File jpeg-8b-typedefs.patch of Package mingw64-jpeg
--- jpeg-8b/jmorecfg.h 2009-11-20 09:01:24.000000000 +0100
+++ jpeg-8b/jmorecfg.h 2010-07-26 13:13:59.000000000 +0200
@@ -162,7 +162,7 @@
#ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */
#ifndef _BASETSD_H /* MinGW is slightly different */
#ifndef QGLOBAL_H /* Qt defines it in qglobal.h */
-typedef long INT32;
+typedef int INT32;
#endif
#endif
#endif
@@ -232,7 +232,13 @@
* 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 */