mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +03:00
052ea606bf
1) Renamed USE_INLINE to PIL_USE_INLINE to avoid conflicts with other headers/libraries. 2) Replace __WIN32__ and WIN32 with _WIN32 3) Don't define WIN32 when the compiler is MSVC but not on Windows Why would you even... 4) Don't define strcasecmp if you're not even going to use it. 5) Don't include Windows.h with undefs for compilers newer than 1998 everywhere. 6) Don't surpress warnings for MSVC++ 4.0. People still using MSVC++ 4.0 deserve it. 7) Don't include things that are already included in Windows.h
73 lines
1.3 KiB
C
73 lines
1.3 KiB
C
/*
|
|
* The Python Imaging Library
|
|
* $Id$
|
|
*
|
|
* platform declarations for the imaging core library
|
|
*
|
|
* Copyright (c) Fredrik Lundh 1995-2003.
|
|
*/
|
|
|
|
#include "Python.h"
|
|
|
|
/* Check that we have an ANSI compliant compiler */
|
|
#ifndef HAVE_PROTOTYPES
|
|
#error Sorry, this library requires support for ANSI prototypes.
|
|
#endif
|
|
#ifndef STDC_HEADERS
|
|
#error Sorry, this library requires ANSI header files.
|
|
#endif
|
|
|
|
#if defined(_MSC_VER) && !defined(__GNUC__)
|
|
#define inline __inline
|
|
#endif
|
|
|
|
#if !defined(PIL_USE_INLINE)
|
|
#define inline
|
|
#endif
|
|
|
|
#ifdef _WIN32
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
#include <Windows.h>
|
|
|
|
#else
|
|
/* For System that are not Windows, we'll need to define these. */
|
|
|
|
#if SIZEOF_SHORT == 2
|
|
#define INT16 short
|
|
#elif SIZEOF_INT == 2
|
|
#define INT16 int
|
|
#else
|
|
#define INT16 short /* most things works just fine anyway... */
|
|
#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
|
|
|
|
#if SIZEOF_LONG == 8
|
|
#define INT64 long
|
|
#elif SIZEOF_LONG_LONG == 8
|
|
#define INT64 long
|
|
#endif
|
|
|
|
#define INT8 signed char
|
|
#define UINT8 unsigned char
|
|
|
|
#define UINT16 unsigned INT16
|
|
#define UINT32 unsigned INT32
|
|
|
|
#endif
|
|
|
|
/* assume IEEE; tweak if necessary (patches are welcome) */
|
|
#define FLOAT32 float
|
|
#define FLOAT64 double
|
|
|
|
|