Author: delphij
Date: Fri Jun 11 22:29:49 2010
New Revision: 209078
URL: http://svn.freebsd.org/changeset/base/209078

Log:
  Detect bit endianness through machine/endian.h.  This fixes xz on big-endian
  systems.
  
  Tested on:    sparc64 (kindly provided by linimon), amd64

Modified:
  head/lib/liblzma/config.h

Modified: head/lib/liblzma/config.h
==============================================================================
--- head/lib/liblzma/config.h   Fri Jun 11 22:25:50 2010        (r209077)
+++ head/lib/liblzma/config.h   Fri Jun 11 22:29:49 2010        (r209078)
@@ -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
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to