summary refs log tree commit diff
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.gz
glibc-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
+constant SIGTSTP
+constant SIGTTIN
+constant SIGTTOU
+constant SIGBUS
+constant SIGPOLL
+constant SIGPROF
+constant SIGSYS
+constant SIGTRAP
+constant SIGURG
+constant SIGVALRM
+constant SIGXCPU
+constant SIGXFSZ
+
+type {struct sigaction}
+
+element {struct sigaction} {void(*} sa_handler )(int)
+element {struct sigaction} sigset_t sa_mask
+element {struct sigaction} int sa_flags
+element {struct sigaction} {void(*} sa_sigaction )(int, siginfo_t*, void*)
+
+constant SA_NOCLDSTOP
+constant SIG_BLOCK
+constant SIG_UNBLOCK
+constant SIG_SETMASK
+constant SA_ONSTACK
+constant SA_RESETHAND
+constant SA_RESTART
+constant SA_SIGINFO
+constant SA_NOCLDWAIT
+constant SA_NODEFER
+constant SS_ONSTACK
+constant SS_DISABLE
+constant MINSIGSTKSZ
+constant SIGSTKSZ
+
+type ucontext_t
+
+element ucontext_t {ucontext_t*} uc_link
+element ucontext_t sigset_t uc_sigmask
+element ucontext_t stack_t uc_stack
+element ucontext_t mcontext_t uc_mcontext
+
+type stack_t
+
+element stack_t {void*} ss_sp
+element stack_t size_t ss_size
+element stack_t int ss_flags
+
+type {struct sigstack}
+
+element {struct sigstack} int ss_onstack
+element {struct sigstack} {void*} ss_sp
+
+type siginfo_t
+
+element siginfo_t int si_signo
+element siginfo_t int si_errno
+element siginfo_t int si_code
+element siginfo_t pid_t si_pid
+element siginfo_t uid_t si_uid
+element siginfo_t {void*} si_addr
+element siginfo_t int si_status
+element siginfo_t long si_band
+element siginfo_t {union sigval} si_value
+
+constant ILL_ILLOPC
+constant ILL_ILLOPN
+constant ILL_ILLADR
+constant ILL_ILLTRP
+constant ILL_PRVOPC
+constant ILL_PRVREG
+constant ILL_COPROC
+constant ILL_BADSTK
+constant FPE_INTDIV
+constant FPE_INTOVF
+constant FPE_FLTDIV
+constant FPE_FLTOVF
+constant FPE_FLTUND
+constant FPE_FLTRES
+constant FPE_FLTINV
+constant FPE_FLTSUB
+constant SEGV_MAPERR
+constant SEGV_ACCERR
+constant BUS_ADRALN
+constant BUS_ADRERR
+constant BUS_OBJERR
+constant TRAP_BRKPT
+constant TRAP_TRACE
+constant CLD_EXITED
+constant CLD_KILLED
+constant CLD_DUMPED
+constant CLD_TRAPPED
+constant CLD_STOPPED
+constant CLD_CONTINUED
+constant POLL_IN
+constant POLL_OUT
+constant POLL_MSG
+constant POLL_ERR
+constant POLL_PRI
+constant POLL_HUP
+constant SI_USER
+constant SI_QUEUE
+constant SI_TIMER
+constant SI_ASYNCIO
+constant SI_MESGQ
+
+function void (*bsd_signal (int, void(*)(int)))(int)
+function int kill (pid_t, int)
+function int killpg (pid_t, int)
+function int pthread_kill (pthread_t, int)
+function int pthread_sigmask (int, const sigset_t*, sigset_t*)
+function int raise (int)
+function int sigaction (int, const struct sigaction*, struct sigaction*)
+function int sigaddset (sigset_t*, int)
+function int sigaltstack (const stack_t*, stack_t*)
+function int sigdelset (sigset_t*, int)
+function int sigemptyset (sigset_t*)
+function int sigfillset (sigset_t*)
+function int sighold (int)
+function int sigignore (int)
+function int siginterrupt (int, int)
+function int sigismember (const sigset_t*, int)
+function void (*signal (int, void(*)(int)))(int)
+function int sigpause (int)
+function int sigpending (sigset_t*)
+function int sigprocmask (int, const sigset_t*, sigset_t*)
+function int sigqueue (pid_t, int, const union sigval)
+function int sigrelse (int)
+function void (*sigset (int, void(*)(int)))(int)
+function int sigstack (struct sigstack*, struct sigstack*)
+function int sigsuspend (const sigset_t*)
+function int sigtimedwait (const sigset_t*, siginfo_t*, const struct timespec*)
+function int sigwait (const sigset_t*, int*)
+function int sigwaitinfo (const sigset_t*, siginfo_t*)
+
+allow SIG*
+allow sa_*
+allow uc_*
+allow ss_*
+allow sv_*
+allow si_*
+allow SI_*
+allow sigev_*
+allow SIGEV_*
+allow sival_*
diff --git a/conform/data/stdarg.h-data b/conform/data/stdarg.h-data
new file mode 100644
index 0000000000..719d504ef9
--- /dev/null
+++ b/conform/data/stdarg.h-data
@@ -0,0 +1,7 @@
+type va_list
+
+// XXX We didn't check the parameters.
+macro va_start
+macro va_arg
+macro va_end
+macro va_copy
diff --git a/conform/data/stddef.h-data b/conform/data/stddef.h-data
new file mode 100644
index 0000000000..05b157060a
--- /dev/null
+++ b/conform/data/stddef.h-data
@@ -0,0 +1,8 @@
+constant NULL
+
+macro offsetof
+
+type ptrdiff_t
+type wchar_t
+type size_t
+type wint_t
diff --git a/conform/data/stdio.h-data b/conform/data/stdio.h-data
new file mode 100644
index 0000000000..93238ba0ba
--- /dev/null
+++ b/conform/data/stdio.h-data
@@ -0,0 +1,103 @@
+constant BUFSIZ
+constant FILENAME_MAX
+constant FOPEN_MAX
+
+constant _IOFBF
+constant _IOLBF
+constant _IONBF
+
+constant L_ctermid
+constant L_cuserid
+constant L_tmpnam
+
+constant SEEK_CUR
+constant SEEK_END
+constant SEEK_SET
+
+constant TMP_MAX
+
+constant EOF
+
+constant NULL
+
+constant P_tmpdir
+
+macro stdin
+macro stdout
+macro stderr
+
+type FILE
+type fpos_t
+type va_list
+type size_t
+
+function void clearerr (FILE*)
+function {char*} ctermid (char*)
+function {char*} cuserid (char*)
+function int fclose (FILE*)
+function {FILE*} fdopen (int, const char*)
+function int feof (FILE*)
+function int ferror (FILE*)
+function int fflush (FILE*)
+function int fgetc (FILE*)
+function int fgetpos (FILE*, fpos_t*)
+function {char*} fgets (char*, int, FILE*)
+function int fileno (FILE*)
+function void flockfile (FILE*)
+function {FILE*} fopen (const char*, const char*)
+function int fprintf (FILE*, const char*, ...)
+function int fputc (int, FILE*)
+function int fputs (const char*, FILE*)
+function size_t fread (void*, size_t, size_t, FILE*)
+function {FILE*} freopen (const char*, const char*, FILE*)
+function int fscanf (FILE*, const char*, ...)
+function int fseek (FILE*, long int, int)
+function int fseeko (FILE*, off_t, int)
+function int fsetpos (FILE*, const fpos_t*)
+function {long int} ftell (FILE*)
+function off_t ftello (FILE*)
+function int ftrylockfile (FILE*)
+function void funlockfile (FILE*)
+function size_t fwrite (const void*, size_t, size_t, FILE*)
+function int getc (FILE*)
+function int getchar (void)
+function int getc_unlocked (FILE*)
+function int getopt (int, char *const[], const char *)
+function {char*} gets (char*)
+function int getw (FILE*)
+function int pclose (FILE*)
+function void perror (const char*)
+function {FILE*} popen (const char*, const char*)
+function int printf (const char*, ...)
+function int putc (int, FILE*)
+function int putchar (int)
+function int putc_unlocked (int, FILE*)
+function int putchar_unlocked (int)
+function int puts (const char*)
+function int putw (int, FILE*)
+function int remove (const char*)
+function int rename (const char*, const char*)
+function void rewind (FILE*)
+function int scanf (const char*, ...)
+function void setbuf (FILE*, char*)
+function int setvbuf (FILE*, char*, int, size_t)
+function int snprintf (char*, size_t, const char*, ...)
+function int sprintf (char *, const char *, ...)
+function int sscanf (const char*, const char*, ...)
+function {char*} tempnam (const char*, const char*)
+function {FILE*} tmpfile (void)
+function {char*} tmpnam (char*)
+function int ungetc (int, FILE*)
+function int vfprintf (FILE*, const char*, va_list)
+function int vprintf (const char*, va_list)
+function int vsnprintf (char*, size_t, const char*, va_list)
+function int vsprintf (char*, const char*, va_list)
+
+#if !defined ISO && !defined POSIX
+variable {char*} optarg
+variable int opterr
+variable int optind
+variable int optopt
+
+allow-header stddef.h
+#endif
diff --git a/dlfcn/dlfcn.h b/dlfcn/dlfcn.h
index b1c51c04d7..327c68d518 100644
--- a/dlfcn/dlfcn.h
+++ b/dlfcn/dlfcn.h
@@ -1,5 +1,5 @@
 /* User functions for run-time dynamic loading.
-   Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1995-1999, 2000 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
@@ -21,8 +21,6 @@
 #define	_DLFCN_H 1
 
 #include <features.h>
-#define __need_NULL
-#include <stddef.h>
 
 /* Collect various system dependent definitions and declarations.  */
 #include <bits/dlfcn.h>
