diff --git a/ChangeLog.txt b/ChangeLog.txt index a2c630dc..a10f8e3a 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -41,6 +41,10 @@ cjpeg. occurred when the application was invoked using I/O redirection (cjpeg output.jpg). +[8] Fixed an issue whereby Windows applications that used libjpeg-turbo would +fail to compile if the Windows system headers were included before jpeglib.h. +This issue was caused by a conflict in the definition of the INT32 type. + 1.0.1 ===== diff --git a/win/jconfig.h b/win/jconfig.h index 9cf6f102..a023455c 100644 --- a/win/jconfig.h +++ b/win/jconfig.h @@ -21,6 +21,13 @@ 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 */ + #define inline __inline #ifdef JPEG_INTERNALS