diff options
author | Xin LI <delphij@FreeBSD.org> | 2010-06-11 22:29:49 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2010-06-11 22:29:49 +0000 |
commit | 6701e403de244483feff70a678479c7d93538f10 (patch) | |
tree | 58cc460b3297ddcd08cdeefa08b303f950bfb4e6 /lib/liblzma/config.h | |
parent | e0d554dbde9cee0d5ee9c7b84f5dbf4d6f580910 (diff) | |
download | src-6701e403de244483feff70a678479c7d93538f10.tar.gz src-6701e403de244483feff70a678479c7d93538f10.zip |
Detect bit endianness through machine/endian.h. This fixes xz on big-endian
systems.
Tested on: sparc64 (kindly provided by linimon), amd64
Notes
Notes:
svn path=/head/; revision=209078
Diffstat (limited to 'lib/liblzma/config.h')
-rw-r--r-- | lib/liblzma/config.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/liblzma/config.h b/lib/liblzma/config.h index 223cb9574d06..e7b61bb95f98 100644 --- a/lib/liblzma/config.h +++ b/lib/liblzma/config.h @@ -84,6 +84,12 @@ # define __EXTENSIONS__ 1 #endif #define VERSION "4.999.9beta" +#if defined(__FreeBSD__) +#include <machine/endian.h> +#if _BYTE_ORDER == _BIG_ENDIAN +# define WORDS_BIGENDIAN 1 +#endif +#else #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 @@ -93,3 +99,4 @@ /* # undef WORDS_BIGENDIAN */ # endif #endif +#endif |