21 #ifndef P99_C99_THROW_H_
22 # define P99_C99_THROW_H_
66 #define P00_LIB_WRAP_DOC(NAME)
69 P00_LIB_WRAP_DOC(feclearexcept)
70 #define feclearexcept_throw(...) P99_THROW_CALL_ZERO(feclearexcept, EINVAL, __VA_ARGS__)
71 P00_LIB_WRAP_DOC(fegetexceptflag)
72 #define fegetexceptflag_throw(...) P99_THROW_CALL_ZERO(fegetexceptflag, EINVAL, __VA_ARGS__)
73 P00_LIB_WRAP_DOC(feraiseexcept)
74 #define feraiseexcept_throw(...) P99_THROW_CALL_ZERO(feraiseexcept, EINVAL, __VA_ARGS__)
75 P00_LIB_WRAP_DOC(fesetexceptflag)
76 #define fesetexceptflag_throw(...) P99_THROW_CALL_ZERO(fesetexceptflag, EINVAL, __VA_ARGS__)
77 P00_LIB_WRAP_DOC(fetestexcept)
78 #define fetestexcept_throw(...) P99_THROW_CALL_ZERO(fetestexcept, EINVAL, __VA_ARGS__)
79 P00_LIB_WRAP_DOC(fegetround)
80 #define fegetround_throw(...) P99_THROW_CALL_ZERO(fegetround, EINVAL, __VA_ARGS__)
81 P00_LIB_WRAP_DOC(fesetround)
82 #define fesetround_throw(...) P99_THROW_CALL_ZERO(fesetround, EINVAL, __VA_ARGS__)
83 P00_LIB_WRAP_DOC(fegetenv)
84 #define fegetenv_throw(...) P99_THROW_CALL_ZERO(fegetenv, EINVAL, __VA_ARGS__)
85 P00_LIB_WRAP_DOC(feholdexcept)
86 #define feholdexcept_throw(...) P99_THROW_CALL_ZERO(feholdexcept, EINVAL, __VA_ARGS__)
87 P00_LIB_WRAP_DOC(fesetenv)
88 #define fesetenv_throw(...) P99_THROW_CALL_ZERO(fesetenv, EINVAL, __VA_ARGS__)
89 P00_LIB_WRAP_DOC(feupdateenv)
90 #define feupdateenv_throw(...) P99_THROW_CALL_ZERO(feupdateenv, EINVAL, __VA_ARGS__)
94 #define strtoimax_throw(...) P99_THROW_CALL_RANGE(strtoimax, __VA_ARGS__)
96 #define strtoumax_throw(...) P99_THROW_CALL_RANGE(strtoumax, __VA_ARGS__)
98 #define wcstoimax_throw(...) P99_THROW_CALL_RANGE(wcstoimax, __VA_ARGS__)
100 #define wcstoumax_throw(...) P99_THROW_CALL_RANGE(wcstoumax, __VA_ARGS__)
108 P00_LIB_WRAP_DOC(
raise)
109 #define raise_throw(...) P99_THROW_CALL_ZERO(raise, EINVAL, __VA_ARGS__)
114 P00_LIB_WRAP_DOC(fclose)
115 #define fclose_throw(...) P99_THROW_CALL_ZERO(fclose, EINVAL, __VA_ARGS__)
116 P00_LIB_WRAP_DOC(fflush)
117 #define fflush_throw(...) P99_THROW_CALL_ZERO(fflush, EINVAL, __VA_ARGS__)
118 P00_LIB_WRAP_DOC(fgetc)
119 #define fgetc_throw(...) P99_THROW_CALL_NEG(fgetc, EINVAL, __VA_ARGS__)
120 P00_LIB_WRAP_DOC(fgetpos)
121 #define fgetpos_throw(...) P99_THROW_CALL_ZERO(fgetpos, EINVAL, __VA_ARGS__)
122 P00_LIB_WRAP_DOC(fgets)
123 #define fgets_throw(...) P99_THROW_CALL_VOIDP(fgets, EINVAL, __VA_ARGS__)
124 P00_LIB_WRAP_DOC(fopen)
125 #define fopen_throw(...) P99_THROW_CALL_VOIDP(fopen, EINVAL, __VA_ARGS__)
126 P00_LIB_WRAP_DOC(fprintf)
127 #define fprintf_throw(...) P99_THROW_CALL_NEG(fprintf, EINVAL, __VA_ARGS__)
128 P00_LIB_WRAP_DOC(fputc)
129 #define fputc_throw(...) P99_THROW_CALL_NEG(fputc, EINVAL, __VA_ARGS__)
130 P00_LIB_WRAP_DOC(fputs)
131 #define fputs_throw(...) P99_THROW_CALL_NEG(fputs, EINVAL, __VA_ARGS__)
132 P00_LIB_WRAP_DOC(freopen)
133 #define freopen_throw(...) P99_THROW_CALL_VOIDP(freopen, EINVAL, __VA_ARGS__)
134 P00_LIB_WRAP_DOC(fscanf)
135 #define fscanf_throw(...) P99_THROW_CALL_NEG(fscanf, EINVAL, __VA_ARGS__)
136 P00_LIB_WRAP_DOC(fseek)
137 #define fseek_throw(...) P99_THROW_CALL_ZERO(fseek, EINVAL, __VA_ARGS__)
138 P00_LIB_WRAP_DOC(fsetpos)
139 #define fsetpos_throw(...) P99_THROW_CALL_ZERO(fsetpos, EINVAL, __VA_ARGS__)
140 P00_LIB_WRAP_DOC(ftell)
141 #define ftell_throw(...) P99_THROW_CALL_NEG(ftell, EINVAL, __VA_ARGS__)
142 P00_LIB_WRAP_DOC(getc)
143 #define getc_throw(...) P99_THROW_CALL_NEG(getc, EINVAL, __VA_ARGS__)
144 P00_LIB_WRAP_DOC(getchar)
145 #define getchar_throw(...) P99_THROW_CALL_NEG(getchar, EINVAL, __VA_ARGS__)
146 P00_LIB_WRAP_DOC(printf)
147 #define printf_throw(...) P99_THROW_CALL_NEG(printf, EINVAL, __VA_ARGS__)
148 P00_LIB_WRAP_DOC(putc)
149 #define putc_throw(...) P99_THROW_CALL_NEG(putc, EINVAL, __VA_ARGS__)
150 P00_LIB_WRAP_DOC(putchar)
151 #define putchar_throw(...) P99_THROW_CALL_NEG(putchar, EINVAL, __VA_ARGS__)
152 P00_LIB_WRAP_DOC(puts)
153 #define puts_throw(...) P99_THROW_CALL_NEG(puts, EINVAL, __VA_ARGS__)
154 P00_LIB_WRAP_DOC(remove)
155 #define remove_throw(...) P99_THROW_CALL_NEG(remove, EINVAL, __VA_ARGS__)
156 P00_LIB_WRAP_DOC(rename)
157 #define rename_throw(...) P99_THROW_CALL_NEG(rename, EINVAL, __VA_ARGS__)
158 P00_LIB_WRAP_DOC(scanf)
159 #define scanf_throw(...) P99_THROW_CALL_NEG(scanf, EINVAL, __VA_ARGS__)
160 P00_LIB_WRAP_DOC(setvbuf)
161 #define setvbuf_throw(...) P99_THROW_CALL_ZERO(setvbuf, EINVAL, __VA_ARGS__)
162 P00_LIB_WRAP_DOC(snprintf)
163 #define snprintf_throw(...) P99_THROW_CALL_NEG(snprintf, EINVAL, __VA_ARGS__)
164 P00_LIB_WRAP_DOC(sprintf)
165 #define sprintf_throw(...) P99_THROW_CALL_NEG(sprintf, EINVAL, __VA_ARGS__)
166 P00_LIB_WRAP_DOC(sscanf)
167 #define sscanf_throw(...) P99_THROW_CALL_NEG(sscanf, EINVAL, __VA_ARGS__)
168 P00_LIB_WRAP_DOC(tmpfile)
169 #define tmpfile_throw(...) P99_THROW_CALL_VOIDP(tmpfile, EINVAL, __VA_ARGS__)
170 P00_LIB_WRAP_DOC(tmpnam)
171 #define tmpnam_throw(...) P99_THROW_CALL_VOIDP(tmpnam, EINVAL, __VA_ARGS__)
172 P00_LIB_WRAP_DOC(ungetc)
173 #define ungetc_throw(...) P99_THROW_CALL_NEG(ungetc, EINVAL, __VA_ARGS__)
174 P00_LIB_WRAP_DOC(vfprintf)
175 #define vfprintf_throw(...) P99_THROW_CALL_NEG(vfprintf, EINVAL, __VA_ARGS__)
176 P00_LIB_WRAP_DOC(vfscanf)
177 #define vfscanf_throw(...) P99_THROW_CALL_NEG(vfscanf, EINVAL, __VA_ARGS__)
178 P00_LIB_WRAP_DOC(vprintf)
179 #define vprintf_throw(...) P99_THROW_CALL_NEG(vprintf, EINVAL, __VA_ARGS__)
180 P00_LIB_WRAP_DOC(vscanf)
181 #define vscanf_throw(...) P99_THROW_CALL_NEG(vscanf, EINVAL, __VA_ARGS__)
182 P00_LIB_WRAP_DOC(vsnprintf)
183 #define vsnprintf_throw(...) P99_THROW_CALL_NEG(vsnprintf, EINVAL, __VA_ARGS__)
184 P00_LIB_WRAP_DOC(vsprintf)
185 #define vsprintf_throw(...) P99_THROW_CALL_NEG(vsprintf, EINVAL, __VA_ARGS__)
186 P00_LIB_WRAP_DOC(vsscanf)
187 #define vsscanf_throw(...) P99_THROW_CALL_NEG(vsscanf, EINVAL, __VA_ARGS__)
202 #define aligned_alloc_throw(...) P99_THROW_CALL_VOIDP(aligned_alloc, thrd_nomem, __VA_ARGS__)
203 P00_LIB_WRAP_DOC(at_quick_exit)
204 #define at_quick_exit_throw(...) P99_THROW_CALL_ZERO(at_quick_exit, EINVAL, __VA_ARGS__)
205 P00_LIB_WRAP_DOC(atexit)
206 #define atexit_throw(...) P99_THROW_CALL_ZERO(atexit, EINVAL, __VA_ARGS__)
208 #define calloc_throw(...) P99_THROW_CALL_VOIDP(calloc, thrd_nomem, __VA_ARGS__)
209 P00_LIB_WRAP_DOC(getenv)
210 #define getenv_throw(...) P99_THROW_CALL_NEG(getenv, EINVAL, __VA_ARGS__)
211 P00_LIB_WRAP_DOC(malloc)
212 #define malloc_throw(...) P99_THROW_CALL_VOIDP(malloc, thrd_nomem, __VA_ARGS__)
213 P00_LIB_WRAP_DOC(mblen)
214 #define mblen_throw(...) P99_THROW_CALL_NEG(mblen, EINVAL, __VA_ARGS__)
215 P00_LIB_WRAP_DOC(mbtowc)
216 #define mbtowc_throw(...) P99_THROW_CALL_NEG(mbtowc, EINVAL, __VA_ARGS__)
217 P00_LIB_WRAP_DOC(realloc)
218 #define realloc_throw(...) P99_THROW_CALL_VOIDP(realloc, thrd_nomem, __VA_ARGS__)
220 #define strtod_throw(...) P99_THROW_CALL_RANGE(strtod, __VA_ARGS__)
222 #define strtof_throw(...) P99_THROW_CALL_RANGE(strtof, __VA_ARGS__)
224 #define strtol_throw(...) P99_THROW_CALL_RANGE(strtol, __VA_ARGS__)
226 #define strtold_throw(...) P99_THROW_CALL_RANGE(strtold, __VA_ARGS__)
228 #define strtoll_throw(...) P99_THROW_CALL_RANGE(strtoll, __VA_ARGS__)
230 #define strtoul_throw(...) P99_THROW_CALL_RANGE(strtoul, __VA_ARGS__)
232 #define strtoull_throw(...) P99_THROW_CALL_RANGE(strtoull, __VA_ARGS__)
233 P00_LIB_WRAP_DOC(system)
234 #define system_throw(...) P99_THROW_CALL_NEG(system, EINVAL, __VA_ARGS__)
235 P00_LIB_WRAP_DOC(wctomb)
236 #define wctomb_throw(...) P99_THROW_CALL_NEG(wctomb, EINVAL, __VA_ARGS__)
287 P00_LIB_WRAP_DOC(cnd_broadcast)
288 #define cnd_broadcast_throw(...) P99_THROW_CALL_THRD(cnd_broadcast, __VA_ARGS__)
289 P00_LIB_WRAP_DOC(cnd_init)
290 #define cnd_init_throw(...) P99_THROW_CALL_THRD(cnd_init, __VA_ARGS__)
291 P00_LIB_WRAP_DOC(cnd_signal)
292 #define cnd_signal_throw(...) P99_THROW_CALL_THRD(cnd_signal, __VA_ARGS__)
293 P00_LIB_WRAP_DOC(cnd_timedwait)
294 #define cnd_timedwait_throw(...) P99_THROW_CALL_THRD(cnd_timedwait, __VA_ARGS__)
295 P00_LIB_WRAP_DOC(cnd_wait)
296 #define cnd_wait_throw(...) P99_THROW_CALL_THRD(cnd_wait, __VA_ARGS__)
297 P00_LIB_WRAP_DOC(mtx_init)
298 #define mtx_init_throw(...) P99_THROW_CALL_THRD(mtx_init, __VA_ARGS__)
299 P00_LIB_WRAP_DOC(mtx_lock)
300 #define mtx_lock_throw(...) P99_THROW_CALL_THRD(mtx_lock, __VA_ARGS__)
301 P00_LIB_WRAP_DOC(mtx_timedlock)
302 #define mtx_timedlock_throw(...) P99_THROW_CALL_THRD(mtx_timedlock, __VA_ARGS__)
303 P00_LIB_WRAP_DOC(mtx_unlock)
304 #define mtx_unlock_throw(...) P99_THROW_CALL_THRD(mtx_unlock, __VA_ARGS__)
305 P00_LIB_WRAP_DOC(thrd_create)
306 #define thrd_create_throw(...) P99_THROW_CALL_THRD(thrd_create, __VA_ARGS__)
307 P00_LIB_WRAP_DOC(thrd_detach)
308 #define thrd_detach_throw(...) P99_THROW_CALL_THRD(thrd_detach, __VA_ARGS__)
309 P00_LIB_WRAP_DOC(thrd_equal)
310 #define thrd_equal_throw(...) P99_THROW_CALL_THRD(thrd_equal, __VA_ARGS__)
311 P00_LIB_WRAP_DOC(thrd_join)
312 #define thrd_join_throw(...) P99_THROW_CALL_THRD(thrd_join, __VA_ARGS__)
313 P00_LIB_WRAP_DOC(thrd_sleep)
314 #define thrd_sleep_throw(...) P99_THROW_CALL_THRD(thrd_sleep, __VA_ARGS__)
315 P00_LIB_WRAP_DOC(tss_create)
316 #define tss_create_throw(...) P99_THROW_CALL_THRD(tss_create, __VA_ARGS__)
317 P00_LIB_WRAP_DOC(tss_set)
318 #define tss_set_throw(...) P99_THROW_CALL_THRD(tss_set, __VA_ARGS__)
333 P00_LIB_WRAP_DOC(btowc)
334 #define btowc_throw(...) P99_THROW_CALL_NEG(btowc, EINVAL, __VA_ARGS__)
335 P00_LIB_WRAP_DOC(fgetwc)
336 #define fgetwc_throw(...) P99_THROW_CALL_NEG(fgetwc, EINVAL, __VA_ARGS__)
337 P00_LIB_WRAP_DOC(fgetws)
338 #define fgetws_throw(...) P99_THROW_CALL_NEG(fgetws, EINVAL, __VA_ARGS__)
339 P00_LIB_WRAP_DOC(fputwc)
340 #define fputwc_throw(...) P99_THROW_CALL_NEG(fputwc, EINVAL, __VA_ARGS__)
341 P00_LIB_WRAP_DOC(fputws)
342 #define fputws_throw(...) P99_THROW_CALL_NEG(fputws, EINVAL, __VA_ARGS__)
343 P00_LIB_WRAP_DOC(fwprintf)
344 #define fwprintf_throw(...) P99_THROW_CALL_NEG(fwprintf, EINVAL, __VA_ARGS__)
345 P00_LIB_WRAP_DOC(fwscanf)
346 #define fwscanf_throw(...) P99_THROW_CALL_NEG(fwscanf, EINVAL, __VA_ARGS__)
347 P00_LIB_WRAP_DOC(getwc)
348 #define getwc_throw(...) P99_THROW_CALL_NEG(getwc, EINVAL, __VA_ARGS__)
349 P00_LIB_WRAP_DOC(getwchar)
350 #define getwchar_throw(...) P99_THROW_CALL_NEG(getwchar, EINVAL, __VA_ARGS__)
351 P00_LIB_WRAP_DOC(putwc)
352 #define putwc_throw(...) P99_THROW_CALL_NEG(putwc, EINVAL, __VA_ARGS__)
353 P00_LIB_WRAP_DOC(putwchar)
354 #define putwchar_throw(...) P99_THROW_CALL_NEG(putwchar, EINVAL, __VA_ARGS__)
355 P00_LIB_WRAP_DOC(swprintf)
356 #define swprintf_throw(...) P99_THROW_CALL_NEG(swprintf, EINVAL, __VA_ARGS__)
357 P00_LIB_WRAP_DOC(swscanf)
358 #define swscanf_throw(...) P99_THROW_CALL_NEG(swscanf, EINVAL, __VA_ARGS__)
359 P00_LIB_WRAP_DOC(ungetwc)
360 #define ungetwc_throw(...) P99_THROW_CALL_NEG(ungetwc, EINVAL, __VA_ARGS__)
361 P00_LIB_WRAP_DOC(vfwprintf)
362 #define vfwprintf_throw(...) P99_THROW_CALL_NEG(vfwprintf, EINVAL, __VA_ARGS__)
363 P00_LIB_WRAP_DOC(vfwscanf)
364 #define vfwscanf_throw(...) P99_THROW_CALL_NEG(vfwscanf, EINVAL, __VA_ARGS__)
365 P00_LIB_WRAP_DOC(vswprintf)
366 #define vswprintf_throw(...) P99_THROW_CALL_NEG(vswprintf, EINVAL, __VA_ARGS__)
367 P00_LIB_WRAP_DOC(vswscanf)
368 #define vswscanf_throw(...) P99_THROW_CALL_NEG(vswscanf, EINVAL, __VA_ARGS__)
369 P00_LIB_WRAP_DOC(vwprintf)
370 #define vwprintf_throw(...) P99_THROW_CALL_NEG(vwprintf, EINVAL, __VA_ARGS__)
371 P00_LIB_WRAP_DOC(vwscanf)
372 #define vwscanf_throw(...) P99_THROW_CALL_NEG(vwscanf, EINVAL, __VA_ARGS__)
374 #define wcstod_throw(...) P99_THROW_CALL_RANGE(wcstod, __VA_ARGS__)
376 #define wcstof_throw(...) P99_THROW_CALL_RANGE(wcstof, __VA_ARGS__)
377 P00_LIB_WRAP_DOC(wcstok)
378 #define wcstok_throw(...) P99_THROW_CALL_RANGE(wcstok, __VA_ARGS__)
380 #define wcstol_throw(...) P99_THROW_CALL_RANGE(wcstol, __VA_ARGS__)
382 #define wcstold_throw(...) P99_THROW_CALL_RANGE(wcstold, __VA_ARGS__)
384 #define wcstoll_throw(...) P99_THROW_CALL_RANGE(wcstoll, __VA_ARGS__)
386 #define wcstoul_throw(...) P99_THROW_CALL_RANGE(wcstoul, __VA_ARGS__)
388 #define wcstoull_throw(...) P99_THROW_CALL_RANGE(wcstoull, __VA_ARGS__)
389 P00_LIB_WRAP_DOC(wprintf)
390 #define wprintf_throw(...) P99_THROW_CALL_NEG(wprintf, EINVAL, __VA_ARGS__)
391 P00_LIB_WRAP_DOC(wscanf)
392 #define wscanf_throw(...) P99_THROW_CALL_NEG(wscanf, EINVAL, __VA_ARGS__)