]> git.proxmox.com Git - wasi-libc.git/blob - libc-bottom-half/headers/public/__header_inttypes.h
__wasi_thread_spawn: stop truncating the return value (#353)
[wasi-libc.git] / libc-bottom-half / headers / public / __header_inttypes.h
1 #ifndef __wasilibc___include_inttypes_h
2 #define __wasilibc___include_inttypes_h
3
4 #include <stdint.h>
5
6 #define __need_wchar_t
7 #include <stddef.h>
8
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12
13 typedef struct { intmax_t quot, rem; } imaxdiv_t;
14
15 intmax_t imaxabs(intmax_t);
16 imaxdiv_t imaxdiv(intmax_t, intmax_t);
17 intmax_t strtoimax(const char *__restrict, char **__restrict, int);
18 uintmax_t strtoumax(const char *__restrict, char **__restrict, int);
19 intmax_t wcstoimax(const wchar_t *__restrict, wchar_t **__restrict, int);
20 uintmax_t wcstoumax(const wchar_t *__restrict, wchar_t **__restrict, int);
21
22 #define PRId16 __INT16_FMTd__
23 #define PRIi16 __INT16_FMTi__
24 #define PRId32 __INT32_FMTd__
25 #define PRIi32 __INT32_FMTi__
26 #define PRId64 __INT64_FMTd__
27 #define PRIi64 __INT64_FMTi__
28 #define PRId8 __INT8_FMTd__
29 #define PRIi8 __INT8_FMTi__
30 #define PRIdMAX __INTMAX_FMTd__
31 #define PRIiMAX __INTMAX_FMTi__
32 #define PRIdPTR __INTPTR_FMTd__
33 #define PRIiPTR __INTPTR_FMTi__
34 #define PRIdFAST16 __INT_FAST16_FMTd__
35 #define PRIiFAST16 __INT_FAST16_FMTi__
36 #define PRIdFAST32 __INT_FAST32_FMTd__
37 #define PRIiFAST32 __INT_FAST32_FMTi__
38 #define PRIdFAST64 __INT_FAST64_FMTd__
39 #define PRIiFAST64 __INT_FAST64_FMTi__
40 #define PRIdFAST8 __INT_FAST8_FMTd__
41 #define PRIiFAST8 __INT_FAST8_FMTi__
42 #define PRIdLEAST16 __INT_LEAST16_FMTd__
43 #define PRIiLEAST16 __INT_LEAST16_FMTi__
44 #define PRIdLEAST32 __INT_LEAST32_FMTd__
45 #define PRIiLEAST32 __INT_LEAST32_FMTi__
46 #define PRIdLEAST64 __INT_LEAST64_FMTd__
47 #define PRIiLEAST64 __INT_LEAST64_FMTi__
48 #define PRIdLEAST8 __INT_LEAST8_FMTd__
49 #define PRIiLEAST8 __INT_LEAST8_FMTi__
50 #define PRIX16 __UINT16_FMTX__
51 #define PRIo16 __UINT16_FMTo__
52 #define PRIu16 __UINT16_FMTu__
53 #define PRIx16 __UINT16_FMTx__
54 #define PRIX32 __UINT32_FMTX__
55 #define PRIo32 __UINT32_FMTo__
56 #define PRIu32 __UINT32_FMTu__
57 #define PRIx32 __UINT32_FMTx__
58 #define PRIX64 __UINT64_FMTX__
59 #define PRIo64 __UINT64_FMTo__
60 #define PRIu64 __UINT64_FMTu__
61 #define PRIx64 __UINT64_FMTx__
62 #define PRIX8 __UINT8_FMTX__
63 #define PRIo8 __UINT8_FMTo__
64 #define PRIu8 __UINT8_FMTu__
65 #define PRIx8 __UINT8_FMTx__
66 #define PRIXMAX __UINTMAX_FMTX__
67 #define PRIoMAX __UINTMAX_FMTo__
68 #define PRIuMAX __UINTMAX_FMTu__
69 #define PRIxMAX __UINTMAX_FMTx__
70 #define PRIXPTR __UINTPTR_FMTX__
71 #define PRIoPTR __UINTPTR_FMTo__
72 #define PRIuPTR __UINTPTR_FMTu__
73 #define PRIxPTR __UINTPTR_FMTx__
74 #define PRIXFAST16 __UINT_FAST16_FMTX__
75 #define PRIoFAST16 __UINT_FAST16_FMTo__
76 #define PRIuFAST16 __UINT_FAST16_FMTu__
77 #define PRIxFAST16 __UINT_FAST16_FMTx__
78 #define PRIXFAST32 __UINT_FAST32_FMTX__
79 #define PRIoFAST32 __UINT_FAST32_FMTo__
80 #define PRIuFAST32 __UINT_FAST32_FMTu__
81 #define PRIxFAST32 __UINT_FAST32_FMTx__
82 #define PRIXFAST64 __UINT_FAST64_FMTX__
83 #define PRIoFAST64 __UINT_FAST64_FMTo__
84 #define PRIuFAST64 __UINT_FAST64_FMTu__
85 #define PRIxFAST64 __UINT_FAST64_FMTx__
86 #define PRIXFAST8 __UINT_FAST8_FMTX__
87 #define PRIoFAST8 __UINT_FAST8_FMTo__
88 #define PRIuFAST8 __UINT_FAST8_FMTu__
89 #define PRIxFAST8 __UINT_FAST8_FMTx__
90 #define PRIXLEAST16 __UINT_LEAST16_FMTX__
91 #define PRIoLEAST16 __UINT_LEAST16_FMTo__
92 #define PRIuLEAST16 __UINT_LEAST16_FMTu__
93 #define PRIxLEAST16 __UINT_LEAST16_FMTx__
94 #define PRIXLEAST32 __UINT_LEAST32_FMTX__
95 #define PRIoLEAST32 __UINT_LEAST32_FMTo__
96 #define PRIuLEAST32 __UINT_LEAST32_FMTu__
97 #define PRIxLEAST32 __UINT_LEAST32_FMTx__
98 #define PRIXLEAST64 __UINT_LEAST64_FMTX__
99 #define PRIoLEAST64 __UINT_LEAST64_FMTo__
100 #define PRIuLEAST64 __UINT_LEAST64_FMTu__
101 #define PRIxLEAST64 __UINT_LEAST64_FMTx__
102 #define PRIXLEAST8 __UINT_LEAST8_FMTX__
103 #define PRIoLEAST8 __UINT_LEAST8_FMTo__
104 #define PRIuLEAST8 __UINT_LEAST8_FMTu__
105 #define PRIxLEAST8 __UINT_LEAST8_FMTx__
106
107 #define SCNd16 __INT16_FMTd__
108 #define SCNi16 __INT16_FMTi__
109 #define SCNd32 __INT32_FMTd__
110 #define SCNi32 __INT32_FMTi__
111 #define SCNd64 __INT64_FMTd__
112 #define SCNi64 __INT64_FMTi__
113 #define SCNd8 __INT8_FMTd__
114 #define SCNi8 __INT8_FMTi__
115 #define SCNdMAX __INTMAX_FMTd__
116 #define SCNiMAX __INTMAX_FMTi__
117 #define SCNdPTR __INTPTR_FMTd__
118 #define SCNiPTR __INTPTR_FMTi__
119 #define SCNdFAST16 __INT_FAST16_FMTd__
120 #define SCNiFAST16 __INT_FAST16_FMTi__
121 #define SCNdFAST32 __INT_FAST32_FMTd__
122 #define SCNiFAST32 __INT_FAST32_FMTi__
123 #define SCNdFAST64 __INT_FAST64_FMTd__
124 #define SCNiFAST64 __INT_FAST64_FMTi__
125 #define SCNdFAST8 __INT_FAST8_FMTd__
126 #define SCNiFAST8 __INT_FAST8_FMTi__
127 #define SCNdLEAST16 __INT_LEAST16_FMTd__
128 #define SCNiLEAST16 __INT_LEAST16_FMTi__
129 #define SCNdLEAST32 __INT_LEAST32_FMTd__
130 #define SCNiLEAST32 __INT_LEAST32_FMTi__
131 #define SCNdLEAST64 __INT_LEAST64_FMTd__
132 #define SCNiLEAST64 __INT_LEAST64_FMTi__
133 #define SCNdLEAST8 __INT_LEAST8_FMTd__
134 #define SCNiLEAST8 __INT_LEAST8_FMTi__
135 #define SCNo16 __UINT16_FMTo__
136 #define SCNu16 __UINT16_FMTu__
137 #define SCNx16 __UINT16_FMTx__
138 #define SCNo32 __UINT32_FMTo__
139 #define SCNu32 __UINT32_FMTu__
140 #define SCNx32 __UINT32_FMTx__
141 #define SCNo64 __UINT64_FMTo__
142 #define SCNu64 __UINT64_FMTu__
143 #define SCNx64 __UINT64_FMTx__
144 #define SCNo8 __UINT8_FMTo__
145 #define SCNu8 __UINT8_FMTu__
146 #define SCNx8 __UINT8_FMTx__
147 #define SCNoMAX __UINTMAX_FMTo__
148 #define SCNuMAX __UINTMAX_FMTu__
149 #define SCNxMAX __UINTMAX_FMTx__
150 #define SCNoPTR __UINTPTR_FMTo__
151 #define SCNuPTR __UINTPTR_FMTu__
152 #define SCNxPTR __UINTPTR_FMTx__
153 #define SCNoFAST16 __UINT_FAST16_FMTo__
154 #define SCNuFAST16 __UINT_FAST16_FMTu__
155 #define SCNxFAST16 __UINT_FAST16_FMTx__
156 #define SCNoFAST32 __UINT_FAST32_FMTo__
157 #define SCNuFAST32 __UINT_FAST32_FMTu__
158 #define SCNxFAST32 __UINT_FAST32_FMTx__
159 #define SCNoFAST64 __UINT_FAST64_FMTo__
160 #define SCNuFAST64 __UINT_FAST64_FMTu__
161 #define SCNxFAST64 __UINT_FAST64_FMTx__
162 #define SCNoFAST8 __UINT_FAST8_FMTo__
163 #define SCNuFAST8 __UINT_FAST8_FMTu__
164 #define SCNxFAST8 __UINT_FAST8_FMTx__
165 #define SCNoLEAST16 __UINT_LEAST16_FMTo__
166 #define SCNuLEAST16 __UINT_LEAST16_FMTu__
167 #define SCNxLEAST16 __UINT_LEAST16_FMTx__
168 #define SCNoLEAST32 __UINT_LEAST32_FMTo__
169 #define SCNuLEAST32 __UINT_LEAST32_FMTu__
170 #define SCNxLEAST32 __UINT_LEAST32_FMTx__
171 #define SCNoLEAST64 __UINT_LEAST64_FMTo__
172 #define SCNuLEAST64 __UINT_LEAST64_FMTu__
173 #define SCNxLEAST64 __UINT_LEAST64_FMTx__
174 #define SCNoLEAST8 __UINT_LEAST8_FMTo__
175 #define SCNuLEAST8 __UINT_LEAST8_FMTu__
176 #define SCNxLEAST8 __UINT_LEAST8_FMTx__
177
178 #ifdef __cplusplus
179 }
180 #endif
181
182 #endif