mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
add check for C99+ to use their defs if possible
This commit is contained in:
parent
c2527348ec
commit
fbec8f19dd
|
@ -43,6 +43,23 @@
|
|||
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 <stdint.h>
|
||||
|
||||
#define INT8 int8_t
|
||||
#define UINT8 uint8_t
|
||||
#define INT16 int16_t
|
||||
#define UINT16 uint16_t
|
||||
#define INT32 int32_t
|
||||
#define UINT32 uint32_t
|
||||
#ifdef INT64_MAX
|
||||
#define INT64 int64_t
|
||||
#define UINT64 uint64_t
|
||||
#endif
|
||||
|
||||
#else /* C99+ */
|
||||
|
||||
#if SIZEOF_SHORT == 2
|
||||
#define INT16 short
|
||||
#elif SIZEOF_INT == 2
|
||||
|
@ -78,6 +95,8 @@
|
|||
#define UINT64 unsigned INT64
|
||||
#endif
|
||||
|
||||
#endif /* C99+ */
|
||||
|
||||
#endif /* WIN */
|
||||
|
||||
/* assume IEEE; tweak if necessary (patches are welcome) */
|
||||
|
|
Loading…
Reference in New Issue
Block a user