]> git.saurik.com Git - wxWidgets.git/commitdiff
compilation fix for Watcom
authorVáclav Slavík <vslavik@fastmail.fm>
Sat, 8 Dec 2001 23:25:35 +0000 (23:25 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sat, 8 Dec 2001 23:25:35 +0000 (23:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/imagjpeg.cpp

index b6785c33f3869c381d18eaa7c72712930f6f18d2..b6f960afdc0c276b05fae27af898b1addd4ac09e 100644 (file)
 #include "wx/debug.h"
 #include "wx/log.h"
 #include "wx/app.h"
+
+// NB: Some compilers define boolean type in Windows headers (e.g. Watcom C++).
+//     This causes a conflict with jmorecfg.h header from libjpeg, so we have
+//     to make sure libjpeg won't try to define boolean itself. This is done by
+//     defining HAVE_BOOLEAN.
+//
+//     TODO: include windows.h for MetroWerks and Watcom only after 2.3.2 release!
+#if defined(__WXMSW__)
+    #if defined(__MWERKS__) || defined(__WATCOMC__)
+        #define HAVE_BOOLEAN
+    #endif
+    #include <windows.h>
+#endif // __WXMSW__
+
 extern "C"
 {
     #include "jpeglib.h"
 }
+
 #include "wx/filefn.h"
 #include "wx/wfstream.h"
 #include "wx/intl.h"
@@ -47,10 +62,6 @@ extern "C"
 #endif
 #endif
 
-#ifdef __WXMSW__
-#include <windows.h>
-#endif
-
 //-----------------------------------------------------------------------------
 // wxJPEGHandler
 //-----------------------------------------------------------------------------