| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#ifndef _INTTYPES_H |
| 5 |
#define _INTTYPES_H |
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
#ifndef __int8_t_defined |
| 11 |
#define __int8_t_defined |
| 12 |
typedef signed char int8_t; |
| 13 |
typedef short int int16_t; |
| 14 |
typedef long int int32_t; |
| 15 |
#if defined(__GNUC__) |
| 16 |
__extension__ typedef long long int int64_t; |
| 17 |
#endif |
| 18 |
|
| 19 |
typedef unsigned char uint8_t; |
| 20 |
typedef unsigned short int uint16_t; |
| 21 |
typedef unsigned long int uint32_t; |
| 22 |
#if defined(__GNUC__) |
| 23 |
__extension__ typedef unsigned long long int uint64_t; |
| 24 |
#endif |
| 25 |
#endif |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
typedef signed char int_least8_t; |
| 31 |
typedef short int int_least16_t; |
| 32 |
typedef long int int_least32_t; |
| 33 |
#if defined(__GNUC__) |
| 34 |
__extension__ typedef long long int int_least64_t; |
| 35 |
#endif |
| 36 |
|
| 37 |
|
| 38 |
typedef unsigned char uint_least8_t; |
| 39 |
typedef unsigned short int uint_least16_t; |
| 40 |
typedef unsigned long int uint_least32_t; |
| 41 |
#if defined(__GNUC__) |
| 42 |
__extension__ typedef unsigned long long int uint_least64_t; |
| 43 |
#endif |
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
typedef signed char int_fast8_t; |
| 50 |
typedef short int int_fast16_t; |
| 51 |
typedef long int int_fast32_t; |
| 52 |
#if defined(__GNUC__) |
| 53 |
__extension__ typedef long long int int_fast64_t; |
| 54 |
#endif |
| 55 |
|
| 56 |
|
| 57 |
typedef unsigned char uint_fast8_t; |
| 58 |
typedef unsigned int uint_fast16_t; |
| 59 |
typedef unsigned long int uint_fast32_t; |
| 60 |
#if defined(__GNUC__) |
| 61 |
__extension__ typedef unsigned long long int uint_fast64_t; |
| 62 |
#endif |
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
#ifndef __intptr_t_defined |
| 67 |
#define __intptr_t_defined |
| 68 |
typedef int intptr_t; |
| 69 |
typedef unsigned int uintptr_t; |
| 70 |
#endif |
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
#if defined(__GNUC__) |
| 75 |
__extension__ typedef long long int intmax_t; |
| 76 |
__extension__ typedef unsigned long long int uintmax_t; |
| 77 |
#endif |
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
#if !defined __cplusplus || defined __STDC_LIMIT_MACROS |
| 83 |
|
| 84 |
#define __INT64_C(c) c ## LL |
| 85 |
#define __UINT64_C(c) c ## ULL |
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
#define INT8_MIN (-128) |
| 91 |
#define INT16_MIN (-32767-1) |
| 92 |
#define INT32_MIN (-2147483647-1) |
| 93 |
#define INT64_MIN (-__INT64_C(9223372036854775807)-1) |
| 94 |
|
| 95 |
#define INT8_MAX (127) |
| 96 |
#define INT16_MAX (32767) |
| 97 |
#define INT32_MAX (2147483647) |
| 98 |
#define INT64_MAX (__INT64_C(9223372036854775807)) |
| 99 |
|
| 100 |
|
| 101 |
#define UINT8_MAX (255) |
| 102 |
#define UINT16_MAX (65535) |
| 103 |
#define UINT32_MAX (4294967295U) |
| 104 |
#define UINT64_MAX (__UINT64_C(18446744073709551615)) |
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
#define INT_LEAST8_MIN (-128) |
| 109 |
#define INT_LEAST16_MIN (-32767-1) |
| 110 |
#define INT_LEAST32_MIN (-2147483647-1) |
| 111 |
#define INT_LEAST64_MIN (-__INT64_C(9223372036854775807)-1) |
| 112 |
|
| 113 |
#define INT_LEAST8_MAX (127) |
| 114 |
#define INT_LEAST16_MAX (32767) |
| 115 |
#define INT_LEAST32_MAX (2147483647) |
| 116 |
#define INT_LEAST64_MAX (__INT64_C(9223372036854775807)) |
| 117 |
|
| 118 |
|
| 119 |
#define UINT_LEAST8_MAX (255) |
| 120 |
#define UINT_LEAST16_MAX (65535) |
| 121 |
#define UINT_LEAST32_MAX (4294967295U) |
| 122 |
#define UINT_LEAST64_MAX (__UINT64_C(18446744073709551615)) |
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
#define INT_FAST8_MIN (-128) |
| 127 |
#define INT_FAST16_MIN (-32768) |
| 128 |
#define INT_FAST32_MIN (-2147483647-1) |
| 129 |
#define INT_FAST64_MIN (-__INT64_C(9223372036854775807)-1) |
| 130 |
|
| 131 |
#define INT_FAST8_MAX (127) |
| 132 |
#define INT_FAST16_MAX (32767) |
| 133 |
#define INT_FAST32_MAX (2147483647) |
| 134 |
#define INT_FAST64_MAX (__INT64_C(9223372036854775807)) |
| 135 |
|
| 136 |
|
| 137 |
#define UINT_FAST8_MAX (255U) |
| 138 |
#define UINT_FAST16_MAX (65535U) |
| 139 |
#define UINT_FAST32_MAX (4294967295UL) |
| 140 |
#define UINT_FAST64_MAX (__UINT64_C(18446744073709551615)) |
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
#define INTPTR_MIN (-32768) |
| 145 |
#define INTPTR_MAX (32767) |
| 146 |
#define UINTPTR_MAX (65535U) |
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
#define INTMAX_MIN (-__INT64_C(9223372036854775807)-1) |
| 151 |
|
| 152 |
#define INTMAX_MAX (__INT64_C(9223372036854775807)) |
| 153 |
|
| 154 |
|
| 155 |
#define UINTMAX_MAX (__UINT64_C(18446744073709551615)) |
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
#define PTRDIFF_MIN (-32768) |
| 162 |
#define PTRDIFF_MAX (32767) |
| 163 |
|
| 164 |
|
| 165 |
#define SIG_ATOMIC_MIN (-32768) |
| 166 |
#define SIG_ATOMIC_MAX (32767) |
| 167 |
|
| 168 |
|
| 169 |
#ifndef SIZE_MAX |
| 170 |
#define SIZE_MAX (65535U) |
| 171 |
#endif |
| 172 |
|
| 173 |
|
| 174 |
#ifndef WCHAR_MIN |
| 175 |
|
| 176 |
#define WCHAR_MIN __WCHAR_MIN |
| 177 |
#define WCHAR_MAX __WCHAR_MAX |
| 178 |
#endif |
| 179 |
|
| 180 |
|
| 181 |
#define WINT_MIN (0U) |
| 182 |
#define WINT_MAX (65535U) |
| 183 |
|
| 184 |
#endif |
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS |
| 190 |
|
| 191 |
|
| 192 |
#define INT8_C(c) c |
| 193 |
#define INT16_C(c) c |
| 194 |
#define INT32_C(c) c |
| 195 |
#define INT64_C(c) c ## LL |
| 196 |
|
| 197 |
|
| 198 |
#define UINT8_C(c) c ## U |
| 199 |
#define UINT16_C(c) c ## U |
| 200 |
#define UINT32_C(c) c ## U |
| 201 |
#define UINT64_C(c) c ## ULL |
| 202 |
|
| 203 |
|
| 204 |
#define INTMAX_C(c) c ## LL |
| 205 |
#define UINTMAX_C(c) c ## ULL |
| 206 |
|
| 207 |
#endif |
| 208 |
#endif |