Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jun 2010 05:21:29 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r209089 - stable/8/lib/liblzma
Message-ID:  <201006120521.o5C5LTIt000431@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Sat Jun 12 05:21:29 2010
New Revision: 209089
URL: http://svn.freebsd.org/changeset/base/209089

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

Modified:
  stable/8/lib/liblzma/config.h
Directory Properties:
  stable/8/lib/liblzma/   (props changed)

Modified: stable/8/lib/liblzma/config.h
==============================================================================
--- stable/8/lib/liblzma/config.h	Sat Jun 12 05:16:37 2010	(r209088)
+++ stable/8/lib/liblzma/config.h	Sat Jun 12 05:21:29 2010	(r209089)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006120521.o5C5LTIt000431>