aboutsummaryrefslogtreecommitdiff
path: root/conform
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-08-24 17:55:34 +0000
committerUlrich Drepper <drepper@redhat.com>1999-08-24 17:55:34 +0000
commitda1067a9154c3125a4274e1d039dd5b2d3aa953c (patch)
tree30f79028faf33d13954ad9726ca77720be218b63 /conform
parent1b13e783c5fb6da75e5254edcc4726b03a33c373 (diff)
downloadglibc-da1067a9154c3125a4274e1d039dd5b2d3aa953c.tar
glibc-da1067a9154c3125a4274e1d039dd5b2d3aa953c.tar.gz
glibc-da1067a9154c3125a4274e1d039dd5b2d3aa953c.tar.bz2
glibc-da1067a9154c3125a4274e1d039dd5b2d3aa953c.zip
Update.
1999-08-24 Ulrich Drepper <drepper@cygnus.com> * conform/Makefile: New file. * conform/conformtest.pl: New file. * conform/data/aio.h-data: New file. * conform/data/assert.h-data: New file. * conform/data/cpio.h-data: New file. * conform/data/ctype.h-data: New file. * conform/data/dirent.h-data: New file. * conform/data/dlfcn.h-data: New file. * conform/data/errno.h-data: New file. * conform/data/fcntl.h-data: New file. * conform/data/float.h-data: New file. * conform/data/fmtmsg.h-data: New file. * conform/data/fnmatch.h-data: New file. * conform/data/ftw.h-data: New file. * conform/data/glob.h-data: New file. * conform/data/grp.h-data: New file. * conform/data/iconv.h-data: New file. * conform/data/inttypes.h-data: New file. * conform/data/iso646.h-data: New file. * conform/data/langinfo.h-data: New file. * conform/data/libgen.h-data: New file. * conform/data/locale.h-data: New file. * conform/data/math.h-data: New file.
Diffstat (limited to 'conform')
-rw-r--r--conform/Makefile24
-rw-r--r--conform/conformtest.pl407
-rw-r--r--conform/data/aio.h-data43
-rw-r--r--conform/data/assert.h-data1
-rw-r--r--conform/data/cpio.h-data23
-rw-r--r--conform/data/ctype.h-data25
-rw-r--r--conform/data/dirent.h-data20
-rw-r--r--conform/data/dlfcn.h-data11
-rw-r--r--conform/data/errno.h-data87
-rw-r--r--conform/data/fcntl.h-data55
-rw-r--r--conform/data/float.h-data39
-rw-r--r--conform/data/fmtmsg.h-data60
-rw-r--r--conform/data/fnmatch.h-data9
-rw-r--r--conform/data/ftw.h-data21
-rw-r--r--conform/data/glob.h-data25
-rw-r--r--conform/data/grp.h-data22
-rw-r--r--conform/data/iconv.h-data7
-rw-r--r--conform/data/inttypes.h-data13
-rw-r--r--conform/data/iso646.h-data11
-rw-r--r--conform/data/langinfo.h-data61
-rw-r--r--conform/data/libgen.h-data4
-rw-r--r--conform/data/locale.h-data34
-rw-r--r--conform/data/math.h-data158
23 files changed, 1160 insertions, 0 deletions
diff --git a/conform/Makefile b/conform/Makefile
new file mode 100644
index 0000000000..bfa860b44f
--- /dev/null
+++ b/conform/Makefile
@@ -0,0 +1,24 @@
+# Copyright (C) 1999 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+
+# You should have received a copy of the GNU Library General Public
+# License along with the GNU C Library; see the file COPYING.LIB. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+#
+# Sub-makefile for conform portion of the library.
+#
+subdir := conform
+
+distribute = conformtest.pl $(wildcard data/*.h-data)
diff --git a/conform/conformtest.pl b/conform/conformtest.pl
new file mode 100644
index 0000000000..fc6eb761cf
--- /dev/null
+++ b/conform/conformtest.pl
@@ -0,0 +1,407 @@
+#! /usr/bin/perl
+
+$CC = "gcc";
+$CFLAGS = "-I. -D_XOPEN_SOURCE=500";
+
+# List of the headers we are testing.
+@headers = ("fmtmsg.h", "float.h", "fcntl.h", "errno.h", "dlfcn.h", "dirent.h",
+ "ctype.h", "cpio.h", "assert.h", "aio.h");
+
+# These are the ISO C9x keywords.
+@keywords = ('auto', 'break', 'case', 'char', 'const', 'continue', 'default',
+ 'do', 'double', 'else', 'enum', 'extern', 'float', 'for', 'goto',
+ 'if', 'inline', 'int', 'long', 'register', 'restrict', 'return',
+ 'short', 'signed', 'sizeof', 'static', 'struct', 'switch',
+ 'typedef', 'union', 'unsigned', 'void', 'volatile', 'while');
+
+# Make an hash table from this information.
+while ($#keywords) {
+ $iskeyword{pop (@keywords)} = 1;
+}
+
+$tmpdir = "/tmp";
+
+$verbose = 1;
+
+$total = 0;
+$skipped = 0;
+$errors = 0;
+
+#$dialect = "ISO";
+#$dialect = "POSIX";
+#$dialect = "XPG3";
+#$dialect = "XPG4";
+$dialect = "UNIX98";
+
+
+sub poorfnmatch {
+ my($pattern, $string) = @_;
+ my($strlen) = length ($string);
+ my($res);
+
+ if (substr ($pattern, 0, 1) eq '*') {
+ my($patlen) = length ($pattern) - 1;
+ $res = ($strlen >= $patlen
+ && substr ($pattern, -$patlen, $patlen) eq substr ($string, -$patlen, $patlen));
+ } elsif (substr ($pattern, -1, 1) eq '*') {
+ my($patlen) = length ($pattern) - 1;
+ $res = ($strlen >= $patlen
+ && substr ($pattern, 0, $patlen) eq substr ($string, 0, $patlen));
+ } else {
+ $res = $pattern eq $string;
+ }
+ return $res;
+}
+
+
+sub compiletest
+{
+ my($fnamebase, $msg, $errmsg, $skip) = @_;
+ my($result) = $skip;
+ my($printlog) = 0;
+
+ ++$total;
+ printf (" $msg...");
+
+ if ($skip != 0) {
+ ++$skipped;
+ printf (" SKIP\n");
+ } else {
+ $ret = system "$CC $CFLAGS -c $fnamebase.c -o $fnamebase.o > $fnamebase.out 2>&1";
+ if ($ret != 0) {
+ printf (" FAIL\n");
+ if ($verbose != 0) {
+ printf (" $errmsg Compiler message:\n");
+ $printlog = 1;
+ }
+ ++$errors;
+ $result = 1;
+ } else {
+ printf (" OK\n");
+ if ($verbose > 1 && -s "$fnamebase.out") {
+ # We print all warnings issued.
+ $printlog = 1;
+ }
+ }
+ if ($printlog != 0) {
+ printf (" " . "-" x 71 . "\n");
+ open (MESSAGE, "< $fnamebase.out");
+ while (<MESSAGE>) {
+ printf (" %s", $_);
+ }
+ close (MESSAGE);
+ printf (" " . "-" x 71 . "\n");
+ }
+ }
+ unlink "$fnamebase.c";
+ unlink "$fnamebase.o";
+ unlink "$fnamebase.out";
+
+ $result;
+}
+
+
+sub runtest
+{
+ my($fnamebase, $msg, $errmsg, $skip) = @_;
+ my($result) = $skip;
+ my($printlog) = 0;
+
+ ++$total;
+ printf (" $msg...");
+
+ if ($skip != 0) {
+ ++$skipped;
+ printf (" SKIP\n");
+ } else {
+ $ret = system "$CC $CFLAGS -o $fnamebase $fnamebase.c > $fnamebase.out 2>&1";
+ if ($ret != 0) {
+ printf (" FAIL\n");
+ if ($verbose != 0) {
+ printf (" $errmsg Compiler message:\n");
+ $printlog = 1;
+ }
+ ++$errors;
+ $result = 1;
+ } else {
+ # Now run the program. If the exit code is not zero something is wrong.
+ $result = system "$fnamebase > $fnamebase.out2 2>&1";
+ if ($result == 0) {
+ printf (" OK\n");
+ if ($verbose > 1 && -s "$fnamebase.out") {
+ # We print all warnings issued.
+ $printlog = 1;
+ system "cat $fnamebase.out2 >> $fnamebase.out";
+ }
+ } else {
+ printf (" FAIL\n");
+ $printlog = 1;
+ unlink "$fnamebase.out";
+ rename "$fnamebase.out2", "$fnamebase.out";
+ }
+ }
+ if ($printlog != 0) {
+ printf (" " . "-" x 71 . "\n");
+ open (MESSAGE, "< $fnamebase.out");
+ while (<MESSAGE>) {
+ printf (" %s", $_);
+ }
+ close (MESSAGE);
+ printf (" " . "-" x 71 . "\n");
+ }
+ }
+ unlink "$fnamebase";
+ unlink "$fnamebase.c";
+ unlink "$fnamebase.o";
+ unlink "$fnamebase.out";
+ unlink "$fnamebase.out2";
+
+ $result;
+}
+
+
+sub newtoken {
+ my($token, $nerrors, @allow) = @_;
+ my($idx);
+
+ for ($idx = 0; $idx <= $#allow; ++$idx) {
+ if ($token =~ /^[0-9_]/ || $iskeyword{$token} || poorfnmatch ($allow[$idx], $token)) {
+ return $nerrors;
+ }
+ }
+
+ ++$nerrors;
+ if ($nerrors == 1) {
+ printf ("FAIL\n " . "-" x 72 . "\n");
+ }
+ printf (" Namespace violation: \"%s\"\n", $token);
+ return $nerrors;
+}
+
+
+sub checknamespace {
+ my($h, $fnamebase, @allow) = @_;
+ my($nerrors) = 0;
+
+ ++$total;
+
+ # Generate a program to get the contents of this header.
+ open (TESTFILE, ">$fnamebase.c");
+ print TESTFILE "#include <$h>\n";
+ close (TESTFILE);
+
+ open (CONTENT, "$CC $CFLAGS -E $fnamebase.c -Wp,-dN | sed -e '/^# [1-9]/d' -e '/^[[:space:]]*\$/d' |");
+ while (<CONTENT>) {
+ chop;
+ if (/^#define (.*)/) {
+ $nerrors = newtoken ($1, $nerrors, @allow);
+ } else {
+ # We have to tokenize the line.
+ my($str) = $_;
+ my($index) = 0;
+ my($len) = length ($str);
+
+ foreach $token (split(/[^a-zA-Z0-9_]/, $str)) {
+ if ($token ne "") {
+ $nerrors = newtoken ($token, $nerrors, @allow);
+ }
+ }
+ }
+ }
+ close (CONTENT);
+ unlink "$fnamebase.c";
+ if ($nerrors != 0) {
+ printf (" " . "-" x 72 . "\n");
+ ++$errors;
+ } else {
+ printf ("OK\n");
+ }
+}
+
+
+while ($#headers >= 0) {
+ my($h) = pop (@headers);
+ my($fnamebase) = "$tmpdir/$h-test";
+ my($missing);
+ my(@allow) = ();
+
+ printf ("Testing <$h>\n");
+ printf ("----------" . "-" x length ($h) . "\n");
+
+ # Generate a program to test for the availability of this header.
+ open (TESTFILE, ">$fnamebase.c");
+ print TESTFILE "#include <$h>\n";
+ close (TESTFILE);
+
+ $missing = compiletest ($fnamebase, "Checking whether <$h> is available",
+ "Header <$h> not available", 0);
+
+ printf ("\n");
+
+ open (CONTROL, "$CC -E -D$dialect - < data/$h-data |");
+ control: while (<CONTROL>) {
+ chop;
+ next control if (/^#/);
+ next control if (/^[ ]*$/);
+
+ if (/^element *({([^}]*)}|([^ ]*)) *({([^}]*)}|([^ ]*)) *([A-Za-z0-9_]*) *(.*)/) {
+ my($struct) = "$2$3";
+ my($type) = "$5$6";
+ my($member) = "$7";
+ my($rest) = "$8";
+ my($res) = $missing;
+
+ # Remember that this name is allowed.
+ push @allow, $member;
+
+ # Generate a program to test for the availability of this member.
+ open (TESTFILE, ">$fnamebase.c");
+ print TESTFILE "#include <$h>\n";
+ print TESTFILE "$struct a;\n";
+ print TESTFILE "$struct b;\n";
+ print TESTFILE "extern void xyzzy (__typeof__ (&b.$member), __typeof__ (&a.$member), unsigned);\n";
+ print TESTFILE "void foobarbaz (void) {\n";
+ print TESTFILE " xyzzy (&a.$member, &b.$member, sizeof (a.$member));\n";
+ print TESTFILE "}\n";
+ close (TESTFILE);
+
+ $res = compiletest ($fnamebase, "Testing for member $member",
+ "Member \"$member\" not available.", $res);
+
+
+ # Test the types of the members.
+ open (TESTFILE, ">$fnamebase.c");
+ print TESTFILE "#include <$h>\n";
+ print TESTFILE "$struct a;\n";
+ print TESTFILE "extern $type b$rest;\n";
+ print TESTFILE "extern __typeof__ (a.$member) b;\n";
+ close (TESTFILE);
+
+ compiletest ($fnamebase, "Testing for type of member $member",
+ "Member \"$member\" does not have the correct type.", $res);
+ } elsif (/^constant *([a-zA-Z0-9_]*) *([A-Za-z0-9_]*)?/) {
+ my($const) = $1;
+ my($value) = $2;
+ my($res) = $missing;
+
+ # Remember that this name is allowed.
+ push @allow, $const;
+
+ # Generate a program to test for the availability of this constant.
+ open (TESTFILE, ">$fnamebase.c");
+ print TESTFILE "#include <$h>\n";
+ print TESTFILE "__typeof__ ($const) a = $const;\n";
+ close (TESTFILE);
+
+ $res = compiletest ($fnamebase, "Testing for constant $const",
+ "Constant \"$const\" not available.", $res);
+
+ if ($value ne "") {
+ # Generate a program to test for the value of this constant.
+ open (TESTFILE, ">$fnamebase.c");
+ print TESTFILE "#include <$h>\n";
+ print TESTFILE "int main (void) { return $const != $value; }\n";
+ close (TESTFILE);
+
+ $res = runtest ($fnamebase, "Testing for value of constant $const",
+ "Constant \"$const\" has not the right value.", $res);
+ }
+ } elsif (/^type *({([^}]*)|([a-zA-Z0-9_]*))/) {
+ my($type) = "$2$3";
+
+ # Remember that this name is allowed.
+ if ($type =~ /^struct *(.*)/) {
+ push @allow, $1;
+ } elsif ($type =~ /^union *(.*)/) {
+ push @allow, $1;
+ } else {
+ push @allow, $type;
+ }
+
+ # Remember that this name is allowed.
+ push @allow, $type;
+
+ # Generate a program to test for the availability of this constant.
+ open (TESTFILE, ">$fnamebase.c");
+ print TESTFILE "#include <$h>\n";
+ print TESTFILE "$type *a;\n";
+ close (TESTFILE);
+
+ compiletest ($fnamebase, "Testing for type $type",
+ "Type \"$type\" not available.", $missing);
+ } elsif (/^function *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(][^)]*[)])/) {
+ my($rettype) = "$2$3";
+ my($fname) = "$4";
+ my($args) = "$5";
+ my($res) = $missing;
+
+ # Remember that this name is allowed.
+ push @allow, $fname;
+
+ # Generate a program to test for availability of this function.
+ open (TESTFILE, ">$fnamebase.c");
+ print TESTFILE "#include <$h>\n";
+ print TESTFILE "#undef $fname\n";
+ print TESTFILE "$rettype (*foobarbaz) $args = $fname;\n";
+ close (TESTFILE);
+
+ $res = compiletest ($fnamebase, "Test availability of function $fname",
+ "Function \"$fname\" is not available.", $res);
+
+ # Generate a program to test for the type of this function.
+ open (TESTFILE, ">$fnamebase.c");
+ print TESTFILE "#include <$h>\n";
+ print TESTFILE "#undef $fname\n";
+ print TESTFILE "extern $rettype (*foobarbaz) $args;\n";
+ print TESTFILE "extern __typeof__ (&$fname) foobarbaz;\n";
+ close (TESTFILE);
+
+ compiletest ($fnamebase, "Test for type of function $fname",
+ "Function \"$fname\" has incorrect type.", $res);
+ } elsif (/^macro *([^ ]*)/) {
+ my($macro) = "$1";
+
+ # Remember that this name is allowed.
+ push @allow, $macro;
+
+ # Generate a program to test for availability of this macro.
+ open (TESTFILE, ">$fnamebase.c");
+ print TESTFILE "#include <$h>\n";
+ print TESTFILE "#ifndef $macro\n";
+ print TESTFILE "# error \"Macro $macro not defined\"\n";
+ print TESTFILE "#endif\n";
+ close (TESTFILE);
+
+ compiletest ($fnamebase, "Test availability of macro $macro",
+ "Macro \"$macro\" is not available.", $missing);
+ } elsif (/^allow *(.*)/) {
+ my($pattern) = $1;
+ push @allow, $pattern;
+ next control;
+ } else {
+ # printf ("line is `%s'\n", $_);
+ next control;
+ }
+
+ printf ("\n");
+ }
+ close (CONTROL);
+
+ # Now check the namespace.
+ printf (" Checking the namespace of \"%s\"... ", $h);
+ if ($missing) {
+ ++$skipped;
+ printf ("SKIP\n");
+ } else {
+ checknamespace ($h, $fnamebase, @allow);
+ }
+
+ printf ("\n\n");
+}
+
+printf "-" x 76 . "\n";
+printf (" Total number of tests : %4d\n", $total);
+printf (" Number of failed tests : %4d (%3d%%)\n", $errors, ($errors * 100) / $total);
+printf (" Number of skipped tests: %4d (%3d%%)\n", $skipped, ($skipped * 100) / $total);
+
+exit $errors != 0;
diff --git a/conform/data/aio.h-data b/conform/data/aio.h-data
new file mode 100644
index 0000000000..75698cb39b
--- /dev/null
+++ b/conform/data/aio.h-data
@@ -0,0 +1,43 @@
+#ifndef ISO
+type {struct aiocb}
+
+// Test elements of the AIO control struct.
+element {struct aiocb} int aio_fildes
+element {struct aiocb} off_t aio_offset
+element {struct aiocb} {volatile void*} aio_buf
+element {struct aiocb} size_t aio_nbytes
+element {struct aiocb} int aio_reqprio
+element {struct aiocb} {struct sigevent} aio_sigevent
+element {struct aiocb} int aio_lio_opcode
+
+constant AIO_CANCELED
+constant AIO_NOTCANCELED
+constant AIO_ALLDONE
+constant LIO_WAIT
+constant LIO_NOWAIT
+constant LIO_READ
+constant LIO_WRITE
+constant LIO_NOP
+
+function int aio_cancel (int, struct aiocb*)
+function int aio_error (const struct aiocb*)
+function int aio_fsync (int, struct aiocb*)
+function int aio_read (struct aiocb*)
+function ssize_t aio_return (struct aiocb*)
+function int aio_suspend (const struct aiocb* const[], int, const struct timespec*)
+function int aio_write (struct aiocb*)
+function int lio_listio (int, struct aiocb *const[], int, struct sigevent*)
+
+# if !defined POSIX
+allow-header fcntl.h
+allow-header signal.h
+allow-header sys/types.h
+allow-header time.h
+# endif
+
+allow aio_*
+allow lio_*
+allow AIO_*
+allow LIO_*
+allow *_t
+#endif
diff --git a/conform/data/assert.h-data b/conform/data/assert.h-data
new file mode 100644
index 0000000000..60a559cb8b
--- /dev/null
+++ b/conform/data/assert.h-data
@@ -0,0 +1 @@
+macro assert
diff --git a/conform/data/cpio.h-data b/conform/data/cpio.h-data
new file mode 100644
index 0000000000..bccbc3057c
--- /dev/null
+++ b/conform/data/cpio.h-data
@@ -0,0 +1,23 @@
+#ifndef ISO
+constant C_IRUSR 0000400
+constant C_IWUSR 0000200
+constant C_IXUSR 0000100
+constant C_IRGRP 0000040
+constant C_IWGRP 0000020
+constant C_IXGRP 0000010
+constant C_IROTH 0000004
+constant C_IWOTH 0000002
+constant C_IXOTH 0000001
+constant C_ISUID 0004000
+constant C_ISGID 0002000
+constant C_ISVTX 0001000
+constant C_ISDIR 0040000
+constant C_ISFIFO 0010000
+constant C_ISREG 0100000
+constant C_ISBLK 0060000
+constant C_ISCHR 0020000
+constant C_ISCTG 0110000
+constant C_ISLNK 0120000
+constant C_ISSOCK 0140000
+constant MAGIC
+#endif
diff --git a/conform/data/ctype.h-data b/conform/data/ctype.h-data
new file mode 100644
index 0000000000..ac0dbb6367
--- /dev/null
+++ b/conform/data/ctype.h-data
@@ -0,0 +1,25 @@
+function int isalnum (int)
+function int isalpha (int)
+function int iscntrl (int)
+function int isdigit (int)
+function int isgraph (int)
+function int islower (int)
+function int isprint (int)
+function int ispunct (int)
+function int isspace (int)
+function int isupper (int)
+function int isxdigit (int)
+function int tolower (int)
+function int toupper (int)
+
+#ifndef ISO
+function int isascii (int)
+function int toascii (int)
+function int _toupper (int)
+function int _tolower (int)
+
+# The following is not entirely correct. It should be is[a-z]* but the
+# replacement fnmatch implementation doesn't grok it.
+allow is*
+allow to*
+#endif
diff --git a/conform/data/dirent.h-data b/conform/data/dirent.h-data
new file mode 100644
index 0000000000..4dbe552c11
--- /dev/null
+++ b/conform/data/dirent.h-data
@@ -0,0 +1,20 @@
+#ifndef ISO
+type DIR
+
+type {struct dirent}
+
+element {struct dirent} ino_t d_ino
+element {struct dirent} char d_name []
+
+type ino_t
+
+function int closedir (DIR*)
+function DIR* opendir (const char*)
+function {struct dirent*} readdir (DIR*)
+function int readdir_r (DIR*, struct dirent*, struct dirent**)
+function void rewinddir (DIR*)
+function void seekdir (DIR*, long int)
+function {long int} telldir (DIR*)
+
+allow d_*
+#endif
diff --git a/conform/data/dlfcn.h-data b/conform/data/dlfcn.h-data
new file mode 100644
index 0000000000..17600da641
--- /dev/null
+++ b/conform/data/dlfcn.h-data
@@ -0,0 +1,11 @@
+#if !defined ISO && !defined POSIX
+macro RTLD_LAZY
+macro RTLD_NOW
+macro RTLD_GLOBAL
+macro RTLD_LOCAL
+
+function {void*} dlopen (const char*, int)
+function {void*} dlsym (void *, const char*)
+function int dlclose (void*)
+function {char*} dlerror (void)
+#endif
diff --git a/conform/data/errno.h-data b/conform/data/errno.h-data
new file mode 100644
index 0000000000..e21e147ba3
--- /dev/null
+++ b/conform/data/errno.h-data
@@ -0,0 +1,87 @@
+constant EDOM
+constant EILSEQ
+constant ERANGE
+
+#ifndef ISO
+constant E2BIG
+constant EACCES
+constant EADDRINUSE
+constant EADDRNOTAVAIL
+constant EAFNOSUPPORT
+constant EAGAIN
+constant EALREADY
+constant EBADF
+constant EBADMSG
+constant EBUSY
+constant ECANCELED
+constant ECHILD
+constant ECONNABORTED
+constant ECONNREFUSED
+constant ECONNRESET
+constant EDEADLK
+constant EDESTADDRREQ
+constant EDQUOT
+constant EEXIST
+constant EFAULT
+constant EFBIG
+constant EHOSTUNREACH
+constant EIDRM
+constant EINPROGRESS
+constant EINTR
+constant EINVAL
+constant EIO
+constant EISCONN
+constant EISDIR
+constant ELOOP
+constant EMFILE
+constant EMLINK
+constant EMSGSIZE
+constant EMULTIHOP
+constant ENAMETOOLONG
+constant ENETDOWN
+constant ENETUNREACH
+constant ENFILE
+constant ENOBUFS
+constant ENODATA
+constant ENODEV
+constant ENOENT
+constant ENOEXEC
+constant ENOLCK
+constant ENOLINK
+constant ENOMEM
+constant ENOMSG
+constant ENOPROTOOPT
+constant ENOSPC
+constant ENOSR
+constant ENOSTR
+constant ENOSYS
+constant ENOTCONN
+constant ENOTDIR
+constant ENOTEMPTY
+constant ENOTSOCK
+constant ENOTSUP
+constant ENOTTY
+constant ENXIO
+constant EOPNOTSUPP
+constant EOVERFLOW
+constant EPERM
+constant EPIPE
+constant EPROTO
+constant EPROTONOSUPPORT
+constant EPROTOTYPE
+constant EROFS
+constant ESPIPE
+constant ESRCH
+constant ESTALE
+constant ETIME
+constant ETIMEDOUT
+constant ETXTBSY
+constant EWOULDBLOCK
+constant EXDEV
+
+# variable int errno
+allow errno
+
+allow E*
+allow *_t
+#endif
diff --git a/conform/data/fcntl.h-data b/conform/data/fcntl.h-data
new file mode 100644
index 0000000000..0344ce973b
--- /dev/null
+++ b/conform/data/fcntl.h-data
@@ -0,0 +1,55 @@
+#if !defined ISO && !defined POSIX
+constant F_DUPFD
+constant F_GETFD
+constant F_SETFD
+constant F_GETFL
+constant F_SETFL
+constant F_GETLK
+constant F_SETLK
+constant F_SETLKW
+
+constant FD_CLOEXEC
+
+constant F_RDLCK
+constant F_UNLCK
+constant F_WRLCK
+
+constant O_CREAT
+constant O_EXCL
+constant O_NOCTTY
+constant O_TRUNC
+
+constant O_APPEND
+constant O_DSYNC
+constant O_NONBLOCK
+constant O_RSYNC
+constant O_SYNC
+
+constant O_ACCMODE
+
+constant O_RDONLY
+constant O_RDWR
+constant O_WRONLY
+
+type {struct flock}
+
+element {struct flock} short l_type
+element {struct flock} short l_whence
+element {struct flock} off_t l_start
+element {struct flock} off_t l_len
+element {struct flock} pid_t l_pid
+
+type mode_t
+type off_t
+type pid_t
+
+function int creat (const char*, mode_t)
+function int fcntl (int, int, ...)
+function int open (const char*, int, ...)
+
+allow-header sys/stat.h
+allow-header unistd.h
+
+allow *_t
+allow l_*
+#endif
diff --git a/conform/data/float.h-data b/conform/data/float.h-data
new file mode 100644
index 0000000000..bdc28d12b3
--- /dev/null
+++ b/conform/data/float.h-data
@@ -0,0 +1,39 @@
+macro FLT_RADIX
+
+constant FLT_ROUNDS
+
+macro FLT_MANT_DIG
+macro DBL_MANT_DIG
+macro LDBL_MANT_DIG
+
+macro FLT_DIG
+macro DBL_DIG
+macro LDBL_DIG
+
+macro FLT_MIN_EXP
+macro DBL_MIN_EXP
+macro LDBL_MIN_EXP
+
+macro FLT_MIN_10_EXP
+macro DBL_MIN_10_EXP
+macro LDBL_MIN_10_EXP
+
+macro FLT_MAX_EXP
+macro DBL_MAX_EXP
+macro LDBL_MAX_EXP
+
+macro FLT_MAX_10_EXP
+macro DBL_MAX_10_EXP
+macro LDBL_MAX_10_EXP
+
+macro FLT_MAX
+macro DBL_MAX
+macro LDBL_MAX
+
+macro FLT_EPSILON
+macro DBL_EPSILON
+macro LDBL_EPSILON
+
+macro FLT_MIN
+macro DBL_MIN
+macro LDBL_MIN
diff --git a/conform/data/fmtmsg.h-data b/conform/data/fmtmsg.h-data
new file mode 100644
index 0000000000..1b88372075
--- /dev/null
+++ b/conform/data/fmtmsg.h-data
@@ -0,0 +1,60 @@
+#if !defined ISO && !defined POSIX
+macro MM_HARD
+constant MM_HARD
+
+macro MM_SOFT
+constant MM_SOFT
+
+macro MM_FIRM
+constant MM_FIRM
+
+macro MM_APPL
+constant MM_APPL
+
+macro MM_UTIL
+constant MM_UTIL
+
+macro MM_OPSYS
+constant MM_OPSYS
+
+macro MM_RECOVER
+constant MM_RECOVER
+
+macro MM_NRECOV
+constant MM_NRECOV
+
+macro MM_HALT
+constant MM_HALT
+
+macro MM_ERROR
+constant MM_ERROR
+
+macro MM_WARNING
+constant MM_WARNING
+
+macro MM_INFO
+constant MM_INFO
+
+macro MM_NOSEV
+constant MM_NOSEV
+
+macro MM_PRINT
+constant MM_PRINT
+
+macro MM_CONSOLE
+constant MM_CONSOLE
+
+constant MM_NULLLBL 0
+constant MM_NULLSEV 0
+constant MM_NULLMC 0
+constant MM_NULLTXT 0
+constant MM_NULLACT 0
+constant MM_NULLTAG 0
+
+macro MM_OK
+macro MM_NOTOK
+macro MM_NOMSG
+macro MM_NOCON
+
+function int fmtmsg (long, const char*, int, const char*, const char*, const char*)
+#endif
diff --git a/conform/data/fnmatch.h-data b/conform/data/fnmatch.h-data
new file mode 100644
index 0000000000..b00fa45e66
--- /dev/null
+++ b/conform/data/fnmatch.h-data
@@ -0,0 +1,9 @@
+#ifndef ISO
+constant FNM_NOMATCH
+constant FNM_PATHNAME
+constant FNM_PERIOD
+constant FNM_NOESCAPE
+constant FNM_NOSYS
+
+function int fnmatch (const char*, const char*, int)
+#endif
diff --git a/conform/data/ftw.h-data b/conform/data/ftw.h-data
new file mode 100644
index 0000000000..b3fa283922
--- /dev/null
+++ b/conform/data/ftw.h-data
@@ -0,0 +1,21 @@
+#if !defined ISO && !defined POSIX
+type {struct FTW}
+element {struct FTW} int base
+element {struct FTW} int level
+
+macro FTW_F
+macro FTW_D
+macro FTW_DNR
+macro FTW_DP
+macro FTW_NS
+macro FTW_SL
+macro FTW_SLN
+
+macro FTW_PHYS
+macro FTW_MOUNT
+macro FTW_DEPTH
+macro FTW_CHDIR
+
+function int ftw (const char*, int (*) (const char *, const struct stat*, int), int)
+function int nftw (const char*, int (*) (const char *, const struct stat*, int, FTW *), int, int)
+#endif
diff --git a/conform/data/glob.h-data b/conform/data/glob.h-data
new file mode 100644
index 0000000000..fd24e7fa79
--- /dev/null
+++ b/conform/data/glob.h-data
@@ -0,0 +1,25 @@
+#ifndef ISO
+type glob_t
+element glob_t size_t gl_pathc
+element glob_t {char**} gl_pathv
+element glob_t size_t gl_offs
+
+constant GLOB_APPEND
+constant GLOB_DOOFS
+constant GLOB_ERR
+constant GLOB_MARK
+constant GLOB_NOCHECK
+constant GLOB_NOESCAPE
+constant GLOB_NOSORT
+
+constant GLOB_ABORTED
+constant GLOB_NOMATCH
+constant GLOB_NOSPACE
+constant GLOB_NOSYS
+
+function int glob (const char*, int, int (*) (const char*, int), glob_t*)
+function void globfree (glob_t)
+
+allow gl_*
+allow GLOB_*
+#endif
diff --git a/conform/data/grp.h-data b/conform/data/grp.h-data
new file mode 100644
index 0000000000..664efb0274
--- /dev/null
+++ b/conform/data/grp.h-data
@@ -0,0 +1,22 @@
+#ifndef ISO
+type {struct group}
+element {struct group} {char*} gr_name
+element {struct group} gid_t gr_gid
+element {struct group} {char**} gr_mem
+
+# ifndef POSIX
+type gid_t
+# endif
+
+function {struct group*} getgrgid (gid_t)
+function {struct group*} getgrnam (const char*)
+# ifndef POSIX
+function int getgrgid_r (gid_t, struct group*, char *, size_t, struct group**)
+function int getgrnam_r (const char *, struct group *, char *, size_t, struct group**)
+function {struct group*} getgrent (void)
+function void endgrent (void)
+function void setgrent (void)
+# endif
+
+allow gr_
+#endif
diff --git a/conform/data/iconv.h-data b/conform/data/iconv.h-data
new file mode 100644
index 0000000000..05523e1595
--- /dev/null
+++ b/conform/data/iconv.h-data
@@ -0,0 +1,7 @@
+#if !defined ISO && !defined POSIX
+type iconv_t
+
+function iconv_t iconv_open (const char*, const char*)
+function size_t iconv (iconv_t, char**, size_t*, char**, size_t*)
+function int iconv_close (iconv_t)
+#endif
diff --git a/conform/data/inttypes.h-data b/conform/data/inttypes.h-data
new file mode 100644
index 0000000000..204a7cf64c
--- /dev/null
+++ b/conform/data/inttypes.h-data
@@ -0,0 +1,13 @@
+type int8_t
+type int16_t
+type int32_t
+type int64_t
+type uint8_t
+type uint16_t
+type uint32_t
+type uint64_t
+type intptr_t
+type uintptr_t
+
+allow PRI*
+allow SCN*
diff --git a/conform/data/iso646.h-data b/conform/data/iso646.h-data
new file mode 100644
index 0000000000..8339da3f1f
--- /dev/null
+++ b/conform/data/iso646.h-data
@@ -0,0 +1,11 @@
+macro and
+macro and_eq
+macro bitand
+macro bitor
+macro compl
+macro not
+macro not_eq
+macro or
+macro or_eq
+macro xor
+macro xor_eq
diff --git a/conform/data/langinfo.h-data b/conform/data/langinfo.h-data
new file mode 100644
index 0000000000..0e313e38c8
--- /dev/null
+++ b/conform/data/langinfo.h-data
@@ -0,0 +1,61 @@
+#if !defined ISO && !defined POSIX
+constant CODESET
+constant D_T_FMT
+constant D_FMT
+constant T_FMT
+constant T_FMT_AMPM
+constant AM_STR
+constant PM_STR
+constant DAY_1
+constant DAY_2
+constant DAY_3
+constant DAY_4
+constant DAY_5
+constant DAY_6
+constant DAY_7
+constant ABDAY_1
+constant ABDAY_2
+constant ABDAY_3
+constant ABDAY_4
+constant ABDAY_5
+constant ABDAY_6
+constant ABDAY_7
+constant MON_1
+constant MON_2
+constant MON_3
+constant MON_4
+constant MON_5
+constant MON_6
+constant MON_7
+constant MON_8
+constant MON_9
+constant MON_10
+constant MON_11
+constant MON_12
+constant ABMON_1
+constant ABMON_2
+constant ABMON_3
+constant ABMON_4
+constant ABMON_5
+constant ABMON_6
+constant ABMON_7
+constant ABMON_8
+constant ABMON_9
+constant ABMON_10
+constant ABMON_11
+constant ABMON_12
+constant ERA
+constant ERA_D_FMT
+constant ERA_D_T_FMT
+constant ERA_T_FMT
+constant ALT_DIGITS
+constant RADIXCHAR
+constant THOUSEP
+constant YESEXPR
+constant NOEXPR
+constant CRNCYSTR
+
+function {char*} nl_langinfo (nl_item)
+
+allow-header nl_types.h
+#endif
diff --git a/conform/data/libgen.h-data b/conform/data/libgen.h-data
new file mode 100644
index 0000000000..97980e9a53
--- /dev/null
+++ b/conform/data/libgen.h-data
@@ -0,0 +1,4 @@
+#if !defined ISO && !defined POSIX
+function {char*} basename (char*)
+function {char*} dirname (char*)
+#endif
diff --git a/conform/data/locale.h-data b/conform/data/locale.h-data
new file mode 100644
index 0000000000..c1325e30e0
--- /dev/null
+++ b/conform/data/locale.h-data
@@ -0,0 +1,34 @@
+type {struct lconv}
+element {struct lconv} {char*} currency_symbol
+element {struct lconv} {char*} decimal_point
+element {struct lconv} char frac_digits
+element {struct lconv} {char*} grouping
+element {struct lconv} {char*} int_curr_symbol
+element {struct lconv} char int_frac_digits
+element {struct lconv} {char*} mon_decimal_point
+element {struct lconv} {char*} mon_thousands_sep
+element {struct lconv} {char*} mon_grouping
+element {struct lconv} {char*} negative_sign
+element {struct lconv} char n_cs_precedes
+element {struct lconv} char n_sep_by_space
+element {struct lconv} char n_sign_posn
+element {struct lconv} {char*} positive_sign
+element {struct lconv} char p_cs_precedes
+element {struct lconv} char p_sep_by_space
+element {struct lconv} char p_sign_pos
+element {struct lconv} {char*} thousands_sep
+
+constant NULL
+
+macro LC_ALL
+macro LC_COLLATE
+macro LC_CTYPE
+macro LC_MESSAGES
+macro LC_MONETARY
+macro LC_NUMERIC
+macro LC_TIME
+
+function {struct lconv*) localeconv (void)
+function {char*} setlocale (int, const char*)
+
+allow LC_*
diff --git a/conform/data/math.h-data b/conform/data/math.h-data
new file mode 100644
index 0000000000..13f617577e
--- /dev/null
+++ b/conform/data/math.h-data
@@ -0,0 +1,158 @@
+#if !defined ISO && !defined POSIX
+constant M_E
+constant M_LOG2E
+constant M_LOG10E
+constant M_LN2
+constant M_LN10
+constant M_PI
+constant M_PI_2
+constant M_PI_4
+constant M_1_PI
+constant M_2_PI
+constant M_2_SQRTPI
+constant M_SQRT2
+constant M_SQRT1_2
+
+constant MAXFLOAT
+constant HUGE_VAL
+
+function double acos (double)
+function double asin (double)
+function double atan (double)
+function double atan2 (double, double)
+function double ceil (double)
+function double cos (double)
+function double cosh (double)
+function double exp (double)
+function double fabs (double)
+function double floor (double)
+function double fmod (double, double)
+function double frexp (double, int*)
+function double ldexp (double, int)
+function double log (double)
+function double log10 (double)
+function double pow (double, double)
+function double sin (double)
+function double sinh (double)
+function double sqrt (double)
+function double tan (double)
+function double tanh (double)
+function double erf (double)
+function double erfc (double)
+function double gamma (double)
+function double hypot (double, double)
+function double j0 (double)
+function double j1 (double)
+function double jn (double)
+function double lgamma (double)
+function double y0 (double)
+function double y1 (double)
+function double yn (double)
+function int isnan (double)
+function double acosh (double)
+function double asinh (double)
+function double atanh (double)
+function double cbrt (double)
+function double expm1 (double)
+function int ilogb (double)
+function double log1p (double)
+function double logb (double)
+function double nextafter (double, double)
+function double remainder (double, double)
+function double rint (double)
+function double scalb (double, double)
+
+# variable signgam
+allow signgam
+
+allow acosf
+allow asinf
+allow atanf
+allow atan2f
+allow ceilf
+allow cosf
+allow coshf
+allow expf
+allow fabsf
+allow floorf
+allow fmodf
+allow frexpf
+allow ldexpf
+allow logf
+allow log10f
+allow powf
+allow sinf
+allow sinhf
+allow sqrtf
+allow tanf
+allow tanhf
+allow erff
+allow erfcf
+allow gammaf
+allow hypotf
+allow j0f
+allow j1f
+allow jnf
+allow lgammaf
+allow y0f
+allow y1f
+allow ynf
+allow isnanf
+allow acoshf
+allow asinhf
+allow atanhf
+allow cbrtf
+allow expm1f
+allow ilogbf
+allow log1pf
+allow logbf
+allow nextafterf
+allow remainderf
+allow rintf
+allow scalbf
+
+allow acosl
+allow asinl
+allow atanl
+allow atan2l
+allow ceill
+allow cosl
+allow coshl
+allow expl
+allow fabsl
+allow floorl
+allow fmodl
+allow frexpl
+allow ldexpl
+allow logl
+allow log10l
+allow powl
+allow sinl
+allow sinhl
+allow sqrtl
+allow tanl
+allow tanhl
+allow erfl
+allow erfcl
+allow gammal
+allow hypotl
+allow j0l
+allow j1l
+allow jnl
+allow lgammal
+allow y0l
+allow y1l
+allow ynl
+allow isnanl
+allow acoshl
+allow asinhl
+allow atanhl
+allow cbrtl
+allow expm1l
+allow ilogbl
+allow log1pl
+allow logbl
+allow nextafterl
+allow remainderl
+allow rintl
+allow scalbl