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>bb10
parent
28fd625873
commit
ec31953007
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue