From 5ceb3ca875f23fc1c58f0f4b32d48900260404f9 Mon Sep 17 00:00:00 2001 From: James Anderson Date: Mon, 9 Jun 2014 11:39:40 -0700 Subject: [PATCH 1/3] Issue #697. On MSVC 2012 builds is not required. --- libImaging/TiffDecode.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libImaging/TiffDecode.h b/libImaging/TiffDecode.h index 90fe3c9d4..70aa63628 100644 --- a/libImaging/TiffDecode.h +++ b/libImaging/TiffDecode.h @@ -13,11 +13,12 @@ #include #endif -#ifndef _UNISTD_H -#include +#ifndef _MSC_VER + #ifndef _UNISTD_H + #include + #endif #endif - #ifndef min #define min(x,y) (( x > y ) ? y : x ) #define max(x,y) (( x < y ) ? y : x ) From a8e02e093ad8bddb3f33dcbf7c322787f286def7 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 18 Jun 2014 16:08:16 -0700 Subject: [PATCH 2/3] We don't need unistd.h anymore on unix platforms either --- libImaging/TiffDecode.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/libImaging/TiffDecode.h b/libImaging/TiffDecode.h index 70aa63628..67d6e82d1 100644 --- a/libImaging/TiffDecode.h +++ b/libImaging/TiffDecode.h @@ -13,12 +13,6 @@ #include #endif -#ifndef _MSC_VER - #ifndef _UNISTD_H - #include - #endif -#endif - #ifndef min #define min(x,y) (( x > y ) ? y : x ) #define max(x,y) (( x < y ) ? y : x ) From 05d8cb5b8fe3e3b89d877c8663b3367b6d939e12 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 18 Jun 2014 16:08:50 -0700 Subject: [PATCH 3/3] Don't carve out exceptions for py2.4 compilers anymore --- libImaging/TiffDecode.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/libImaging/TiffDecode.h b/libImaging/TiffDecode.h index 67d6e82d1..46c940d1b 100644 --- a/libImaging/TiffDecode.h +++ b/libImaging/TiffDecode.h @@ -38,11 +38,10 @@ extern int ImagingLibTiffEncodeInit(ImagingCodecState state, char *filename, int extern int ImagingLibTiffSetField(ImagingCodecState state, ttag_t tag, ...); -#if defined(_MSC_VER) && (_MSC_VER == 1310) -/* VS2003/py2.4 can't use varargs. Skipping trace for now.*/ -#define TRACE(args) -#else - +/* + Trace debugging + legacy, don't enable for python 3.x, unicode issues. +*/ /* #define VA_ARGS(...) __VA_ARGS__ @@ -51,8 +50,5 @@ extern int ImagingLibTiffSetField(ImagingCodecState state, ttag_t tag, ...); #define TRACE(args) -#endif /* _MSC_VER */ - - #endif