strtok_r added.
[AROS.git] / compiler / stdc / stdc.conf
blob39ee5e7e7a1628d66683e145e4ba9dd20b3c6c66
1 ##begin config
2 version 0.1
3 basename StdC
4 libbasetypeextern struct StdCBase
5 libbasetype struct StdCIntBase
6 options peropenerbase
7 ##end config
9 ##begin cdef
10 #include <libraries/stdc.h>
11 #include <setjmp.h>
12 #include <complex.h>
13 #include <fenv.h>
14 #include <math.h>
15 #include <signal.h>
16 #include <stdarg.h>
17 #include <stdlib.h>
18 #include <time.h>
20 #ifdef __GNUC__
21 #undef cimag
22 #undef cimagf
23 #undef cimagl
24 #undef creal
25 #undef crealf
26 #undef creall
27 #endif
29 /* Avoid warning for redefinition of isinf()/isnan() */
30 #define STDC_NOLIBINLINE
31 #define STDC_NOLIBDEFINES
33 ##end cdef
35 ##begin cdefprivate
36 #include "__stdc_intbase.h"
37 ##end cdefprivate
39 ##begin startup
40 #include "stdc_startup.c"
41 ##end startup
43 ##begin functionlist
44 # == Internal functions ==
46 int __stdc_gmtoffset(void)
47 void __stdc_program_startup(jmp_buf exitjmp, int *errorptr)
48 void __stdc_program_end(void)
49 int *__stdc_set_errorptr(int *errorptr)
50 int *__stdc_get_errorptr(void)
51 void __stdc_set_exitjmp(jmp_buf exitjmp, jmp_buf previousjmp)
52 void __stdc_jmp2exit(int normal, int returncode)
53 .skip 3
54 # == C99 functions ordered per include file ==
55 # * assert.h: Support function for assert() macro
56 .skip 1
57 #__stdc_assert(const char * expr, const char * file, unsigned int line)
58 #.alias __assert
60 # * complex.h
61 .skip 42
62 #double complex cacos(double complex z)
63 #float complex cacosf(float complex z)
64 #long double complex cacosl(long double complex z)
65 #double complex casin(double complex z)
66 #float complex casinf(float complex z)
67 #long double complex casinl(long double complex z)
68 #double complex catan(double complex z)
69 #float complex catanf(float complex z)
70 #long double complex catanl(long double complex z)
71 #double complex ccos(double complex z)
72 #float complex ccosf(float complex z)
73 #long double complex ccosl(long double complex z)
74 #double complex csin(double complex z)
75 #float complex csinf(float complex z)
76 #long double complex csinl(long double complex z)
77 #double complex ctan(double complex z)
78 #float complex ctanf(float complex z)
79 #long double complex ctanl(long double complex z)
80 #double complex cacosh(double complex z)
81 #float complex cacoshf(float complex z)
82 #long double complex cacoshl(long double complex z)
83 #double complex casinh(double complex z)
84 #float complex casinhf(float complex z)
85 #long double complex casinhl(long double complex z)
86 #double complex catanh(double complex z)
87 #float complex catanhf(float complex z)
88 #long double complex catanhl(long double complex z)
89 #double complex ccosh(double complex z)
90 #float complex ccoshf(float complex z)
91 #long double complex ccoshl(long double complex z)
92 #double complex csinh(double complex z)
93 #float complex csinhf(float complex z)
94 #long double complex csinhl(long double complex z)
95 #double complex ctanh(double complex z)
96 #float complex ctanhf(float complex z)
97 #long double complex ctanhl(long double complex z)
98 #double complex cexp(double complex z)
99 #float complex cexpf(float complex z)
100 #long double complex cexpl(long double complex z)
101 #double complex clog(double complex z)
102 #float complex clogf(float complex z)
103 #long double complex clogl(long double complex z)
104 double cabs(double complex z)
105 float cabsf(float complex z)
106 .skip 10
107 #long double cabsl(long double complex z)
108 #double complex cpow(double complex x, double complex y)
109 #float complex cpowf(float complex x, float complex y)
110 #long double complex cpowl(long double complex x, long double complex y)
111 #double complex csqrt(double complex z)
112 #float complex csqrtf(float complex z)
113 #long double complex csqrtl(long double complex z)
114 #double carg(double complex z)
115 #float cargf(float complex z)
116 #long double cargl(long double complex z)
117 double cimag(double complex z)
118 float cimagf(float complex z)
119 long double cimagl(long double complex z)
120 double complex conj(double complex z)
121 float complex conjf(float complex z)
122 long double complex conjl(long double complex z)
123 .skip 3
124 #double complex cproj(double complex z)
125 #float complex cprojf(float complex z)
126 #long double complex cprojl(long double complex z)
127 double creal(double complex z)
128 float crealf(float complex z)
129 long double creall(long double complex z)
131 # * ctype.h: functions are declared as static inline functions
133 # * errno.h
134 int __stdc_ioerr2errno(int ioerr)
135 .alias ioerr2errno
137 # * fenv.h
138 int feclearexcept(int excepts)
139 .function _feclearexcept
140 int fegetexceptflag(fexcept_t *flagp, int excepts)
141 .function _fegetexceptflag
142 int feraiseexcept(int excepts)
143 .function _feraiseexcept
144 int fesetexceptflag(const fexcept_t *flagp, int excepts)
145 .function _fesetexceptflag
146 int fetestexcept(int excepts)
147 .function _fetestexcept
148 int fegetround(void)
149 .function _fegetround
150 int fesetround(int round)
151 .function _fesetround
152 int fegetenv(fenv_t *envp)
153 .function _fegetenv
154 int feholdexcept(fenv_t *envp)
155 .function _feholdexcept
156 int fesetenv(const fenv_t *envp)
157 .function _fesetenv
158 int feupdateenv(const fenv_t *envp)
159 .function _feupdateenv
161 # * float.h: no functions in float.h
163 # * inttypes.h
164 .skip 2
165 #intmax_t imaxabs(intmax_t j)
166 #imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom)
167 intmax_t strtoimax(const char * restrict nptr, char ** restrict endptr, int base)
168 uintmax_t strtoumax(const char * restrict nptr, char ** restrict endptr, int base)
169 .skip 2
170 #intmax_t wcstoimax(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base)
171 #uintmax_t wcstoumax(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base)
173 # * iso646.h: no functions in iso646.h
175 # * limits.h: no functions in limits.h
177 # * locale.h
178 char *setlocale(int category, const char *locale)
179 struct lconv *localeconv(void)
181 # * math.h
182 .skip 3
183 #int __fpclassify(double)
184 #int __fpclassifyf(float)
185 #int __fpclassifyl(long double)
186 int __isfinite(double)
187 .alias finite
188 int __isfinitef(float)
189 .alias finitef
190 int __isfinitel(long double)
191 .alias finitel
192 int __isinf(double)
193 .alias isinf
194 int __isinff(float)
195 .alias isinff
196 .skip 1
197 #int __isinfl(long double)
198 #.alias isinfl
199 int __isnan(double)
200 .alias isnan
201 int __isnanf(float)
202 .alias isnanf
203 int __isnanl(long double)
204 .alias isnanl
205 int __isnormal(double)
206 int __isnormalf(float)
207 int __isnormall(long double)
208 int __signbit(double)
209 int __signbitf(float)
210 int __signbitl(long double)
211 double acos(double)
212 double asin(double)
213 double atan(double)
214 double atan2(double, double)
215 double cos(double)
216 double sin(double)
217 double tan(double)
218 double acosh(double)
219 double asinh(double)
220 double atanh(double)
221 double cosh(double)
222 double sinh(double)
223 double tanh(double)
224 double exp(double)
225 double exp2(double)
226 double expm1(double)
227 double frexp(double, int *)
228 int ilogb(double)
229 double ldexp(double, int)
230 double log(double)
231 double log10(double)
232 double log1p(double)
233 .skip 1
234 #double log2(double) 
235 double logb(double)
236 double modf(double, double *)
237 double scalbn(double, int)
238 double scalbln(double, long)
239 double cbrt(double)
240 double fabs(double)
241 double hypot(double, double)
242 double pow(double, double)
243 double sqrt(double)
244 double erf(double)
245 double erfc(double)
246 double lgamma(double)
247 .alias gamma
248 .skip 1
249 #double tgamma(double)
250 double ceil(double)
251 double floor(double)
252 double nearbyint(double)
253 double rint(double)
254 long lrint(double)
255 long long llrint(double)
256 double round(double)
257 long lround(double)
258 long long llround(double)
259 double trunc(double)
260 double fmod(double, double)
261 double remainder(double, double)
262 .alias drem
263 double remquo(double, double, int *)
264 double copysign(double, double)
265 double nan(const char *tagp)
266 double nextafter(double, double)
267 double nexttoward(double, long double)
268 double fdim(double, double)
269 double fmax(double, double)
270 double fmin(double, double)
271 double fma(double, double, double)
272 float acosf(float)
273 float asinf(float)
274 float atanf(float)
275 float atan2f(float, float)
276 float cosf(float)
277 float sinf(float)
278 float tanf(float)
279 float acoshf(float)
280 float asinhf(float)
281 float atanhf(float)
282 float coshf(float)
283 float sinhf(float)
284 float tanhf(float)
285 float expf(float)
286 float exp2f(float)
287 float expm1f(float)
288 float frexpf(float, int *)
289 int ilogbf(float)
290 float ldexpf(float, int)
291 float logf(float)
292 float log10f(float)
293 float log1pf(float)
294 .skip 1
295 #float log2f(float) 
296 float logbf(float)
297 float modff(float, float *)
298 float scalbnf(float, int)
299 float scalblnf(float, long)
300 float cbrtf(float)
301 float fabsf(float)
302 float hypotf(float, float)
303 float powf(float, float)
304 float sqrtf(float)
305 float erff(float)
306 float erfcf(float)
307 float lgammaf(float)
308 .alias gammaf
309 .skip 1
310 #float tgammaf(float)
311 float ceilf(float)
312 float floorf(float)
313 float nearbyintf(float)
314 float rintf(float)
315 long lrintf(float)
316 long long llrintf(float)
317 float roundf(float)
318 long lroundf(float)
319 long long llroundf(float)
320 float truncf(float)
321 float fmodf(float, float)
322 float remainderf(float, float)
323 .alias dremf
324 float remquof(float, float, int *)
325 float copysignf(float, float)
326 float nanf(const char *tagp)
327 float nextafterf(float, float)
328 float nexttowardf(float, long double)
329 float fdimf(float, float)
330 float fmaxf(float, float)
331 float fminf(float, float)
332 float fmaf(float, float, float)
333 .skip 16
334 #long double acosl(long double)
335 #long double asinl(long double)
336 #long double atanl(long double)
337 #long double atan2l(long double, long double)
338 #long double cosl(long double)
339 #long double sinl(long double)
340 #long double tanl(long double)
341 #long double acoshl(long double)
342 #long double asinhl(long double)
343 #long double atanhl(long double)
344 #long double coshl(long double)
345 #long double sinhl(long double)
346 #long double tanhl(long double)
347 #long double expl(long double)
348 #long double exp2l(long double)
349 #long double expm1l(long double)
350 long double frexpl(long double value, int *)
351 int ilogbl(long double)
352 long double ldexpl(long double, int)
353 .skip 5
354 #long double logl(long double)
355 #long double log10l(long double)
356 #long double log1pl(long double)
357 #long double log2l(long double)
358 #long double logbl(long double)
359 long double modfl(long double, long double *)
360 long double scalbnl(long double, int)
361 long double scalblnl(long double, long)
362 .skip 1
363 #long double cbrtl(long double)
364 long double fabsl(long double)
365 .skip 7
366 #long double hypotl(long double, long double)
367 #long double powl(long double, long double)
368 #long double sqrtl(long double)
369 #long double erfl(long double)
370 #long double erfcl(long double)
371 #long double lgammal(long double)
372 #.alias gammal
373 #long double tgammal(long double)
374 long double ceill(long double)
375 long double floorl(long double)
376 .skip 4
377 #long double nearbyintl(long double)
378 #long double rintl(long double)
379 #long lrintl(long double)
380 #long long llrintl(long double)
381 long double roundl(long double)
382 long lroundl(long double)
383 long long llroundl(long double)
384 long double truncl(long double)
385 .skip 3
386 #long double fmodl(long double, long double)
387 #long double remainderl(long double, long double)
388 #.alias dreml
389 #long double remquol(long double, long double, int *)
390 long double copysignl(long double, long double)
391 long double nanl(const char *tagp)
392 long double nextafterl(long double, long double)
393 long double nexttowardl(long double, long double)
394 long double fdiml(long double, long double)
395 long double fmaxl(long double, long double)
396 long double fminl(long double, long double)
397 long double fmal(long double, long double, long double)
399 # * setjmp.h
400 .skip 2
401 int setjmp(jmp_buf env)
402 .unusedlibbase
403 void longjmp(jmp_buf env, int val)
404 .unusedlibbase
406 # * signal.h
407 __sighandler_t *signal(int, __sighandler_t *)
408 int raise(int)
410 # * stdarg.h: implementation has to be provided by the compiler.
412 # * stdbool.h: no functions in stdbool.h
414 # * stddef.h: no functions in stddef.h
416 # * stdint.h: no functions in stdint.h
418 # * stdio.h: only string based functions are implemented, the rest in stdcio.library
419 int snprintf(char * restrict s, size_t n, const char * restrict format, ...)
420 int sprintf(char * restrict s, const char * restrict format, ...)
421 int sscanf(const char * restrict s, const char * restrict format, ...)
422 int vsnprintf(char * restrict s, size_t n, const char * restrict format, va_list arg)
423 int vsprintf(char * restrict s, const char * restrict format, va_list arg)
424 int vsscanf(const char * restrict s, const char * restrict format, va_list arg)
426 # * stdlib.h: getenv() and system() implemented in stdcio.library
427 double atof(const char *nptr)
428 int atoi(const char *nptr)
429 long int atol(const char *nptr)
430 .skip 1
431 #long long int atoll(const char *nptr)
432 double strtod(const char * restrict nptr, char ** restrict endptr)
433 .skip 2
434 #float strtof(const char * restrict nptr, char ** restrict endptr)
435 #long double strtold(const char * restrict nptr, char ** restrict endptr)
436 long int strtol(const char * restrict nptr, char ** restrict endptr, int base)
437 long long int strtoll(const char * restrict nptr, char ** restrict endptr, int base)
438 unsigned long int strtoul(const char * restrict nptr, char ** restrict endptr, int base)
439 unsigned long long int strtoull(const char * restrict nptr, char ** restrict endptr, int base)
440 int rand(void)
441 void srand(unsigned int seed)
442 void *calloc(size_t count, size_t size)
443 void free(void *memory)
444 void *malloc(size_t size)
445 void *malloc_align(size_t size, size_t alignment)
446 void *realloc(void *oldmem, size_t newsize)
447 void *realloc_nocopy(void *oldmem, size_t newsize)
448 void abort(void)
449 int atexit(void (*func)(void))
450 int on_exit(void (*func)(int, void *), void *)
451 void exit(int code)
452 void _Exit(int)
453 .alias _exit
454 void *bsearch(const void * key, const void * base, size_t count, size_t size, int (*comparefunction)(const void *, const void *))
455 void qsort(void * array, size_t count, size_t elementsize, int (*comparefunction)(const void * element1, const void * element2))
456 int abs(int j)
457 long labs(long j)
458 long long llabs(long long j)
459 div_t div(int numer, int denom)
460 ldiv_t ldiv(long int numer, long int denom)
461 lldiv_t lldiv(long long int numer, long long int denom)
462 int mblen(const char *s, size_t n)
463 .skip 4
464 #int mbtowc(wchar_t * restrict pwc, const char * restrict s, size_t n)
465 #int wctomb(char *s, wchar_t wc)
466 #size_t mbstowcs(wchar_t * restrict pwcs, const char * restrict s, size_t n)
467 #size_t wcstombs(char * restrict s, const wchar_t * restrict pwcs, size_t n)
469 # * string.h: memcpy is the same as memmove
470 void *memmove (void * dest, const void * src, size_t n)
471 .alias memcpy
472 char *strcpy (char * restrict dest, const char * restrict src)
473 char *strncpy (char * restrict dest, const char * restrict src, size_t n)
474 char *strcat (char * restrict dest, const char * restrict src)
475 char *strncat (char * restrict dest, const char * restrict src, size_t n)
476 int memcmp (const void * s1, const void * s2, size_t n)
477 int strcmp (const char * s1, const char * s2)
478 int strcoll (const char *s1, const char *s2)
479 int strncmp (const char * s1, const char * s2, size_t n)
480 size_t strxfrm (char * restrict s1, const char * restrict s2, size_t n)
481 void *memchr (const void * dest, int c, size_t n)
482 char *strchr (const char * s, int c)
483 .alias index
484 size_t strcspn (const char *s1, const char *s2)
485 char *strpbrk (const char * s1, const char * s2)
486 char *strrchr (const char * s, int c)
487 .alias rindex
488 size_t strspn (const char * s1, const char * s2)
489 char *strstr (const char * buf, const char * str)c
490 char *strtok (char * str, const char * sep)v
491 void *memset (void * dest, int c, size_t n)
492 char *__stdc_strerror (int n)
493 .alias strerror
494 size_t strlen (const char * str)
496 # * tgmath.h: not implemented in stdc.library
498 # * time.h
499 .skip 9
500 clock_t clock(void)
501 double difftime(time_t, time_t)
502 time_t mktime(struct tm *)
503 time_t time(time_t *)
504 char *asctime(const struct tm *)
505 char *ctime(const time_t *)
506 struct tm *gmtime(const time_t *)
507 struct tm *localtime(const time_t *)
508 size_t strftime(char *, size_t, const char *, const struct tm *)
510 # * wchar.h: not implemented in stdc.library
512 # * wctype.h: not implemented in stdc.library
514 # == Extensions ==
515 # <math.h>: Mostly BSD functions
516 double j0(double)
517 double j1(double)
518 double jn(int, double)
519 double scalb(double, double)
520 double y0(double)
521 double y1(double)
522 double yn(int, double)
523 double gamma_r(double, int *)
524 double lgamma_r(double, int *)
525 void sincos(double, double *, double *)
526 double significand(double)
527 float j0f(float)
528 float j1f(float)
529 float jnf(int, float)
530 float scalbf(float, float)
531 float y0f(float)
532 float y1f(float)
533 float ynf(int, float)
534 float gammaf_r(float, int *)
535 float lgammaf_r(float, int *)
536 void sincosf(float, float *, float *)
537 float significandf(float)
538 .skip 9
539 #long double j0l(long double)
540 #long double j1l(long double)
541 #long double jnl(int, long double)
542 #long double scalbl(long double, long double)
543 #long double y0l(long double)
544 #long double y1l(long double)
545 #long double ynl(int, long double)
546 #long double gammal_r(long double, int *)
547 #long double lgammal_r(long double, int *)
548 void sincosl(long double, long double *, long double *)
549 .skip 1
550 #long double significandl(long double)
552 # * stdio.h: AROS specific support functions based on libnix
553 int __vcformat(void * data, int (*outc)(int, void *), const char * format, va_list args)
554 int __vcscan(void * data, int (*getc)(void *), int (*ungetc)(int, void *), const char * format, va_list args)
556 # * string.h: POSIX, BSD/UNIX, SAS/C
557 .skip 1
558 #void *memccpy(void *restrict, const void *restrict, int, size_t)
559 char *stpcpy(char *restrict, const char *restrict)
560 .skip 2
561 #char *stpncpy(char *restrict, const char *restrict, size_t)
562 #int strcoll_l(const char *, const char *, locale_t)
563 char *strdup(const char *)
564 .skip 2
565 #char *strerror_l(int, locale_t)
566 #int strerror_r(int, char *, size_t)
567 char *strndup(const char *, size_t)
568 .skip 4
569 #size_t strnlen(const char *, size_t)
570 #char *strsignal(int)
571 char *strtok_r(char *restrict, const char *restrict, char **restrict)
572 #size_t strxfrm_l(char *restrict, const char *restrict, size_t, locale_t)
573 size_t strlcpy(char *dst, const char *src, size_t size)
574 size_t strlcat(char *dst, const char *src, size_t size)
575 char *strsep(char **, const char *)
576 char *strlwr(char *)
577 char *strupr(char *)
578 char *strrev(char * s)
579 int stch_l(const char * in, long * lvalue)
580 int stcd_l(const char * in, long * lvalue)
581 int stco_l(const char * in, long * lvalue)
582 int stcl_d(char * out, long lvalue)
583 int stcl_h(char * out, long lvalue)
584 int stcl_o(char * out, long lvalue)
585 int stcu_d(char * out, unsigned uivalue)
586 size_t stccpy(char *str1_ptr, const char *str2_ptr, size_t max)
587 char *stpsym(char *str_ptr, char *dest_ptr, int dest_size)
588 char *stpblk( const char * str )
590 # * strings.h: POSIX, BSD
591 int strcasecmp(const char * s1, const char * s2)
592 .skip 1
593 #int strcasecmp_l(const char *, const char *, locale_t)
594 int strncasecmp(const char *, const char *, size_t)
595 .skip 1
596 #int strncasecmp_l(const char *, const char *, size_t, locale_t)
598 # * time.h: reentrant versions of some C99 functions (POSIX)
599 .skip 4
600 char *asctime_r(const struct tm *, char *)
601 char *ctime_r(const time_t *, char *)
602 struct tm *gmtime_r(const time_t *, struct tm *)
603 struct tm *localtime_r(const time_t *, struct tm *)
605 ##end functionlist