summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/sh/bits/endian.h
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-02-21 18:58:30 +0000
committerEric Andersen <andersen@codepoet.org>2001-02-21 18:58:30 +0000
commit36970cc69149ef3a3f32d57663a14adedaebcbb9 (patch)
treea82e8df0bf9a6771c4b27f9f15c5a2844e8f81ea /libc/sysdeps/linux/sh/bits/endian.h
parent93ccb0356b10af44f620ec035fb76fa8a1165c22 (diff)
Add an SH port done by Jean-Yves Avenard of Hewlett-Packard - Embedded
and Personal Systems. Thanks! -Erik
Diffstat (limited to 'libc/sysdeps/linux/sh/bits/endian.h')
-rw-r--r--libc/sysdeps/linux/sh/bits/endian.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/sh/bits/endian.h b/libc/sysdeps/linux/sh/bits/endian.h
new file mode 100644
index 000000000..1fef1ff93
--- /dev/null
+++ b/libc/sysdeps/linux/sh/bits/endian.h
@@ -0,0 +1,13 @@
+/* SH is bi-endian but with a big-endian FPU. */
+
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
+#ifdef __LITTLE_ENDIAN__
+#define __BYTE_ORDER __LITTLE_ENDIAN
+#define __FLOAT_WORD_ORDER __LITTLE_ENDIAN
+#else
+#define __BYTE_ORDER __BIG_ENDIAN
+#define __FLOAT_WORD_ORDER __BIG_ENDIAN
+#endif