P99
p99_c99_throw.h
Go to the documentation of this file.
1 /* This may look like nonsense, but it really is -*- mode: C; coding: utf-8 -*- */
2 /* */
3 /* Except for parts copied from previous work and as explicitly stated below, */
4 /* the author and copyright holder for this work is */
5 /* (C) copyright 2012 Jens Gustedt, INRIA, France */
6 /* */
7 /* This file is free software; it is part of the P99 project. */
8 /* */
9 /* Licensed under the Apache License, Version 2.0 (the "License"); */
10 /* you may not use this file except in compliance with the License. */
11 /* You may obtain a copy of the License at */
12 /* */
13 /* http://www.apache.org/licenses/LICENSE-2.0 */
14 /* */
15 /* Unless required by applicable law or agreed to in writing, software */
16 /* distributed under the License is distributed on an "AS IS" BASIS, */
17 /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
18 /* See the License for the specific language governing permissions and */
19 /* limitations under the License. */
20 /* */
21 #ifndef P99_C99_THROW_H_
22 # define P99_C99_THROW_H_
23 
24 #include "p99_try.h"
25 
66 #define P00_LIB_WRAP_DOC(NAME)
68 /* fenv.h */
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__)
91 
92 /* inttypes.h */
93 P00_LIB_WRAP_DOC(strtoimax)
94 #define strtoimax_throw(...) P99_THROW_CALL_RANGE(strtoimax, __VA_ARGS__)
95 P00_LIB_WRAP_DOC(strtoumax)
96 #define strtoumax_throw(...) P99_THROW_CALL_RANGE(strtoumax, __VA_ARGS__)
97 P00_LIB_WRAP_DOC(wcstoimax)
98 #define wcstoimax_throw(...) P99_THROW_CALL_RANGE(wcstoimax, __VA_ARGS__)
99 P00_LIB_WRAP_DOC(wcstoumax)
100 #define wcstoumax_throw(...) P99_THROW_CALL_RANGE(wcstoumax, __VA_ARGS__)
101 //#define imaxabs_throw(...) P99_THROW_CALL_NEG(imaxabs, EINVAL, __VA_ARGS__)
102 //#define imaxdiv_throw(...) P99_THROW_CALL_NEG(imaxdiv, EINVAL, __VA_ARGS__)
103 
104 /* math.h has nothing that can be caught */
105 
106 /* signal.h */
107 // void (*signal(int sig, void (*func)(int)))(int);
108 P00_LIB_WRAP_DOC(raise)
109 #define raise_throw(...) P99_THROW_CALL_ZERO(raise, EINVAL, __VA_ARGS__)
110 
111 /* stdarg.h has nothing that can be caught */
112 
113 /* stdio.h */
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__)
188 /* the following are void functions or the capture of the return value
189  makes no sense, here. */
190 //#define clearerr_throw(...) P99_THROW_CALL_NEG(clearerr, EINVAL, __VA_ARGS__)
191 //#define feof_throw(...) P99_THROW_CALL_NEG(feof, EINVAL, __VA_ARGS__)
192 //#define ferror_throw(...) P99_THROW_CALL_NEG(ferror, EINVAL, __VA_ARGS__)
193 //#define fread_throw(...) P99_THROW_CALL_NEG(fread, EINVAL, __VA_ARGS__)
194 //#define fwrite_throw(...) P99_THROW_CALL_NEG(fwrite, EINVAL, __VA_ARGS__)
195 //#define perror_throw(...) P99_THROW_CALL_NEG(perror, EINVAL, __VA_ARGS__)
196 //#define rewind_throw(...) P99_THROW_CALL_NEG(rewind, EINVAL, __VA_ARGS__)
197 //#define setbuf_throw(...) P99_THROW_CALL_NEG(setbuf, EINVAL, __VA_ARGS__)
198 
199 
200 /* stdlib.h */
201 P00_LIB_WRAP_DOC(aligned_alloc)
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__)
207 P00_LIB_WRAP_DOC(calloc)
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__)
219 P00_LIB_WRAP_DOC(strtod)
220 #define strtod_throw(...) P99_THROW_CALL_RANGE(strtod, __VA_ARGS__)
221 P00_LIB_WRAP_DOC(strtof)
222 #define strtof_throw(...) P99_THROW_CALL_RANGE(strtof, __VA_ARGS__)
223 P00_LIB_WRAP_DOC(strtol)
224 #define strtol_throw(...) P99_THROW_CALL_RANGE(strtol, __VA_ARGS__)
225 P00_LIB_WRAP_DOC(strtold)
226 #define strtold_throw(...) P99_THROW_CALL_RANGE(strtold, __VA_ARGS__)
227 P00_LIB_WRAP_DOC(strtoll)
228 #define strtoll_throw(...) P99_THROW_CALL_RANGE(strtoll, __VA_ARGS__)
229 P00_LIB_WRAP_DOC(strtoul)
230 #define strtoul_throw(...) P99_THROW_CALL_RANGE(strtoul, __VA_ARGS__)
231 P00_LIB_WRAP_DOC(strtoull)
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__)
237 
238 /* the following are void functions or the capture of the return value
239  makes no sense, here. */
240 //#define _Exit_throw(...) P99_THROW_CALL_NEG(_Exit, EINVAL, __VA_ARGS__)
241 //#define abort_throw(...) P99_THROW_CALL_NEG(abort, EINVAL, __VA_ARGS__)
242 //#define abs_throw(...) P99_THROW_CALL_NEG(abs, EINVAL, __VA_ARGS__)
243 //#define bsearch_throw(...) P99_THROW_CALL_NEG(bsearch, EINVAL, __VA_ARGS__)
244 //#define div_throw(...) P99_THROW_CALL_NEG(div, EINVAL, __VA_ARGS__)
245 //#define exit_throw(...) P99_THROW_CALL_NEG(exit, EINVAL, __VA_ARGS__)
246 //#define free_throw(...) P99_THROW_CALL_NEG(free, EINVAL, __VA_ARGS__)
247 //#define labs_throw(...) P99_THROW_CALL_NEG(labs, EINVAL, __VA_ARGS__)
248 //#define ldiv_throw(...) P99_THROW_CALL_NEG(ldiv, EINVAL, __VA_ARGS__)
249 //#define llabs_throw(...) P99_THROW_CALL_NEG(llabs, EINVAL, __VA_ARGS__)
250 //#define lldiv_throw(...) P99_THROW_CALL_NEG(lldiv, EINVAL, __VA_ARGS__)
251 //#define qsort_throw(...) P99_THROW_CALL_NEG(qsort, EINVAL, __VA_ARGS__)
252 //#define quick_exit_throw(...) P99_THROW_CALL_NEG(quick_exit, EINVAL, __VA_ARGS__)
253 //#define rand_throw(...) P99_THROW_CALL_NEG(rand, EINVAL, __VA_ARGS__)
254 //#define srand_throw(...) P99_THROW_CALL_NEG(srand, EINVAL, __VA_ARGS__)
255 
256 /* the following are functions that return SIZE_MAX on error. We are
257  not yet able to handle that special convention. */
258 //#define wcstombs_throw(...) P99_THROW_CALL_NEG(wcstombs, EINVAL, __VA_ARGS__)
259 //#define mbstowcs_throw(...) P99_THROW_CALL_NEG(mbstowcs, EINVAL, __VA_ARGS__)
260 
261 /* string.h has nothing that can be caught */
262 //#define memchr_throw(...) P99_THROW_CALL_NEG(memchr, EINVAL, __VA_ARGS__)
263 //#define memcmp_throw(...) P99_THROW_CALL_NEG(memcmp, EINVAL, __VA_ARGS__)
264 //#define memcpy_throw(...) P99_THROW_CALL_NEG(memcpy, EINVAL, __VA_ARGS__)
265 //#define memmove_throw(...) P99_THROW_CALL_NEG(memmove, EINVAL, __VA_ARGS__)
266 //#define memset_throw(...) P99_THROW_CALL_NEG(memset, EINVAL, __VA_ARGS__)
267 //#define strcat_throw(...) P99_THROW_CALL_NEG(strcat, EINVAL, __VA_ARGS__)
268 //#define strchr_throw(...) P99_THROW_CALL_NEG(strchr, EINVAL, __VA_ARGS__)
269 //#define strcmp_throw(...) P99_THROW_CALL_NEG(strcmp, EINVAL, __VA_ARGS__)
270 //#define strcoll_throw(...) P99_THROW_CALL_NEG(strcoll, EINVAL, __VA_ARGS__)
271 //#define strcpy_throw(...) P99_THROW_CALL_NEG(strcpy, EINVAL, __VA_ARGS__)
272 //#define strcspn_throw(...) P99_THROW_CALL_NEG(strcspn, EINVAL, __VA_ARGS__)
273 //#define strerror_throw(...) P99_THROW_CALL_NEG(strerror, EINVAL, __VA_ARGS__)
274 //#define strlen_throw(...) P99_THROW_CALL_NEG(strlen, EINVAL, __VA_ARGS__)
275 //#define strncat_throw(...) P99_THROW_CALL_NEG(strncat, EINVAL, __VA_ARGS__)
276 //#define strncmp_throw(...) P99_THROW_CALL_NEG(strncmp, EINVAL, __VA_ARGS__)
277 //#define strncpy_throw(...) P99_THROW_CALL_NEG(strncpy, EINVAL, __VA_ARGS__)
278 //#define strpbrk_throw(...) P99_THROW_CALL_NEG(strpbrk, EINVAL, __VA_ARGS__)
279 //#define strrchr_throw(...) P99_THROW_CALL_NEG(strrchr, EINVAL, __VA_ARGS__)
280 //#define strspn_throw(...) P99_THROW_CALL_NEG(strspn, EINVAL, __VA_ARGS__)
281 //#define strstr_throw(...) P99_THROW_CALL_NEG(strstr, EINVAL, __VA_ARGS__)
282 //#define strtok_throw(...) P99_THROW_CALL_NEG(strtok, EINVAL, __VA_ARGS__)
283 //#define strxfrm_throw(...) P99_THROW_CALL_NEG(strxfrm, EINVAL, __VA_ARGS__)
284 
285 
286 /* threads.h */
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__)
319 
320 /* the following are void functions or the capture of the return value
321  makes no sense, here. */
322 //#define cnd_destroy_throw(...) P99_THROW_CALL_NEG(cnd_destroy, EINVAL, __VA_ARGS__)
323 //#define mtx_destroy_throw(...) P99_THROW_CALL_NEG(mtx_destroy, EINVAL, __VA_ARGS__)
324 //#define mtx_trylock_throw(...) P99_THROW_CALL_THRD(mtx_trylock, __VA_ARGS__)
325 //#define thrd_current_throw(...) P99_THROW_CALL_NEG(thrd_current, EINVAL, __VA_ARGS__)
326 //#define thrd_exit_throw(...) P99_THROW_CALL_NEG(thrd_exit, EINVAL, __VA_ARGS__)
327 //#define thrd_yield_throw(...) P99_THROW_CALL_NEG(thrd_yield, EINVAL, __VA_ARGS__)
328 //#define tss_delete_throw(...) P99_THROW_CALL_NEG(tss_delete, EINVAL, __VA_ARGS__)
329 //#define tss_get_throw(...) P99_THROW_CALL_NEG(tss_get, EINVAL, __VA_ARGS__)
330 //void call_once(once_flag *flag, void (*func)(void));
331 
332 /* wchar.h */
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__)
373 P00_LIB_WRAP_DOC(wcstod)
374 #define wcstod_throw(...) P99_THROW_CALL_RANGE(wcstod, __VA_ARGS__)
375 P00_LIB_WRAP_DOC(wcstof)
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__)
379 P00_LIB_WRAP_DOC(wcstol)
380 #define wcstol_throw(...) P99_THROW_CALL_RANGE(wcstol, __VA_ARGS__)
381 P00_LIB_WRAP_DOC(wcstold)
382 #define wcstold_throw(...) P99_THROW_CALL_RANGE(wcstold, __VA_ARGS__)
383 P00_LIB_WRAP_DOC(wcstoll)
384 #define wcstoll_throw(...) P99_THROW_CALL_RANGE(wcstoll, __VA_ARGS__)
385 P00_LIB_WRAP_DOC(wcstoul)
386 #define wcstoul_throw(...) P99_THROW_CALL_RANGE(wcstoul, __VA_ARGS__)
387 P00_LIB_WRAP_DOC(wcstoull)
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__)
393 
394 /* the following are void functions or the capture of the return value
395  makes no sense, here. */
396 //#define fwide_throw(...) P99_THROW_CALL_NEG(fwide, EINVAL, __VA_ARGS__)
397 //#define mbsinit_throw(...) P99_THROW_CALL_NEG(mbsinit, EINVAL, __VA_ARGS__)
398 //#define wcscat_throw(...) P99_THROW_CALL_NEG(wcscat, EINVAL, __VA_ARGS__)
399 //#define wcschr_throw(...) P99_THROW_CALL_NEG(wcschr, EINVAL, __VA_ARGS__)
400 //#define wcscmp_throw(...) P99_THROW_CALL_NEG(wcscmp, EINVAL, __VA_ARGS__)
401 //#define wcscoll_throw(...) P99_THROW_CALL_NEG(wcscoll, EINVAL, __VA_ARGS__)
402 //#define wcscpy_throw(...) P99_THROW_CALL_NEG(wcscpy, EINVAL, __VA_ARGS__)
403 //#define wcscspn_throw(...) P99_THROW_CALL_NEG(wcscspn, EINVAL, __VA_ARGS__)
404 //#define wcsftime_throw(...) P99_THROW_CALL_NEG(wcsftime, EINVAL, __VA_ARGS__)
405 //#define wcslen_throw(...) P99_THROW_CALL_NEG(wcslen, EINVAL, __VA_ARGS__)
406 //#define wcsncat_throw(...) P99_THROW_CALL_NEG(wcsncat, EINVAL, __VA_ARGS__)
407 //#define wcsncmp_throw(...) P99_THROW_CALL_NEG(wcsncmp, EINVAL, __VA_ARGS__)
408 //#define wcsncpy_throw(...) P99_THROW_CALL_NEG(wcsncpy, EINVAL, __VA_ARGS__)
409 //#define wcspbrk_throw(...) P99_THROW_CALL_NEG(wcspbrk, EINVAL, __VA_ARGS__)
410 //#define wcsrchr_throw(...) P99_THROW_CALL_NEG(wcsrchr, EINVAL, __VA_ARGS__)
411 //#define wcsspn_throw(...) P99_THROW_CALL_NEG(wcsspn, EINVAL, __VA_ARGS__)
412 //#define wcsstr_throw(...) P99_THROW_CALL_NEG(wcsstr, EINVAL, __VA_ARGS__)
413 //#define wcsxfrm_throw(...) P99_THROW_CALL_NEG(wcsxfrm, EINVAL, __VA_ARGS__)
414 //#define wctob_throw(...) P99_THROW_CALL_NEG(wctob, EINVAL, __VA_ARGS__)
415 //#define wmemchr_throw(...) P99_THROW_CALL_NEG(wmemchr, EINVAL, __VA_ARGS__)
416 //#define wmemcmp_throw(...) P99_THROW_CALL_NEG(wmemcmp, EINVAL, __VA_ARGS__)
417 //#define wmemcpy_throw(...) P99_THROW_CALL_NEG(wmemcpy, EINVAL, __VA_ARGS__)
418 //#define wmemmove_throw(...) P99_THROW_CALL_NEG(wmemmove, EINVAL, __VA_ARGS__)
419 //#define wmemset_throw(...) P99_THROW_CALL_NEG(wmemset, EINVAL, __VA_ARGS__)
420 
421 /* the following are functions that return SIZE_MAX or similar on
422  error. We are not yet able to handle that special convention. */
423 //-#define mbrlen_throw(...) P99_THROW_CALL_NEG(mbrlen, EINVAL, __VA_ARGS__)
424 //-#define mbrtowc_throw(...) P99_THROW_CALL_NEG(mbrtowc, EINVAL, __VA_ARGS__)
425 //-#define mbsrtowcs_throw(...) P99_THROW_CALL_NEG(mbsrtowcs, EINVAL, __VA_ARGS__)
426 //-#define wcrtomb_throw(...) P99_THROW_CALL_NEG(wcrtomb, EINVAL, __VA_ARGS__)
427 //-#define wcsrtombs_throw(...) P99_THROW_CALL_NEG(wcsrtombs, EINVAL, __VA_ARGS__)
428 
434 #endif
wcstoul
#define wcstoul(...)
Default arguments for C99 function wcstoul
Definition: p99_c99_default.h:130
strtoll
#define strtoll(...)
Default arguments for C99 function strtoll
Definition: p99_c99_default.h:190
aligned_alloc
void * aligned_alloc(size_t p00_alignment, size_t p00_size)
allocation with a chosen alignment
Definition: p99_clib.h:51
strtol
#define strtol(...)
Default arguments for C99 function strtol
Definition: p99_c99_default.h:177
calloc
#define calloc(...)
Default arguments for C99 function calloc
Definition: p99_c99_default.h:44
wcstol
#define wcstol(...)
Default arguments for C99 function wcstol
Definition: p99_c99_default.h:105
wcstoull
#define wcstoull(...)
Default arguments for C99 function wcstoull
Definition: p99_c99_default.h:138
wcstoll
#define wcstoll(...)
Default arguments for C99 function wcstoll
Definition: p99_c99_default.h:114
strtold
#define strtold(...)
Default arguments for C99 function strtold
Definition: p99_c99_default.h:241
strtoumax
#define strtoumax(...)
Default arguments for C99 function strtoumax
Definition: p99_c99_default.h:222
wcstold
#define wcstold(...)
Default arguments for C99 function wcstold
Definition: p99_c99_default.h:165
strtod
#define strtod(...)
Default arguments for C99 function strtod
Definition: p99_c99_default.h:235
wcstof
#define wcstof(...)
Default arguments for C99 function wcstof
Definition: p99_c99_default.h:153
strtof
#define strtof(...)
Default arguments for C99 function strtof
Definition: p99_c99_default.h:229
p99_try.h
strtoull
#define strtoull(...)
Default arguments for C99 function strtoull
Definition: p99_c99_default.h:214
wcstod
#define wcstod(...)
Default arguments for C99 function wcstod
Definition: p99_c99_default.h:159
strtoul
#define strtoul(...)
Default arguments for C99 function strtoul
Definition: p99_c99_default.h:206
strtoimax
#define strtoimax(...)
Default arguments for C99 function strtoimax
Definition: p99_c99_default.h:198
wcstoumax
#define wcstoumax(...)
Default arguments for C99 function wcstoumax
Definition: p99_c99_default.h:146
wcstoimax
#define wcstoimax(...)
Default arguments for C99 function wcstoimax
Definition: p99_c99_default.h:122