forked from OSchip/llvm-project
builtins: avoid endian.h in favour of compiler builtins
Use the __BYTE_ORDER__ macro which has been available in GCC since 4.6 and is available in clang as well. llvm-svn: 220626
This commit is contained in:
parent
d0b6a4ac67
commit
d888169d75
|
@ -85,15 +85,14 @@
|
|||
/* .. */
|
||||
|
||||
#if defined(__linux__)
|
||||
#include <endian.h>
|
||||
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
#define _YUGA_LITTLE_ENDIAN 0
|
||||
#define _YUGA_BIG_ENDIAN 1
|
||||
#elif __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
#define _YUGA_LITTLE_ENDIAN 1
|
||||
#define _YUGA_BIG_ENDIAN 0
|
||||
#endif /* __BYTE_ORDER */
|
||||
#endif /* __BYTE_ORDER__ */
|
||||
|
||||
#endif /* GNU/Linux */
|
||||
|
||||
|
|
Loading…
Reference in New Issue