-// NB: Some compilers define boolean type in Windows headers
-// (e.g. Watcom C++, but not some Open Watcom versions).
-// 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.
-#if defined(__WXMSW__) && (defined(__MWERKS__) || defined(__DIGITALMARS__) || \
- (defined(__WATCOMC__) && !wxONLY_WATCOM_EARLIER_THAN(1,6)))
+// 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.
+//
+#ifdef wxHACK_BOOLEAN