@@ -37,7 +35,7 @@
 /* If the first argument to `dlsym' or `dlvsym' is set to RTLD_DEFAULT
    the run-time address of the symbol called NAME in the global scope
    is returned.  */
-# define RTLD_DEFAULT	NULL
+# define RTLD_DEFAULT	((void *) 0)
 #endif
 
 __BEGIN_DECLS
diff --git a/iconv/iconv.h b/iconv/iconv.h
index 217156cdad..2e5fcb92fa 100644
--- a/iconv/iconv.h
+++ b/iconv/iconv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000 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
@@ -38,7 +38,7 @@ extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode)
 /* Convert at most *INBYTESLEFT bytes from *INBUF according to the
    code conversion algorithm specified by CD and place up to
    *OUTBYTESLEFT bytes in buffer at *OUTBUF.  */
-extern size_t iconv (iconv_t cd, __const char **__restrict __inbuf,
+extern size_t iconv (iconv_t __cd, __const char **__restrict __inbuf,
 		     size_t *__restrict __inbytesleft,
 		     char **__restrict __outbuf,
 		     size_t *__restrict __outbytesleft);
diff --git a/misc/libgen.h b/misc/libgen.h
index 948a9c381a..16003a9add 100644
--- a/misc/libgen.h
+++ b/misc/libgen.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999, 2000 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
@@ -19,7 +19,7 @@
 #ifndef _LIBGEN_H
 #define _LIBGEN_H	1
 
-#include <sys/cdefs.h>
+#include <features.h>
 
 __BEGIN_DECLS
 
diff --git a/misc/search.h b/misc/search.h
index ebc525a7a3..0ea91c2150 100644
--- a/misc/search.h
+++ b/misc/search.h
@@ -1,5 +1,5 @@
 /* Declarations for System V style searching functions.
-   Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1995-1999, 2000 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
@@ -70,7 +70,7 @@ ACTION;
 typedef struct entry
   {
     char *key;
-    char *data;
+    void *data;
   }
 ENTRY;
 
diff --git a/posix/glob.h b/posix/glob.h
index d92026f794..7d93b98320 100644
--- a/posix/glob.h
+++ b/posix/glob.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 95, 96, 97, 98 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 95, 96, 97, 98, 2000 Free Software Foundation, Inc.
 
    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
@@ -49,6 +49,9 @@ extern "C" {
 #ifndef __size_t
 # if defined __GNUC__ && __GNUC__ >= 2
 typedef __SIZE_TYPE__ __size_t;
+#  ifdef _XOPEN_SOURCE
+typedef __SIZE_TYPE__ size_t;
+#  endif
 # else
 /* This is a guess.  */
 typedef unsigned long int __size_t;
diff --git a/posix/unistd.h b/posix/unistd.h
index d563ef92ab..a36868caae 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1999, 2000 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
@@ -814,8 +814,8 @@ extern int sync (void) __THROW;
 
 /* Return the number of bytes in a page.  This is the system's page size,
    which is not necessarily the same as the hardware page size.  */
-extern int __getpagesize (void) __THROW;
-extern int getpagesize (void) __THROW;
+extern int __getpagesize (void) __attribute__ ((__const__)) __THROW;
+extern int getpagesize (void) __attribute__ ((__const__)) __THROW;
 
 
 /* Truncate FILE to LENGTH bytes.  */
diff --git a/signal/Versions b/signal/Versions
index 21fc5a5ae8..0217a4089d 100644
--- a/signal/Versions
+++ b/signal/Versions
@@ -45,4 +45,8 @@ libc {
     # LinuxThreads needs this entry point.
     __sigsuspend;
   }
+  GLIBC_2.2 {
+    # Needed to provide a pointer to the XPG sigpause function.
+    __xpg_sigpause;
+  }
 }
