X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/79fa23744b2c622ebe9ff89a3ee8c8ec8017ee3b..4c200e8d87728306b219822d9c07e28526cd8649:/src/common/imagjpeg.cpp diff --git a/src/common/imagjpeg.cpp b/src/common/imagjpeg.cpp index a36895eb11..d1588229f9 100644 --- a/src/common/imagjpeg.cpp +++ b/src/common/imagjpeg.cpp @@ -28,11 +28,12 @@ #include "wx/log.h" #include "wx/app.h" -// NB: Some compilers define boolean type in Windows headers (e.g. Watcom C++). +// NB: Some compilers define boolean type in Windows headers +// (e.g. Watcom C++, but not Open Watcom). // 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(__WATCOMC__)) +#if defined(__WXMSW__) && (defined(__MWERKS__) || (defined(__WATCOMC__) && __WATCOMC__ < 1200)) #define HAVE_BOOLEAN #include #endif @@ -381,7 +382,6 @@ bool wxJPEGHandler::DoCanRead( wxInputStream& stream ) if ( !stream.Read(hdr, WXSIZEOF(hdr)) ) return FALSE; - stream.SeekI(-WXSIZEOF(hdr), wxFromCurrent); return hdr[0] == 0xFF && hdr[1] == 0xD8; }