diff -urN RC13-git7-elf_class/fs/xfs/xfs_arch.h RC13-git7-xfs/fs/xfs/xfs_arch.h --- RC13-git7-elf_class/fs/xfs/xfs_arch.h 2005-06-17 15:48:29.000000000 -0400 +++ RC13-git7-xfs/fs/xfs/xfs_arch.h 2005-09-07 13:55:39.000000000 -0400 @@ -45,6 +45,13 @@ #endif #ifdef __BIG_ENDIAN # define __BYTE_ORDER __BIG_ENDIAN +# define XFS_NATIVE_HOST +#endif + +#else + +#if __BYTE_ORDER == __BIG_ENDIAN +#define XFS_NATIVE_HOST #endif #endif /* __KERNEL__ */ @@ -52,7 +59,7 @@ /* do we need conversion? */ #define ARCH_NOCONVERT 1 -#if __BYTE_ORDER == __LITTLE_ENDIAN +#ifndef XFS_NATIVE_HOST # define ARCH_CONVERT 0 #else # define ARCH_CONVERT ARCH_NOCONVERT diff -urN RC13-git7-elf_class/fs/xfs/xfs_bmap_btree.c RC13-git7-xfs/fs/xfs/xfs_bmap_btree.c --- RC13-git7-elf_class/fs/xfs/xfs_bmap_btree.c 2005-08-28 23:09:47.000000000 -0400 +++ RC13-git7-xfs/fs/xfs/xfs_bmap_btree.c 2005-09-07 13:55:39.000000000 -0400 @@ -2017,7 +2017,7 @@ ext_flag); } -#if __BYTE_ORDER != __BIG_ENDIAN +#ifndef XFS_NATIVE_HOST /* Endian flipping versions of the bmbt extraction functions */ void xfs_bmbt_disk_get_all( @@ -2531,7 +2531,7 @@ #endif /* XFS_BIG_BLKNOS */ } -#if __BYTE_ORDER != __BIG_ENDIAN +#ifndef XFS_NATIVE_HOST /* * Set all the fields in a bmap extent record from the uncompressed form. */ diff -urN RC13-git7-elf_class/fs/xfs/xfs_bmap_btree.h RC13-git7-xfs/fs/xfs/xfs_bmap_btree.h --- RC13-git7-elf_class/fs/xfs/xfs_bmap_btree.h 2005-08-28 23:09:47.000000000 -0400 +++ RC13-git7-xfs/fs/xfs/xfs_bmap_btree.h 2005-09-07 13:55:39.000000000 -0400 @@ -62,7 +62,7 @@ * l1:0-20 are blockcount. */ -#if __BYTE_ORDER == __LITTLE_ENDIAN +#ifndef XFS_NATIVE_HOST #define BMBT_TOTAL_BITLEN 128 /* 128 bits, 16 bytes */ #define BMBT_EXNTFLAG_BITOFF 0 @@ -505,7 +505,7 @@ xfs_bmbt_get_state( xfs_bmbt_rec_t *r); -#if __BYTE_ORDER != __BIG_ENDIAN +#ifndef XFS_NATIVE_HOST void xfs_bmbt_disk_get_all( xfs_bmbt_rec_t *r, @@ -623,7 +623,7 @@ xfs_bmbt_rec_t *r, xfs_exntst_t v); -#if __BYTE_ORDER != __BIG_ENDIAN +#ifndef XFS_NATIVE_HOST void xfs_bmbt_disk_set_all( xfs_bmbt_rec_t *r, diff -urN RC13-git7-elf_class/fs/xfs/xfs_dir_leaf.h RC13-git7-xfs/fs/xfs/xfs_dir_leaf.h --- RC13-git7-elf_class/fs/xfs/xfs_dir_leaf.h 2005-08-28 23:09:47.000000000 -0400 +++ RC13-git7-xfs/fs/xfs/xfs_dir_leaf.h 2005-09-07 13:55:39.000000000 -0400 @@ -127,7 +127,7 @@ * Watch the order here (endian-ness dependent). */ struct { -#if __BYTE_ORDER == __LITTLE_ENDIAN +#ifndef XFS_NATIVE_HOST xfs_dahash_t h; /* hash value */ __uint32_t be; /* block and entry */ #else /* __BYTE_ORDER == __BIG_ENDIAN */ diff -urN RC13-git7-elf_class/fs/xfs/xfs_inode_item.c RC13-git7-xfs/fs/xfs/xfs_inode_item.c --- RC13-git7-elf_class/fs/xfs/xfs_inode_item.c 2005-08-28 23:09:47.000000000 -0400 +++ RC13-git7-xfs/fs/xfs/xfs_inode_item.c 2005-09-07 13:55:39.000000000 -0400 @@ -339,7 +339,7 @@ nrecs = ip->i_df.if_bytes / (uint)sizeof(xfs_bmbt_rec_t); ASSERT(nrecs > 0); -#if __BYTE_ORDER == __BIG_ENDIAN +#ifdef XFS_NATIVE_HOST if (nrecs == ip->i_d.di_nextents) { /* * There are no delayed allocation @@ -467,7 +467,7 @@ #endif ASSERT(nrecs > 0); ASSERT(nrecs == ip->i_d.di_anextents); -#if __BYTE_ORDER == __BIG_ENDIAN +#ifdef XFS_NATIVE_HOST /* * There are not delayed allocation extents * for attributes, so just point at the array. diff -urN RC13-git7-elf_class/fs/xfs/xfs_log_priv.h RC13-git7-xfs/fs/xfs/xfs_log_priv.h --- RC13-git7-elf_class/fs/xfs/xfs_log_priv.h 2005-08-28 23:09:47.000000000 -0400 +++ RC13-git7-xfs/fs/xfs/xfs_log_priv.h 2005-09-07 13:55:39.000000000 -0400 @@ -112,7 +112,7 @@ * this has endian issues, of course. */ -#if __BYTE_ORDER == __LITTLE_ENDIAN +#ifndef XFS_NATIVE_HOST #define GET_CLIENT_ID(i,arch) \ ((i) & 0xff) #else @@ -366,14 +366,10 @@ #define XLOG_FMT_IRIX_BE 3 /* our fmt */ -#if __BYTE_ORDER == __LITTLE_ENDIAN +#ifndef XFS_NATIVE_HOST #define XLOG_FMT XLOG_FMT_LINUX_LE #else -#if __BYTE_ORDER == __BIG_ENDIAN #define XLOG_FMT XLOG_FMT_LINUX_BE -#else -#error unknown byte order -#endif #endif typedef struct xlog_rec_header {