summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/sparc/bits/endian.h
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-11-14 07:41:08 +0000
committerEric Andersen <andersen@codepoet.org>2001-11-14 07:41:08 +0000
commita5cc55111f77315fc7e04613772237b52a3dbfdf (patch)
treeea62d66b343dbc91de8ab529c8983021a18eda7d /libc/sysdeps/linux/sparc/bits/endian.h
parentc4990c6859a4caab9710a07a0c9052c57a1d11d4 (diff)
Sync up sparc headers
Diffstat (limited to 'libc/sysdeps/linux/sparc/bits/endian.h')
-rw-r--r--libc/sysdeps/linux/sparc/bits/endian.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/sparc/bits/endian.h b/libc/sysdeps/linux/sparc/bits/endian.h
index 68fc68de6..8acfdf5df 100644
--- a/libc/sysdeps/linux/sparc/bits/endian.h
+++ b/libc/sysdeps/linux/sparc/bits/endian.h
@@ -1,7 +1,12 @@
-/* SPARC is big-endian. */
+/* Sparc is big-endian, but v9 supports endian conversion on loads/stores
+ and GCC supports such a mode. Be prepared. */
#ifndef _ENDIAN_H
# error "Never use <bits/endian.h> directly; include <endian.h> instead."
#endif
-#define __BYTE_ORDER __BIG_ENDIAN
+#ifdef __LITTLE_ENDIAN__
+# define __BYTE_ORDER __LITTLE_ENDIAN
+#else
+# define __BYTE_ORDER __BIG_ENDIAN
+#endif