summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-03-14 03:45:56 +0000
committerMike Frysinger <vapier@gentoo.org>2007-03-14 03:45:56 +0000
commit524fcc49dd97810fbf5ab1a687e21a49506464dc (patch)
tree82fbf948c8a7ccf76b5a35ebfad53bb4bb6d0f6d /utils
parentd8a1759c47f6ebdcf0c7ffd4a327733fe183f7ce (diff)
more ifdef tweaks from holin (#1247) for retarded hosts (like OS X)
Diffstat (limited to 'utils')
-rw-r--r--utils/bswap.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/utils/bswap.h b/utils/bswap.h
index 302b1673f..183fce5c2 100644
--- a/utils/bswap.h
+++ b/utils/bswap.h
@@ -8,6 +8,12 @@
#if !defined(__BYTE_ORDER) && defined(BYTE_ORDER)
# define __BYTE_ORDER BYTE_ORDER
+# if !defined(__BIG_ENDIAN) && defined(BIG_ENDIAN)
+# define __BIG_ENDIAN BIG_ENDIAN
+# endif
+# if !defined(__LITTLE_ENDIAN) && defined(LITTLE_ENDIAN)
+# define __LITTLE_ENDIAN LITTLE_ENDIAN
+# endif
#endif
#ifndef __BYTE_ORDER
@@ -18,11 +24,11 @@
# define __BIG_ENDIAN 4321 /* most-significant byte first (IBM, net) */
# define __PDP_ENDIAN 3412 /* LSB first in word, MSW first in long (pdp) */
-# if defined(sun386) || defined(i386)
+# if defined(sun386) || defined(i386) || defined(__LITTLE_ENDIAN__)
# define __BYTE_ORDER __LITTLE_ENDIAN
# endif
-# if defined(sparc)
+# if defined(sparc) || defined(__BIG_ENDIAN__)
# define __BYTE_ORDER __BIG_ENDIAN
# endif