File jpeg-typedef-boolean.diff of Package mingw32-libjpeg-turbo
Copied by jengelh from mingw32-jpeg/jpeg-8b-typedefs.patch
(unknown original patch author).
This fugly typedef pollutes the namespace, and ultimately
causes a clash with Qt5 trying to define the same typedef
(stupid, too - people should just use the preprovided "bool" type
already).
---
jmorecfg.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
Index: libjpeg-turbo-1.4.0/jmorecfg.h
===================================================================
--- libjpeg-turbo-1.4.0.orig/jmorecfg.h
+++ libjpeg-turbo-1.4.0/jmorecfg.h
@@ -205,7 +205,13 @@ typedef unsigned int JDIMENSION;
* Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
*/
-#ifndef HAVE_BOOLEAN
+#if defined(_WIN32) && !defined(HAVE_BOOLEAN)
+# ifndef __RPCNDR_H__
+typedef unsigned char boolean;
+# endif
+# define HAVE_BOOLEAN
+#endif
+#if !defined(HAVE_BOOLEAN) && !defined(__RPCNDR_H__)
typedef int boolean;
#endif
#ifndef FALSE /* in case these macros already exist */