Add a hack to allow an external jpeg library to still be used on
cygwin/mingw/wine now that their windows headers define a type boolean conflicting with the jpeg headers. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43721 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -26,6 +26,22 @@
|
|||||||
#include "wx/module.h"
|
#include "wx/module.h"
|
||||||
#endif
|
#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"
|
extern "C"
|
||||||
{
|
{
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
|
@@ -59,9 +59,14 @@ int TIFFFillTile(TIFF*, ttile_t);
|
|||||||
|
|
||||||
http://bugzilla.remotesensing.org/show_bug.cgi?id=188
|
http://bugzilla.remotesensing.org/show_bug.cgi?id=188
|
||||||
*/
|
*/
|
||||||
#if defined(__RPCNDR_H__)
|
#if defined wxHACK_BOOLEAN || defined __RPCNDR_H__ || defined __WINE_RPCNDR_H
|
||||||
#define HAVE_BOOLEAN
|
#define HAVE_BOOLEAN
|
||||||
#define boolean unsigned int
|
|
||||||
|
#ifdef wxHACK_BOOLEAN
|
||||||
|
#define boolean wxHACK_BOOLEAN
|
||||||
|
#else
|
||||||
|
#define boolean int
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "jpeglib.h"
|
#include "jpeglib.h"
|
||||||
|
Reference in New Issue
Block a user