fix api tests (add some obsolete symbols fix wchar tests)
authorSzabolcs Nagy <nsz@port70.net>
Thu, 24 Oct 2013 13:17:48 +0000 (13:17 +0000)
committerSzabolcs Nagy <nsz@port70.net>
Thu, 24 Oct 2013 13:17:48 +0000 (13:17 +0000)
13 files changed:
src/api/locale.c
src/api/ndbm.c
src/api/pthread.c
src/api/search.c
src/api/setjmp.c
src/api/stdio.c
src/api/string.c
src/api/sys_resource.c
src/api/sys_socket.c
src/api/sys_stat.c
src/api/sys_time.c
src/api/time.c
src/api/wchar.c

index e7ef233..0428b70 100644 (file)
@@ -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)
index e06e9b4..8a8dc41 100644 (file)
@@ -6,6 +6,7 @@
 static void f()
 {
 T(size_t)
+T(mode_t)
 T(DBM)
 {
 datum x;
index fa2b2fc..db772bb 100644 (file)
@@ -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;}
index a482b6e..83e1162 100644 (file)
@@ -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)
 }
index 84fde10..afcf164 100644 (file)
@@ -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
 }
index ac73961..03bd98b 100644 (file)
@@ -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)
index dba2c24..beaf468 100644 (file)
@@ -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;}
index 27d4ff3..5539098 100644 (file)
@@ -5,6 +5,7 @@
 static void f()
 {
 T(rlim_t)
+T(id_t)
 T(struct timeval)
 C(PRIO_PROCESS)
 C(PRIO_PGRP)
index ac10cbf..f504324 100644 (file)
@@ -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)
index 75477a0..632af80 100644 (file)
@@ -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)
index 54fc0e7..05f6fde 100644 (file)
@@ -4,6 +4,7 @@
 #define C(n) switch(n){case n:;}
 static void f()
 {
+T(time_t)
 T(suseconds_t)
 T(fd_set)
 {
index 257d9d3..c87fee4 100644 (file)
@@ -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 <signal.h>
-static void g()
-{
-{int(*p)(clockid_t,struct sigevent*restrict,timer_t*restrict) = timer_create;}
-}
-#endif
index bbb6963..3a44486 100644 (file)
@@ -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;}