X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e604ac7991a2f5bae2ea3ba01662be566e01af8d..a54bae7af72c4cbc54d53109bcad29b2a01f7f34:/src/common/imagjpeg.cpp diff --git a/src/common/imagjpeg.cpp b/src/common/imagjpeg.cpp index c92e115396..86f864b753 100644 --- a/src/common/imagjpeg.cpp +++ b/src/common/imagjpeg.cpp @@ -26,6 +26,22 @@ #include "wx/module.h" #endif +// A hack based on one from tif_jpeg.c to overcome the problem on Windows +// of rpcndr.h defining boolean with a different type to the jpeg headers. +// +// This hack is only necessary for an external jpeg library, the builtin one +// usually used on Windows doesn't use the type boolean, so always works. +// +#if defined wxHACK_BOOLEAN || defined __RPCNDR_H__ || defined __WINE_RPCNDR_H + #define HAVE_BOOLEAN + + #ifdef wxHACK_BOOLEAN + #define boolean wxHACK_BOOLEAN + #else + #define boolean int + #endif +#endif + extern "C" { #if defined(__WXMSW__)