aboutsummaryrefslogtreecommitdiff
path: root/ports/sysdeps/unix/sysv/linux/mips/bits/endian.h
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-07-01 13:06:41 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-07-01 13:06:41 +0000
commite64ac02c24b43659048622714afdc92fedf561fa (patch)
tree37162878b72d302de351788bec4c9360c9d55f1d /ports/sysdeps/unix/sysv/linux/mips/bits/endian.h
parenta20c2b3c87aebc7d4b090c622d36480263b80042 (diff)
downloadglibc-e64ac02c24b43659048622714afdc92fedf561fa.tar
glibc-e64ac02c24b43659048622714afdc92fedf561fa.tar.gz
glibc-e64ac02c24b43659048622714afdc92fedf561fa.tar.bz2
glibc-e64ac02c24b43659048622714afdc92fedf561fa.zip
Move all files into ports/ subdirectory in preparation for merge with glibcglibc-2.16-ports-before-merge
Diffstat (limited to 'ports/sysdeps/unix/sysv/linux/mips/bits/endian.h')
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/bits/endian.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/ports/sysdeps/unix/sysv/linux/mips/bits/endian.h b/ports/sysdeps/unix/sysv/linux/mips/bits/endian.h
new file mode 100644
index 0000000000..0a3d2fabe3
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/mips/bits/endian.h
@@ -0,0 +1,16 @@
+/* The MIPS architecture has selectable endianness.
+ Linux/MIPS exists in two both little and big endian flavours and we
+ want to be able to share the installed headerfiles between both,
+ so we define __BYTE_ORDER based on GCC's predefines. */
+
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
+#ifdef __MIPSEB__
+# define __BYTE_ORDER __BIG_ENDIAN
+#else
+# ifdef __MIPSEL__
+# define __BYTE_ORDER __LITTLE_ENDIAN
+# endif
+#endif