Lazuli
stdint.h
Go to the documentation of this file.
1 /*
2  * SPDX-License-Identifier: GPL-3.0-only
3  * This file is part of Lazuli.
4  */
5 
21 #ifndef STDINT_H
22 #define STDINT_H
23 
27 typedef char int8_t;
28 
32 typedef short int16_t;
33 
37 typedef int int32_t;
38 
42 typedef long int64_t;
43 
47 typedef char int_fast8_t;
48 
52 typedef short int_fast16_t;
53 
57 typedef int int_fast32_t;
58 
62 typedef long int_fast64_t;
63 
67 typedef unsigned char int_least8_t;
68 
72 typedef unsigned short int_least16_t;
73 
77 typedef unsigned int int_least32_t;
78 
82 typedef unsigned long int_least64_t;
83 
90 typedef int64_t intmax_t;
91 
99 typedef int64_t intptr_t;
100 
104 typedef unsigned char uint8_t;
105 
109 typedef unsigned short uint16_t;
110 
114 typedef unsigned int uint32_t;
115 
119 typedef unsigned long uint64_t;
120 
124 typedef unsigned char uint_fast8_t;
125 
129 typedef unsigned short uint_fast16_t;
130 
134 typedef unsigned int uint_fast32_t;
135 
139 typedef unsigned long uint_fast64_t;
140 
144 typedef unsigned char uint_least8_t;
145 
149 typedef unsigned short uint_least16_t;
150 
154 typedef unsigned int uint_least32_t;
155 
159 typedef unsigned long uint_least64_t;
160 
168 
177 
181 #define INT8_MIN ((int8_t)0x80)
182 
186 #define INT16_MIN ((int16_t)0x8000)
187 
191 #define INT32_MIN ((int32_t)0x80000000)
192 
196 #define INT64_MIN ((int64_t)0x8000000000000000)
197 
201 #define INT_FAST8_MIN INT8_MIN
202 
206 #define INT_FAST16_MIN INT16_MIN
207 
211 #define INT_FAST32_MIN INT32_MIN
212 
216 #define INT_FAST64_MIN INT64_MIN
217 
221 #define INT_LEAST8_MIN INT8_MIN
222 
226 #define INT_LEAST16_MIN INT16_MIN
227 
231 #define INT_LEAST32_MIN INT32_MIN
232 
236 #define INT_LEAST64_MIN INT64_MIN
237 
241 #define INTPTR_MIN INT64_MIN
242 
246 #define INT8_MAX ((int8_t)0x7f)
247 
251 #define INT16_MAX ((int16_t)0x7fff)
252 
256 #define INT32_MAX ((int32_t)0x7fffffff)
257 
261 #define INT64_MAX ((int64_t)0x7fffffffffffffff)
262 
266 #define INT_FAST8_MAX INT8_MAX
267 
271 #define INT_FAST16_MAX INT16_MAX
272 
276 #define INT_FAST32_MAX INT32_MAX
277 
281 #define INT_FAST64_MAX INT64_MAX
282 
286 #define INT_LEAST8_MAX INT8_MAX
287 
291 #define INT_LEAST16_MAX INT16_MAX
292 
296 #define INT_LEAST32_MAX INT32_MAX
297 
301 #define INT_LEAST64_MAX INT64_MAX
302 
306 #define INTPTR_MAX INT64_MAX
307 
311 #define UINT8_MAX ((uint8_t)0xff)
312 
316 #define UINT16_MAX ((uint16_t)0xffff)
317 
321 #define UINT32_MAX ((uint32_t)0xffffffff)
322 
326 #define UINT64_MAX ((uint64_t)0xffffffffffffffff)
327 
331 #define UINT_FAST8_MAX UINT8_MAX
332 
336 #define UINT_FAST16_MAX UINT16_MAX
337 
341 #define UINT_FAST32_MAX UINT32_MAX
342 
346 #define UINT_FAST64_MAX UINT64_MAX
347 
351 #define UINT_LEAST8_MAX UINT8_MAX
352 
356 #define UINT_LEAST16_MAX UINT16_MAX
357 
361 #define UINT_LEAST32_MAX UINT32_MAX
362 
366 #define UINT_LEAST64_MAX UINT64_MAX
367 
371 #define UINTPTR_MAX UINT64_MAX
372 
376 #define UINTMAX_MAX UINT64_MAX
377 
382 #define INT8_C(X) ((int_least8_t)(X))
383 
388 #define INT16_C(X) ((int_least16_t)(X))
389 
394 #define INT32_C(X) ((int_least32_t)(X))
395 
400 #define INT64_C(X) ((int_least64_t)(X))
401 
406 #define INTMAX_C(X) ((intmax_t)(X))
407 
412 #define UINT8_C(X) ((uint_least8_t)(X))
413 
418 #define UINT16_C(X) ((uint_least16_t)(X))
419 
424 #define UINT32_C(X) ((uint_least32_t)(X))
425 
430 #define UINT64_C(X) ((uint_least64_t)(X))
431 
436 #define UINTMAX_C(X) ((uintmax_t)(X))
437 
438 /* Format macro constants not defined */
439 
440 #endif /* STDINT_H */
char int8_t
Represents a signed integer type with width of exactly 8 bits.
Definition: stdint.h:27
unsigned long uint32_t
Represents a unsigned integer type with width of exactly 32 bits.
Definition: stdint.h:99
long int64_t
Represents a signed integer type with width of exactly 64 bits.
Definition: stdint.h:42
unsigned long uint_least64_t
Represents the smallest unsigned integer type with width of at least 64 bits.
Definition: stdint.h:159
unsigned char uint_fast8_t
Represents the fastest unsigned integer type with width of at least 8 bits.
Definition: stdint.h:104
int16_t intptr_t
Represents an integer capable of holding a pointer.
Definition: stdint.h:84
unsigned long uint_least32_t
Represents the smallest unsigned integer type with width of at least 32 bits.
Definition: stdint.h:129
unsigned int uint_fast16_t
Represents the fastest unsigned integer type with width of at least 16 bits.
Definition: stdint.h:109
int int_fast16_t
Represents the fastest signed integer type with width of at least 16 bits.
Definition: stdint.h:47
unsigned int uint_least16_t
Represents the smallest unsigned integer type with width of at least 16 bits.
Definition: stdint.h:124
unsigned int uint16_t
Represents a unsigned integer type with width of exactly 16 bits.
Definition: stdint.h:94
unsigned long uint64_t
Represents a unsigned integer type with width of exactly 64 bits.
Definition: stdint.h:119
int32_t intmax_t
Represents the maximum width integer type.
Definition: stdint.h:75
char int_fast8_t
Represents the fastest signed integer type with width of at least 8 bits.
Definition: stdint.h:42
unsigned char uint8_t
Represents a unsigned integer type with width of exactly 8 bits.
Definition: stdint.h:89
unsigned long uint_fast32_t
Represents the fastest unsigned integer type with width of at least 32 bits.
Definition: stdint.h:114
unsigned long int_least64_t
Represents the smallest signed integer type with width of at least 64 bits.
Definition: stdint.h:82
unsigned char int_least8_t
Represents the smallest signed integer type with width of at least 8 bits.
Definition: stdint.h:57
uint16_t uintptr_t
Represents an unsigned integer capable of holding a pointer.
Definition: stdint.h:146
int int16_t
Represents a signed integer type with width of exactly 16 bits.
Definition: stdint.h:32
unsigned long uint_fast64_t
Represents the fastest unsigned integer type with width of at least 64 bits.
Definition: stdint.h:139
long int_fast32_t
Represents the fastest signed integer type with width of at least 32 bits.
Definition: stdint.h:52
long int32_t
Represents a signed integer type with width of exactly 32 bits.
Definition: stdint.h:37
unsigned char uint_least8_t
Represents the smallest unsigned integer type with width of at least 8 bits.
Definition: stdint.h:119
uint32_t uintmax_t
Represents the maximum width unsigned integer type.
Definition: stdint.h:137
unsigned long int_least32_t
Represents the smallest signed integer type with width of at least 32 bits.
Definition: stdint.h:67
long int_fast64_t
Represents the fastest signed integer type with width of at least 64 bits.
Definition: stdint.h:62
unsigned int int_least16_t
Represents the smallest signed integer type with width of at least 16 bits.
Definition: stdint.h:62