Add endianness configuration block for GCC.
Previously GCC using libc++ would just leak endian.h for every include. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@247827 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
41a04d69c4
commit
2897e786b4
@ -64,6 +64,16 @@
|
|||||||
#endif // __BIG_ENDIAN__
|
#endif // __BIG_ENDIAN__
|
||||||
#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__
|
#ifdef __FreeBSD__
|
||||||
# include <sys/endian.h>
|
# include <sys/endian.h>
|
||||||
# if _BYTE_ORDER == _LITTLE_ENDIAN
|
# if _BYTE_ORDER == _LITTLE_ENDIAN
|
||||||
|
Loading…
x
Reference in New Issue
Block a user