paul@181 | 1 | /* |
paul@181 | 2 | * If linux/types.h is already been included, assume it has defined |
paul@181 | 3 | * everything we need. (cross fingers) Other header files may have |
paul@181 | 4 | * also defined the types that we need. |
paul@181 | 5 | */ |
paul@181 | 6 | #if (!defined(_STDINT_H) && !defined(_UUID_STDINT_H)) |
paul@181 | 7 | #define _UUID_STDINT_H |
paul@181 | 8 | |
paul@181 | 9 | typedef unsigned char uint8_t; |
paul@181 | 10 | typedef signed char int8_t; |
paul@181 | 11 | |
paul@181 | 12 | #if (4 == 8) |
paul@181 | 13 | typedef int int64_t; |
paul@181 | 14 | typedef unsigned int uint64_t; |
paul@181 | 15 | #elif (4 == 8) |
paul@181 | 16 | typedef long int64_t; |
paul@181 | 17 | typedef unsigned long uint64_t; |
paul@181 | 18 | #elif (8 == 8) |
paul@181 | 19 | #if defined(__GNUC__) |
paul@181 | 20 | typedef __signed__ long long int64_t; |
paul@181 | 21 | #else |
paul@181 | 22 | typedef signed long long int64_t; |
paul@181 | 23 | #endif |
paul@181 | 24 | typedef unsigned long long uint64_t; |
paul@181 | 25 | #endif |
paul@181 | 26 | |
paul@181 | 27 | #if (4 == 2) |
paul@181 | 28 | typedef int int16_t; |
paul@181 | 29 | typedef unsigned int uint16_t; |
paul@181 | 30 | #elif (2 == 2) |
paul@181 | 31 | typedef short int16_t; |
paul@181 | 32 | typedef unsigned short uint16_t; |
paul@181 | 33 | #else |
paul@181 | 34 | ?==error: undefined 16 bit type |
paul@181 | 35 | #endif |
paul@181 | 36 | |
paul@181 | 37 | #if (4 == 4) |
paul@181 | 38 | typedef int int32_t; |
paul@181 | 39 | typedef unsigned int uint32_t; |
paul@181 | 40 | #elif (4 == 4) |
paul@181 | 41 | typedef long int32_t; |
paul@181 | 42 | typedef unsigned long uint32_t; |
paul@181 | 43 | #elif (2 == 4) |
paul@181 | 44 | typedef short int32_t; |
paul@181 | 45 | typedef unsigned short uint32_t; |
paul@181 | 46 | #else |
paul@181 | 47 | ?== error: undefined 32 bit type |
paul@181 | 48 | #endif |
paul@181 | 49 | |
paul@181 | 50 | #endif |