From: Vadim Zeitlin Date: Wed, 6 Feb 2013 00:42:06 +0000 (+0000) Subject: Check for _MSC_VER definedness in libtiff code. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9ab1e1539df2a8da087e86f27e17db4db265f077?ds=inline Check for _MSC_VER definedness in libtiff code. This avoids warnings about _MSC_VER being undefined when it's compared with 1500 when building with gcc. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/tiff/libtiff/tif_dirread.c b/src/tiff/libtiff/tif_dirread.c index f264fddb9d..56d65e0170 100644 --- a/src/tiff/libtiff/tif_dirread.c +++ b/src/tiff/libtiff/tif_dirread.c @@ -585,7 +585,7 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryFloat(TIFF* tif, TIFFDirEntry* d err=TIFFReadDirEntryCheckedLong8(tif,direntry,&m); if (err!=TIFFReadDirEntryErrOk) return(err); -#if defined(__WIN32__) && (_MSC_VER < 1500) +#if defined(__WIN32__) && defined(_MSC_VER) && (_MSC_VER < 1500) /* * XXX: MSVC 6.0 does not support conversion * of 64-bit integers into floating point @@ -696,7 +696,7 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryDouble(TIFF* tif, TIFFDirEntry* err=TIFFReadDirEntryCheckedLong8(tif,direntry,&m); if (err!=TIFFReadDirEntryErrOk) return(err); -#if defined(__WIN32__) && (_MSC_VER < 1500) +#if defined(__WIN32__) && defined(_MSC_VER) && (_MSC_VER < 1500) /* * XXX: MSVC 6.0 does not support conversion * of 64-bit integers into floating point @@ -2321,7 +2321,7 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryFloatArray(TIFF* tif, TIFFDirEnt { if (tif->tif_flags&TIFF_SWAB) TIFFSwabLong8(ma); -#if defined(__WIN32__) && (_MSC_VER < 1500) +#if defined(__WIN32__) && defined(_MSC_VER) && (_MSC_VER < 1500) /* * XXX: MSVC 6.0 does not support * conversion of 64-bit integers into @@ -2564,7 +2564,7 @@ TIFFReadDirEntryDoubleArray(TIFF* tif, TIFFDirEntry* direntry, double** value) { if (tif->tif_flags&TIFF_SWAB) TIFFSwabLong8(ma); -#if defined(__WIN32__) && (_MSC_VER < 1500) +#if defined(__WIN32__) && defined(_MSC_VER) && (_MSC_VER < 1500) /* * XXX: MSVC 6.0 does not support * conversion of 64-bit integers into diff --git a/src/tiff/libtiff/tif_win32.c b/src/tiff/libtiff/tif_win32.c index 42e340c2df..8531797091 100644 --- a/src/tiff/libtiff/tif_win32.c +++ b/src/tiff/libtiff/tif_win32.c @@ -369,7 +369,7 @@ _TIFFmemcmp(const void* p1, const void* p2, tmsize_t c) #ifndef _WIN32_WCE -#if (_MSC_VER < 1500) +#if defined(_MSC_VER) && (_MSC_VER < 1500) # define vsnprintf _vsnprintf #endif