diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2018-11-21 11:25:57 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2018-12-07 18:52:16 +0000 |
commit | ec31953007126a6e0f9f3ca16b64bdfdcdf3d7b6 (patch) | |
tree | 7b5fc08ace2fe3a42d6fef6721c0fc46297564af /src/plugins/imageformats | |
parent | 28fd625873f9bb191cb10a2a36a1b974c6e8c97e (diff) | |
download | qtbase-ec31953007126a6e0f9f3ca16b64bdfdcdf3d7b6.tar.gz |
Fix build using Windows SDK 10.0.17763
c:\qt\qt5\qtbase\src\3rdparty\libjpeg\src\jmorecfg.h(242): error C2371: 'boolean': redefinition; different basic types
c:\program files (x86)\windows kits\10\include\10.0.17763.0\shared\rpcndr.h(193): note: see declaration of 'boolean'
Instead of trying to guess if a certain header has been #included and
whether that header does typedef something to boolean, let's just use
the preprocessor to hide, like some people do for X11/Xlib.h's Bool (see
qmetatype.h where we refused).
Change-Id: I05b8d7ba19004af99f3cfffd15693a87e175f05d
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/plugins/imageformats')
-rw-r--r-- | src/plugins/imageformats/jpeg/qjpeghandler.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp index e52a19703c..54fe857908 100644 --- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp +++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp @@ -56,13 +56,12 @@ // including jpeglib.h seems to be a little messy extern "C" { -// mingw includes rpcndr.h but does not define boolean -#if defined(Q_OS_WIN) && defined(Q_CC_GNU) -# if defined(__RPCNDR_H__) && !defined(boolean) - typedef unsigned char boolean; -# define HAVE_BOOLEAN -# endif +// jpeglib.h->jmorecfg.h tries to typedef int boolean; but this conflicts with +// some Windows headers that may or may not have been included +#ifdef HAVE_BOOLEAN +# undef HAVE_BOOLEAN #endif +#define boolean jboolean #define XMD_H // shut JPEGlib up #include <jpeglib.h> |