X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/39c2d6bde187994f45933a2ffa13435a31d12c02..bcf324bebe65cd7ee49c139533ceea52dceb4b91:/src/jpeg/jmorecfg.h diff --git a/src/jpeg/jmorecfg.h b/src/jpeg/jmorecfg.h index 898c2570e9..c4a5d33b08 100644 --- a/src/jpeg/jmorecfg.h +++ b/src/jpeg/jmorecfg.h @@ -130,6 +130,7 @@ typedef char JOCTET; */ /* UINT8 must hold at least the values 0..255. */ +#ifndef __WINE_BASETSD_H #ifdef HAVE_UNSIGNED_CHAR typedef unsigned char UINT8; @@ -155,6 +156,8 @@ typedef unsigned int UINT16; typedef short INT16; #endif +#endif /* __WINE_BASETSD_H */ + /* INT32 must hold at least signed 32-bit values. */ /* @@ -257,9 +260,29 @@ typedef unsigned int JDIMENSION; * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. */ +#if 0 #ifndef HAVE_BOOLEAN typedef int boolean; #endif +#endif + +/* + * Notes about boolean above: + * + * The main conflict we see is with the Windows headers of some compilers that + * have a different definition of boolean. Therefore boolean has been replaced + * with wxjpeg_boolean throughout the jpeg sources. The alternative would have + * been to make the definition here the same as the Windows definition. It's + * not enough to just define HAVE_BOOLEAN when using the jpeg library, the + * definition of boolean must match when the jpeg library is compiled too. + * + * System jepg libs won't have this type, of course, so to use test + * HAVE_WXJPEG_BOOLEAN and fall back to boolean when not defined. + */ + +typedef int wxjpeg_boolean; +#define HAVE_WXJPEG_BOOLEAN + #ifndef FALSE /* in case these macros already exist */ #define FALSE 0 /* values of boolean */ #endif