| 1 | //#ifndef __STDINT |
|---|
| 2 | //#define __STDINT |
|---|
| 3 | |
|---|
| 4 | typedef signed char int8_t; |
|---|
| 5 | typedef short int int16_t; |
|---|
| 6 | typedef long int int32_t; |
|---|
| 7 | typedef long long int int64_t; |
|---|
| 8 | |
|---|
| 9 | typedef unsigned char uint8_t; |
|---|
| 10 | typedef unsigned short int uint16_t; |
|---|
| 11 | typedef unsigned long int uint32_t; |
|---|
| 12 | typedef unsigned long long int uint64_t; |
|---|
| 13 | |
|---|
| 14 | typedef signed char int_least8_t; |
|---|
| 15 | typedef short int int_least16_t; |
|---|
| 16 | typedef long int int_least32_t; |
|---|
| 17 | typedef long long int int_least64_t; |
|---|
| 18 | |
|---|
| 19 | typedef unsigned char uint_least8_t; |
|---|
| 20 | typedef unsigned short int uint_least16_t; |
|---|
| 21 | typedef unsigned long int uint_least32_t; |
|---|
| 22 | typedef unsigned long long int uint_least64_t; |
|---|
| 23 | |
|---|
| 24 | typedef short int int_fast8_t; |
|---|
| 25 | typedef short int int_fast16_t; |
|---|
| 26 | typedef long int int_fast32_t; |
|---|
| 27 | typedef long long int int_fast64_t; |
|---|
| 28 | |
|---|
| 29 | typedef unsigned short int uint_fast8_t; |
|---|
| 30 | typedef unsigned short int uint_fast16_t; |
|---|
| 31 | typedef unsigned long int uint_fast32_t; |
|---|
| 32 | typedef unsigned long long int uint_fast64_t; |
|---|
| 33 | |
|---|
| 34 | typedef long int intptr_t; |
|---|
| 35 | typedef unsigned long int uintptr_t; |
|---|
| 36 | |
|---|
| 37 | typedef long long int intmax_t; |
|---|
| 38 | typedef unsigned long long int uintmax_t; |
|---|
| 39 | |
|---|
| 40 | //#if !defined __cplusplus || defined __STDC_LIMIT_MACROS |
|---|
| 41 | |
|---|
| 42 | #define INT8_MIN (-128) |
|---|
| 43 | #define INT16_MIN (-32767-1) |
|---|
| 44 | #define INT32_MIN (-2147483647L-1) |
|---|
| 45 | #define INT64_MIN (-9223372036854775807LL-1) |
|---|
| 46 | |
|---|
| 47 | #define INT8_MAX (127) |
|---|
| 48 | #define INT16_MAX (32767) |
|---|
| 49 | #define INT32_MAX (2147483647L) |
|---|
| 50 | #define INT64_MAX (9223372036854775807LL) |
|---|
| 51 | |
|---|
| 52 | #define UINT8_MAX (255) |
|---|
| 53 | #define UINT16_MAX (65535) |
|---|
| 54 | #define UINT32_MAX (4294967295UL) |
|---|
| 55 | #define UINT64_MAX (18446744073709551615ULL) |
|---|
| 56 | |
|---|
| 57 | #define INT_LEAST8_MIN (-127) |
|---|
| 58 | #define INT_LEAST16_MIN (-32767) |
|---|
| 59 | #define INT_LEAST32_MIN (-2147483647L) |
|---|
| 60 | #define INT_LEAST64_MIN (-9223372036854775807LL) |
|---|
| 61 | |
|---|
| 62 | #define INT_LEAST8_MAX (127) |
|---|
| 63 | #define INT_LEAST16_MAX (32767) |
|---|
| 64 | #define INT_LEAST32_MAX (2147483647L) |
|---|
| 65 | #define INT_LEAST64_MAX (9223372036854775807LL) |
|---|
| 66 | |
|---|
| 67 | #define UINT_LEAST8_MAX (255) |
|---|
| 68 | #define UINT_LEAST16_MAX (65535) |
|---|
| 69 | #define UINT_LEAST32_MAX (4294967295U) |
|---|
| 70 | #define UINT_LEAST64_MAX (18446744073709551615ULL) |
|---|
| 71 | |
|---|
| 72 | #define INT_FAST8_MIN (-127) |
|---|
| 73 | #define INT_FAST16_MIN (-32767) |
|---|
| 74 | #define INT_FAST32_MIN (-2147483647L) |
|---|
| 75 | #define INT_FAST64_MIN (-9223372036854775807LL) |
|---|
| 76 | |
|---|
| 77 | #define INT_FAST8_MAX (32767) |
|---|
| 78 | #define INT_FAST16_MAX (32767) |
|---|
| 79 | #define INT_FAST32_MAX (2147483647L) |
|---|
| 80 | #define INT_FAST64_MAX (9223372036854775807LL) |
|---|
| 81 | |
|---|
| 82 | #define UINT_FAST8_MAX (65535) |
|---|
| 83 | #define UINT_FAST16_MAX (65535) |
|---|
| 84 | #define UINT_FAST32_MAX (4294967295UL) |
|---|
| 85 | #define UINT_FAST64_MAX (18446744073709551615ULL) |
|---|
| 86 | |
|---|
| 87 | #define INTPTR_MIN (-2147483647L) |
|---|
| 88 | #define INTPTR_MAX (2147483647L) |
|---|
| 89 | #define UINTPTR_MAX (4294967295UL) |
|---|
| 90 | |
|---|
| 91 | #define INTMAX_MIN (-9223372036854775807LL) |
|---|
| 92 | #define INTMAX_MAX (9223372036854775807LL) |
|---|
| 93 | #define UINTMAX_MAX (18446744073709551615ULL) |
|---|
| 94 | |
|---|
| 95 | //#endif |
|---|
| 96 | |
|---|
| 97 | //#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS |
|---|
| 98 | |
|---|
| 99 | #define INT8_C(c) c |
|---|
| 100 | #define INT16_C(c) c |
|---|
| 101 | #define INT32_C(c) c ## L |
|---|
| 102 | #define INT64_C(c) c ## LL |
|---|
| 103 | |
|---|
| 104 | #define UINT8_C(c) c ## U |
|---|
| 105 | #define UINT16_C(c) c ## U |
|---|
| 106 | #define UINT32_C(c) c ## UL |
|---|
| 107 | #define UINT64_C(c) c ## ULL |
|---|
| 108 | |
|---|
| 109 | #define INTMAX_C(c) c ## LL |
|---|
| 110 | #define UINTMAX_C(c) c ## ULL |
|---|
| 111 | |
|---|
| 112 | //#endif |
|---|
| 113 | |
|---|
| 114 | //#endif |
|---|