summaryrefslogtreecommitdiffstats
path: root/compiler-rt
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2013-08-17 22:32:10 +0000
committerJoerg Sonnenberger <joerg@bec.de>2013-08-17 22:32:10 +0000
commit9dce26947e3bd5da661f96a77d32c01b0413fd5f (patch)
tree7834ced6fa265e3cc0619ac537df7f3bd7a3eeaa /compiler-rt
parent949939cdbb2dfcc13a6c67c8e85b4843a38ecb82 (diff)
downloadbcm5719-llvm-9dce26947e3bd5da661f96a77d32c01b0413fd5f.tar.gz
bcm5719-llvm-9dce26947e3bd5da661f96a77d32c01b0413fd5f.zip
Fix endian conditions on Solaris. From Alexander Esilevich.
llvm-svn: 188613
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/lib/int_endianness.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler-rt/lib/int_endianness.h b/compiler-rt/lib/int_endianness.h
index edb58c810e2..a64f926478c 100644
--- a/compiler-rt/lib/int_endianness.h
+++ b/compiler-rt/lib/int_endianness.h
@@ -19,13 +19,15 @@
#if defined(__SVR4) && defined(__sun)
#include <sys/byteorder.h>
-#if _BYTE_ORDER == _BIG_ENDIAN
+#if defined(_BIG_ENDIAN)
#define _YUGA_LITTLE_ENDIAN 0
#define _YUGA_BIG_ENDIAN 1
-#elif _BYTE_ORDER == _LITTLE_ENDIAN
+#elif defined(_LITTLE_ENDIAN)
#define _YUGA_LITTLE_ENDIAN 1
#define _YUGA_BIG_ENDIAN 0
-#endif /* _BYTE_ORDER */
+#else /* !_LITTLE_ENDIAN */
+#error "unknown endianness"
+#endif /* !_LITTLE_ENDIAN */
#endif /* Solaris and AuroraUX. */
OpenPOWER on IntegriCloud