aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-02-23 06:02:09 +0000
committerUlrich Drepper <drepper@redhat.com>2000-02-23 06:02:09 +0000
commit8ce9ea0ca67b8eff5f1a708d951d969ac9c0ab2a (patch)
tree4a04cd7c0e3a05987fcf74caa28a0f5d93020b5b
parent93a19c64c994e85e1c3e87cefa1d68c15e7acb0d (diff)
downloadglibc-8ce9ea0ca67b8eff5f1a708d951d969ac9c0ab2a.tar.xz
glibc-8ce9ea0ca67b8eff5f1a708d951d969ac9c0ab2a.zip
Update.
* dlfcn/dlfcn.h (RTLD_DEFAULT): Don't use NULL. * iconv/iconv.h (iconv): Fix prototype. * misc/libgen.h: When using gcc using renaming feature to get XPG definition of basename. * misc/search.h (struct entry): Fix type of element data. * posix/unistd.h (getpagesize): Declare as const function. * sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Define SA_NOCLDWAIT. * sysdeps/unix/sysv/linux/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h: Likewise. * signal/signal.h [__USE_XOPEN]: Define uid_t. (sigstack): Correct type of first parameter. * sysdeps/generic/sigstack.c (sigstack): Likewise. * sysdeps/unix/sysv/linux/sigstack.c (sigstack): Likewise. * sysdeps/unix/sysv/linux/alpha/bits/siginfo.h: New file. Copy of old sysdeps/unix/sysv/linux/bits/siginfo.h. * sysdeps/unix/sysv/linux/sparc/sparc64/bits/siginfo.h: Likewise. * sysdeps/unix/sysv/linux/bits/siginfo.h [struct siginfo] (si_band): Change type to `long int'. * signal/signal.h [__USE_XOPEN]: Declare sigpause to redirect to __xpg_sigpause. * sysdeps/generic/sigpause.c: Define __xpg_sigpause. * sysdeps/posix/sigpause.c: Likewise. * conform/conformtest.pl: Correct bugs. Add more functionality. * conform/data/dlfcn.h-data: Correct typos. * conform/data/ftw.h-data: Likewise. * conform/data/iconv.h-data: Likewise. * conform/data/nl_types.h-data: Likewise. * conform/data/search.h-data: Likewise. * conform/data/semaphore.h-data: New file. * conform/data/setjmp.h-data: New file. * conform/data/signal.h-data: New file. * conform/data/stdarg.h-data: New file. * conform/data/stddef.h-data: New file. * conform/data/stdio.h-data: New file.
-rw-r--r--ChangeLog45
-rw-r--r--conform/conformtest.pl147
-rw-r--r--conform/data/dlfcn.h-data1
-rw-r--r--conform/data/ftw.h-data2
-rw-r--r--conform/data/iconv.h-data2
-rw-r--r--conform/data/nl_types.h-data2
-rw-r--r--conform/data/search.h-data2
-rw-r--r--conform/data/semaphore.h-data23
-rw-r--r--conform/data/setjmp.h-data20
-rw-r--r--conform/data/signal.h-data191
-rw-r--r--conform/data/stdarg.h-data7
-rw-r--r--conform/data/stddef.h-data8
-rw-r--r--conform/data/stdio.h-data103
-rw-r--r--dlfcn/dlfcn.h6
-rw-r--r--iconv/iconv.h4
-rw-r--r--misc/libgen.h4
-rw-r--r--misc/search.h4
-rw-r--r--posix/glob.h5
-rw-r--r--posix/unistd.h6
-rw-r--r--signal/Versions4
-rw-r--r--signal/signal.h21
-rw-r--r--stdlib/fmtmsg.h2
-rw-r--r--sysdeps/generic/sigpause.c14
-rw-r--r--sysdeps/generic/sigstack.c4
-rw-r--r--sysdeps/posix/sigpause.c16
-rw-r--r--sysdeps/unix/sysv/linux/alpha/bits/sigaction.h3
-rw-r--r--sysdeps/unix/sysv/linux/alpha/bits/siginfo.h293
-rw-r--r--sysdeps/unix/sysv/linux/bits/sigaction.h3
-rw-r--r--sysdeps/unix/sysv/linux/bits/siginfo.h2
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/sigaction.h1
-rw-r--r--sysdeps/unix/sysv/linux/sigstack.c4
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/sigaction.h3
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/bits/siginfo.h293
33 files changed, 1202 insertions, 43 deletions
diff --git a/ChangeLog b/ChangeLog
index 44ecd76e3e..4aff7cd6db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,50 @@
2000-02-22 Ulrich Drepper <drepper@redhat.com>
+ * dlfcn/dlfcn.h (RTLD_DEFAULT): Don't use NULL.
+
+ * iconv/iconv.h (iconv): Fix prototype.
+
+ * misc/libgen.h: When using gcc using renaming feature to get XPG
+ definition of basename.
+
+ * misc/search.h (struct entry): Fix type of element data.
+
+ * posix/unistd.h (getpagesize): Declare as const function.
+
+ * sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Define SA_NOCLDWAIT.
+ * sysdeps/unix/sysv/linux/bits/sigaction.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h: Likewise.
+
+ * signal/signal.h [__USE_XOPEN]: Define uid_t.
+ (sigstack): Correct type of first parameter.
+ * sysdeps/generic/sigstack.c (sigstack): Likewise.
+ * sysdeps/unix/sysv/linux/sigstack.c (sigstack): Likewise.
+
+ * sysdeps/unix/sysv/linux/alpha/bits/siginfo.h: New file. Copy of
+ old sysdeps/unix/sysv/linux/bits/siginfo.h.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/bits/siginfo.h: Likewise.
+ * sysdeps/unix/sysv/linux/bits/siginfo.h [struct siginfo] (si_band):
+ Change type to `long int'.
+
+ * signal/signal.h [__USE_XOPEN]: Declare sigpause to redirect to
+ __xpg_sigpause.
+ * sysdeps/generic/sigpause.c: Define __xpg_sigpause.
+ * sysdeps/posix/sigpause.c: Likewise.
+
+ * conform/conformtest.pl: Correct bugs. Add more functionality.
+ * conform/data/dlfcn.h-data: Correct typos.
+ * conform/data/ftw.h-data: Likewise.
+ * conform/data/iconv.h-data: Likewise.
+ * conform/data/nl_types.h-data: Likewise.
+ * conform/data/search.h-data: Likewise.
+ * conform/data/semaphore.h-data: New file.
+ * conform/data/setjmp.h-data: New file.
+ * conform/data/signal.h-data: New file.
+ * conform/data/stdarg.h-data: New file.
+ * conform/data/stddef.h-data: New file.
+ * conform/data/stdio.h-data: New file.
+
* po/de.po: Update from translation team.
1999-12-31 Martin Buchholz <martin@xemacs.org>
diff --git a/conform/conformtest.pl b/conform/conformtest.pl
index 41613c67e5..30577c07d6 100644
--- a/conform/conformtest.pl
+++ b/conform/conformtest.pl
@@ -4,7 +4,9 @@ $CC = "gcc";
$CFLAGS = "-I. '-D__attribute__(x)=' -D_XOPEN_SOURCE=500";
# List of the headers we are testing.
-@headers = ("search.h", "sched.h", "regex.h", "pwd.h", "pthread.h",
+@headers = ("stdio.h",
+ "stddef.h", "stdarg.h", "signal.h", "setjmp.h", "semaphore.h",
+ "search.h", "sched.h", "regex.h", "pwd.h", "pthread.h",
"poll.h", "nl_types.h", "ndbm.h", "mqueue.h", "monetary.h",
"math.h", "locale.h", "libgen.h", "langinfo.h", "iso646.h",
"inttypes.h", "iconv.h", "grp.h", "glob.h", "ftw.h", "fnmatch.h",
@@ -171,8 +173,12 @@ sub newtoken {
my($token, $nerrors, @allow) = @_;
my($idx);
+ if ($token =~ /^[0-9_]/ || $iskeyword{$token}) {
+ return $nerrors;
+ }
+
for ($idx = 0; $idx <= $#allow; ++$idx) {
- if ($token =~ /^[0-9_]/ || $iskeyword{$token} || poorfnmatch ($allow[$idx], $token)) {
+ if (poorfnmatch ($allow[$idx], $token)) {
return $nerrors;
}
}
@@ -319,6 +325,48 @@ while ($#headers >= 0) {
$res = runtest ($fnamebase, "Testing for value of constant $const",
"Constant \"$const\" has not the right value.", $res);
}
+ } elsif (/^typed-constant *([a-zA-Z0-9_]*) *({([^}]*)}|([^ ]*)) *([A-Za-z0-9_]*)?/) {
+ my($const) = $1;
+ my($type) = "$3$4";
+ my($value) = $5;
+ 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 "$prepend";
+ 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);
+
+ # Test the types of the members.
+ open (TESTFILE, ">$fnamebase.c");
+ print TESTFILE "$prepend";
+ print TESTFILE "#include <$h>\n";
+ print TESTFILE "__typeof__ (($type) 0) a;\n";
+ print TESTFILE "extern __typeof__ ($const) a;\n";
+ close (TESTFILE);
+
+ compiletest ($fnamebase, "Testing for type of constant $const",
+ "Constant \"$const\" does not have the correct type.",
+ $res);
+
+ if ($value ne "") {
+ # Generate a program to test for the value of this constant.
+ open (TESTFILE, ">$fnamebase.c");
+ print TESTFILE "$prepend";
+ 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";
@@ -343,7 +391,38 @@ while ($#headers >= 0) {
compiletest ($fnamebase, "Testing for type $type",
"Type \"$type\" not available.", $missing);
- } elsif (/^function *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(][^)]*[)])/) {
+ } 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 "$prepend";
+ 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 "$prepend";
+ 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 (/^function *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) {
my($rettype) = "$2$3";
my($fname) = "$4";
my($args) = "$5";
@@ -374,6 +453,68 @@ while ($#headers >= 0) {
compiletest ($fnamebase, "Test for type of function $fname",
"Function \"$fname\" has incorrect type.", $res);
+ } elsif (/^variable *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*)/) {
+ my($type) = "$2$3";
+ my($vname) = "$4";
+ my($res) = $missing;
+
+ # Remember that this name is allowed.
+ push @allow, $vname;
+
+ # Generate a program to test for availability of this function.
+ open (TESTFILE, ">$fnamebase.c");
+ print TESTFILE "$prepend";
+ print TESTFILE "#include <$h>\n";
+ # print TESTFILE "#undef $fname\n";
+ print TESTFILE "$type *foobarbaz = &$vname;\n";
+ close (TESTFILE);
+
+ $res = compiletest ($fnamebase, "Test availability of variable $vname",
+ "Variable \"$vname\" is not available.", $res);
+
+ # Generate a program to test for the type of this function.
+ open (TESTFILE, ">$fnamebase.c");
+ print TESTFILE "$prepend";
+ print TESTFILE "#include <$h>\n";
+ # print TESTFILE "#undef $fname\n";
+ print TESTFILE "extern $type $vname;\n";
+ close (TESTFILE);
+
+ compiletest ($fnamebase, "Test for type of variable $fname",
+ "Variable \"$vname\" has incorrect type.", $res);
+ } elsif (/^macro-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 "$prepend";
+ print TESTFILE "#include <$h>\n";
+ print TESTFILE "#ifndef $fname\n";
+ print TESTFILE "$rettype (*foobarbaz) $args = $fname;\n";
+ print TESTFILE "#endif\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 "$prepend";
+ print TESTFILE "#include <$h>\n";
+ print TESTFILE "#ifndef $fname\n";
+ print TESTFILE "extern $rettype (*foobarbaz) $args;\n";
+ print TESTFILE "extern __typeof__ (&$fname) foobarbaz;\n";
+ print TESTFILE "#endif\n";
+ close (TESTFILE);
+
+ compiletest ($fnamebase, "Test for type of function $fname",
+ "Function \"$fname\" has incorrect type.", $res);
} elsif (/^macro *([^ ]*)/) {
my($macro) = "$1";
diff --git a/conform/data/dlfcn.h-data b/conform/data/dlfcn.h-data
index 530feabf88..93e3354635 100644
--- a/conform/data/dlfcn.h-data
+++ b/conform/data/dlfcn.h-data
@@ -10,4 +10,5 @@ function int dlclose (void*)
function {char*} dlerror (void)
allow *_t
+allow RTLD_*
#endif
diff --git a/conform/data/ftw.h-data b/conform/data/ftw.h-data
index f5dec5cf79..ef34116a73 100644
--- a/conform/data/ftw.h-data
+++ b/conform/data/ftw.h-data
@@ -17,7 +17,7 @@ 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)
+function int nftw (const char*, int (*) (const char *, const struct stat*, int, struct FTW *), int, int)
allow *_t
#endif
diff --git a/conform/data/iconv.h-data b/conform/data/iconv.h-data
index f1e2ea0527..1c748a04ca 100644
--- a/conform/data/iconv.h-data
+++ b/conform/data/iconv.h-data
@@ -2,7 +2,7 @@
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 size_t iconv (iconv_t, const char**, size_t*, char**, size_t*)
function int iconv_close (iconv_t)
allow *_t
diff --git a/conform/data/nl_types.h-data b/conform/data/nl_types.h-data
index 91eacafa96..7cabf3ff62 100644
--- a/conform/data/nl_types.h-data
+++ b/conform/data/nl_types.h-data
@@ -6,7 +6,7 @@ constant NL_SETD
constant NL_CAT_LOCALE
function int catclose (nl_catd)
-function {char*} catgets (nl_catd, int, int, char char*)
+function {char*} catgets (nl_catd, int, int, const char*)
function nl_catd catopen (const char*, int)
allow *_t
diff --git a/conform/data/search.h-data b/conform/data/search.h-data
index 7da11c97c1..da7f2a1332 100644
--- a/conform/data/search.h-data
+++ b/conform/data/search.h-data
@@ -22,7 +22,7 @@ function {void*} lfind (const void*, const void*, size_t*, size_t, int (*)(const
function {void*} lsearch (const void*, void*, size_t*, size_t, int (*)(const void*, const void*))
function void remque (void*)
function {void*} tdelete (const void*, void**, int(*)(const void*, const void*))
-function {void*} tfind (const void*, void*const*, int(*)(const void*, const void*)) tfind (const void*, void*const*, int(*)(const void*, const void*))
+function {void*} tfind (const void*, void*const*, int(*)(const void*, const void*))
function {void*} tsearch (const void*, void**, int(*)(const void*, const void*))
function void twalk (const void*, void (*) (const void*, VISIT, int))
diff --git a/conform/data/semaphore.h-data b/conform/data/semaphore.h-data
new file mode 100644
index 0000000000..9664b67dd5
--- /dev/null
+++ b/conform/data/semaphore.h-data
@@ -0,0 +1,23 @@
+#if !defined ISO
+type sem_t
+
+constant SEM_FAILED
+
+function int sem_close (sem_t*)
+function int sem_destroy (sem_t*)
+function int sem_getvalue (sem_t*, int*)
+function int sem_init (sem_t*, int, unsigned int)
+function {sem_t*} sem_open (const char*, int, ...)
+function int sem_post (sem_t*)
+function int sem_trywait (sem_t*)
+function int sem_unlink (const char*)
+function int sem_wait (sem_t*)
+
+# if !defined POSIX
+allow-header fcntl.h
+allow-header sys/types.h
+# endif
+
+allow sem_*
+allow SEM_*
+#endif
diff --git a/conform/data/setjmp.h-data b/conform/data/setjmp.h-data
new file mode 100644
index 0000000000..806dacfc94
--- /dev/null
+++ b/conform/data/setjmp.h-data
@@ -0,0 +1,20 @@
+type jmp_buf
+#ifndef ISO
+type sigjmp_buf
+#endif
+
+function void longjmp (jmp_buf, int)
+#ifndef ISO
+function void siglongjmp (sigjmp_buf, int)
+# ifndef POSIX
+function void _longjmp (jmp_buf, int)
+# endif
+#endif
+
+macro-function int setjmp (jmp_buf)
+#ifndef ISO
+macro-function int sigsetjmp (sigjmp_buf, int)
+# ifndef POSIX
+macro-function int _setjmp (jmp_buf)
+# endif
+#endif
diff --git a/conform/data/signal.h-data b/conform/data/signal.h-data
new file mode 100644
index 0000000000..fda1af9436
--- /dev/null
+++ b/conform/data/signal.h-data
@@ -0,0 +1,191 @@
+typed-constant SIG_DFL {void(*)(int)}
+typed-constant SIG_ERR {void(*)(int)}
+typed-constant SIG_HOLD {void(*)(int)}
+typed-constant SIG_IGN {void(*)(int)}
+
+type sig_atomic_t
+type sigset_t
+type pid_t
+
+element {union sigval} int sival_int
+element {union sigval} {void*} sival_ptr
+
+type {struct sigevent}
+
+// Test the elements of the sigevent_t structure.
+element {struct sigevent} int sigev_notify
+element {struct sigevent} int sigev_signo
+element {struct sigevent} {union sigval} sigev_value
+element {struct sigevent} {void(*)(union sigval)} sigev_notify_function
+element {struct sigevent} {pthread_attr_t*} sigev_notify_attributes
+
+constant SIGEV_NONE
+constant SIGEV_SIGNAL
+constant SIGEV_THREAD
+
+type {union sigval}
+
+macro SIGRTMIN
+macro SIGRTMAX
+
+constant SIGABRT
+constant SIGALRM
+constant SIGFPE
+constant SIGHUP
+constant SIGILL
+constant SIGINT
+constant SIGKILL
+constant SIGPIPE
+constant SIGQUIT
+constant SIGSEGV
+constant SIGTERM
+constant SIGUSR1
+constant SIGUSR2
+constant SIGCHLD
+constant SIGCONT
+constant SIGSTOP<