summaryrefslogtreecommitdiff
path: root/test/API
diff options
context:
space:
mode:
Diffstat (limited to 'test/API')
-rw-r--r--test/API/Makefile7
-rw-r--r--test/API/Makefile.in26
-rw-r--r--test/API/aio.SUSv4.syms8
-rw-r--r--test/API/arpa_inet.SUSv4.syms8
-rw-r--r--test/API/complex.SUSv4.syms66
-rw-r--r--test/API/ctype-CX.SUSv4.syms14
-rw-r--r--test/API/ctype-OBXSI.SUSv4.syms2
-rw-r--r--test/API/ctype.SUSv4.syms14
-rw-r--r--test/API/dirent-XSI.SUSv4.syms2
-rw-r--r--test/API/dirent.SUSv4.syms9
-rw-r--r--test/API/dlfcn.SUSv4.syms4
-rw-r--r--test/API/fcntl-ADV.SUSv4.syms2
-rw-r--r--test/API/fcntl.SUSv4.syms4
-rw-r--r--test/API/fenv.SUSv4.syms11
-rw-r--r--test/API/ftw-OB.SUSv4.syms1
-rw-r--r--test/API/ftw.SUSv4.syms1
-rw-r--r--test/API/glob.SUSv4.syms2
-rw-r--r--test/API/grp-XSI.SUSv4.syms1
-rw-r--r--test/API/grp.SUSv4.syms6
-rwxr-xr-xtest/API/html2input.sh119
-rw-r--r--test/API/iconv.SUSv4.syms3
-rw-r--r--test/API/inttypes.SUSv4.syms6
-rw-r--r--test/API/libgen.SUSv4.syms2
-rw-r--r--test/API/locale-CX.SUSv4.syms4
-rw-r--r--test/API/locale.SUSv4.syms2
-rw-r--r--test/API/math-XSI.SUSv4.syms6
-rw-r--r--test/API/math.SUSv4.syms171
-rw-r--r--test/API/monetary.SUSv4.syms2
-rw-r--r--test/API/mqueue.SUSv4.syms10
-rw-r--r--test/API/ndbm.SUSv4.syms9
-rw-r--r--test/API/net_if.SUSv4.syms4
-rw-r--r--test/API/netdb.SUSv4.syms22
-rw-r--r--test/API/nl_types.SUSv4.syms3
-rw-r--r--test/API/pthread-MC1.SUSv4.syms2
-rw-r--r--test/API/pthread-OBXSI.SUSv4.syms2
-rw-r--r--test/API/pthread-RPP|TPP.SUSv4.syms4
-rw-r--r--test/API/pthread-TCT.SUSv4.syms1
-rw-r--r--test/API/pthread-TPS.SUSv4.syms9
-rw-r--r--test/API/pthread-TSATSS.SUSv4.syms2
-rw-r--r--test/API/pthread-TSH.SUSv4.syms8
-rw-r--r--test/API/pthread-TSS.SUSv4.syms2
-rw-r--r--test/API/pthread.SUSv4.syms70
-rw-r--r--test/API/pwd-XSI.SUSv4.syms3
-rw-r--r--test/API/pwd.SUSv4.syms4
-rw-r--r--test/API/regex.SUSv4.syms4
-rw-r--r--test/API/sched-PS.SUSv4.syms4
-rw-r--r--test/API/sched-PS|TPS.SUSv4.syms3
-rw-r--r--test/API/sched.SUSv4.syms1
-rw-r--r--test/API/search.SUSv4.syms11
-rw-r--r--test/API/semaphore.SUSv4.syms10
-rw-r--r--test/API/separate.awk48
-rw-r--r--test/API/setjmp-CX.SUSv4.syms1
-rw-r--r--test/API/setjmp-OBXSI.SUSv4.syms1
-rw-r--r--test/API/setjmp.SUSv4.syms1
-rw-r--r--test/API/signal-CX.SUSv4.syms18
-rw-r--r--test/API/signal-OBXSI.SUSv4.syms6
-rw-r--r--test/API/signal-XSI.SUSv4.syms2
-rw-r--r--test/API/signal.SUSv4.syms2
-rw-r--r--test/API/spawn-PS.SUSv4.syms4
-rw-r--r--test/API/spawn.SUSv4.syms17
-rw-r--r--test/API/stdio-CX.SUSv4.syms20
-rw-r--r--test/API/stdio-OB.SUSv4.syms2
-rw-r--r--test/API/stdio-OBXSI.SUSv4.syms1
-rw-r--r--test/API/stdio.SUSv4.syms44
-rw-r--r--test/API/stdlib-ADV.SUSv4.syms1
-rw-r--r--test/API/stdlib-CX.SUSv4.syms4
-rw-r--r--test/API/stdlib-OBCX.SUSv4.syms1
-rw-r--r--test/API/stdlib-XSI.SUSv4.syms22
-rw-r--r--test/API/stdlib.SUSv4.syms37
-rw-r--r--test/API/string-CX.SUSv4.syms11
-rw-r--r--test/API/string-XSI.SUSv4.syms1
-rw-r--r--test/API/string.SUSv4.syms22
-rw-r--r--test/API/strings-XSI.SUSv4.syms1
-rw-r--r--test/API/strings.SUSv4.syms4
-rw-r--r--test/API/stropts.SUSv4.syms8
-rw-r--r--test/API/sys_mman-ADV.SUSv4.syms1
-rw-r--r--test/API/sys_mman-ML.SUSv4.syms2
-rw-r--r--test/API/sys_mman-MLR.SUSv4.syms2
-rw-r--r--test/API/sys_mman-SHM.SUSv4.syms2
-rw-r--r--test/API/sys_mman-TYM.SUSv4.syms3
-rw-r--r--test/API/sys_mman-XSI|SIO.SUSv4.syms1
-rw-r--r--test/API/sys_mman.SUSv4.syms3
-rw-r--r--test/API/sys_msg.SUSv4.syms4
-rw-r--r--test/API/sys_resource.SUSv4.syms5
-rw-r--r--test/API/sys_select.SUSv4.syms6
-rw-r--r--test/API/sys_sem.SUSv4.syms3
-rw-r--r--test/API/sys_shm.SUSv4.syms4
-rw-r--r--test/API/sys_socket.SUSv4.syms18
-rw-r--r--test/API/sys_stat-XSI.SUSv4.syms2
-rw-r--r--test/API/sys_stat.SUSv4.syms14
-rw-r--r--test/API/sys_statvfs.SUSv4.syms2
-rw-r--r--test/API/sys_time-OB.SUSv4.syms3
-rw-r--r--test/API/sys_time.SUSv4.syms2
-rw-r--r--test/API/sys_uio.SUSv4.syms2
-rw-r--r--test/API/sys_wait.SUSv4.syms3
-rw-r--r--test/API/syslog.SUSv4.syms4
-rw-r--r--test/API/termios.SUSv4.syms11
-rw-r--r--test/API/time-CPT.SUSv4.syms1
-rw-r--r--test/API/time-CX.SUSv4.syms15
-rw-r--r--test/API/time-OB.SUSv4.syms2
-rw-r--r--test/API/time-OBCX.SUSv4.syms2
-rw-r--r--test/API/time-XSI.SUSv4.syms4
-rw-r--r--test/API/time.SUSv4.syms7
-rw-r--r--test/API/trace-TEF.SUSv4.syms8
-rw-r--r--test/API/trace-TRI.SUSv4.syms2
-rw-r--r--test/API/trace-TRL.SUSv4.syms9
-rw-r--r--test/API/trace.SUSv4.syms31
-rw-r--r--test/API/tst-API.sh16
-rw-r--r--test/API/unistd-CX.SUSv4.syms1
-rw-r--r--test/API/unistd-FSC.SUSv4.syms1
-rw-r--r--test/API/unistd-OBXSI.SUSv4.syms1
-rw-r--r--test/API/unistd-SIO.SUSv4.syms1
-rw-r--r--test/API/unistd-XSI.SUSv4.syms9
-rw-r--r--test/API/unistd.SUSv4.syms74
-rw-r--r--test/API/utmpx.SUSv4.syms6
-rw-r--r--test/API/wchar-CX.SUSv4.syms13
-rw-r--r--test/API/wchar-OBXSI.SUSv4.syms15
-rw-r--r--test/API/wchar-XSI.SUSv4.syms2
-rw-r--r--test/API/wchar.SUSv4.syms59
-rw-r--r--test/API/wctype-CX.SUSv4.syms18
-rw-r--r--test/API/wctype.SUSv4.syms18
-rw-r--r--test/API/wordexp.SUSv4.syms2
122 files changed, 1384 insertions, 0 deletions
diff --git a/test/API/Makefile b/test/API/Makefile
new file mode 100644
index 000000000..458d6c53f
--- /dev/null
+++ b/test/API/Makefile
@@ -0,0 +1,7 @@
+# uClibc API tests
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+
+top_builddir=../../
+include ../Rules.mak
+-include Makefile.in
+include ../Test.mak
diff --git a/test/API/Makefile.in b/test/API/Makefile.in
new file mode 100644
index 000000000..9e7cfdf57
--- /dev/null
+++ b/test/API/Makefile.in
@@ -0,0 +1,26 @@
+# uClibc API tests
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+
+SHELL_TESTS := shell_tst-API
+run: $(SHELL_TESTS)
+
+define get_codes
+ $(subst .,,$(sort $(suffix $(subst -,.,$(foreach x,$(1),$(if $(findstring -,$(x)),$(x),))))))
+endef
+sym_files = $(patsubst %.syms,%,$(wildcard *.syms))
+stds = $(patsubst .%,%,$(sort $(suffix $(sym_files))))
+tests=$(foreach s,$(stds),$(patsubst %.$(s),%,$(sym_files)))
+codes=$(call get_codes,$(tests))
+
+shell_tst-API: uclibc_out=$(patsubst shell_%,%,$@).out
+shell_tst-API: glibc_out=$(patsubst shell_%,%_glibc,$@).out
+shell_tst-API:
+ @exec echo "DISABLED for now, needs improvement"
+shell_tst-API_DISABLED:
+ $(showtest)
+ $(Q)top_builddir=$(top_builddir) AWK=$(AWK) \
+ uclibc_out=$(uclibc_out) glibc_out=$(glibc_out) \
+ $(SHELL) \
+ $(patsubst shell_%,%.sh,$@) $(stds) "$(tests)"
+ $(do_showdiff) $(glibc_out) $(uclibc_out) ; \
+ exec diff -u "$(glibc_out)" "$(uclibc_out)"
diff --git a/test/API/aio.SUSv4.syms b/test/API/aio.SUSv4.syms
new file mode 100644
index 000000000..c7d13e09c
--- /dev/null
+++ b/test/API/aio.SUSv4.syms
@@ -0,0 +1,8 @@
+aio_cancel
+aio_error
+aio_fsync
+aio_read
+aio_return
+aio_suspend
+aio_write
+lio_listio
diff --git a/test/API/arpa_inet.SUSv4.syms b/test/API/arpa_inet.SUSv4.syms
new file mode 100644
index 000000000..e61cc9f76
--- /dev/null
+++ b/test/API/arpa_inet.SUSv4.syms
@@ -0,0 +1,8 @@
+htonl
+htons
+ntohl
+ntohs
+inet_addr
+inet_ntoa
+inet_ntop
+inet_pton
diff --git a/test/API/complex.SUSv4.syms b/test/API/complex.SUSv4.syms
new file mode 100644
index 000000000..ce7be69c8
--- /dev/null
+++ b/test/API/complex.SUSv4.syms
@@ -0,0 +1,66 @@
+cabs
+cabsf
+cabsl
+cacos
+cacosf
+cacosh
+cacoshf
+cacoshl
+cacosl
+carg
+cargf
+cargl
+casin
+casinf
+casinh
+casinhf
+casinhl
+casinl
+catan
+catanf
+catanh
+catanhf
+catanhl
+catanl
+ccos
+ccosf
+ccosh
+ccoshf
+ccoshl
+ccosl
+cexp
+cexpf
+cexpl
+cimag
+cimagf
+cimagl
+clog
+clogf
+clogl
+conj
+conjf
+conjl
+cpow
+cpowf
+cpowl
+cproj
+cprojf
+cprojl
+creal
+crealf
+creall
+csin
+csinf
+csinh
+csinhf
+csinhl
+csinl
+csqrt
+csqrtf
+csqrtl
+ctan
+ctanf
+ctanh
+ctanhf
+ctanhl
+ctanl
diff --git a/test/API/ctype-CX.SUSv4.syms b/test/API/ctype-CX.SUSv4.syms
new file mode 100644
index 000000000..3963c49a5
--- /dev/null
+++ b/test/API/ctype-CX.SUSv4.syms
@@ -0,0 +1,14 @@
+isalnum_l
+isalpha_l
+isblank_l
+iscntrl_l
+isdigit_l
+isgraph_l
+islower_l
+isprint_l
+ispunct_l
+isspace_l
+isupper_l
+isxdigit_l
+tolower_l
+toupper_l
diff --git a/test/API/ctype-OBXSI.SUSv4.syms b/test/API/ctype-OBXSI.SUSv4.syms
new file mode 100644
index 000000000..7a5ad9b14
--- /dev/null
+++ b/test/API/ctype-OBXSI.SUSv4.syms
@@ -0,0 +1,2 @@
+isascii
+toascii
diff --git a/test/API/ctype.SUSv4.syms b/test/API/ctype.SUSv4.syms
new file mode 100644
index 000000000..fac123f32
--- /dev/null
+++ b/test/API/ctype.SUSv4.syms
@@ -0,0 +1,14 @@
+isalnum
+isalpha
+isblank
+iscntrl
+isdigit
+isgraph
+islower
+isprint
+ispunct
+isspace
+isupper
+isxdigit
+tolower
+toupper
diff --git a/test/API/dirent-XSI.SUSv4.syms b/test/API/dirent-XSI.SUSv4.syms
new file mode 100644
index 000000000..979107095
--- /dev/null
+++ b/test/API/dirent-XSI.SUSv4.syms
@@ -0,0 +1,2 @@
+seekdir
+telldir
diff --git a/test/API/dirent.SUSv4.syms b/test/API/dirent.SUSv4.syms
new file mode 100644
index 000000000..e749efb67
--- /dev/null
+++ b/test/API/dirent.SUSv4.syms
@@ -0,0 +1,9 @@
+alphasort
+closedir
+dirfd
+fdopendir
+opendir
+readdir
+readdir_r
+rewinddir
+scandir
diff --git a/test/API/dlfcn.SUSv4.syms b/test/API/dlfcn.SUSv4.syms
new file mode 100644
index 000000000..1e7500efc
--- /dev/null
+++ b/test/API/dlfcn.SUSv4.syms
@@ -0,0 +1,4 @@
+dlclose
+dlerror
+dlopen
+dlsym
diff --git a/test/API/fcntl-ADV.SUSv4.syms b/test/API/fcntl-ADV.SUSv4.syms
new file mode 100644
index 000000000..899236e5e
--- /dev/null
+++ b/test/API/fcntl-ADV.SUSv4.syms
@@ -0,0 +1,2 @@
+posix_fadvise
+posix_fallocate
diff --git a/test/API/fcntl.SUSv4.syms b/test/API/fcntl.SUSv4.syms
new file mode 100644
index 000000000..588085b1f
--- /dev/null
+++ b/test/API/fcntl.SUSv4.syms
@@ -0,0 +1,4 @@
+creat
+fcntl
+open
+openat
diff --git a/test/API/fenv.SUSv4.syms b/test/API/fenv.SUSv4.syms
new file mode 100644
index 000000000..a9aebcbdd
--- /dev/null
+++ b/test/API/fenv.SUSv4.syms
@@ -0,0 +1,11 @@
+feclearexcept
+fegetenv
+fegetexceptflag
+fegetround
+feholdexcept
+feraiseexcept
+fesetenv
+fesetexceptflag
+fesetround
+fetestexcept
+feupdateenv
diff --git a/test/API/ftw-OB.SUSv4.syms b/test/API/ftw-OB.SUSv4.syms
new file mode 100644
index 000000000..87a440fc3
--- /dev/null
+++ b/test/API/ftw-OB.SUSv4.syms
@@ -0,0 +1 @@
+ftw
diff --git a/test/API/ftw.SUSv4.syms b/test/API/ftw.SUSv4.syms
new file mode 100644
index 000000000..35000c9ce
--- /dev/null
+++ b/test/API/ftw.SUSv4.syms
@@ -0,0 +1 @@
+nftw
diff --git a/test/API/glob.SUSv4.syms b/test/API/glob.SUSv4.syms
new file mode 100644
index 000000000..c2e4234ab
--- /dev/null
+++ b/test/API/glob.SUSv4.syms
@@ -0,0 +1,2 @@
+glob
+globfree
diff --git a/test/API/grp-XSI.SUSv4.syms b/test/API/grp-XSI.SUSv4.syms
new file mode 100644
index 000000000..e2b1c1dd2
--- /dev/null
+++ b/test/API/grp-XSI.SUSv4.syms
@@ -0,0 +1 @@
+setgrent
diff --git a/test/API/grp.SUSv4.syms b/test/API/grp.SUSv4.syms
new file mode 100644
index 000000000..77a8c6ea9
--- /dev/null
+++ b/test/API/grp.SUSv4.syms
@@ -0,0 +1,6 @@
+endgrent
+getgrent
+getgrgid
+getgrgid_r
+getgrnam
+getgrnam_r
diff --git a/test/API/html2input.sh b/test/API/html2input.sh
new file mode 100755
index 000000000..9ea68fec1
--- /dev/null
+++ b/test/API/html2input.sh
@@ -0,0 +1,119 @@
+#!/bin/sh
+# vi: ft=awk :
+#
+# Script to extract functions and external variables off SUS html docs
+#
+# Copyright (C) 2010 Bernhard Reutner-Fischer
+# Public Domain
+
+# Usage:
+# wget http://www.opengroup.org/onlinepubs/9699919799/download/susv4.tgz
+# tar xzf susv4.tgz
+# SUS=susv4 html2input.sh -vFULL_DECLARATIONS=1
+# or
+# SUS=susv4 html2input.sh -vFULL_DECLARATIONS=0 -vSTDNAME=SUSv4
+#
+# Bug in time.h.html of SUSv4:
+# It inconsistently reads "as variables" instead of "external variables" that
+# is used everywhere except in time.h.html
+
+test "x$SUS" = "x" && SUS="susv4"
+test "x$AWK" = "x" && AWK="AWK"
+test "x$GREP" = "x" && GREP="GREP"
+for h in \
+ $($GREP -l "shall be declared as functions" $SUS/basedefs/*.h.html) \
+ $($GREP -l "shall declare the following as variables" $SUS/basedefs/*.h.html) \
+ $($GREP -l "shall declare the following external variables" $SUS/basedefs/*.h.html)
+do
+$AWK $* '
+function get_filename () {
+ if (NR == 1) {
+ x=FILENAME
+ sub(".*/", "", x)
+ split(x, f , ".")
+ fname=f[1]
+ if (STDNAME)
+ fname=fname "." STDNAME
+ fname=fname ".in"
+ printf "" > fname
+ }
+}
+function unhtml (l) {
+ sub("<tt>", "", l)
+ sub("</tt>", "", l)
+ sub("<sup>", "", l)
+ sub("</sup>", "", l)
+ sub("<a [^>]*>", "", l)
+ sub("</a>", "", l)
+ if (l ~ /<img[^>]*Option[[:space:]][[:space:]]*Start[^>]*>/) {
+ sub("<img[^>]*>", "[Option Start]", l)
+ } else if (l ~ /<img[^>]*Option[[:space:]][[:space:]]*End[^>]*>/) {
+ sub("<img[^>]*>", "[Option End]", l)
+ }
+ sub("<.*>", "", l)
+ return l
+}
+function get_funcname (l) {
+ if (FULL_DECLARATIONS)
+ return l
+ if (l !~ /;$/)
+ return l
+ cnt = split(l, foo, " ")
+ if (cnt >= 2 && foo[2] ~ /^\(\*/) {
+ cnt = split(l, foo, "(")
+ # good enough for signal() and sigset()
+ if (cnt >= 2)
+ l=foo[2]
+ } else {
+ sub("\\(.*", "", l)
+ }
+ gsub("[[\\]\\*]", "", l)
+ i = split(l, a, " ")
+ if (i)
+ l = a[i]
+ return l
+}
+function get_varname (l) {
+ if (FULL_DECLARATIONS)
+ return l
+ if (l !~ /;$/)
+ return l
+ gsub(",[[:space:]][[:space:]]*", ",", l)
+ sub(";$", "", l)
+ i = split(l, a, " ")
+ if (i)
+ l = a[i]
+ gsub("[[\\]\\*]", "", l)
+ gsub(",", "\n", l)
+ return l
+}
+BEGIN{data=0;l=""}
+get_filename()
+/shall be declared as functions/{data=1;isvar=0;next;}
+/shall declare the following as variables/{data=1;isvar=1;next;}
+/shall declare the following external variables/{data=1;isvar=1;next;}
+/<pre>/{data++;next;}
+/<\/pre>/{data=0;next;}
+/.*/{
+ if (data == 2 && fname) {
+ tmp = $0
+ sub("^[[:space:]][[:space:]]*", " ", tmp)
+ l = l tmp
+ tmp = unhtml(l)
+ if (!tmp)
+ next
+ l = tmp
+ if (tmp !~ /;$/ && tmp !~ />$/ &&
+ tmp !~ /Option Start\]$/ && tmp !~ /Option End\]$/)
+ next
+ if (!isvar)
+ l = get_funcname(l)
+ else
+ l = get_varname(l)
+ if (l)
+ print l >> fname
+ l=""
+ }
+}
+' $h
+done
diff --git a/test/API/iconv.SUSv4.syms b/test/API/iconv.SUSv4.syms
new file mode 100644
index 000000000..059952064
--- /dev/null
+++ b/test/API/iconv.SUSv4.syms
@@ -0,0 +1,3 @@
+iconv
+iconv_close
+iconv_open
diff --git a/test/API/inttypes.SUSv4.syms b/test/API/inttypes.SUSv4.syms
new file mode 100644
index 000000000..6cbc3a259
--- /dev/null
+++ b/test/API/inttypes.SUSv4.syms
@@ -0,0 +1,6 @@
+imaxabs
+imaxdiv
+strtoimax
+strtoumax
+wcstoimax
+wcstoumax
diff --git a/test/API/libgen.SUSv4.syms b/test/API/libgen.SUSv4.syms
new file mode 100644
index 000000000..3d4945afe
--- /dev/null
+++ b/test/API/libgen.SUSv4.syms
@@ -0,0 +1,2 @@
+basename
+dirname
diff --git a/test/API/locale-CX.SUSv4.syms b/test/API/locale-CX.SUSv4.syms
new file mode 100644
index 000000000..22ffcfc2a
--- /dev/null
+++ b/test/API/locale-CX.SUSv4.syms
@@ -0,0 +1,4 @@
+duplocale
+freelocale
+newlocale
+uselocale
diff --git a/test/API/locale.SUSv4.syms b/test/API/locale.SUSv4.syms
new file mode 100644
index 000000000..33f8cad06
--- /dev/null
+++ b/test/API/locale.SUSv4.syms
@@ -0,0 +1,2 @@
+localeconv
+setlocale
diff --git a/test/API/math-XSI.SUSv4.syms b/test/API/math-XSI.SUSv4.syms
new file mode 100644
index 000000000..4ce15d8f0
--- /dev/null
+++ b/test/API/math-XSI.SUSv4.syms
@@ -0,0 +1,6 @@
+j0
+j1
+jn
+y0
+y1
+yn
diff --git a/test/API/math.SUSv4.syms b/test/API/math.SUSv4.syms
new file mode 100644
index 000000000..5343ac068
--- /dev/null
+++ b/test/API/math.SUSv4.syms
@@ -0,0 +1,171 @@
+acos
+acosf
+acosh
+acoshf
+acoshl
+acosl
+asin
+asinf
+asinh
+asinhf
+asinhl
+asinl
+atan
+atan2
+atan2f
+atan2l
+atanf
+atanh
+atanhf
+atanhl
+atanl
+cbrt
+cbrtf
+cbrtl
+ceil
+ceilf
+ceill
+copysign
+copysignf
+copysignl
+cos
+cosf
+cosh
+coshf
+coshl
+cosl
+erf
+erfc
+erfcf
+erfcl
+erff
+erfl
+exp
+exp2
+exp2f
+exp2l
+expf
+expl
+expm1
+expm1f
+expm1l
+fabs
+fabsf
+fabsl
+fdim
+fdimf
+fdiml
+floor
+floorf
+floorl
+fma
+fmaf
+fmal
+fmax
+fmaxf
+fmaxl
+fmin
+fminf
+fminl
+fmod
+fmodf
+fmodl
+frexp
+frexpf
+frexpl
+hypot
+hypotf
+hypotl
+ilogb
+ilogbf
+ilogbl
+ldexp
+ldexpf
+ldexpl
+lgamma
+lgammaf
+lgammal
+llrint
+llrintf
+llrintl
+llround
+llroundf
+llroundl
+log
+log10
+log10f
+log10l
+log1p
+log1pf
+log1pl
+log2
+log2f
+log2l
+logb
+logbf
+logbl
+logf
+logl
+lrint
+lrintf
+lrintl
+lround
+lroundf
+lroundl
+modf
+modff
+modfl
+nan
+nanf
+nanl
+nearbyint
+nearbyintf
+nearbyintl
+nextafter
+nextafterf
+nextafterl
+nexttoward
+nexttowardf
+nexttowardl
+pow
+powf
+powl
+remainder
+remainderf
+remainderl
+remquo
+remquof
+remquol
+rint
+rintf
+rintl
+round
+roundf
+roundl
+scalbln
+scalblnf
+scalblnl
+scalbn
+scalbnf
+scalbnl
+sin
+sinf
+sinh
+sinhf
+sinhl
+sinl
+sqrt
+sqrtf
+sqrtl
+tan
+tanf
+tanh
+tanhf
+tanhl
+tanl
+tgamma
+tgammaf
+tgammal
+trunc
+truncf
+truncl
diff --git a/test/API/monetary.SUSv4.syms b/test/API/monetary.SUSv4.syms
new file mode 100644
index 000000000..256b53a78
--- /dev/null
+++ b/test/API/monetary.SUSv4.syms
@@ -0,0 +1,2 @@
+strfmon
+strfmon_l
diff --git a/test/API/mqueue.SUSv4.syms b/test/API/mqueue.SUSv4.syms
new file mode 100644
index 000000000..54c80a08d
--- /dev/null
+++ b/test/API/mqueue.SUSv4.syms
@@ -0,0 +1,10 @@
+mq_close
+mq_getattr
+mq_notify
+mq_open
+mq_receive
+mq_send
+mq_setattr
+mq_timedreceive
+mq_timedsend
+mq_unlink
diff --git a/test/API/ndbm.SUSv4.syms b/test/API/ndbm.SUSv4.syms
new file mode 100644
index 000000000..70116bf49
--- /dev/null
+++ b/test/API/ndbm.SUSv4.syms
@@ -0,0 +1,9 @@
+dbm_clearerr
+dbm_close
+dbm_delete
+dbm_error
+dbm_fetch
+dbm_firstkey
+dbm_nextkey
+dbm_open
+dbm_store
diff --git a/test/API/net_if.SUSv4.syms b/test/API/net_if.SUSv4.syms
new file mode 100644
index 000000000..828a0cdb8
--- /dev/null
+++ b/test/API/net_if.SUSv4.syms
@@ -0,0 +1,4 @@
+if_freenameindex
+if_indextoname
+if_nameindex
+if_nametoindex
diff --git a/test/API/netdb.SUSv4.syms b/test/API/netdb.SUSv4.syms
new file mode 100644
index 000000000..daf932b05
--- /dev/null
+++ b/test/API/netdb.SUSv4.syms
@@ -0,0 +1,22 @@
+endhostent
+endnetent
+endprotoent
+endservent
+freeaddrinfo
+gai_strerror
+getaddrinfo
+gethostent
+getnameinfo
+getnetbyaddr
+getnetbyname
+getnetent
+getprotobyname
+getprotobynumber
+getprotoent
+getservbyname
+getservbyport
+getservent
+sethostent
+setnetent
+setprotoent
+setservent
diff --git a/test/API/nl_types.SUSv4.syms b/test/API/nl_types.SUSv4.syms
new file mode 100644
index 000000000..ea0059931
--- /dev/null
+++ b/test/API/nl_types.SUSv4.syms
@@ -0,0 +1,3 @@
+catclose
+catgets
+catopen
diff --git a/test/API/pthread-MC1.SUSv4.syms b/test/API/pthread-MC1.SUSv4.syms
new file mode 100644
index 000000000..8a47a3910
--- /dev/null
+++ b/test/API/pthread-MC1.SUSv4.syms
@@ -0,0 +1,2 @@
+pthread_mutexattr_getprotocol
+pthread_mutexattr_setprotocol
diff --git a/test/API/pthread-OBXSI.SUSv4.syms b/test/API/pthread-OBXSI.SUSv4.syms
new file mode 100644
index 000000000..140b53d06
--- /dev/null
+++ b/test/API/pthread-OBXSI.SUSv4.syms
@@ -0,0 +1,2 @@
+pthread_getconcurrency
+pthread_setconcurrency
diff --git a/test/API/pthread-RPP|TPP.SUSv4.syms b/test/API/pthread-RPP|TPP.SUSv4.syms
new file mode 100644
index 000000000..b116695f2
--- /dev/null
+++ b/test/API/pthread-RPP|TPP.SUSv4.syms
@@ -0,0 +1,4 @@
+pthread_mutex_getprioceiling
+pthread_mutex_setprioceiling
+pthread_mutexattr_getprioceiling
+pthread_mutexattr_setprioceiling
diff --git a/test/API/pthread-TCT.SUSv4.syms b/test/API/pthread-TCT.SUSv4.syms
new file mode 100644
index 000000000..7153787e2
--- /dev/null
+++ b/test/API/pthread-TCT.SUSv4.syms
@@ -0,0 +1 @@
+pthread_getcpuclockid
diff --git a/test/API/pthread-TPS.SUSv4.syms b/test/API/pthread-TPS.SUSv4.syms
new file mode 100644
index 000000000..76fcd9560
--- /dev/null
+++ b/test/API/pthread-TPS.SUSv4.syms
@@ -0,0 +1,9 @@
+pthread_attr_getinheritsched
+pthread_attr_getschedpolicy
+pthread_attr_getscope
+pthread_attr_setinheritsched
+pthread_attr_setschedpolicy
+pthread_attr_setscope
+pthread_getschedparam
+pthread_setschedparam
+pthread_setschedprio
diff --git a/test/API/pthread-TSATSS.SUSv4.syms b/test/API/pthread-TSATSS.SUSv4.syms
new file mode 100644
index 000000000..5e03091cb
--- /dev/null
+++ b/test/API/pthread-TSATSS.SUSv4.syms
@@ -0,0 +1,2 @@
+pthread_attr_getstack
+pthread_attr_setstack
diff --git a/test/API/pthread-TSH.SUSv4.syms b/test/API/pthread-TSH.SUSv4.syms
new file mode 100644
index 000000000..717b232ac
--- /dev/null
+++ b/test/API/pthread-TSH.SUSv4.syms
@@ -0,0 +1,8 @@
+pthread_barrierattr_getpshared
+pthread_barrierattr_setpshared
+pthread_condattr_getpshared
+pthread_condattr_setpshared
+pthread_mutexattr_getpshared
+pthread_mutexattr_setpshared
+pthread_rwlockattr_getpshared
+pthread_rwlockattr_setpshared
diff --git a/test/API/pthread-TSS.SUSv4.syms b/test/API/pthread-TSS.SUSv4.syms
new file mode 100644
index 000000000..1092f88d3
--- /dev/null
+++ b/test/API/pthread-TSS.SUSv4.syms
@@ -0,0 +1,2 @@
+pthread_attr_getstacksize
+pthread_attr_setstacksize
diff --git a/test/API/pthread.SUSv4.syms b/test/API/pthread.SUSv4.syms
new file mode 100644
index 000000000..524a6fec7
--- /dev/null
+++ b/test/API/pthread.SUSv4.syms
@@ -0,0 +1,70 @@
+pthread_atfork
+pthread_attr_destroy
+pthread_attr_getdetachstate
+pthread_attr_getguardsize
+pthread_attr_getschedparam
+pthread_attr_init
+pthread_attr_setdetachstate
+pthread_attr_setguardsize
+pthread_attr_setschedparam
+pthread_barrier_destroy
+pthread_barrier_init
+pthread_barrier_wait
+pthread_barrierattr_destroy
+pthread_barrierattr_init
+pthread_cancel
+pthread_cleanup_pop
+pthread_cleanup_push
+pthread_cond_broadcast
+pthread_cond_destroy
+pthread_cond_init
+pthread_cond_signal
+pthread_cond_timedwait
+pthread_cond_wait
+pthread_condattr_destroy
+pthread_condattr_getclock
+pthread_condattr_init
+pthread_condattr_setclock
+pthread_create
+pthread_detach
+pthread_equal
+pthread_exit
+pthread_getspecific
+pthread_join
+pthread_key_create
+pthread_key_delete
+pthread_mutex_consistent
+pthread_mutex_destroy
+pthread_mutex_init
+pthread_mutex_lock
+pthread_mutex_timedlock
+pthread_mutex_trylock
+pthread_mutex_unlock
+pthread_mutexattr_destroy
+pthread_mutexattr_getrobust
+pthread_mutexattr_gettype
+pthread_mutexattr_init
+pthread_mutexattr_setrobust
+pthread_mutexattr_settype
+pthread_once
+pthread_rwlock_destroy
+pthread_rwlock_init
+pthread_rwlock_rdlock
+pthread_rwlock_timedrdlock
+pthread_rwlock_timedwrlock
+pthread_rwlock_tryrdlock
+pthread_rwlock_trywrlock
+pthread_rwlock_unlock
+pthread_rwlock_wrlock
+pthread_rwlockattr_destroy
+pthread_rwlockattr_init
+pthread_self
+pthread_setcancelstate
+pthread_setcanceltype
+pthread_setspecific
+pthread_spin_destroy
+pthread_spin_init
+pthread_spin_lock
+pthread_spin_trylock
+pthread_spin_unlock
+pthread_testcancel
diff --git a/test/API/pwd-XSI.SUSv4.syms b/test/API/pwd-XSI.SUSv4.syms
new file mode 100644
index 000000000..8b0350aa6
--- /dev/null
+++ b/test/API/pwd-XSI.SUSv4.syms
@@ -0,0 +1,3 @@
+endpwent
+getpwent
+setpwent
diff --git a/test/API/pwd.SUSv4.syms b/test/API/pwd.SUSv4.syms
new file mode 100644
index 000000000..45328f664
--- /dev/null
+++ b/test/API/pwd.SUSv4.syms
@@ -0,0 +1,4 @@
+getpwnam
+getpwnam_r
+getpwuid
+getpwuid_r
diff --git a/test/API/regex.SUSv4.syms b/test/API/regex.SUSv4.syms
new file mode 100644
index 000000000..94bf9fa67
--- /dev/null
+++ b/test/API/regex.SUSv4.syms
@@ -0,0 +1,4 @@
+regcomp
+regerror
+regexec
+regfree
diff --git a/test/API/sched-PS.SUSv4.syms b/test/API/sched-PS.SUSv4.syms
new file mode 100644
index 000000000..51ce62afa
--- /dev/null
+++ b/test/API/sched-PS.SUSv4.syms
@@ -0,0 +1,4 @@
+sched_getparam
+sched_getscheduler
+sched_setparam
+sched_setscheduler
diff --git a/test/API/sched-PS|TPS.SUSv4.syms b/test/API/sched-PS|TPS.SUSv4.syms
new file mode 100644
index 000000000..67fdb603b
--- /dev/null
+++ b/test/API/sched-PS|TPS.SUSv4.syms
@@ -0,0 +1,3 @@
+sched_get_priority_max
+sched_get_priority_min
+sched_rr_get_interval
diff --git a/test/API/sched.SUSv4.syms b/test/API/sched.SUSv4.syms
new file mode 100644
index 000000000..0b6b81db0
--- /dev/null
+++ b/test/API/sched.SUSv4.syms
@@ -0,0 +1 @@
+sched_yield
diff --git a/test/API/search.SUSv4.syms b/test/API/search.SUSv4.syms
new file mode 100644
index 000000000..5bbf8451f
--- /dev/null
+++ b/test/API/search.SUSv4.syms
@@ -0,0 +1,11 @@
+hcreate
+hdestroy
+hsearch
+insque
+lfind
+lsearch
+remque
+tdelete
+tfind
+tsearch
+twalk
diff --git a/test/API/semaphore.SUSv4.syms b/test/API/semaphore.SUSv4.syms
new file mode 100644
index 000000000..1f291c540
--- /dev/null
+++ b/test/API/semaphore.SUSv4.syms
@@ -0,0 +1,10 @@
+sem_close
+sem_destroy
+sem_getvalue
+sem_init
+sem_open
+sem_post
+sem_timedwait
+sem_trywait
+sem_unlink
+sem_wait
diff --git a/test/API/separate.awk b/test/API/separate.awk
new file mode 100644
index 000000000..f7850c4f4
--- /dev/null
+++ b/test/API/separate.awk
@@ -0,0 +1,48 @@
+#!/usr/bin/awk -f
+#
+# Usage: awk -f separate.awk foo.SUSv4.in
+# Input: http://www.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html#tag_13_77_03_06
+# Output: foo-$CODE.SUSv4.syms, foo.SUSv4.syms
+#
+# Copyright (C) 2010 Bernhard Reutner-Fischer
+# Public domain
+
+function get_code(line)
+{
+ sub("\\]\\[.*", "", line)
+ sub("\\[", "", line)
+ sub(" ", "", line)
+ return line
+}
+BEGIN{
+ code="";# feature set; XSI, OB XSI, CX, etc
+
+}
+/\[Option Start\]/{
+ code = get_code($0)
+ next
+}
+/\[Option End\]/{ code = ""; next; }
+/.*/ {
+ if (!hdrname) {
+ split(FILENAME, fparts, ".")
+ hdrname = fparts[1]
+ stdname = fparts[2]
+ if (fparts[3] != "in") {
+ print "inputfilename may not be ok, exiting."
+ exit(1)
+ }
+ }
+ if (code) {
+ fname = hdrname "-" code "." stdname ".syms"
+ } else {
+ fname = hdrname "." stdname ".syms"
+ }
+ sub("^*", "", $0)
+ if (file[code]) {
+ print $0 >> fname
+ } else {
+ print $0 > fname
+ file[code] = 1
+ }
+}
diff --git a/test/API/setjmp-CX.SUSv4.syms b/test/API/setjmp-CX.SUSv4.syms
new file mode 100644
index 000000000..fb0fbbe93
--- /dev/null
+++ b/test/API/setjmp-CX.SUSv4.syms
@@ -0,0 +1 @@
+siglongjmp
diff --git a/test/API/setjmp-OBXSI.SUSv4.syms b/test/API/setjmp-OBXSI.SUSv4.syms
new file mode 100644
index 000000000..8f2d5b11e
--- /dev/null
+++ b/test/API/setjmp-OBXSI.SUSv4.syms
@@ -0,0 +1 @@
+_longjmp
diff --git a/test/API/setjmp.SUSv4.syms b/test/API/setjmp.SUSv4.syms
new file mode 100644
index 000000000..a51df77b6
--- /dev/null
+++ b/test/API/setjmp.SUSv4.syms
@@ -0,0 +1 @@
+longjmp
diff --git a/test/API/signal-CX.SUSv4.syms b/test/API/signal-CX.SUSv4.syms
new file mode 100644
index 000000000..3d77c5acc
--- /dev/null
+++ b/test/API/signal-CX.SUSv4.syms
@@ -0,0 +1,18 @@
+kill
+psiginfo
+psignal
+pthread_kill
+pthread_sigmask
+sigaction
+sigaddset
+sigdelset
+sigemptyset
+sigfillset
+sigismember
+sigpending
+sigprocmask
+sigqueue
+sigsuspend
+sigtimedwait
+sigwait
+sigwaitinfo
diff --git a/test/API/signal-OBXSI.SUSv4.syms b/test/API/signal-OBXSI.SUSv4.syms
new file mode 100644
index 000000000..2a6341d63
--- /dev/null
+++ b/test/API/signal-OBXSI.SUSv4.syms
@@ -0,0 +1,6 @@
+sighold
+sigignore
+siginterrupt
+sigpause
+sigrelse
+void
diff --git a/test/API/signal-XSI.SUSv4.syms b/test/API/signal-XSI.SUSv4.syms
new file mode 100644
index 000000000..f3df0c15e
--- /dev/null
+++ b/test/API/signal-XSI.SUSv4.syms
@@ -0,0 +1,2 @@
+killpg
+sigaltstack
diff --git a/test/API/signal.SUSv4.syms b/test/API/signal.SUSv4.syms
new file mode 100644
index 000000000..2119c27d1
--- /dev/null
+++ b/test/API/signal.SUSv4.syms
@@ -0,0 +1,2 @@
+raise
+void
diff --git a/test/API/spawn-PS.SUSv4.syms b/test/API/spawn-PS.SUSv4.syms
new file mode 100644
index 000000000..f92ebbb2e
--- /dev/null
+++ b/test/API/spawn-PS.SUSv4.syms
@@ -0,0 +1,4 @@
+posix_spawnattr_getschedparam
+posix_spawnattr_getschedpolicy
+posix_spawnattr_setschedparam
+posix_spawnattr_setschedpolicy
diff --git a/test/API/spawn.SUSv4.syms b/test/API/spawn.SUSv4.syms
new file mode 100644
index 000000000..7481640c1
--- /dev/null
+++ b/test/API/spawn.SUSv4.syms
@@ -0,0 +1,17 @@
+posix_spawn
+posix_spawn_file_actions_addclose
+posix_spawn_file_actions_adddup2
+posix_spawn_file_actions_addopen
+posix_spawn_file_actions_destroy
+posix_spawn_file_actions_init
+posix_spawnattr_destroy
+posix_spawnattr_getflags
+posix_spawnattr_getpgroup
+posix_spawnattr_getsigdefault
+posix_spawnattr_getsigmask
+posix_spawnattr_init
+posix_spawnattr_setflags
+posix_spawnattr_setpgroup
+posix_spawnattr_setsigdefault
+posix_spawnattr_setsigmask
+posix_spawnp
diff --git a/test/API/stdio-CX.SUSv4.syms b/test/API/stdio-CX.SUSv4.syms
new file mode 100644
index 000000000..98742c369
--- /dev/null
+++ b/test/API/stdio-CX.SUSv4.syms
@@ -0,0 +1,20 @@
+ctermid
+fdopen
+fileno
+flockfile
+fmemopen
+fseeko
+ftello
+ftrylockfile
+funlockfile
+getc_unlocked
+getchar_unlocked
+getdelim
+getline
+open_memstream
+pclose
+popen
+putc_unlocked
+putchar_unlocked
+renameat
+vdprintf
diff --git a/test/API/stdio-OB.SUSv4.syms b/test/API/stdio-OB.SUSv4.syms
new file mode 100644
index 000000000..f874a6c1c
--- /dev/null
+++ b/test/API/stdio-OB.SUSv4.syms
@@ -0,0 +1,2 @@
+gets
+tmpnam
diff --git a/test/API/stdio-OBXSI.SUSv4.syms b/test/API/stdio-OBXSI.SUSv4.syms
new file mode 100644
index 000000000..644049efe
--- /dev/null
+++ b/test/API/stdio-OBXSI.SUSv4.syms
@@ -0,0 +1 @@
+tempnam
diff --git a/test/API/stdio.SUSv4.syms b/test/API/stdio.SUSv4.syms
new file mode 100644
index 000000000..08404437e
--- /dev/null
+++ b/test/API/stdio.SUSv4.syms
@@ -0,0 +1,44 @@
+clearerr
+fclose
+feof
+ferror
+fflush
+fgetc
+fgetpos
+fgets
+fopen
+fprintf
+fputc
+fputs
+fread
+freopen
+fscanf
+fseek
+fsetpos
+ftell
+fwrite
+getc
+getchar
+perror
+printf
+putc
+putchar
+puts
+remove
+rename
+rewind
+scanf
+setbuf
+setvbuf
+snprintf
+sprintf
+sscanf
+tmpfile
+ungetc
+vfprintf
+vfscanf
+vprintf
+vscanf
+vsnprintf
+vsprintf
+vsscanf
diff --git a/test/API/stdlib-ADV.SUSv4.syms b/test/API/stdlib-ADV.SUSv4.syms
new file mode 100644
index 000000000..bfb66851d
--- /dev/null
+++ b/test/API/stdlib-ADV.SUSv4.syms
@@ -0,0 +1 @@
+posix_memalign
diff --git a/test/API/stdlib-CX.SUSv4.syms b/test/API/stdlib-CX.SUSv4.syms
new file mode 100644
index 000000000..10a7b1f67
--- /dev/null
+++ b/test/API/stdlib-CX.SUSv4.syms
@@ -0,0 +1,4 @@
+mkdtemp
+mkstemp
+setenv
+unsetenv
diff --git a/test/API/stdlib-OBCX.SUSv4.syms b/test/API/stdlib-OBCX.SUSv4.syms
new file mode 100644
index 000000000..1947cc782
--- /dev/null
+++ b/test/API/stdlib-OBCX.SUSv4.syms
@@ -0,0 +1 @@
+rand_r
diff --git a/test/API/stdlib-XSI.SUSv4.syms b/test/API/stdlib-XSI.SUSv4.syms
new file mode 100644
index 000000000..6cb0f1bb7
--- /dev/null
+++ b/test/API/stdlib-XSI.SUSv4.syms
@@ -0,0 +1,22 @@
+a64l
+drand48
+erand48
+grantpt
+initstate
+jrand48
+l64a
+lcong48
+lrand48
+mrand48
+nrand48
+posix_openpt
+ptsname
+putenv
+random
+realpath
+seed48
+setkey
+setstate
+srand48
+srandom
+unlockpt
diff --git a/test/API/stdlib.SUSv4.syms b/test/API/stdlib.SUSv4.syms
new file mode 100644
index 000000000..aefd96939
--- /dev/null
+++ b/test/API/stdlib.SUSv4.syms
@@ -0,0 +1,37 @@
+_Exit
+abort
+abs
+atexit
+atof
+atoi
+atol
+atoll
+bsearch
+calloc
+div
+exit
+free
+getenv
+getsubopt
+labs
+ldiv
+llabs
+lldiv
+malloc
+mblen
+mbstowcs
+mbtowc
+qsort
+rand
+realloc
+srand
+strtod
+strtof
+strtol
+strtold
+strtoll
+strtoul
+strtoull
+system
+wcstombs
+wctomb
diff --git a/test/API/string-CX.SUSv4.syms b/test/API/string-CX.SUSv4.syms
new file mode 100644
index 000000000..4f493d4e1
--- /dev/null
+++ b/test/API/string-CX.SUSv4.syms
@@ -0,0 +1,11 @@
+stpcpy
+stpncpy
+strcoll_l
+strdup
+strerror_l
+strerror_r
+strndup
+strnlen
+strsignal
+strtok_r
+strxfrm_l
diff --git a/test/API/string-XSI.SUSv4.syms b/test/API/string-XSI.SUSv4.syms
new file mode 100644
index 000000000..e0ee4e32f
--- /dev/null
+++ b/test/API/string-XSI.SUSv4.syms
@@ -0,0 +1 @@
+memccpy
diff --git a/test/API/string.SUSv4.syms b/test/API/string.SUSv4.syms
new file mode 100644
index 000000000..3c5e2b877
--- /dev/null
+++ b/test/API/string.SUSv4.syms
@@ -0,0 +1,22 @@
+memchr
+memcmp
+memcpy
+memmove
+memset
+strcat
+strchr
+strcmp
+strcoll
+strcpy
+strcspn
+strerror
+strlen
+strncat
+strncmp
+strncpy
+strpbrk
+strrchr
+strspn
+strstr
+strtok
+strxfrm
diff --git a/test/API/strings-XSI.SUSv4.syms b/test/API/strings-XSI.SUSv4.syms
new file mode 100644
index 000000000..c1173c1a9
--- /dev/null
+++ b/test/API/strings-XSI.SUSv4.syms
@@ -0,0 +1 @@
+ffs
diff --git a/test/API/strings.SUSv4.syms b/test/API/strings.SUSv4.syms
new file mode 100644
index 000000000..b4bc23372
--- /dev/null
+++ b/test/API/strings.SUSv4.syms
@@ -0,0 +1,4 @@
+strcasecmp
+strcasecmp_l
+strncasecmp
+strncasecmp_l
diff --git a/test/API/stropts.SUSv4.syms b/test/API/stropts.SUSv4.syms
new file mode 100644
index 000000000..796d3885b
--- /dev/null
+++ b/test/API/stropts.SUSv4.syms
@@ -0,0 +1,8 @@
+fattach
+fdetach
+getmsg
+getpmsg
+ioctl
+isastream
+putmsg
+putpmsg
diff --git a/test/API/sys_mman-ADV.SUSv4.syms b/test/API/sys_mman-ADV.SUSv4.syms
new file mode 100644
index 000000000..4598c3b70
--- /dev/null
+++ b/test/API/sys_mman-ADV.SUSv4.syms
@@ -0,0 +1 @@
+posix_madvise
diff --git a/test/API/sys_mman-ML.SUSv4.syms b/test/API/sys_mman-ML.SUSv4.syms
new file mode 100644
index 000000000..de0f37d48
--- /dev/null
+++ b/test/API/sys_mman-ML.SUSv4.syms
@@ -0,0 +1,2 @@
+mlockall
+munlockall
diff --git a/test/API/sys_mman-MLR.SUSv4.syms b/test/API/sys_mman-MLR.SUSv4.syms
new file mode 100644
index 000000000..aa8ea9ca1
--- /dev/null
+++ b/test/API/sys_mman-MLR.SUSv4.syms
@@ -0,0 +1,2 @@
+mlock
+munlock
diff --git a/test/API/sys_mman-SHM.SUSv4.syms b/test/API/sys_mman-SHM.SUSv4.syms
new file mode 100644
index 000000000..885119a8b
--- /dev/null
+++ b/test/API/sys_mman-SHM.SUSv4.syms
@@ -0,0 +1,2 @@
+shm_open
+shm_unlink
diff --git a/test/API/sys_mman-TYM.SUSv4.syms b/test/API/sys_mman-TYM.SUSv4.syms
new file mode 100644
index 000000000..68bc50e37
--- /dev/null
+++ b/test/API/sys_mman-TYM.SUSv4.syms
@@ -0,0 +1,3 @@
+posix_mem_offset
+posix_typed_mem_get_info
+posix_typed_mem_open
diff --git a/test/API/sys_mman-XSI|SIO.SUSv4.syms b/test/API/sys_mman-XSI|SIO.SUSv4.syms
new file mode 100644
index 000000000..3a2f8c300
--- /dev/null
+++ b/test/API/sys_mman-XSI|SIO.SUSv4.syms
@@ -0,0 +1 @@
+msync
diff --git a/test/API/sys_mman.SUSv4.syms b/test/API/sys_mman.SUSv4.syms
new file mode 100644
index 000000000..46a46e7d7
--- /dev/null
+++ b/test/API/sys_mman.SUSv4.syms
@@ -0,0 +1,3 @@
+mmap
+mprotect
+munmap
diff --git a/test/API/sys_msg.SUSv4.syms b/test/API/sys_msg.SUSv4.syms
new file mode 100644
index 000000000..95c2ec18c
--- /dev/null
+++ b/test/API/sys_msg.SUSv4.syms
@@ -0,0 +1,4 @@
+msgctl
+msgget
+msgrcv
+msgsnd
diff --git a/test/API/sys_resource.SUSv4.syms b/test/API/sys_resource.SUSv4.syms
new file mode 100644
index 000000000..72d3e1e24
--- /dev/null
+++ b/test/API/sys_resource.SUSv4.syms
@@ -0,0 +1,5 @@
+getpriority
+getrlimit
+getrusage
+setpriority
+setrlimit
diff --git a/test/API/sys_select.SUSv4.syms b/test/API/sys_select.SUSv4.syms
new file mode 100644
index 000000000..40cf6d869
--- /dev/null
+++ b/test/API/sys_select.SUSv4.syms
@@ -0,0 +1,6 @@
+FD_CLR
+FD_ISSET
+FD_SET
+FD_ZERO
+pselect
+select
diff --git a/test/API/sys_sem.SUSv4.syms b/test/API/sys_sem.SUSv4.syms
new file mode 100644
index 000000000..173f1d99b
--- /dev/null
+++ b/test/API/sys_sem.SUSv4.syms
@@ -0,0 +1,3 @@
+semctl
+semget
+semop
diff --git a/test/API/sys_shm.SUSv4.syms b/test/API/sys_shm.SUSv4.syms
new file mode 100644
index 000000000..f284402e8
--- /dev/null
+++ b/test/API/sys_shm.SUSv4.syms
@@ -0,0 +1,4 @@
+shmat
+shmctl
+shmdt
+shmget
diff --git a/test/API/sys_socket.SUSv4.syms b/test/API/sys_socket.SUSv4.syms
new file mode 100644
index 000000000..cc51c9e56
--- /dev/null
+++ b/test/API/sys_socket.SUSv4.syms
@@ -0,0 +1,18 @@
+accept
+bind
+connect
+getpeername
+getsockname
+getsockopt
+listen
+recv
+recvfrom
+recvmsg
+send
+sendmsg
+sendto
+setsockopt
+shutdown
+sockatmark
+socket
+socketpair
diff --git a/test/API/sys_stat-XSI.SUSv4.syms b/test/API/sys_stat-XSI.SUSv4.syms
new file mode 100644
index 000000000..4800d0098
--- /dev/null
+++ b/test/API/sys_stat-XSI.SUSv4.syms
@@ -0,0 +1,2 @@
+mknod
+mknodat
diff --git a/test/API/sys_stat.SUSv4.syms b/test/API/sys_stat.SUSv4.syms
new file mode 100644
index 000000000..3fe729fc5
--- /dev/null
+++ b/test/API/sys_stat.SUSv4.syms
@@ -0,0 +1,14 @@
+chmod
+fchmod
+fchmodat
+fstat
+fstatat
+futimens
+lstat
+mkdir
+mkdirat
+mkfifo
+mkfifoat
+stat
+umask
+utimensat
diff --git a/test/API/sys_statvfs.SUSv4.syms b/test/API/sys_statvfs.SUSv4.syms
new file mode 100644
index 000000000..c3fd5f4dc
--- /dev/null
+++ b/test/API/sys_statvfs.SUSv4.syms
@@ -0,0 +1,2 @@
+fstatvfs
+statvfs
diff --git a/test/API/sys_time-OB.SUSv4.syms b/test/API/sys_time-OB.SUSv4.syms
new file mode 100644
index 000000000..caf1f3f3d
--- /dev/null
+++ b/test/API/sys_time-OB.SUSv4.syms
@@ -0,0 +1,3 @@
+getitimer
+gettimeofday
+setitimer
diff --git a/test/API/sys_time.SUSv4.syms b/test/API/sys_time.SUSv4.syms
new file mode 100644
index 000000000..526a4049e
--- /dev/null
+++ b/test/API/sys_time.SUSv4.syms
@@ -0,0 +1,2 @@
+select
+utimes
diff --git a/test/API/sys_uio.SUSv4.syms b/test/API/sys_uio.SUSv4.syms
new file mode 100644
index 000000000..31caee5c3
--- /dev/null
+++ b/test/API/sys_uio.SUSv4.syms
@@ -0,0 +1,2 @@
+readv
+writev
diff --git a/test/API/sys_wait.SUSv4.syms b/test/API/sys_wait.SUSv4.syms
new file mode 100644
index 000000000..753c3806d
--- /dev/null
+++ b/test/API/sys_wait.SUSv4.syms
@@ -0,0 +1,3 @@
+wait
+waitid
+waitpid
diff --git a/test/API/syslog.SUSv4.syms b/test/API/syslog.SUSv4.syms
new file mode 100644
index 000000000..a44f514cf
--- /dev/null
+++ b/test/API/syslog.SUSv4.syms
@@ -0,0 +1,4 @@
+closelog
+openlog
+setlogmask
+syslog
diff --git a/test/API/termios.SUSv4.syms b/test/API/termios.SUSv4.syms
new file mode 100644
index 000000000..43ac8366d
--- /dev/null
+++ b/test/API/termios.SUSv4.syms
@@ -0,0 +1,11 @@
+cfgetispeed
+cfgetospeed
+cfsetispeed
+cfsetospeed
+tcdrain
+tcflow
+tcflush
+tcgetattr
+tcgetsid
+tcsendbreak
+tcsetattr
diff --git a/test/API/time-CPT.SUSv4.syms b/test/API/time-CPT.SUSv4.syms
new file mode 100644
index 000000000..278952e5b
--- /dev/null
+++ b/test/API/time-CPT.SUSv4.syms
@@ -0,0 +1 @@
+clock_getcpuclockid
diff --git a/test/API/time-CX.SUSv4.syms b/test/API/time-CX.SUSv4.syms
new file mode 100644
index 000000000..d2cbb7757
--- /dev/null
+++ b/test/API/time-CX.SUSv4.syms
@@ -0,0 +1,15 @@
+clock_getres
+clock_gettime
+clock_nanosleep
+clock_settime
+gmtime_r
+localtime_r
+nanosleep
+strftime_l
+timer_create
+timer_delete
+timer_getoverrun
+timer_gettime
+timer_settime
+tzset
+tzname
diff --git a/test/API/time-OB.SUSv4.syms b/test/API/time-OB.SUSv4.syms
new file mode 100644
index 000000000..ce1dad050
--- /dev/null
+++ b/test/API/time-OB.SUSv4.syms
@@ -0,0 +1,2 @@
+asctime
+ctime
diff --git a/test/API/time-OBCX.SUSv4.syms b/test/API/time-OBCX.SUSv4.syms
new file mode 100644
index 000000000..b46018c57
--- /dev/null
+++ b/test/API/time-OBCX.SUSv4.syms
@@ -0,0 +1,2 @@
+asctime_r
+ctime_r
diff --git a/test/API/time-XSI.SUSv4.syms b/test/API/time-XSI.SUSv4.syms
new file mode 100644
index 000000000..9bf1f6226
--- /dev/null
+++ b/test/API/time-XSI.SUSv4.syms
@@ -0,0 +1,4 @@
+getdate
+strptime
+daylight
+timezone
diff --git a/test/API/time.SUSv4.syms b/test/API/time.SUSv4.syms
new file mode 100644
index 000000000..788e19eed
--- /dev/null
+++ b/test/API/time.SUSv4.syms
@@ -0,0 +1,7 @@
+clock
+difftime
+gmtime
+localtime
+mktime
+strftime
+time
diff --git a/test/API/trace-TEF.SUSv4.syms b/test/API/trace-TEF.SUSv4.syms
new file mode 100644
index 000000000..bc9f47bf4
--- /dev/null
+++ b/test/API/trace-TEF.SUSv4.syms
@@ -0,0 +1,8 @@
+posix_trace_eventset_add
+posix_trace_eventset_del
+posix_trace_eventset_empty
+posix_trace_eventset_fill
+posix_trace_eventset_ismember
+posix_trace_get_filter
+posix_trace_set_filter
+posix_trace_trid_eventid_open
diff --git a/test/API/trace-TRI.SUSv4.syms b/test/API/trace-TRI.SUSv4.syms
new file mode 100644
index 000000000..ea5723dc5
--- /dev/null
+++ b/test/API/trace-TRI.SUSv4.syms
@@ -0,0 +1,2 @@
+posix_trace_attr_getinherited
+posix_trace_attr_setinherited
diff --git a/test/API/trace-TRL.SUSv4.syms b/test/API/trace-TRL.SUSv4.syms
new file mode 100644
index 000000000..763c7f429
--- /dev/null
+++ b/test/API/trace-TRL.SUSv4.syms
@@ -0,0 +1,9 @@
+posix_trace_attr_getlogfullpolicy
+posix_trace_attr_getlogsize
+posix_trace_attr_setlogfullpolicy
+posix_trace_attr_setlogsize
+posix_trace_close
+posix_trace_create_withlog
+posix_trace_flush
+posix_trace_open
+posix_trace_rewind
diff --git a/test/API/trace.SUSv4.syms b/test/API/trace.SUSv4.syms
new file mode 100644
index 000000000..c12b882e6
--- /dev/null
+++ b/test/API/trace.SUSv4.syms
@@ -0,0 +1,31 @@
+posix_trace_attr_destroy
+posix_trace_attr_getclockres
+posix_trace_attr_getcreatetime
+posix_trace_attr_getgenversion
+posix_trace_attr_getmaxdatasize
+posix_trace_attr_getmaxsystemeventsize
+posix_trace_attr_getmaxusereventsize
+posix_trace_attr_getname
+posix_trace_attr_getstreamfullpolicy
+posix_trace_attr_getstreamsize
+posix_trace_attr_init
+posix_trace_attr_setmaxdatasize
+posix_trace_attr_setname
+posix_trace_attr_setstreamfullpolicy
+posix_trace_attr_setstreamsize
+posix_trace_clear
+posix_trace_create
+posix_trace_event
+posix_trace_eventid_equal
+posix_trace_eventid_get_name
+posix_trace_eventid_open
+posix_trace_eventtypelist_getnext_id
+posix_trace_eventtypelist_rewind
+posix_trace_get_attr
+posix_trace_get_status
+posix_trace_getnext_event
+posix_trace_shutdown
+posix_trace_start
+posix_trace_stop
+posix_trace_timedgetnext_event
+posix_trace_trygetnext_event
diff --git a/test/API/tst-API.sh b/test/API/tst-API.sh
new file mode 100644
index 000000000..38a339945
--- /dev/null
+++ b/test/API/tst-API.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+std="$1"
+shift
+cod="$*"
+
+result=0
+
+for l in $top_builddir/lib/lib*-*.so; do \
+ readelf -D -W -s $l | \
+ egrep -v "(UND|LOCAL|^Symbol table for image:|^[[:space:]]*Num[[:space:]])" | \
+ $AWK '{print $NF}'; \
+ done | sort | uniq > $uclibc_out
+for code in $cod; do cat $code.$std.syms; done | sort | uniq > $glibc_out
+result=0
+exit $result
diff --git a/test/API/unistd-CX.SUSv4.syms b/test/API/unistd-CX.SUSv4.syms
new file mode 100644
index 000000000..4e183e444
--- /dev/null
+++ b/test/API/unistd-CX.SUSv4.syms
@@ -0,0 +1 @@
+ctermid
diff --git a/test/API/unistd-FSC.SUSv4.syms b/test/API/unistd-FSC.SUSv4.syms
new file mode 100644
index 000000000..e5c2ab2b2
--- /dev/null
+++ b/test/API/unistd-FSC.SUSv4.syms
@@ -0,0 +1 @@
+fsync
diff --git a/test/API/unistd-OBXSI.SUSv4.syms b/test/API/unistd-OBXSI.SUSv4.syms
new file mode 100644
index 000000000..4e6787f6a
--- /dev/null
+++ b/test/API/unistd-OBXSI.SUSv4.syms
@@ -0,0 +1 @@
+setpgrp
diff --git a/test/API/unistd-SIO.SUSv4.syms b/test/API/unistd-SIO.SUSv4.syms
new file mode 100644
index 000000000..2ed33b396
--- /dev/null
+++ b/test/API/unistd-SIO.SUSv4.syms
@@ -0,0 +1 @@
+fdatasync
diff --git a/test/API/unistd-XSI.SUSv4.syms b/test/API/unistd-XSI.SUSv4.syms
new file mode 100644
index 000000000..db5417673
--- /dev/null
+++ b/test/API/unistd-XSI.SUSv4.syms
@@ -0,0 +1,9 @@
+crypt
+encrypt
+gethostid
+lockf
+nice
+setregid
+setreuid
+swab
+sync
diff --git a/test/API/unistd.SUSv4.syms b/test/API/unistd.SUSv4.syms
new file mode 100644
index 000000000..fec630db8
--- /dev/null
+++ b/test/API/unistd.SUSv4.syms
@@ -0,0 +1,74 @@
+access
+alarm
+chdir
+chown
+close
+confstr
+dup
+dup2
+_exit
+execl
+execle
+execlp
+execv
+execve
+execvp
+faccessat
+fchdir
+fchown
+fchownat
+fexecve
+fork
+fpathconf
+ftruncate
+getcwd
+getegid
+geteuid
+getgid
+getgroups
+gethostname
+getlogin
+getlogin_r
+getopt
+getpgid
+getpgrp
+getpid
+getppid
+getsid
+getuid
+isatty
+lchown
+link
+linkat
+lseek
+pathconf
+pause
+pipe
+pread
+pwrite
+read
+readlink
+readlinkat
+rmdir
+setegid
+seteuid
+setgid
+setpgid
+setsid
+setuid
+sleep
+symlink
+symlinkat
+sysconf
+tcgetpgrp
+tcsetpgrp
+truncate
+ttyname
+ttyname_r
+unlink
+unlinkat
+write
+optarg
+opterr
+optind
+optopt
diff --git a/test/API/utmpx.SUSv4.syms b/test/API/utmpx.SUSv4.syms
new file mode 100644
index 000000000..1fd294aac
--- /dev/null
+++ b/test/API/utmpx.SUSv4.syms
@@ -0,0 +1,6 @@
+endutxent
+getutxent
+getutxid
+getutxline
+pututxline
+setutxent
diff --git a/test/API/wchar-CX.SUSv4.syms b/test/API/wchar-CX.SUSv4.syms
new file mode 100644
index 000000000..080493849
--- /dev/null
+++ b/test/API/wchar-CX.SUSv4.syms
@@ -0,0 +1,13 @@
+mbsnrtowcs
+open_wmemstream
+wcpcpy
+wcpncpy
+wcscasecmp
+wcscasecmp_l
+wcscoll_l
+wcsdup
+wcsncasecmp
+wcsncasecmp_l
+wcsnlen
+wcsnrtombs
+wcsxfrm_l
diff --git a/test/API/wchar-OBXSI.SUSv4.syms b/test/API/wchar-OBXSI.SUSv4.syms
new file mode 100644
index 000000000..bc76ee66a
--- /dev/null
+++ b/test/API/wchar-OBXSI.SUSv4.syms
@@ -0,0 +1,15 @@
+iswalnum
+iswalpha
+iswcntrl
+iswctype
+iswdigit
+iswgraph
+iswlower
+iswprint
+iswpunct
+iswspace
+iswupper
+iswxdigit
+towlower
+towupper
+wctype
diff --git a/test/API/wchar-XSI.SUSv4.syms b/test/API/wchar-XSI.SUSv4.syms
new file mode 100644
index 000000000..834731c9e
--- /dev/null
+++ b/test/API/wchar-XSI.SUSv4.syms
@@ -0,0 +1,2 @@
+wcswidth
+wcwidth
diff --git a/test/API/wchar.SUSv4.syms b/test/API/wchar.SUSv4.syms
new file mode 100644
index 000000000..d58f600b6
--- /dev/null
+++ b/test/API/wchar.SUSv4.syms
@@ -0,0 +1,59 @@
+btowc
+fgetwc
+fgetws
+fputwc
+fputws
+fwide
+fwprintf
+fwscanf
+getwc
+getwchar
+mbrlen
+mbrtowc
+mbsinit
+mbsrtowcs
+putwc
+putwchar
+swprintf
+swscanf
+ungetwc
+vfwprintf
+vfwscanf
+vswprintf
+vswscanf
+vwprintf
+vwscanf
+wcrtomb
+wcscat
+wcschr
+wcscmp
+wcscoll
+wcscpy
+wcscspn
+wcsftime
+wcslen
+wcsncat
+wcsncmp
+wcsncpy
+wcspbrk
+wcsrchr
+wcsrtombs
+wcsspn
+wcsstr
+wcstod
+wcstof
+wcstok
+wcstol
+wcstold
+wcstoll
+wcstoul
+wcstoull
+wcsxfrm
+wctob
+wmemchr
+wmemcmp
+wmemcpy
+wmemmove
+wmemset
+wprintf
+wscanf
diff --git a/test/API/wctype-CX.SUSv4.syms b/test/API/wctype-CX.SUSv4.syms
new file mode 100644
index 000000000..81c0331b9
--- /dev/null
+++ b/test/API/wctype-CX.SUSv4.syms
@@ -0,0 +1,18 @@
+iswalnum_l
+iswalpha_l
+iswblank_l
+iswcntrl_l
+iswctype_l
+iswdigit_l
+iswgraph_l
+iswlower_l
+iswprint_l
+iswpunct_l
+iswspace_l
+iswupper_l
+iswxdigit_l
+towctrans_l
+towlower_l
+towupper_l
+wctrans_l
+wctype_l
diff --git a/test/API/wctype.SUSv4.syms b/test/API/wctype.SUSv4.syms
new file mode 100644
index 000000000..fddc3955a
--- /dev/null
+++ b/test/API/wctype.SUSv4.syms
@@ -0,0 +1,18 @@
+iswalnum
+iswalpha
+iswblank
+iswcntrl
+iswctype
+iswdigit
+iswgraph
+iswlower
+iswprint
+iswpunct
+iswspace
+iswupper
+iswxdigit
+towctrans
+towlower
+towupper
+wctrans
+wctype
diff --git a/test/API/wordexp.SUSv4.syms b/test/API/wordexp.SUSv4.syms
new file mode 100644
index 000000000..3681b3c4b
--- /dev/null
+++ b/test/API/wordexp.SUSv4.syms
@@ -0,0 +1,2 @@
+wordexp
+wordfree