about summary refs log tree commit diff
path: root/REORG.TODO/sysdeps/mips/bits/endian.h
diff options
context:
space:
mode:
Diffstat (limited to 'REORG.TODO/sysdeps/mips/bits/endian.h')
-rw-r--r--REORG.TODO/sysdeps/mips/bits/endian.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/REORG.TODO/sysdeps/mips/bits/endian.h b/REORG.TODO/sysdeps/mips/bits/endian.h
new file mode 100644
index 0000000000..126059799d
--- /dev/null
+++ b/REORG.TODO/sysdeps/mips/bits/endian.h
@@ -0,0 +1,15 @@
+/* The MIPS architecture has selectable endianness.
+   It exists in both little and big endian flavours and we
+   want to be able to share the installed header files 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
+#endif
+#ifdef __MIPSEL
+# define __BYTE_ORDER __LITTLE_ENDIAN
+#endif