diff options
| author | Dan Albert <danalbert@google.com> | 2015-09-16 18:10:47 +0000 |
|---|---|---|
| committer | Dan Albert <danalbert@google.com> | 2015-09-16 18:10:47 +0000 |
| commit | 5e61cfdb9e229c019118667d0c8f9a3d1f536356 (patch) | |
| tree | a931b421c06b5de0d31a2e24b70fbaa86676a295 /libcxx | |
| parent | dd07e00dbcf52047a81eb675c900c119ca813c6c (diff) | |
| download | bcm5719-llvm-5e61cfdb9e229c019118667d0c8f9a3d1f536356.tar.gz bcm5719-llvm-5e61cfdb9e229c019118667d0c8f9a3d1f536356.zip | |
Add endianness configuration block for GCC.
Previously GCC using libc++ would just leak endian.h for every
include.
llvm-svn: 247827
Diffstat (limited to 'libcxx')
| -rw-r--r-- | libcxx/include/__config | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config index 76675008605..e951f9b11ec 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -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 |

