[compiler-rt] r188613 - Fix endian conditions on Solaris. From Alexander Esilevich.
Joerg Sonnenberger
joerg at bec.de
Sat Aug 17 15:32:11 PDT 2013
Author: joerg
Date: Sat Aug 17 17:32:10 2013
New Revision: 188613
URL: http://llvm.org/viewvc/llvm-project?rev=188613&view=rev
Log:
Fix endian conditions on Solaris. From Alexander Esilevich.
Modified:
compiler-rt/trunk/lib/int_endianness.h
Modified: compiler-rt/trunk/lib/int_endianness.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/int_endianness.h?rev=188613&r1=188612&r2=188613&view=diff
==============================================================================
--- compiler-rt/trunk/lib/int_endianness.h (original)
+++ compiler-rt/trunk/lib/int_endianness.h Sat Aug 17 17:32:10 2013
@@ -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. */
More information about the llvm-commits
mailing list