Ken McGuire's patch to make mke2fs and e2fsck work on big endian systems like
PPC, with an obligatory couple of swipes from me.
This commit is contained in:
@@ -34,7 +34,7 @@ extern "C" {
|
||||
* has been configured or if we're being built on a CPU architecture
|
||||
* with a non-native byte order.
|
||||
*/
|
||||
#if defined(ENABLE_SWAPFS) || defined(WORDS_BIGENDIAN)
|
||||
#if defined(ENABLE_SWAPFS) || defined(WORDS_BIGENDIAN) || __BYTE_ORDER== __BIG_ENDIAN
|
||||
#define EXT2FS_ENABLE_SWAPFS
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* native.c --- returns the ext2_flag for a native byte order
|
||||
*
|
||||
* Copyright (C) 1996 Theodore Ts'o.
|
||||
*
|
||||
* %Begin-Header%
|
||||
* This file may be redistributed under the terms of the GNU Public
|
||||
* License.
|
||||
* %End-Header%
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "ext2_fs.h"
|
||||
#include "ext2fs.h"
|
||||
|
||||
int ext2fs_native_flag(void)
|
||||
{
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
return EXT2_FLAG_SWAP_BYTES;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user