jpeg-turbo: resolve some conflicts to fix poppler build
poppler uses both windows.h and jpeg headers, so runs into the conflict between Win32 definitions of boolean, INT16, INT32, and jpeg's. Tweak jpeg-turbo headers so it uses the Win32 definitions. Change-Id: I2dc2b35a8d08d521c95494e528c1e47ccbfc390a
This commit is contained in:
parent
8cef9b4dba
commit
f2761b62b3
28
external/jpeg-turbo/jpeg-turbo.win_build.patch.1
vendored
28
external/jpeg-turbo/jpeg-turbo.win_build.patch.1
vendored
@ -1,3 +1,7 @@
|
||||
Copy definitions of "boolean", "INT16", "INT32" from win/jconfig.h.in
|
||||
|
||||
... into jconfig.h.in, which is the one we use via configure.
|
||||
|
||||
diff -ru jpeg-turbo.orig/simd/Makefile.in jpeg-turbo/simd/Makefile.in
|
||||
--- jpeg-turbo.orig/simd/Makefile.in 2015-09-21 20:48:45.000000000 +0200
|
||||
+++ jpeg-turbo/simd/Makefile.in 2015-11-22 10:52:46.975285184 +0100
|
||||
@ -24,3 +28,27 @@ diff -ru jpeg-turbo.orig/configure jpeg-turbo/configure
|
||||
|
||||
fi
|
||||
done
|
||||
--- jpeg-turbo/jconfig.h.in.orig 2016-11-02 22:43:55.012600000 +0100
|
||||
+++ jpeg-turbo/jconfig.h.in 2016-11-02 22:45:01.905400000 +0100
|
||||
@@ -71,3 +71,21 @@
|
||||
|
||||
/* The size of `size_t', as computed by sizeof. */
|
||||
#undef SIZEOF_SIZE_T
|
||||
+
|
||||
+#ifdef _MSC_VER
|
||||
+
|
||||
+/* Define "boolean" as unsigned char, not int, per Windows custom */
|
||||
+#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
|
||||
+typedef unsigned char boolean;
|
||||
+#endif
|
||||
+#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
|
||||
+
|
||||
+/* Define "INT32" as int, not long, per Windows custom */
|
||||
+#if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */
|
||||
+typedef short INT16;
|
||||
+typedef signed int INT32;
|
||||
+#endif
|
||||
+#define XMD_H /* prevent jmorecfg.h from redefining it */
|
||||
+
|
||||
+#endif /* _MSC_VER */
|
||||
+
|
||||
|
Loading…
x
Reference in New Issue
Block a user