123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- #ifndef __INTEGERS_H_
- #define __INTEGERS_H_
- #include <sys/types.h>
- #include "config.h"
- #if SIZEOF_U_INT8_T != 1 || SIZEOF_U_INT16_T != 2 || SIZEOF_U_INT32_T != 4
- # if defined(HAVE_C99_INTS)
-
-
- # if defined(HAVE_STDINT_H)
- # include <stdint.h>
- # elif defined(HAVE_SYS_INTTYPES_H)
- # include <sys/inttypes.h>
- # endif
-
- # if SIZEOF_U_INT8_T != 1
- typedef uint8_t u_int8_t;
- # endif
- # if SIZEOF_U_INT16_T != 2
- typedef uint16_t u_int16_t;
- # endif
- # if SIZEOF_U_INT32_T != 4
- typedef uint32_t u_int32_t;
- # endif
- # elif (SIZEOF_UNSIGNED_SHORT_INT == 2 || SIZEOF_UNSIGNED_INT == 2) \
- && (SIZEOF_UNSIGNED_INT == 4 || SIZEOF_UNSIGNED_LONG_INT == 4)
-
-
-
- # if SIZEOF_U_INT8_T != 1
- typedef unsigned char u_int8_t;
- # endif
- # if SIZEOF_U_INT16_T != 2
- # if SIZEOF_UNSIGNED_SHORT_INT == 2
- typedef unsigned short int u_int16_t;
- # elif SIZEOF_UNSIGNED_INT == 2
- typedef unsigned int u_int16_t;
- # endif
- # endif
- # if SIZEOF_U_INT32_T != 4
- # if SIZEOF_UNSIGNED_INT == 4
- typedef unsigned int u_int32_t;
- # elif SIZEOF_UNSIGNED_LONG_INT == 4
- typedef unsigned long int u_int32_t;
- # endif
- # endif
-
- # else
- # error "Your C compiler seems to lack 16 and 32 bit unsigned integer types"
- # endif
- #endif
- #endif
|