about summary refs log tree commit diff
path: root/sysdeps/nios2/bits/endianness.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/nios2/bits/endianness.h')
-rw-r--r--sysdeps/nios2/bits/endianness.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/sysdeps/nios2/bits/endianness.h b/sysdeps/nios2/bits/endianness.h
new file mode 100644
index 0000000000..87e66ebd71
--- /dev/null
+++ b/sysdeps/nios2/bits/endianness.h
@@ -0,0 +1,16 @@
+#ifndef _BITS_ENDIANNESS_H
+#define _BITS_ENDIANNESS_H 1
+
+#ifndef _BITS_ENDIAN_H
+# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
+#endif
+
+/* Nios II has selectable endianness.  */
+#ifdef __nios2_big_endian__
+# define __BYTE_ORDER __BIG_ENDIAN
+#endif
+#ifdef __nios2_little_endian__
+# define __BYTE_ORDER __LITTLE_ENDIAN
+#endif
+
+#endif /* bits/endianness.h */