diff options
| author | David Chisnall <csdavec@swan.ac.uk> | 2010-08-11 16:27:20 +0000 |
|---|---|---|
| committer | David Chisnall <csdavec@swan.ac.uk> | 2010-08-11 16:27:20 +0000 |
| commit | 2a072dde4b717af12b74dcd37fad4c12ed1c3e26 (patch) | |
| tree | 12c973bed38f27f2b58310a17ce0553b978fcf33 | |
| parent | de05118c84dd4fc3e612bec263a6f3178cf5d3db (diff) | |
| download | bcm5719-llvm-2a072dde4b717af12b74dcd37fad4c12ed1c3e26.tar.gz bcm5719-llvm-2a072dde4b717af12b74dcd37fad4c12ed1c3e26.zip | |
Include sys/endian.h on FreeBSD and use that to detect the byte order.
llvm-svn: 110824
| -rw-r--r-- | libcxx/include/__config | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config index 42797365b47..c3cf8c7b1b3 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -36,6 +36,17 @@ #endif #endif +#ifdef __FreeBSD__ +# include <sys/endian.h> +# if _BYTE_ORDER == _LITTLE_ENDIAN +# define _LIBCPP_LITTLE_ENDIAN 1 +# define _LIBCPP_BIG_ENDIAN 0 +# else +# define _LIBCPP_LITTLE_ENDIAN 0 +# define _LIBCPP_BIG_ENDIAN 1 +# endif +#endif + #if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN) # include <endian.h> # if __BYTE_ORDER == __LITTLE_ENDIAN |

