summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/system/ByteOrder.hxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/system/ByteOrder.hxx b/src/system/ByteOrder.hxx
index d4cf454c9..edeeb31c3 100644
--- a/src/system/ByteOrder.hxx
+++ b/src/system/ByteOrder.hxx
@@ -52,6 +52,15 @@
# define IS_LITTLE_ENDIAN false
# define IS_BIG_ENDIAN true
# endif
+#elif defined(__BYTE_ORDER__)
+/* GCC-specific macros */
+# if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+# define IS_LITTLE_ENDIAN true
+# define IS_BIG_ENDIAN false
+# else
+# define IS_LITTLE_ENDIAN false
+# define IS_BIG_ENDIAN true
+# endif
#else
/* generic compile-time check */
# include <endian.h>