summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_arch.h
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2005-09-08 09:30:05 +0400
committerNathan Scott <nathans@sgi.com>2005-09-08 09:30:05 +0400
commitf016bad6be720496b5582a59738bca00a26f876c (patch)
tree2a99f1eec64972538fc10b13e8076ff4b7c17e0c /fs/xfs/xfs_arch.h
parentcaf39e87cc1182f7dae84eefc43ca14d54c78ef9 (diff)
downloadlinux-f016bad6be720496b5582a59738bca00a26f876c.tar.xz
[XFS] Cleanup some -Wundef flag warnings in the endian macros (thanks
Christoph). SGI-PV: 942400 SGI-Modid: xfs-linux-melb:xfs-kern:23771a Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_arch.h')
-rw-r--r--fs/xfs/xfs_arch.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/fs/xfs/xfs_arch.h b/fs/xfs/xfs_arch.h
index ae35189b3d70..5ab0dd885b1b 100644
--- a/fs/xfs/xfs_arch.h
+++ b/fs/xfs/xfs_arch.h
@@ -40,22 +40,28 @@
#include <asm/byteorder.h>
-#ifdef __LITTLE_ENDIAN
-# define __BYTE_ORDER __LITTLE_ENDIAN
-#endif
#ifdef __BIG_ENDIAN
-# define __BYTE_ORDER __BIG_ENDIAN
+#define XFS_NATIVE_HOST 1
+#else
+#undef XFS_NATIVE_HOST
+#endif
+
+#else /* __KERNEL__ */
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+#define XFS_NATIVE_HOST 1
+#else
+#undef XFS_NATIVE_HOST
#endif
#endif /* __KERNEL__ */
/* do we need conversion? */
-
#define ARCH_NOCONVERT 1
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-# define ARCH_CONVERT 0
-#else
+#ifdef XFS_NATIVE_HOST
# define ARCH_CONVERT ARCH_NOCONVERT
+#else
+# define ARCH_CONVERT 0
#endif
/* generic swapping macros */