xfs
[Top] [All Lists]

[PATCH] XFS #if abuses

To: torvalds@xxxxxxxx
Subject: [PATCH] XFS #if abuses
From: viro@xxxxxxxxxxxxxxxx
Date: Sun, 29 Aug 2004 06:52:49 +0100
Cc: linux-xfs@xxxxxxxxxxx
Sender: linux-xfs-bounce@xxxxxxxxxxx
Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxxxxxxxx>
----
diff -urN RC9-rc1-bk4-pcm/fs/xfs/xfs_arch.h RC9-rc1-bk4-xfs/fs/xfs/xfs_arch.h
--- RC9-rc1-bk4-pcm/fs/xfs/xfs_arch.h   Sat Aug 14 03:46:32 2004
+++ RC9-rc1-bk4-xfs/fs/xfs/xfs_arch.h   Sat Aug 28 23:21:33 2004
@@ -52,7 +52,7 @@
 /* do we need conversion? */
 
 #define ARCH_NOCONVERT 1
-#if __BYTE_ORDER == __LITTLE_ENDIAN
+#ifdef __LITTLE_ENDIAN
 # define ARCH_CONVERT  0
 #else
 # define ARCH_CONVERT  ARCH_NOCONVERT
@@ -123,7 +123,7 @@
  * now pick the right ones for our MACHINE ARCHITECTURE
  */
 
-#if __BYTE_ORDER == __LITTLE_ENDIAN
+#ifdef __LITTLE_ENDIAN
 #define INT_GET_UNALIGNED_16(pointer)      INT_GET_UNALIGNED_16_LE(pointer)
 #define INT_SET_UNALIGNED_16(pointer,value) 
INT_SET_UNALIGNED_16_LE(pointer,value)
 #define INT_GET_UNALIGNED_32(pointer)      INT_GET_UNALIGNED_32_LE(pointer)
@@ -251,7 +251,7 @@
     )
 #else
 /* MACHINE ARCHITECTURE dependent */
-#if __BYTE_ORDER == __LITTLE_ENDIAN
+#ifdef __LITTLE_ENDIAN
 #define DIRINO_GET_ARCH(pointer,arch) \
     DIRINO4_GET_ARCH((((__u8*)pointer)+4),arch)
 #else
diff -urN RC9-rc1-bk4-pcm/fs/xfs/xfs_bmap_btree.h 
RC9-rc1-bk4-xfs/fs/xfs/xfs_bmap_btree.h
--- RC9-rc1-bk4-pcm/fs/xfs/xfs_bmap_btree.h     Tue Aug 24 10:38:11 2004
+++ RC9-rc1-bk4-xfs/fs/xfs/xfs_bmap_btree.h     Sat Aug 28 23:21:38 2004
@@ -62,7 +62,7 @@
  *  l1:0-20 are blockcount.
  */
 
-#if __BYTE_ORDER == __LITTLE_ENDIAN
+#ifdef __LITTLE_ENDIAN
 
 #define BMBT_TOTAL_BITLEN      128     /* 128 bits, 16 bytes */
 #define BMBT_EXNTFLAG_BITOFF   0
diff -urN RC9-rc1-bk4-pcm/fs/xfs/xfs_dir_leaf.h 
RC9-rc1-bk4-xfs/fs/xfs/xfs_dir_leaf.h
--- RC9-rc1-bk4-pcm/fs/xfs/xfs_dir_leaf.h       Mon May  5 03:28:10 2003
+++ RC9-rc1-bk4-xfs/fs/xfs/xfs_dir_leaf.h       Sat Aug 28 23:21:44 2004
@@ -127,7 +127,7 @@
         * Watch the order here (endian-ness dependent).
         */
        struct {
-#if __BYTE_ORDER == __LITTLE_ENDIAN
+#ifdef __LITTLE_ENDIAN
                xfs_dahash_t    h;      /* hash value */
                __uint32_t      be;     /* block and entry */
 #else  /* __BYTE_ORDER == __BIG_ENDIAN */
diff -urN RC9-rc1-bk4-pcm/fs/xfs/xfs_log.h RC9-rc1-bk4-xfs/fs/xfs/xfs_log.h
--- RC9-rc1-bk4-pcm/fs/xfs/xfs_log.h    Wed Feb  4 05:23:21 2004
+++ RC9-rc1-bk4-xfs/fs/xfs/xfs_log.h    Sat Aug 28 23:21:51 2004
@@ -32,7 +32,7 @@
 #ifndef        __XFS_LOG_H__
 #define __XFS_LOG_H__
 
-#if __BYTE_ORDER == __LITTLE_ENDIAN
+#ifdef __LITTLE_ENDIAN
 #define LSN_FIELD_CYCLE(arch) (((arch)==ARCH_NOCONVERT)?1:0)
 #define LSN_FIELD_BLOCK(arch) (((arch)==ARCH_NOCONVERT)?0:1)
 #else
diff -urN RC9-rc1-bk4-pcm/fs/xfs/xfs_log_priv.h 
RC9-rc1-bk4-xfs/fs/xfs/xfs_log_priv.h
--- RC9-rc1-bk4-pcm/fs/xfs/xfs_log_priv.h       Tue Aug 24 10:38:11 2004
+++ RC9-rc1-bk4-xfs/fs/xfs/xfs_log_priv.h       Sat Aug 28 23:21:55 2004
@@ -112,7 +112,7 @@
  * this has endian issues, of course.
  */
 
-#if __BYTE_ORDER == __LITTLE_ENDIAN
+#ifdef __LITTLE_ENDIAN
 #define GET_CLIENT_ID(i,arch) \
     ((i) & 0xff)
 #else
@@ -366,10 +366,10 @@
 #define XLOG_FMT_IRIX_BE  3
 
 /* our fmt */
-#if __BYTE_ORDER == __LITTLE_ENDIAN
+#ifdef __LITTLE_ENDIAN
 #define XLOG_FMT XLOG_FMT_LINUX_LE
 #else
-#if __BYTE_ORDER == __BIG_ENDIAN
+#ifdef __BIG_ENDIAN
 #define XLOG_FMT XLOG_FMT_LINUX_BE
 #else
 #error unknown byte order


<Prev in Thread] Current Thread [Next in Thread>