The manual
ginnOS
The reference: libc, the libraries and the kernel
Toggle main menu visibility
Loading...
Searching...
No Matches
stdint.h
Go to the documentation of this file.
1
#pragma once
2
3
/**
4
* @file stdint.h
5
* @brief integer types of fixed width. the types are the compiler's own
6
* (__INT64_TYPE__ and so on), so they agree with it on both
7
* architectures: int64_t is long long on i686 and long on x86_64.
8
*/
9
10
typedef
signed
char
int8_t
;
11
typedef
unsigned
char
uint8_t
;
12
typedef
short
int16_t
;
13
typedef
unsigned
short
uint16_t
;
14
typedef
int
int32_t
;
15
typedef
unsigned
int
uint32_t
;
16
typedef
__INT64_TYPE__
int64_t
;
17
typedef
__UINT64_TYPE__
uint64_t
;
18
typedef
__INTPTR_TYPE__
intptr_t
;
19
typedef
__UINTPTR_TYPE__
uintptr_t
;
20
typedef
__INTMAX_TYPE__
intmax_t
;
21
typedef
__UINTMAX_TYPE__
uintmax_t
;
22
23
// the smallest types of at least a width, and the fastest ones
24
typedef
__INT_LEAST8_TYPE__
int_least8_t
;
25
typedef
__UINT_LEAST8_TYPE__
uint_least8_t
;
26
typedef
__INT_LEAST16_TYPE__
int_least16_t
;
27
typedef
__UINT_LEAST16_TYPE__
uint_least16_t
;
28
typedef
__INT_LEAST32_TYPE__
int_least32_t
;
29
typedef
__UINT_LEAST32_TYPE__
uint_least32_t
;
30
typedef
__INT_LEAST64_TYPE__
int_least64_t
;
31
typedef
__UINT_LEAST64_TYPE__
uint_least64_t
;
32
typedef
__INT_FAST8_TYPE__
int_fast8_t
;
33
typedef
__UINT_FAST8_TYPE__
uint_fast8_t
;
34
typedef
__INT_FAST16_TYPE__
int_fast16_t
;
35
typedef
__UINT_FAST16_TYPE__
uint_fast16_t
;
36
typedef
__INT_FAST32_TYPE__
int_fast32_t
;
37
typedef
__UINT_FAST32_TYPE__
uint_fast32_t
;
38
typedef
__INT_FAST64_TYPE__
int_fast64_t
;
39
typedef
__UINT_FAST64_TYPE__
uint_fast64_t
;
40
41
#define INT8_MIN (-128)
42
#define INT8_MAX 127
43
#define UINT8_MAX 255
44
#define INT16_MIN (-32768)
45
#define INT16_MAX 32767
46
#define UINT16_MAX 65535
47
#define INT32_MIN (-2147483647 - 1)
48
#define INT32_MAX 2147483647
49
#define UINT32_MAX 4294967295u
50
#define INT64_MAX __INT64_MAX__
51
#define INT64_MIN (-INT64_MAX - 1)
52
#define UINT64_MAX __UINT64_MAX__
53
#define INTMAX_MAX __INTMAX_MAX__
54
#define INTMAX_MIN (-INTMAX_MAX - 1)
55
#define UINTMAX_MAX __UINTMAX_MAX__
56
#define INT64_C(c) __INT64_C(c)
57
#define UINT64_C(c) __UINT64_C(c)
58
#define INTPTR_MAX __INTPTR_MAX__
59
#define INTPTR_MIN (-INTPTR_MAX - 1)
60
#define UINTPTR_MAX __UINTPTR_MAX__
61
#define SIZE_MAX __SIZE_MAX__
62
#define PTRDIFF_MAX __PTRDIFF_MAX__
63
#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)
64
#define SIG_ATOMIC_MAX __SIG_ATOMIC_MAX__
65
#define SIG_ATOMIC_MIN __SIG_ATOMIC_MIN__
66
#define WCHAR_MAX __WCHAR_MAX__
67
#define WCHAR_MIN __WCHAR_MIN__
68
#define WINT_MAX __WINT_MAX__
69
#define WINT_MIN __WINT_MIN__
70
71
#define INT_LEAST8_MAX __INT_LEAST8_MAX__
72
#define INT_LEAST8_MIN (-INT_LEAST8_MAX - 1)
73
#define UINT_LEAST8_MAX __UINT_LEAST8_MAX__
74
#define INT_LEAST16_MAX __INT_LEAST16_MAX__
75
#define INT_LEAST16_MIN (-INT_LEAST16_MAX - 1)
76
#define UINT_LEAST16_MAX __UINT_LEAST16_MAX__
77
#define INT_LEAST32_MAX __INT_LEAST32_MAX__
78
#define INT_LEAST32_MIN (-INT_LEAST32_MAX - 1)
79
#define UINT_LEAST32_MAX __UINT_LEAST32_MAX__
80
#define INT_LEAST64_MAX __INT_LEAST64_MAX__
81
#define INT_LEAST64_MIN (-INT_LEAST64_MAX - 1)
82
#define UINT_LEAST64_MAX __UINT_LEAST64_MAX__
83
#define INT_FAST8_MAX __INT_FAST8_MAX__
84
#define INT_FAST8_MIN (-INT_FAST8_MAX - 1)
85
#define UINT_FAST8_MAX __UINT_FAST8_MAX__
86
#define INT_FAST16_MAX __INT_FAST16_MAX__
87
#define INT_FAST16_MIN (-INT_FAST16_MAX - 1)
88
#define UINT_FAST16_MAX __UINT_FAST16_MAX__
89
#define INT_FAST32_MAX __INT_FAST32_MAX__
90
#define INT_FAST32_MIN (-INT_FAST32_MAX - 1)
91
#define UINT_FAST32_MAX __UINT_FAST32_MAX__
92
#define INT_FAST64_MAX __INT_FAST64_MAX__
93
#define INT_FAST64_MIN (-INT_FAST64_MAX - 1)
94
#define UINT_FAST64_MAX __UINT_FAST64_MAX__
95
96
// constants of the least types and intmax_t
97
#define INT8_C(c) __INT8_C(c)
98
#define UINT8_C(c) __UINT8_C(c)
99
#define INT16_C(c) __INT16_C(c)
100
#define UINT16_C(c) __UINT16_C(c)
101
#define INT32_C(c) __INT32_C(c)
102
#define UINT32_C(c) __UINT32_C(c)
103
#define INTMAX_C(c) __INTMAX_C(c)
104
#define UINTMAX_C(c) __UINTMAX_C(c)
uint32_t
unsigned int uint32_t
Definition
fb.h:17
uint8_t
unsigned char uint8_t
Definition
fb.h:18
intptr_t
__INTPTR_TYPE__ intptr_t
Definition
stdint.h:18
uint_least16_t
__UINT_LEAST16_TYPE__ uint_least16_t
Definition
stdint.h:27
uint64_t
__UINT64_TYPE__ uint64_t
Definition
stdint.h:17
uint_fast8_t
__UINT_FAST8_TYPE__ uint_fast8_t
Definition
stdint.h:33
uint16_t
unsigned short uint16_t
Definition
stdint.h:13
int32_t
int int32_t
Definition
stdint.h:14
int_least16_t
__INT_LEAST16_TYPE__ int_least16_t
Definition
stdint.h:26
int_least32_t
__INT_LEAST32_TYPE__ int_least32_t
Definition
stdint.h:28
uintptr_t
__UINTPTR_TYPE__ uintptr_t
Definition
stdint.h:19
uintmax_t
__UINTMAX_TYPE__ uintmax_t
Definition
stdint.h:21
int_fast32_t
__INT_FAST32_TYPE__ int_fast32_t
Definition
stdint.h:36
uint_least8_t
__UINT_LEAST8_TYPE__ uint_least8_t
Definition
stdint.h:25
uint_fast64_t
__UINT_FAST64_TYPE__ uint_fast64_t
Definition
stdint.h:39
uint_least32_t
__UINT_LEAST32_TYPE__ uint_least32_t
Definition
stdint.h:29
int_fast16_t
__INT_FAST16_TYPE__ int_fast16_t
Definition
stdint.h:34
int_least64_t
__INT_LEAST64_TYPE__ int_least64_t
Definition
stdint.h:30
int_fast8_t
__INT_FAST8_TYPE__ int_fast8_t
Definition
stdint.h:32
int16_t
short int16_t
Definition
stdint.h:12
uint_fast32_t
__UINT_FAST32_TYPE__ uint_fast32_t
Definition
stdint.h:37
uint_fast16_t
__UINT_FAST16_TYPE__ uint_fast16_t
Definition
stdint.h:35
uint_least64_t
__UINT_LEAST64_TYPE__ uint_least64_t
Definition
stdint.h:31
int_fast64_t
__INT_FAST64_TYPE__ int_fast64_t
Definition
stdint.h:38
int64_t
__INT64_TYPE__ int64_t
Definition
stdint.h:16
int_least8_t
__INT_LEAST8_TYPE__ int_least8_t
Definition
stdint.h:24
intmax_t
__INTMAX_TYPE__ intmax_t
Definition
stdint.h:20
int8_t
signed char int8_t
fixed-width integer types.
Definition
stdint.h:10
src
libc
include
stdint.h
Generated by
1.18.0