aboutsummaryrefslogtreecommitdiff
path: root/system/include/libc/machine/endian.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-05 11:32:10 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-05 11:32:10 -0800
commit5ad5df53ba7dc0ce890acabed3388c6c2ca6077d (patch)
tree2c6941aa54b3eb36a0323a3edafb0be7d17927ad /system/include/libc/machine/endian.h
parent048cb329be8de531a7f427c95187fae1f86f24a7 (diff)
parent6b72b402328e0f4eb62bdd3bd8bde72d3cf7a464 (diff)
Merge pull request #162 from jterrace/incoming
Endianness, cross-compiling, and missing headers
Diffstat (limited to 'system/include/libc/machine/endian.h')
-rw-r--r--system/include/libc/machine/endian.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/system/include/libc/machine/endian.h b/system/include/libc/machine/endian.h
index 07ebc8f6..cec97a7b 100644
--- a/system/include/libc/machine/endian.h
+++ b/system/include/libc/machine/endian.h
@@ -9,6 +9,13 @@
#define LITTLE_ENDIAN 1234
#endif
+#ifndef __LITTLE_ENDIAN
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
+#endif
+#ifndef __BIG_ENDIAN
+#define __BIG_ENDIAN BIG_ENDIAN
+#endif
+
#ifndef BYTE_ORDER
#if defined(__IEEE_LITTLE_ENDIAN) || defined(__IEEE_BYTES_LITTLE_ENDIAN)
#define BYTE_ORDER LITTLE_ENDIAN
@@ -17,4 +24,8 @@
#endif
#endif
+#ifndef __BYTE_ORDER
+#define __BYTE_ORDER BYTE_ORDER
+#endif
+
#endif /* __MACHINE_ENDIAN_H__ */