summaryrefslogtreecommitdiff
path: root/src/shared/architecture.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-11 15:56:16 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-11 15:56:16 +0200
commit4f4b92ba7ae9c56cb0f181d5f95d709e085b8bd5 (patch)
treeb50f5df4563b99d893c88d5ed9bd58d88c8ac04f /src/shared/architecture.h
parentce0f1493c399178a3c7796415bfe5abd105ad610 (diff)
always check for __BYTE_ORDER == __BIG_ENDIAN when checking for endianess
Let's always stick to glibc's way to determine byte order, and not mix autoconf-specific checks with gcc checks.
Diffstat (limited to 'src/shared/architecture.h')
-rw-r--r--src/shared/architecture.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shared/architecture.h b/src/shared/architecture.h
index 4821d5d289..58e97e5744 100644
--- a/src/shared/architecture.h
+++ b/src/shared/architecture.h
@@ -80,7 +80,7 @@ Architecture uname_architecture(void);
# define native_architecture() ARCHITECTURE_X86
# define LIB_ARCH_TUPLE "i386-linux-gnu"
#elif defined(__powerpc64__)
-# if defined(WORDS_BIGENDIAN)
+# if __BYTE_ORDER == __BIG_ENDIAN
# define native_architecture() ARCHITECTURE_PPC64
# define LIB_ARCH_TUPLE "ppc64-linux-gnu"
# else
@@ -88,7 +88,7 @@ Architecture uname_architecture(void);
# error "Missing LIB_ARCH_TUPLE for PPC64LE"
# endif
#elif defined(__powerpc__)
-# if defined(WORDS_BIGENDIAN)
+# if __BYTE_ORDER == __BIG_ENDIAN
# define native_architecture() ARCHITECTURE_PPC
# define LIB_ARCH_TUPLE "powerpc-linux-gnu"
# else
@@ -117,7 +117,7 @@ Architecture uname_architecture(void);
# define native_architecture() ARCHITECTURE_SPARC
# define LIB_ARCH_TUPLE "sparc-linux-gnu"
#elif defined(__mips64__)
-# if defined(WORDS_BIGENDIAN)
+# if __BYTE_ORDER == __BIG_ENDIAN
# define native_architecture() ARCHITECTURE_MIPS64
# error "Missing LIB_ARCH_TUPLE for MIPS64"
# else
@@ -125,7 +125,7 @@ Architecture uname_architecture(void);
# error "Missing LIB_ARCH_TUPLE for MIPS64_LE"
# endif
#elif defined(__mips__)
-# if defined(WORDS_BIGENDIAN)
+# if __BYTE_ORDER == __BIG_ENDIAN
# define native_architecture() ARCHITECTURE_MIPS
# define LIB_ARCH_TUPLE "mips-linux-gnu"
# else
@@ -136,7 +136,7 @@ Architecture uname_architecture(void);
# define native_architecture() ARCHITECTURE_ALPHA
# define LIB_ARCH_TUPLE "alpha-linux-gnu"
#elif defined(__aarch64__)
-# if defined(WORDS_BIGENDIAN)
+# if __BYTE_ORDER == __BIG_ENDIAN
# define native_architecture() ARCHITECTURE_ARM64_BE
# define LIB_ARCH_TUPLE "aarch64_be-linux-gnu"
# else
@@ -144,7 +144,7 @@ Architecture uname_architecture(void);
# define LIB_ARCH_TUPLE "aarch64-linux-gnu"
# endif
#elif defined(__arm__)
-# if defined(WORDS_BIGENDIAN)
+# if __BYTE_ORDER == __BIG_ENDIAN
# define native_architecture() ARCHITECTURE_ARM_BE
# if defined(__ARM_EABI__)
# if defined(__ARM_PCS_VFP)