diff --git a/signal/signal.h b/signal/signal.h
index 12019f06f6..2ae76a1f37 100644
--- a/signal/signal.h
+++ b/signal/signal.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1999, 2000 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
@@ -55,9 +55,15 @@ typedef __sigset_t sigset_t;
 #include <bits/types.h>
 #include <bits/signum.h>
 
-#if defined __USE_XOPEN && !defined __pid_t_defined
+#ifdef __USE_XOPEN
+# ifndef __pid_t_defined
 typedef __pid_t pid_t;
-# define __pid_t_defined
+#  define __pid_t_defined
+# endif
+# ifndef __uid_t_defined
+typedef __uid_t uid_t;
+#  define __uid_t_defined
+# endif
 #endif	/* Unix98 */
 
 
@@ -140,6 +146,9 @@ extern int sigpause (int __mask) __THROW;
 # define sigpause(mask) __sigpause ((mask), 0)
 #else
 # ifdef __USE_XOPEN
+#  ifdef __GNUC__
+extern int sigpause (int __sig) __asm__ ("__xpg_sigpause") __THROW;
+#  endif
 /* Remove a signal from the signal mask and suspend the process.  */
 #  define sigpause(sig) __sigpause ((sig), 1)
 # endif
@@ -309,12 +318,14 @@ extern int sigreturn (struct sigcontext *__scp) __THROW;
 extern int siginterrupt (int __sig, int __interrupt) __THROW;
 
 # include <bits/sigstack.h>
+# ifdef __USE_XOPEN
+#  include <ucontext.h>
+# endif
 
 /* Run signals handlers on the stack specified by SS (if not NULL).
    If OSS is not NULL, it is filled in with the old signal stack status.
    This interface is obsolete and on many platform not implemented.  */
-extern int sigstack (__const struct sigstack *__ss,
-		     struct sigstack *__oss) __THROW;
+extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) __THROW;
 
 /* Alternate signal handler stack interface.
    This interface should always be preferred over `sigstack'.  */
diff --git a/stdlib/fmtmsg.h b/stdlib/fmtmsg.h
index ae166840cd..8c489d46ed 100644
--- a/stdlib/fmtmsg.h
+++ b/stdlib/fmtmsg.h
@@ -1,5 +1,5 @@
 /* Message display handling.
-   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2000 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
diff --git a/sysdeps/generic/sigpause.c b/sysdeps/generic/sigpause.c
index 25dfff1ea5..5a1badcdbe 100644
--- a/sysdeps/generic/sigpause.c
+++ b/sysdeps/generic/sigpause.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 2000 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
@@ -30,10 +30,8 @@ __sigpause (sig_or_mask, is_sig)
 stub_warning (__sigpause)
 
 
-int __default_sigpause __P ((int mask));
 int
-__default_sigpause (mask)
-     int mask;
+__default_sigpause (int mask)
 {
   __set_errno (ENOSYS);
   return -1;
@@ -41,3 +39,11 @@ __default_sigpause (mask)
 weak_alias (__default_sigpause, sigpause)
 stub_warning (sigpause)
 #include <stub-tag.h>
+
+
+int
+__xpg_sigpause (int sig)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
diff --git a/sysdeps/generic/sigstack.c b/sysdeps/generic/sigstack.c
index 52b135a19f..b4e2748a4c 100644
--- a/sysdeps/generic/sigstack.c
+++ b/sysdeps/generic/sigstack.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 2000 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
@@ -23,7 +23,7 @@
    If OSS is not NULL, it is filled in with the old signal stack status.  */
 int
 sigstack (ss, oss)
