diff options
Diffstat (limited to 'lib/stdint.h')
| -rw-r--r-- | lib/stdint.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/lib/stdint.h b/lib/stdint.h new file mode 100644 index 0000000..ef5f214 --- /dev/null +++ b/lib/stdint.h | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | #ifndef __LIB_STDINT_H | ||
| 2 | #define __LIB_STDINT_H | ||
| 3 | |||
| 4 | typedef signed char int8_t; | ||
| 5 | #define INT8_MAX 127 | ||
| 6 | #define INT8_MIN (-INT8_MAX - 1) | ||
| 7 | |||
| 8 | typedef signed short int int16_t; | ||
| 9 | #define INT16_MAX 32767 | ||
| 10 | #define INT16_MIN (-INT16_MAX - 1) | ||
| 11 | |||
| 12 | typedef signed int int32_t; | ||
| 13 | #define INT32_MAX 2147483647 | ||
| 14 | #define INT32_MIN (-INT32_MAX - 1) | ||
| 15 | |||
| 16 | typedef signed long long int int64_t; | ||
| 17 | #define INT64_MAX 9223372036854775807LL | ||
| 18 | #define INT64_MIN (-INT64_MAX - 1) | ||
| 19 | |||
| 20 | typedef unsigned char uint8_t; | ||
| 21 | #define UINT8_MAX 255 | ||
| 22 | |||
| 23 | typedef unsigned short int uint16_t; | ||
| 24 | #define UINT16_MAX 65535 | ||
| 25 | |||
| 26 | typedef unsigned int uint32_t; | ||
| 27 | #define UINT32_MAX 4294967295U | ||
| 28 | |||
| 29 | typedef unsigned long long int uint64_t; | ||
| 30 | #define UINT64_MAX 18446744073709551615ULL | ||
| 31 | |||
| 32 | typedef int32_t intptr_t; | ||
| 33 | #define INTPTR_MIN INT32_MIN | ||
| 34 | #define INTPTR_MAX INT32_MAX | ||
| 35 | |||
| 36 | typedef uint32_t uintptr_t; | ||
| 37 | #define UINTPTR_MAX UINT32_MAX | ||
| 38 | |||
| 39 | typedef int64_t intmax_t; | ||
| 40 | #define INTMAX_MIN INT64_MIN | ||
| 41 | #define INTMAX_MAX INT64_MAX | ||
| 42 | |||
| 43 | typedef uint64_t uintmax_t; | ||
| 44 | #define UINTMAX_MAX UINT64_MAX | ||
| 45 | |||
| 46 | #define PTRDIFF_MIN INT32_MIN | ||
| 47 | #define PTRDIFF_MAX INT32_MAX | ||
| 48 | |||
| 49 | #define SIZE_MAX UINT32_MAX | ||
| 50 | |||
| 51 | #endif /* lib/stdint.h */ | ||
