summaryrefslogtreecommitdiff
path: root/external/libjpeg-turbo/jpeg-turbo.win_build.patch.1
blob: 00b642703f3a7d29a90e48d5db647f2fc9cd953c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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
@@ -769,8 +769,8 @@
 .asm.lo:
 	$(AM_V_GEN) $(LIBTOOL) $(AM_V_lt) --mode=compile --tag NASM $(srcdir)/nasm_lt.sh $(AM_V_lt) $(NASM) $(NAFLAGS) -I$(srcdir) -I. $< -o $@
 
-jsimdcfg.inc: $(srcdir)/jsimdcfg.inc.h ../jpeglib.h ../jconfig.h ../jmorecfg.h
-	$(AM_V_GEN) $(CPP) -I$(top_builddir) -I$(top_builddir)/simd $(srcdir)/jsimdcfg.inc.h | $(EGREP) "^[\;%]|^\ %" | sed 's%_cpp_protection_%%' | sed 's@% define@%define@g' > $@
+jsimdcfg.inc: $(top_srcdir)/win/jsimdcfg.inc
+	cp $< $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff -ru jpeg-turbo.orig/configure jpeg-turbo/configure
--- jpeg-turbo.orig/configure   2015-11-22 15:57:23.702656000 +0100
+++ jpeg-turbo/configure        2015-11-22 15:59:37.084285000 +0100
@@ -13931,7 +13931,7 @@

 else

-$as_echo "#define NEED_BSD_STRINGS 1" >>confdefs.h
+$as_echo "#undef NEED_BSD_STRINGS" >>confdefs.h

 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 @@
 
 /* Define to `unsigned int' if <sys/types.h> does not define. */
 #undef 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 */
+