-     const struct sigstack *ss;
+     struct sigstack *ss;
      struct sigstack *oss;
 {
   __set_errno (ENOSYS);
diff --git a/sysdeps/posix/sigpause.c b/sysdeps/posix/sigpause.c
index eced47e42a..793ec89a51 100644
--- a/sysdeps/posix/sigpause.c
+++ b/sysdeps/posix/sigpause.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 1994-1998, 2000 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
@@ -60,12 +60,20 @@ __sigpause (sig_or_mask, is_sig)
 /* We have to provide a default version of this function since the
    standards demand it.  The version which is a bit more reasonable is
    the BSD version.  So make this the default.  */
-int __default_sigpause __P ((int mask));
 int
-__default_sigpause (mask)
-     int mask;
+__default_sigpause (int mask)
 {
   return __sigpause (mask, 0);
 }
 #undef sigpause
 weak_alias (__default_sigpause, sigpause)
+
+
+/* We have to provide a default version of this function since the
+   standards demand it.  The version which is a bit more reasonable is
+   the BSD version.  So make this the default.  */
+int
+__xpg_sigpause (int sig)
+{
+  return __sigpause (sig, 1);
+}
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
index be04235981..605c4f3fa3 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
@@ -1,5 +1,5 @@
 /* The proper definitions for Linux/Alpha sigaction.
-   Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1999, 2000 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
@@ -49,6 +49,7 @@ struct sigaction
 
 /* Bits in `sa_flags'.  */
 #define	SA_NOCLDSTOP  0x00000004 /* Don't send SIGCHLD when children stop.  */
+#define SA_NOCLDWAIT  0x00000020 /* Don't create zombie on child death.  */
 #define SA_SIGINFO    0x00000040 /* Invoke signal-catching function with
 				    three arguments instead of one.  */
 #if defined __USE_UNIX98 || defined __USE_MISC
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
new file mode 100644
index 0000000000..9426c13ee7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
@@ -0,0 +1,293 @@
+/* siginfo_t, sigevent and constants.  Linux/SPARC version.
+   Copyright (C) 1997, 1998, 1999, 2000 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.  */
+
+#if !defined _SIGNAL_H && !defined __need_siginfo_t
+# error "Never include this file directly.  Use <signal.h> instead"
+#endif
+
+#include <bits/wordsize.h>
+
+#if (!defined __have_siginfo_t \
+     && (defined _SIGNAL_H || defined __need_siginfo_t))
+# define __have_siginfo_t	1
+
+/* Type for data associated with a signal.  */
+typedef union sigval
+  {
+    int sival_int;
+    void *sival_ptr;
+  } sigval_t;
+
+# define __SI_MAX_SIZE     128
+# if __WORDSIZE == 64
+#  define __SI_PAD_SIZE     ((__SI_MAX_SIZE / sizeof (int)) - 4)
+# else
+#  define __SI_PAD_SIZE     ((__SI_MAX_SIZE / sizeof (int)) - 3)
+# endif
+
+typedef struct siginfo
+  {
+    int si_signo;		/* Signal number.  */
+    int si_errno;		/* If non-zero, an errno value associated with
+				   this signal, as defined in <errno.h>.  */
+    int si_code;		/* Signal code.  */
+
+    union
+      {
+	int _pad[__SI_PAD_SIZE];
+
+	 /* kill().  */
+	struct
+	  {
+	    __pid_t si_pid;	/* Sending process ID.  */
+	    __uid_t si_uid;	/* Real user ID of sending process.  */
+	  } _kill;
+
+	/* POSIX.1b timers.  */
+	struct
+	  {
+	    unsigned int _timer1;
+	    unsigned int _timer2;
+	  } _timer;
+
+	/* POSIX.1b signals.  */
+	struct
+	  {
+	    __pid_t si_pid;	/* Sending process ID.  */
+	    __uid_t si_uid;	/* Real user ID of sending process.  */
+	    sigval_t si_sigval;	/* Signal value.  */
+	  } _rt;
+
+	/* SIGCHLD.  */
+	struct
+	  {
+	    __pid_t si_pid;	/* Which child.  */
+	    __uid_t si_uid;	/* Real user ID of sending process.  */
+	    int si_status;	/* Exit value or signal.  */
+	    __clock_t si_utime;
+	    __clock_t si_stime;
+	  } _sigchld;
+
+	/* SIGILL, SIGFPE, SIGSEGV, SIGBUS.  */
+	struct
+	  {
+	    void *si_addr;	/* Faulting insn/memory ref.  */
+	  } _sigfault;
+
+	/* SIGPOLL.  */
+	struct
+	  {
+	    int si_band;	/* Band event for SIGPOLL.  */
+	    int si_fd;
+	  } _sigpoll;
+      } _sifields;
+  } siginfo_t;
+
+
+/* X/Open requires some more fields with fixed names.  */
+# define si_pid		_sifields._kill.si_pid
+# define si_uid		_sifields._kill.si_uid
+# define si_timer1	_sifields._timer._timer1
+# define si_timer2	_sifields._timer._timer2
+# define si_status	_sifields._sigchld.si_status
+# define si_utime	_sifields._sigchld.si_utime
+# define si_stime	_sifields._sigchld.si_stime
+# define si_value	_sifields._rt.si_sigval
+# define si_int		_sifields._rt.si_sigval.sival_int
+# define si_ptr		_sifields._rt.si_sigval.sival_ptr
+# define si_addr	_sifields._sigfault.si_addr
+# define si_band	_sifields._sigpoll.si_band
+# define si_fd		_sifields._sigpoll.si_fd
+
+
+/* Values for `si_code'.  Positive values are reserved for kernel-generated
+   signals.  */
+enum
+{
+  SI_SIGIO = -5,		/* Sent by queued SIGIO. */
+# define SI_SIGIO	SI_SIGIO
+  SI_ASYNCIO,			/* Sent by AIO completion.  */
+# define SI_ASYNCIO	SI_ASYNCIO
+  SI_MESGQ,			/* Sent by real time mesq state change.  */
+# define SI_MESGQ	SI_MESGQ
+  SI_TIMER,			/* Sent by timer expiration.  */
+# define SI_TIMER	SI_TIMER
+  SI_QUEUE,			/* Sent by sigqueue.  */
+# define SI_QUEUE	SI_QUEUE
+  SI_USER,			/* Sent by kill, sigsend, raise.  */
+# define SI_USER	SI_USER
+  SI_KERNEL = 0x80		/* Send by kernel.  */
+#define SI_KERNEL	SI_KERNEL
+};
+
+
+/* `si_code' values for SIGILL signal.  */
+enum
+{
+  ILL_ILLOPC = 1,		/* Illegal opcode.  */
+# define ILL_ILLOPC	ILL_ILLOPC
+  ILL_ILLOPN,			/* Illegal operand.  */
+# define ILL_ILLOPN	ILL_ILLOPN
+  ILL_ILLADR,			/* Illegal addressing mode.  */
+# define ILL_ILLADR	ILL_ILLADR
+  ILL_ILLTRP,			/* Illegal trap. */
+# define ILL_ILLTRP	ILL_ILLTRP
+  ILL_PRVOPC,			/* Privileged opcode.  */
+# define ILL_PRVOPC	ILL_PRVOPC
+  ILL_PRVREG,			/* Privileged register.  */
+# define ILL_PRVREG	ILL_PRVREG
+  ILL_COPROC,			/* Coprocessor error.  */
+# define ILL_COPROC	ILL_COPROC
+  ILL_BADSTK			/* Internal stack error.  */
+# define ILL_BADSTK	ILL_BADSTK
+};
+
+/* `si_code' values for SIGFPE signal.  */
+enum
+{
+  FPE_INTDIV = 1,		/* Integer divide by zero.  */
+# define FPE_INTDIV	FPE_INTDIV
+  FPE_INTOVF,			/* Integer overflow.  */
+# define FPE_INTOVF	FPE_INTOVF
+  FPE_FLTDIV,			/* Floating point divide by zero.  */
+# define FPE_FLTDIV	FPE_FLTDIV
+  FPE_FLTOVF,			/* Floating point overflow.  */
+# define FPE_FLTOVF	FPE_FLTOVF
+  FPE_FLTUND,			/* Floating point underflow.  */
+# define FPE_FLTUND	FPE_FLTUND
+  FPE_FLTRES,			/* Floating point inexact result.  */
+# define FPE_FLTRES	FPE_FLTRES
+  FPE_FLTINV,			/* Floating point invalid operation.  */
+# define FPE_FLTINV	FPE_FLTINV
+  FPE_FLTSUB			/* Subscript out of range.  */
+# define FPE_FLTSUB	FPE_FLTSUB
+};
+
+/* `si_code' values for SIGSEGV signal.  */
+enum
+{
+  SEGV_MAPERR = 1,		/* Address not mapped to object.  */
+# define SEGV_MAPERR	SEGV_MAPERR
+  SEGV_ACCERR			/* Invalid permissions for mapped object.  */
+# define SEGV_ACCERR	SEGV_ACCERR
+};
+
+/* `si_code' values for SIGBUS signal.  */
+enum
+{
+  BUS_ADRALN = 1,		/* Invalid address alignment.  */
+# define BUS_ADRALN	BUS_ADRALN
+  BUS_ADRERR,			/* Non-existant physical address.  */
+# define BUS_ADRERR	BUS_ADRERR
+  BUS_OBJERR			/* Object specific hardware error.  */
+# define BUS_OBJERR	BUS_OBJERR
+};
+
+/* `si_code' values for SIGTRAP signal.  */
+enum
+{
+  TRAP_BRKPT = 1,		/* Process breakpoint.  */
+# define TRAP_BRKPT	TRAP_BRKPT
+  TRAP_TRACE			/* Process trace trap.  */
+# define TRAP_TRACE	TRAP_TRACE
+};
+
+/* `si_code' values for SIGCHLD signal.  */
+enum
+{
+  CLD_EXITED = 1,		/* Child has exited.  */
+# define CLD_EXITED	CLD_EXITED
+  CLD_KILLED,			/* Child was killed.  */
+# define CLD_KILLED	CLD_KILLED
+  CLD_DUMPED,			/* Child terminated abnormally.  */
+# define CLD_DUMPED	CLD_DUMPED
+  CLD_TRAPPED,			/* Traced child has trapped.  */
+# define CLD_TRAPPED	CLD_TRAPPED
+  CLD_STOPPED,			/* Child has stopped.  */
+# define CLD_STOPPED	CLD_STOPPED
+  CLD_CONTINUED			/* Stopped child has continued.  */
+# define CLD_CONTINUED	CLD_CONTINUED
+};
+
+/* `si_code' values for SIGPOLL signal.  */
+enum
+{
+  POLL_IN = 1,			/* Data input available.  */
+# define POLL_IN	POLL_IN
+  POLL_OUT,			/* Output buffers available.  */
+# define POLL_OUT	POLL_OUT
+  POLL_MSG,			/* Input message available.   */
+# define POLL_MSG	POLL_MSG
+  POLL_ERR,			/* I/O error.  */
+# define POLL_ERR	POLL_ERR
+  POLL_PRI,			/* High priority input available.  */
+# define POLL_PRI	POLL_PRI
+  POLL_HUP			/* Device disconnected.  */
+# define POLL_HUP	POLL_HUP
+};
+
+# undef __need_siginfo_t
+#endif	/* !have siginfo_t && (have _SIGNAL_H || need siginfo_t).  */
+
+
+#if defined _SIGNAL_H && !defined __have_sigevent_t
+# define __have_sigevent_t	1
+
+/* Structure to transport application-defined values with signals.  */
+# define __SIGEV_MAX_SIZE	64
+# if __WORDSIZE == 64
+#  define __SIGEV_PAD_SIZE	((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
+# else
+#  define __SIGEV_PAD_SIZE	((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
+# endif
+
+typedef struct sigevent
+  {
+    sigval_t sigev_value;
+    int sigev_signo;
+    int sigev_notify;
+
+    union
+      {
+	int _pad[__SIGEV_PAD_SIZE];
+
+	struct
+	  {
+	    void (*_function) (sigval_t);	  /* Function to start.  */
+	    void *_attribute;			  /* Really pthread_attr_t.  */
+	  } _sigev_thread;
+      } _sigev_un;
+  } sigevent_t;
+
+/* POSIX names to access some of the members.  */
+# define sigev_notify_function   _sigev_un._sigev_thread._function
+# define sigev_notify_attributes _sigev_un._sigev_thread._attribute
+
+/* `sigev_notify' values.  */
+enum
+{
+  SIGEV_SIGNAL = 0,		/* Notify via signal.  */
+# define SIGEV_SIGNAL	SIGEV_SIGNAL
+  SIGEV_NONE,			/* Other notification: meaningless.  */
+# define SIGEV_NONE	SIGEV_NONE
+  SIGEV_THREAD			/* Deliver via thread creation.  */
+# define SIGEV_THREAD	SIGEV_THREAD
+};
+
+#endif	/* have _SIGNAL_H.  */
diff --git a/sysdeps/unix/sysv/linux/bits/sigaction.h b/sysdeps/unix/sysv/linux/bits/sigaction.h
index d4ba74dfa8..fcf0a86179 100644
--- a/sysdeps/unix/sysv/linux/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/bits/sigaction.h
@@ -1,5 +1,5 @@
 /* The proper definitions for Linux's sigaction.
-   Copyright (C) 1993, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
+   Copyright (C) 1993-1999, 2000 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
@@ -52,6 +52,7 @@ struct sigaction
 
 /* Bits in `sa_flags'.  */
 #define	SA_NOCLDSTOP  1		 /* Don't send SIGCHLD when children stop.  */
