Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


ImPlatform.h
01: /* 
02:  * The Python Imaging Library
03:  * $Id$
04:  *
05:  * platform declarations for the imaging core library
06:  *
07:  * Copyright (c) Fredrik Lundh 1995-2003.
08:  */
09: 
10: #include "Python.h"
11: 
12: /* Check that we have an ANSI compliant compiler */
13: #ifndef HAVE_PROTOTYPES
14: #error Sorry, this library requires support for ANSI prototypes.
15: #endif
16: #ifndef STDC_HEADERS
17: #error Sorry, this library requires ANSI header files.
18: #endif
19: 
20: #if defined(_MSC_VER)
21: #ifndef WIN32
22: #define WIN32
23: #endif
24: /* VC++ 4.0 is a bit annoying when it comes to precision issues (like
25:    claiming that "float a = 0.0;" would lead to loss of precision).  I
26:    don't like to see warnings from my code, but since I still want to
27:    keep it readable, I simply switch off a few warnings instead of adding
28:    the tons of casts that VC++ seem to require.  This code is compiled
29:    with numerous other compilers as well, so any real errors are likely
30:    to be catched anyway. */
31: #pragma warning(disable: 4244) /* conversion from 'float' to 'int' */
32: #endif
33: 
34: #if defined(_MSC_VER)
35: #define inline __inline
36: #elif !defined(USE_INLINE)
37: #define inline
38: #endif
39: 
40: #if SIZEOF_SHORT == 2
41: #define INT16 short
42: #elif SIZEOF_INT == 2
43: #define INT16 int
44: #else
45: #define INT16 short /* most things works just fine anyway... */
46: #endif
47: 
48: #if SIZEOF_SHORT == 4
49: #define INT32 short
50: #elif SIZEOF_INT == 4
51: #define INT32 int
52: #elif SIZEOF_LONG == 4
53: #define INT32 long
54: #else
55: #error Cannot find required 32-bit integer type
56: #endif
57: 
58: #if SIZEOF_LONG == 8
59: #define INT64 long
60: #elif SIZEOF_LONG_LONG == 8
61: #define INT64 long
62: #endif
63: 
64: /* assume IEEE; tweak if necessary (patches are welcome) */
65: #define FLOAT32 float
66: #define FLOAT64 double
67: 
68: #define INT8  signed char
69: #define UINT8 unsigned char
70: 
71: #define UINT16 unsigned INT16
72: #define UINT32 unsigned INT32
73: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/