forked from OSchip/llvm-project
Add endianness configuration block for GCC.
Previously GCC using libc++ would just leak endian.h for every include. llvm-svn: 247827
This commit is contained in:
parent
dd07e00dbc
commit
5e61cfdb9e
|
@ -64,6 +64,16 @@
|
|||
#endif // __BIG_ENDIAN__
|
||||
#endif // __BIG_ENDIAN__
|
||||
|
||||
#ifdef __BYTE_ORDER__
|
||||
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
#define _LIBCPP_LITTLE_ENDIAN 1
|
||||
#define _LIBCPP_BIG_ENDIAN 0
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
#define _LIBCPP_LITTLE_ENDIAN 0
|
||||
#define _LIBCPP_BIG_ENDIAN 1
|
||||
#endif // __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
#endif // __BYTE_ORDER__
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
# include <sys/endian.h>
|
||||
# if _BYTE_ORDER == _LITTLE_ENDIAN
|
||||
|
|
Loading…
Reference in New Issue