+#define SA_NOCLDWAIT  2		 /* Don't create zombie on child death.  */
 #define SA_SIGINFO    4		 /* Invoke signal-catching function with
 				    three arguments instead of one.  */
 #if defined __USE_UNIX98 || defined __USE_MISC
diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h b/sysdeps/unix/sysv/linux/bits/siginfo.h
index 9426c13ee7..fca2612c48 100644
--- a/sysdeps/unix/sysv/linux/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/bits/siginfo.h
@@ -93,7 +93,7 @@ typedef struct siginfo
 	/* SIGPOLL.  */
 	struct
 	  {
-	    int si_band;	/* Band event for SIGPOLL.  */
+	    long int si_band;	/* Band event for SIGPOLL.  */
 	    int si_fd;
 	  } _sigpoll;
       } _sifields;
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
index 04179d2982..0225078652 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
@@ -58,6 +58,7 @@ struct sigaction
 /* Please note that some Linux kernels versions use different values for these
    flags which is a bug in those kernel versions.  */
 #define SA_NOCLDSTOP  0x00000001 /* Don't send SIGCHLD when children stop.  */
+#define SA_NOCLDWAIT  0x00010000 /* Don't create zombie on child death.  */
 #define SA_SIGINFO    0x00000008 /* Invoke signal-catching function with
 				    three arguments instead of one.  */
 #if defined __USE_UNIX98 || defined __USE_MISC
