ports/java/openjdk7/files/patch-src-share-native-com-sun-java-util-jar-pack-zip.cpp
Greg Lewis 49d7c249aa . Fix unpack200 on i386/amd64 by only swapping bytes when this is actually
a big endian machine. [1]
. Bump PORTREVISION for the fix.
. Speed up the build on multi-core machines using the MAKE_JOBS trickery
  from the openjdk8 Makefile.
. Enlist openjdk7 users as testers of ant 1.9.4.
. Add a dependency on fontconfig.

PR:		191735 [1]
Requested by:	Michael Schmiedgen <schmiedgen@takwa.de> [2]
2014-07-12 17:36:17 +00:00

22 lines
542 B
C++

--- jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp.orig 2014-07-12 09:24:56.000000000 -0700
+++ jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp 2014-07-12 09:28:38.000000000 -0700
@@ -33,6 +33,10 @@
#include <stdlib.h>
+#ifdef _ALLBSD_SOURCE
+#include <machine/endian.h>
+#endif
+
#ifndef _MSC_VER
#include <strings.h>
#endif
@@ -62,7 +66,7 @@
#endif // End of ZLIB
-#ifdef _BIG_ENDIAN
+#if (BYTE_ORDER == BIG_ENDIAN)
#define SWAP_BYTES(a) \
((((a) << 8) & 0xff00) | 0x00ff) & (((a) >> 8) | 0xff00)
#else