| 1 |
#ifndef LCDF_INTTYPES_H |
| 2 |
#define LCDF_INTTYPES_H |
| 3 |
/* Define known-width integer types. */ |
| 4 |
|
| 5 |
#ifdef HAVE_INTTYPES_H |
| 6 |
# include <inttypes.h> |
| 7 |
#elif defined(HAVE_SYS_TYPES_H) |
| 8 |
# include <sys/types.h> |
| 9 |
# ifdef HAVE_U_INT_TYPES |
| 10 |
typedef u_int8_t uint8_t; |
| 11 |
typedef u_int16_t uint16_t; |
| 12 |
typedef u_int32_t uint32_t; |
| 13 |
# endif |
| 14 |
#endif |
| 15 |
|
| 16 |
#ifdef HAVE_FAKE_INT_TYPES |
| 17 |
typedef signed char int8_t; |
| 18 |
typedef unsigned char uint8_t; |
| 19 |
typedef signed short int16_t; |
| 20 |
typedef unsigned short uint16_t; |
| 21 |
typedef signed int int32_t; |
| 22 |
typedef unsigned int uint32_t; |
| 23 |
#endif |
| 24 |
|
| 25 |
#ifndef HAVE_UINTPTR_T |
| 26 |
# if SIZEOF_VOID_P == SIZEOF_UNSIGNED_INT |
| 27 |
typedef unsigned int uintptr_t; |
| 28 |
# elif SIZEOF_VOID_P == SIZEOF_UNSIGNED_LONG |
| 29 |
typedef unsigned long uintptr_t; |
| 30 |
# endif |
| 31 |
#endif |
| 32 |
|
| 33 |
/* Note: Windows compilers call these types '[un]signed __int8', etc. */ |
| 34 |
#endif |