Module Name: src
Committed By: riz
Date: Wed Jul 4 19:45:31 UTC 2012
Modified Files:
src/external/public-domain/xz [netbsd-6]: prepare-import.sh
src/external/public-domain/xz/include [netbsd-6]: config.h
Log Message:
Pull up following revision(s) (requested by jdc in ticket #378):
external/public-domain/xz/prepare-import.sh: revision 1.3
external/public-domain/xz/include/config.h: revision 1.2
Determine WORDS_BIGENDIAN at build time, rather than hardcoding it to 0.
Makes liblzma work on sparc64 (and probably other big endian hosts too).
Add a note to the import script.
To generate a diff of this commit:
cvs rdiff -u -r1.1.8.1 -r1.1.8.2 \
src/external/public-domain/xz/prepare-import.sh
cvs rdiff -u -r1.1 -r1.1.8.1 src/external/public-domain/xz/include/config.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/public-domain/xz/prepare-import.sh
diff -u src/external/public-domain/xz/prepare-import.sh:1.1.8.1 src/external/public-domain/xz/prepare-import.sh:1.1.8.2
--- src/external/public-domain/xz/prepare-import.sh:1.1.8.1 Wed Mar 7 22:33:25 2012
+++ src/external/public-domain/xz/prepare-import.sh Wed Jul 4 19:45:31 2012
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: prepare-import.sh,v 1.1.8.1 2012/03/07 22:33:25 riz Exp $
+# $NetBSD: prepare-import.sh,v 1.1.8.2 2012/07/04 19:45:31 riz Exp $
set -e
@@ -31,3 +31,12 @@ done
# build-aux/* from autoconf
# lib/*
# m4/*
+
+# Changes to config.h
+echo Add build-time endian test to include/config.h:
+cat << EOE
+#include <sys/endian.h>
+#if BYTE_ORDER == BIG_ENDIAN
+# define WORDS_BIGENDIAN 1
+#endif
+EOE
Index: src/external/public-domain/xz/include/config.h
diff -u src/external/public-domain/xz/include/config.h:1.1 src/external/public-domain/xz/include/config.h:1.1.8.1
--- src/external/public-domain/xz/include/config.h:1.1 Tue Nov 2 16:34:36 2010
+++ src/external/public-domain/xz/include/config.h Wed Jul 4 19:45:31 2012
@@ -286,14 +286,9 @@
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
+#include <sys/endian.h>
+#if BYTE_ORDER == BIG_ENDIAN
# define WORDS_BIGENDIAN 1
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-/* # undef WORDS_BIGENDIAN */
-# endif
#endif
/* Number of bits in a file offset, on hosts where this is settable. */