Skip to content

Commit 17f09f3

Browse files
authored
Merge pull request #8644 from radarhere/c99
Remove pre-C99 definitions
2 parents c7026d9 + d42f22b commit 17f09f3

File tree

2 files changed

+5
-30
lines changed

2 files changed

+5
-30
lines changed

docs/releasenotes/11.1.0.rst

+5
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ Saving JPEG 2000 CMYK images
6868

6969
With OpenJPEG 2.5.3 or later, Pillow can now save CMYK images as JPEG 2000 files.
7070

71+
Minimum C version
72+
^^^^^^^^^^^^^^^^^
73+
74+
C99 is now the minimum version of C required to compile Pillow from source.
75+
7176
zlib-ng in wheels
7277
^^^^^^^^^^^^^^^^^
7378

src/libImaging/ImPlatform.h

-30
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@
4444
defines their own types with the same names, so we need to be able to undef
4545
ours before including the JPEG code. */
4646

47-
#if __STDC_VERSION__ >= 199901L /* C99+ */
48-
4947
#include <stdint.h>
5048

5149
#define INT8 int8_t
@@ -55,34 +53,6 @@
5553
#define INT32 int32_t
5654
#define UINT32 uint32_t
5755

58-
#else /* < C99 */
59-
60-
#define INT8 signed char
61-
62-
#if SIZEOF_SHORT == 2
63-
#define INT16 short
64-
#elif SIZEOF_INT == 2
65-
#define INT16 int
66-
#else
67-
#error Cannot find required 16-bit integer type
68-
#endif
69-
70-
#if SIZEOF_SHORT == 4
71-
#define INT32 short
72-
#elif SIZEOF_INT == 4
73-
#define INT32 int
74-
#elif SIZEOF_LONG == 4
75-
#define INT32 long
76-
#else
77-
#error Cannot find required 32-bit integer type
78-
#endif
79-
80-
#define UINT8 unsigned char
81-
#define UINT16 unsigned INT16
82-
#define UINT32 unsigned INT32
83-
84-
#endif /* < C99 */
85-
8656
#endif /* not WIN */
8757

8858
/* assume IEEE; tweak if necessary (patches are welcome) */

0 commit comments

Comments
 (0)