diff --git a/src/api/locale.c b/src/api/locale.c index e7ef233..0428b70 100644 --- a/src/api/locale.c +++ b/src/api/locale.c @@ -32,9 +32,7 @@ F(char,p_sep_by_space) F(char,p_sign_posn) F(char*,thousands_sep) } -#ifndef NULL -#error no NULL -#endif +{void *x=NULL;} C(LC_ALL) C(LC_COLLATE) C(LC_CTYPE) diff --git a/src/api/ndbm.c b/src/api/ndbm.c index e06e9b4..8a8dc41 100644 --- a/src/api/ndbm.c +++ b/src/api/ndbm.c @@ -6,6 +6,7 @@ static void f() { T(size_t) +T(mode_t) T(DBM) { datum x; diff --git a/src/api/pthread.c b/src/api/pthread.c index fa2b2fc..db772bb 100644 --- a/src/api/pthread.c +++ b/src/api/pthread.c @@ -133,6 +133,10 @@ C(PTHREAD_SCOPE_SYSTEM) {pthread_t(*p)(void) = pthread_self;} {int(*p)(int,int*) = pthread_setcancelstate;} {int(*p)(int,int*) = pthread_setcanceltype;} +#if defined _XOPEN_SOURCE && defined OBSOLETE +{int(*p)(void) = pthread_getconcurrency;} +{int(*p)(int) = pthread_setconcurrency;} +#endif {int(*p)(pthread_t,int) = pthread_setschedprio;} {int(*p)(pthread_key_t,const void*) = pthread_setspecific;} {int(*p)(pthread_spinlock_t*) = pthread_spin_destroy;} diff --git a/src/api/search.c b/src/api/search.c index a482b6e..83e1162 100644 --- a/src/api/search.c +++ b/src/api/search.c @@ -7,8 +7,9 @@ static void f() T(size_t) T(ACTION) T(VISIT) +T(ENTRY) { -ENTRY x; +struct entry x; F(char*,key) F(void*,data) } diff --git a/src/api/setjmp.c b/src/api/setjmp.c index 84fde10..afcf164 100644 --- a/src/api/setjmp.c +++ b/src/api/setjmp.c @@ -10,4 +10,8 @@ T(sigjmp_buf) {void(*p)(sigjmp_buf,int) = siglongjmp;} {int(*p)(sigjmp_buf,int) = sigsetjmp;} #endif +#if defined _XOPEN_SOURCE && defined OBSOLETE +{void(*p)(jmp_buf,int) = _longjmp;} +{int(*p)(jmp_buf) = _setjmp;} +#endif } diff --git a/src/api/stdio.c b/src/api/stdio.c index ac73961..03bd98b 100644 --- a/src/api/stdio.c +++ b/src/api/stdio.c @@ -14,6 +14,9 @@ T(ssize_t) T(va_list) C(L_ctermid) #endif +#ifdef OBSOLETE +C(L_tmpnam) +#endif C(_IOFBF) C(_IOLBF) C(_IONBF) diff --git a/src/api/string.c b/src/api/string.c index dba2c24..beaf468 100644 --- a/src/api/string.c +++ b/src/api/string.c @@ -3,6 +3,7 @@ static void f() { T(size_t) +{void *x=NULL;} {void*(*p)(const void*,int,size_t) = memchr;} {int(*p)(const void*,const void*,size_t) = memcmp;} {void*(*p)(void*restrict,const void*restrict,size_t) = memcpy;} diff --git a/src/api/sys_resource.c b/src/api/sys_resource.c index 27d4ff3..5539098 100644 --- a/src/api/sys_resource.c +++ b/src/api/sys_resource.c @@ -5,6 +5,7 @@ static void f() { T(rlim_t) +T(id_t) T(struct timeval) C(PRIO_PROCESS) C(PRIO_PGRP) diff --git a/src/api/sys_socket.c b/src/api/sys_socket.c index ac10cbf..f504324 100644 --- a/src/api/sys_socket.c +++ b/src/api/sys_socket.c @@ -28,6 +28,11 @@ F(socklen_t,msg_controllen) F(int,msg_flags) } { +struct iovec x; +F(void *,iov_base) +F(size_t,iov_len) +} +{ struct cmsghdr x; F(socklen_t,cmsg_len) F(int,cmsg_level) diff --git a/src/api/sys_stat.c b/src/api/sys_stat.c index 75477a0..632af80 100644 --- a/src/api/sys_stat.c +++ b/src/api/sys_stat.c @@ -15,8 +15,11 @@ T(uid_t) T(gid_t) T(off_t) T(time_t) -T(struct timespec) - +{ +struct timespec x; +F(time_t,tv_sec) +F(long,tv_nsec) +} { struct stat x; F(dev_t, st_dev) diff --git a/src/api/sys_time.c b/src/api/sys_time.c index 54fc0e7..05f6fde 100644 --- a/src/api/sys_time.c +++ b/src/api/sys_time.c @@ -4,6 +4,7 @@ #define C(n) switch(n){case n:;} static void f() { +T(time_t) T(suseconds_t) T(fd_set) { diff --git a/src/api/time.c b/src/api/time.c index 257d9d3..c87fee4 100644 --- a/src/api/time.c +++ b/src/api/time.c @@ -46,7 +46,6 @@ C(TIMER_ABSTIME) {char*(*p)(const struct tm*) = asctime;} {clock_t(*p)(void) = clock;} {char*(*p)(const time_t*) = ctime;} -{int i = daylight;} {double(*p)(time_t,time_t) = difftime;} {struct tm*(*p)(const time_t*) = gmtime;} {struct tm*(*p)(const time_t*) = localtime;} @@ -65,6 +64,7 @@ C(TIMER_ABSTIME) {struct tm*(*p)(const time_t*restrict,struct tm*restrict) = localtime_r;} {int(*p)(const struct timespec*,struct timespec*) = nanosleep;} {size_t(*p)(char*restrict,size_t,const char*restrict,const struct tm*restrict,locale_t) = strftime_l;} +{int(*p)(clockid_t,struct sigevent*restrict,timer_t*restrict) = timer_create;} {int(*p)(timer_t) = timer_delete;} {int(*p)(timer_t) = timer_getoverrun;} {int(*p)(timer_t,struct itimerspec*) = timer_gettime;} @@ -77,12 +77,6 @@ C(TIMER_ABSTIME) {int i = getdate_err;} {char*(*p)(const char*restrict,const char*restrict,struct tm*restrict) = strptime;} {long i = timezone;} +{int i = daylight;} #endif } -#ifdef _POSIX_C_SOURCE -#include -static void g() -{ -{int(*p)(clockid_t,struct sigevent*restrict,timer_t*restrict) = timer_create;} -} -#endif diff --git a/src/api/wchar.c b/src/api/wchar.c index bbb6963..3a44486 100644 --- a/src/api/wchar.c +++ b/src/api/wchar.c @@ -13,16 +13,36 @@ T(mbstate_t) T(size_t) T(wchar_t) T(wint_t) +T(struct tm) C(WCHAR_MAX) C(WCHAR_MIN) C(WEOF) {void *x=NULL;} +{wint_t(*p)(int) = btowc;} +{wint_t(FILE*) = fgetwc;} +{wchar_t*(*p)(wchar_t*restrict,int,FILE*restrict) = fgetws;} +{wint_t(*p)(wchar_t,FILE*) = fputwc;} +{int(*p)(const wchar_t*restrict,FILE*restrict) = fputws;} +{int(*p)(FILE*,int) = fwide;} +{int(*p)(FILE*restrict,const wchar_t*restrict,...) = fwprintf;} +{int(*p)(FILE*restrict,const wchar_t*restrict,...) = fwscanf;} +{wint_t(*p)(FILE*) = getwc;} {wint_t(*p)(void) = getwchar;} {size_t(*p)(const char*restrict,size_t,mbstate_t*restrict) = mbrlen;} {size_t(*p)(wchar_t*restrict,const char*restrict,size_t,mbstate_t*restrict) = mbrtowc;} {int(*p)(const mbstate_t*) = mbsinit;} {size_t(*p)(wchar_t*restrict,const char**restrict,size_t,mbstate_t*restrict) = mbsrtowcs;} +{wint_t(*p)(wchar_t,FILE*) = putwc;} {wint_t(*p)(wchar_t) = putwchar;} +{int(*p)(wchar_t*restrict,size_t,const wchar_t*restrict,...) = swprintf;} +{int(*p)(const wchar_t*restrict,const wchar_t*restrict,...) = swscanf;} +{wint_t(*p)(wint_t,FILE*) = ungetwc;} +{int(*p)(FILE*restrict,const wchar_t*restrict,va_list) = vfwprintf;} +{int(*p)(FILE*restrict,const wchar_t*restrict,va_list) = vfwscanf;} +{int(*p)(wchar_t*restrict,size_t,const wchar_t*restrict,va_list) = vswprintf;} +{int(*p)(const wchar_t*restrict,const wchar_t*restrict,va_list) = vswscanf;} +{int(*p)(const wchar_t*restrict,va_list) = vwprintf;} +{int(*p)(const wchar_t*restrict,va_list) = vwscanf;} {size_t(*p)(char*restrict,wchar_t,mbstate_t*restrict) = wcrtomb;} {wchar_t*(*p)(wchar_t*restrict,const wchar_t*restrict) = wcscat;} {wchar_t*(*p)(const wchar_t*,wchar_t) = wcschr;} @@ -49,6 +69,7 @@ C(WEOF) {unsigned long(*p)(const wchar_t*restrict,wchar_t**restrict,int) = wcstoul;} {unsigned long long(*p)(const wchar_t*restrict,wchar_t**restrict,int) = wcstoull;} {size_t(*p)(wchar_t*restrict,const wchar_t*restrict,size_t) = wcsxfrm;} +{int(*p)(wint_t) = wctob;} {wchar_t*(*p)(const wchar_t*,wchar_t,size_t) = wmemchr;} {int(*p)(const wchar_t*,const wchar_t*,size_t) = wmemcmp;} {wchar_t*(*p)(wchar_t*restrict,const wchar_t*restrict,size_t) = wmemcpy;}