diff --git a/sysdeps/unix/sysv/linux/sigstack.c b/sysdeps/unix/sysv/linux/sigstack.c
index ab66360c93..c08aab3151 100644
--- a/sysdeps/unix/sysv/linux/sigstack.c
+++ b/sysdeps/unix/sysv/linux/sigstack.c
@@ -1,5 +1,5 @@
 /* Emulate sigstack function using sigaltstack.
-   Copyright (C) 1998 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -26,7 +26,7 @@
 #ifdef __NR_sigaltstack
 int
 sigstack (ss, oss)
-     const struct sigstack *ss;
+     struct sigstack *ss;
      struct sigstack *oss;
 {
   stack_t sas;
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h b/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
index d00990569f..c8036b8406 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
@@ -1,5 +1,5 @@
 /* The proper definitions for Linux/SPARC sigaction.
-   Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 1999, 2000 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
@@ -53,6 +53,7 @@ struct sigaction
 
 /* Bits in `sa_flags'.  */
 #define	SA_NOCLDSTOP 0x00000008  /* Don't send SIGCHLD when children stop.  */
+#define SA_NOCLDWAIT 0x00000100  /* Don't create zombie on child death.  */
 #define SA_SIGINFO   0x00000200  /* Invoke signal-catching function with
 				    three arguments instead of one.  */
 #ifdef __USE_MISC
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/bits/siginfo.h b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/siginfo.h
new file mode 100644
index 0000000000..9426c13ee7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/siginfo.h
@@ -0,0 +1,293 @@
+/* siginfo_t, sigevent and constants.  Linux/SPARC version.
+   Copyright (C) 1997, 1998, 1999, 2000 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.  */
+
+#if !defined _SIGNAL_H && !defined __need_siginfo_t
+# error "Never include this file directly.  Use <signal.h> instead"
+#endif
+
+#include <bits/wordsize.h>
+
+#if (!defined __have_siginfo_t \
+     && (defined _SIGNAL_H || defined __need_siginfo_t))
+# define __have_siginfo_t	1
+
+/* Type for data associated with a signal.  */
+typedef union sigval
+  {
+    int sival_int;
+    void *sival_ptr;
+  } sigval_t;
+
+# define __SI_MAX_SIZE     128
+# if __WORDSIZE == 64
+#  define __SI_PAD_SIZE     ((__SI_MAX_SIZE / sizeof (int)) - 4)
+# else
+#  define __SI_PAD_SIZE     ((__SI_MAX_SIZE / sizeof (int)) - 3)
+# endif
+
+typedef struct siginfo
+  {
+    int si_signo;		/* Signal number.  */
+    int si_errno;		/* If non-zero, an errno value associated with
+				   this signal, as defined in <errno.h>.  */
+    int si_code;		/* Signal code.  */
+
+    union
+      {
+	int _pad[__SI_PAD_SIZE];
+
+	 /* kill().  */
+	struct
+	  {
+	    __pid_t si_pid;	/* Sending process ID.  */
+	    __uid_t si_uid;	/* Real user ID of sending process.  */
+	  } _kill;
+
+	/* POSIX.1b timers.  */
+	struct
+	  {
+	    unsigned int _timer1;
+	    unsigned int _timer2;
+	  } _timer;
+
+	/* POSIX.1b signals.  */
+	struct
+	  {
+	    __pid_t si_pid;	/* Sending process ID.  */
+	    __uid_t si_uid;	/* Real user ID of sending process.  */
+	    sigval_t si_sigval;	/* Signal value.  */
+	  } _rt;
+
+	/* SIGCHLD.  */
+	struct
+	  {
+	    __pid_t si_pid;	/* Which child.  */
+	    __uid_t si_uid;	/* Real user ID of sending process.  */
+	    int si_status;	/* Exit value or signal.  */
+	    __clock_t si_utime;
+	    __clock_t si_stime;
+	  } _sigchld;
+
+	/* SIGILL, SIGFPE, SIGSEGV, SIGBUS.  */
+	struct
+	  {
+	    void *si_addr;	/* Faulting insn/memory ref.  */
+	  } _sigfault;
+
+	/* SIGPOLL.  */
+	struct
+	  {
+	    int si_band;	/* Band event for SIGPOLL.  */
+	    int si_fd;
+	  } _sigpoll;
+      } _sifields;
+  } siginfo_t;
+
+
+/* X/Open requires some more fields with fixed names.  */
+# define si_pid		_sifields._kill.si_pid
+# define si_uid		_sifields._kill.si_uid
+# define si_timer1	_sifields._timer._timer1
+# define si_timer2	_sifields._timer._timer2
+# define si_status	_sifields._sigchld.si_status
+# define si_utime	_sifields._sigchld.si_utime
+# define si_stime	_sifields._sigchld.si_stime
+# define si_value	_sifields._rt.si_sigval
+# define si_int		_sifields._rt.si_sigval.sival_int
+# define si_ptr		_sifields._rt.si_sigval.sival_ptr
+# define si_addr	_sifields._sigfault.si_addr
+# define si_band	_sifields._sigpoll.si_band
+# define si_fd		_sifields._sigpoll.si_fd
+
+
+/* Values for `si_code'.  Positive values are reserved for kernel-generated
+   signals.  */
+enum
+{
+  SI_SIGIO = -5,		/* Sent by queued SIGIO. */
+# define SI_SIGIO	SI_SIGIO
+  SI_ASYNCIO,			/* Sent by AIO completion.  */
+# define SI_ASYNCIO	SI_ASYNCIO
+  SI_MESGQ,			/* Sent by real time mesq state change.  */
+# define SI_MESGQ	SI_MESGQ
+  SI_TIMER,			/* Sent by timer expiration.  */
+# define SI_TIMER	SI_TIMER
+  SI_QUEUE,			/* Sent by sigqueue.  */
+# define SI_QUEUE	SI_QUEUE
+  SI_USER,			/* Sent by kill, sigsend, raise.  */
+# define SI_USER	SI_USER
+  SI_KERNEL = 0x80		/* Send by kernel.  */
+#define SI_KERNEL	SI_KERNEL
+};
+
+
+/* `si_code' values for SIGILL signal.  */
+enum
+{
+  ILL_ILLOPC = 1,		/* Illegal opcode.  */
+# define ILL_ILLOPC	ILL_ILLOPC
+  ILL_ILLOPN,			/* Illegal operand.  */
+# define ILL_ILLOPN	ILL_ILLOPN
+  ILL_ILLADR,			/* Illegal addressing mode.  */
+# define ILL_ILLADR	ILL_ILLADR
+  ILL_ILLTRP,			/* Illegal trap. */
+# define ILL_ILLTRP	ILL_ILLTRP
+  ILL_PRVOPC,			/* Privileged opcode.  */
+# define ILL_PRVOPC	ILL_PRVOPC
+  ILL_PRVREG,			/* Privileged register.  */
+# define ILL_PRVREG	ILL_PRVREG
+  ILL_COPROC,			/* Coprocessor error.  */
+# define ILL_COPROC	ILL_COPROC
+  ILL_BADSTK			/* Internal stack error.  */
+# define ILL_BADSTK	ILL_BADSTK
+};
+
+/* `si_code' values for SIGFPE signal.  */
+enum
+{
+  FPE_INTDIV = 1,		/* Integer divide by zero.  */
+# define FPE_INTDIV	FPE_INTDIV
+  FPE_INTOVF,			/* Integer overflow.  */
+# define FPE_INTOVF	FPE_INTOVF
+  FPE_FLTDIV,			/* Floating point divide by zero.  */
+# define FPE_FLTDIV	FPE_FLTDIV
+  FPE_FLTOVF,			/* Floating point overflow.  */
+# define FPE_FLTOVF	FPE_FLTOVF
+  FPE_FLTUND,			/* Floating point underflow.  */
+# define FPE_FLTUND	FPE_FLTUND
+  FPE_FLTRES,			/* Floating point inexact result.  */
+# define FPE_FLTRES	FPE_FLTRES
+  FPE_FLTINV,			/* Floating point invalid operation.  */
+# define FPE_FLTINV	FPE_FLTINV
+  FPE_FLTSUB			/* Subscript out of range.  */
+# define FPE_FLTSUB	FPE_FLTSUB
+};
+
+/* `si_code' values for SIGSEGV signal.  */
+enum
+{
+  SEGV_MAPERR = 1,		/* Address not mapped to object.  */
+# define SEGV_MAPERR	SEGV_MAPERR
+  SEGV_ACCERR			/* Invalid permissions for mapped object.  */
+# define SEGV_ACCERR	SEGV_ACCERR
+};
+
+/* `si_code' values for SIGBUS signal.  */
+enum
+{
+  BUS_ADRALN = 1,		/* Invalid address alignment.  */
+# define BUS_ADRALN	BUS_ADRALN
+  BUS_ADRERR,			/* Non-existant physical address.  */
+# define BUS_ADRERR	BUS_ADRERR
+  BUS_OBJERR			/* Object specific hardware error.  */
+# define BUS_OBJERR	BUS_OBJERR
+};
+
+/* `si_code' values for SIGTRAP signal.  */
+enum
+{
+  TRAP_BRKPT = 1,		/* Process breakpoint.  */
+# define TRAP_BRKPT	TRAP_BRKPT
+  TRAP_TRACE			/* Process trace trap.  */
+# define TRAP_TRACE	TRAP_TRACE
+};
+
+/* `si_code' values for SIGCHLD signal.  */
+enum
+{
+  CLD_EXITED = 1,		/* Child has exited.  */
+# define CLD_EXITED	CLD_EXITED
+  CLD_KILLED,			/* Child was killed.  */
+# define CLD_KILLED	CLD_KILLED
+  CLD_DUMPED,			/* Child terminated abnormally.  */
+# define CLD_DUMPED	CLD_DUMPED
+  CLD_TRAPPED,			/* Traced child has trapped.  */
+# define CLD_TRAPPED	CLD_TRAPPED
+  CLD_STOPPED,			/* Child has stopped.  */
+# define CLD_STOPPED	CLD_STOPPED
+  CLD_CONTINUED			/* Stopped child has continued.  */
+# define CLD_CONTINUED	CLD_CONTINUED
+};
+
+/* `si_code' values for SIGPOLL signal.  */
+enum
+{
+  POLL_IN = 1,			/* Data input available.  */
+# define POLL_IN	POLL_IN
+  POLL_OUT,			/* Output buffers available.  */
+# define POLL_OUT	POLL_OUT
+  POLL_MSG,			/* Input message available.   */
+# define POLL_MSG	POLL_MSG
+  POLL_ERR,			/* I/O error.  */
+# define POLL_ERR	POLL_ERR
+  POLL_PRI,			/* High priority input available.  */
+# define POLL_PRI	POLL_PRI
+  POLL_HUP			/* Device disconnected.  */
+# define POLL_HUP	POLL_HUP
+};
+
+# undef __need_siginfo_t
+#endif	/* !have siginfo_t && (have _SIGNAL_H || need siginfo_t).  */
+
+
+#if defined _SIGNAL_H && !defined __have_sigevent_t
+# define __have_sigevent_t	1
+
+/* Structure to transport application-defined values with signals.  */
+# define __SIGEV_MAX_SIZE	64
+# if __WORDSIZE == 64
+#  define __SIGEV_PAD_SIZE	((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
+# else
+#  define __SIGEV_PAD_SIZE	((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
+# endif
+
+typedef struct sigevent
+  {
+    sigval_t sigev_value;
+    int sigev_signo;
+    int sigev_notify;
+
+    union
+      {
+	int _pad[__SIGEV_PAD_SIZE];
+
+	struct
+	  {
+	    void (*_function) (sigval_t);	  /* Function to start.  */
+	    void *_attribute;			  /* Really pthread_attr_t.  */
+	  } _sigev_thread;
+      } _sigev_un;
+  } sigevent_t;
+
+/* POSIX names to access some of the members.  */
+# define sigev_notify_function   _sigev_un._sigev_thread._function
+# define sigev_notify_attributes _sigev_un._sigev_thread._attribute
+
+/* `sigev_notify' values.  */
+enum
+{
+  SIGEV_SIGNAL = 0,		/* Notify via signal.  */
+# define SIGEV_SIGNAL	SIGEV_SIGNAL
+  SIGEV_NONE,			/* Other notification: meaningless.  */
+# define SIGEV_NONE	SIGEV_NONE
+  SIGEV_THREAD			/* Deliver via thread creation.  */
+# define SIGEV_THREAD	SIGEV_THREAD
+};
+
+#endif	/* have _SIGNAL_H.  */