diff --git a/src/libImaging/Draw.c b/src/libImaging/Draw.c index f1c8ffcff8d..5c61e0e7ed3 100644 --- a/src/libImaging/Draw.c +++ b/src/libImaging/Draw.c @@ -35,7 +35,6 @@ #include "Imaging.h" #include -#include #define CEIL(v) (int)ceil(v) #define FLOOR(v) ((v) >= 0.0 ? (int)(v) : (int)floor(v)) diff --git a/src/libImaging/ImagingPlatform.h b/src/libImaging/ImagingPlatform.h index f6e7fb6b921..6e9676ff4f0 100644 --- a/src/libImaging/ImagingPlatform.h +++ b/src/libImaging/ImagingPlatform.h @@ -7,7 +7,7 @@ * Copyright (c) Fredrik Lundh 1995-2003. */ -#include "Python.h" +#include /* Check that we have an ANSI compliant compiler */ #ifndef HAVE_PROTOTYPES @@ -17,34 +17,13 @@ #error Sorry, this library requires ANSI header files. #endif -#if defined(PIL_NO_INLINE) -#define inline -#else #if defined(_MSC_VER) && !defined(__GNUC__) #define inline __inline #endif -#endif - -#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ - -#define WIN32_LEAN_AND_MEAN -#include - -#ifdef __CYGWIN__ -#undef _WIN64 -#undef _WIN32 -#undef __WIN32__ -#undef WIN32 -#endif -#else /* not WIN */ -/* For System that are not Windows, we'll need to define these. */ -/* We have to define them instead of using typedef because the JPEG lib also +/* We have to define types instead of using typedef because the JPEG lib also defines their own types with the same names, so we need to be able to undef ours before including the JPEG code. */ - -#if __STDC_VERSION__ >= 199901L /* C99+ */ - #include #define INT8 int8_t @@ -54,45 +33,11 @@ #define INT32 int32_t #define UINT32 uint32_t -#else /* < C99 */ - -#define INT8 signed char - -#if SIZEOF_SHORT == 2 -#define INT16 short -#elif SIZEOF_INT == 2 -#define INT16 int -#else -#error Cannot find required 16-bit integer type -#endif - -#if SIZEOF_SHORT == 4 -#define INT32 short -#elif SIZEOF_INT == 4 -#define INT32 int -#elif SIZEOF_LONG == 4 -#define INT32 long -#else -#error Cannot find required 32-bit integer type -#endif - -#define UINT8 unsigned char -#define UINT16 unsigned INT16 -#define UINT32 unsigned INT32 - -#endif /* < C99 */ - -#endif /* not WIN */ - /* assume IEEE; tweak if necessary (patches are welcome) */ #define FLOAT16 UINT16 #define FLOAT32 float #define FLOAT64 double -#ifdef _MSC_VER -typedef signed __int64 int64_t; -#endif - #ifdef __GNUC__ #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #endif diff --git a/src/libImaging/QuantTypes.h b/src/libImaging/QuantTypes.h index 986b70806dc..e01023de7e1 100644 --- a/src/libImaging/QuantTypes.h +++ b/src/libImaging/QuantTypes.h @@ -9,15 +9,10 @@ * See the README file for information on usage and redistribution. */ -#ifndef __TYPES_H__ -#define __TYPES_H__ +#ifndef __QUANTTYPES_H__ +#define __QUANTTYPES_H__ -#ifdef _MSC_VER -typedef unsigned __int32 uint32_t; -typedef unsigned __int64 uint64_t; -#else #include -#endif typedef union { struct {