summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2011-10-04 10:50:47 +1000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2011-10-06 22:22:25 +0200
commitc13e46c982133482f32352c5a845978a5f076116 (patch)
tree78bb6acc2e632d14b6a5488a4b134a96690ec06a /libc/sysdeps/linux
parent3655ce8f050c819135302dbe5ace41c06c68bdb9 (diff)
microblaze can be either big or little endian
Signed-off-by: Steve Bennett <steveb@workware.net.au> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/microblaze/bits/endian.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/microblaze/bits/endian.h b/libc/sysdeps/linux/microblaze/bits/endian.h
index 8a4f6efcc..56fcd5dd9 100644
--- a/libc/sysdeps/linux/microblaze/bits/endian.h
+++ b/libc/sysdeps/linux/microblaze/bits/endian.h
@@ -17,4 +17,11 @@
# error "Never use <bits/endian.h> directly; include <endian.h> instead."
#endif
-#define __BYTE_ORDER __BIG_ENDIAN
+/* Note: Toolchain supplies _BIG_ENDIAN or _LITTLE_ENDIAN */
+#if defined(_BIG_ENDIAN)
+# define __BYTE_ORDER __BIG_ENDIAN
+#elif defined(_LITTLE_ENDIAN)
+# define __BYTE_ORDER __LITTLE_ENDIAN
+#else
+# error "Endianness is unknown"
+#endif