about summary refs log tree commit diff
path: root/sysdeps/stub
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/stub')
-rw-r--r--sysdeps/stub/__longjmp.c9
-rw-r--r--sysdeps/stub/accept.c11
-rw-r--r--sysdeps/stub/access.c15
-rw-r--r--sysdeps/stub/acct.c8
-rw-r--r--sysdeps/stub/adjtime.c11
-rw-r--r--sysdeps/stub/alarm.c8
-rw-r--r--sysdeps/stub/bind.c9
-rw-r--r--sysdeps/stub/brk.c9
-rw-r--r--sysdeps/stub/chdir.c14
-rw-r--r--sysdeps/stub/chflags.c11
-rw-r--r--sysdeps/stub/chmod.c11
-rw-r--r--sysdeps/stub/chown.c13
-rw-r--r--sysdeps/stub/chroot.c8
-rw-r--r--sysdeps/stub/clock.c7
-rw-r--r--sysdeps/stub/close.c10
-rw-r--r--sysdeps/stub/closedir.c2
-rw-r--r--sysdeps/stub/connect.c9
-rw-r--r--sysdeps/stub/ctermid.c8
-rw-r--r--sysdeps/stub/cuserid.c8
-rw-r--r--sysdeps/stub/dirfd.c4
-rw-r--r--sysdeps/stub/dup.c8
-rw-r--r--sysdeps/stub/dup2.c11
-rw-r--r--sysdeps/stub/errnos.h4
-rw-r--r--sysdeps/stub/euidaccess.c6
-rw-r--r--sysdeps/stub/execve.c14
-rw-r--r--sysdeps/stub/fchdir.c8
-rw-r--r--sysdeps/stub/fchflags.c11
-rw-r--r--sysdeps/stub/fchmod.c11
-rw-r--r--sysdeps/stub/fchown.c13
-rw-r--r--sysdeps/stub/fcntl.c11
-rw-r--r--sysdeps/stub/fdopen.c9
-rw-r--r--sysdeps/stub/fexecve.c14
-rw-r--r--sysdeps/stub/flock.c10
-rw-r--r--sysdeps/stub/fork.c7
-rw-r--r--sysdeps/stub/fpathconf.c11
-rw-r--r--sysdeps/stub/fstatfs.c3
-rw-r--r--sysdeps/stub/fsync.c8
-rw-r--r--sysdeps/stub/ftruncate.c10
-rw-r--r--sysdeps/stub/fxstat.c8
-rw-r--r--sysdeps/stub/getcwd.c4
-rw-r--r--sysdeps/stub/getdents.c12
-rw-r--r--sysdeps/stub/getdomain.c10
-rw-r--r--sysdeps/stub/getdtsz.c7
-rw-r--r--sysdeps/stub/getegid.c7
-rw-r--r--sysdeps/stub/getenv.c10
-rw-r--r--sysdeps/stub/geteuid.c7
-rw-r--r--sysdeps/stub/getgid.c7
-rw-r--r--sysdeps/stub/getgroups.c9
-rw-r--r--sysdeps/stub/gethostid.c7
-rw-r--r--sysdeps/stub/gethostname.c10
-rw-r--r--sysdeps/stub/getitimer.c12
-rw-r--r--sysdeps/stub/getlogin.c7
-rw-r--r--sysdeps/stub/getlogin_r.c2
-rw-r--r--sysdeps/stub/getpagesize.c7
-rw-r--r--sysdeps/stub/getpeername.c11
-rw-r--r--sysdeps/stub/getpgid.c7
-rw-r--r--sysdeps/stub/getpid.c9
-rw-r--r--sysdeps/stub/getppid.c7
-rw-r--r--sysdeps/stub/getpriority.c10
-rw-r--r--sysdeps/stub/getrlimit.c2
-rw-r--r--sysdeps/stub/getrusage.c10
-rw-r--r--sysdeps/stub/getsid.c4
-rw-r--r--sysdeps/stub/getsockname.c11
-rw-r--r--sysdeps/stub/getsockopt.c14
-rw-r--r--sysdeps/stub/getsysstats.c8
-rw-r--r--sysdeps/stub/gettimeofday.c10
-rw-r--r--sysdeps/stub/getuid.c7
-rw-r--r--sysdeps/stub/gtty.c12
-rw-r--r--sysdeps/stub/ioctl.c10
-rw-r--r--sysdeps/stub/isatty.c8
-rw-r--r--sysdeps/stub/isfdtype.c3
-rw-r--r--sysdeps/stub/kill.c9
-rw-r--r--sysdeps/stub/killpg.c9
-rw-r--r--sysdeps/stub/libc-lock.h6
-rw-r--r--sysdeps/stub/link.c11
-rw-r--r--sysdeps/stub/listen.c10
-rw-r--r--sysdeps/stub/lseek.c14
-rw-r--r--sysdeps/stub/lxstat.c4
-rw-r--r--sysdeps/stub/madvise.c4
-rw-r--r--sysdeps/stub/mkdir.c11
-rw-r--r--sysdeps/stub/mkfifo.c11
-rw-r--r--sysdeps/stub/mkstemp.c12
-rw-r--r--sysdeps/stub/mktemp.c12
-rw-r--r--sysdeps/stub/mmap.c4
-rw-r--r--sysdeps/stub/morecore.c8
-rw-r--r--sysdeps/stub/mprotect.c2
-rw-r--r--sysdeps/stub/msgctl.c4
-rw-r--r--sysdeps/stub/msgget.c4
-rw-r--r--sysdeps/stub/msgrcv.c4
-rw-r--r--sysdeps/stub/msgsnd.c4
-rw-r--r--sysdeps/stub/msync.c2
-rw-r--r--sysdeps/stub/munmap.c4
-rw-r--r--sysdeps/stub/nanosleep.c2
-rw-r--r--sysdeps/stub/nice.c8
-rw-r--r--sysdeps/stub/nlist.c12
-rw-r--r--sysdeps/stub/open.c11
-rw-r--r--sysdeps/stub/opendir.c2
-rw-r--r--sysdeps/stub/pathconf.c9
-rw-r--r--sysdeps/stub/pause.c4
-rw-r--r--sysdeps/stub/pipe.c10
-rw-r--r--sysdeps/stub/pipestream.c18
-rw-r--r--sysdeps/stub/poll.c4
-rw-r--r--sysdeps/stub/profil.c4
-rw-r--r--sysdeps/stub/ptrace.c22
-rw-r--r--sysdeps/stub/putenv.c8
-rw-r--r--sysdeps/stub/raise.c8
-rw-r--r--sysdeps/stub/read.c15
-rw-r--r--sysdeps/stub/readdir.c2
-rw-r--r--sysdeps/stub/readlink.c11
-rw-r--r--sysdeps/stub/readv.c11
-rw-r--r--sysdeps/stub/reboot.c8
-rw-r--r--sysdeps/stub/recv.c12
-rw-r--r--sysdeps/stub/recvfrom.c15
-rw-r--r--sysdeps/stub/recvmsg.c11
-rw-r--r--sysdeps/stub/remove.c4
-rw-r--r--sysdeps/stub/rename.c15
-rw-r--r--sysdeps/stub/revoke.c4
-rw-r--r--sysdeps/stub/rewinddir.c8
-rw-r--r--sysdeps/stub/rmdir.c10
-rw-r--r--sysdeps/stub/sbrk.c12
-rw-r--r--sysdeps/stub/sched_getp.c2
-rw-r--r--sysdeps/stub/sched_gets.c2
-rw-r--r--sysdeps/stub/sched_primax.c2
-rw-r--r--sysdeps/stub/sched_primin.c2
-rw-r--r--sysdeps/stub/sched_rr_gi.c2
-rw-r--r--sysdeps/stub/sched_setp.c2
-rw-r--r--sysdeps/stub/sched_sets.c2
-rw-r--r--sysdeps/stub/sched_yield.c2
-rw-r--r--sysdeps/stub/seekdir.c11
-rw-r--r--sysdeps/stub/select.c14
-rw-r--r--sysdeps/stub/semctl.c4
-rw-r--r--sysdeps/stub/semget.c4
-rw-r--r--sysdeps/stub/semop.c4
-rw-r--r--sysdeps/stub/send.c12
-rw-r--r--sysdeps/stub/sendmsg.c11
-rw-r--r--sysdeps/stub/sendto.c13
-rw-r--r--sysdeps/stub/setdomain.c10
-rw-r--r--sysdeps/stub/setegid.c8
-rw-r--r--sysdeps/stub/setenv.c11
-rw-r--r--sysdeps/stub/seteuid.c8
-rw-r--r--sysdeps/stub/setgid.c8
-rw-r--r--sysdeps/stub/setgroups.c9
-rw-r--r--sysdeps/stub/sethostid.c8
-rw-r--r--sysdeps/stub/sethostname.c10
-rw-r--r--sysdeps/stub/setitimer.c14
-rw-r--r--sysdeps/stub/setjmp.c4
-rw-r--r--sysdeps/stub/setlogin.c8
-rw-r--r--sysdeps/stub/setpgid.c7
-rw-r--r--sysdeps/stub/setpriority.c11
-rw-r--r--sysdeps/stub/setregid.c10
-rw-r--r--sysdeps/stub/setreuid.c10
-rw-r--r--sysdeps/stub/setrlimit.c8
-rw-r--r--sysdeps/stub/setsid.c7
-rw-r--r--sysdeps/stub/setsockopt.c14
-rw-r--r--sysdeps/stub/settimeofday.c10
-rw-r--r--sysdeps/stub/setuid.c8
-rw-r--r--sysdeps/stub/shmat.c4
-rw-r--r--sysdeps/stub/shmctl.c4
-rw-r--r--sysdeps/stub/shmdt.c4
-rw-r--r--sysdeps/stub/shmget.c4
-rw-r--r--sysdeps/stub/shutdown.c10
-rw-r--r--sysdeps/stub/sigaction.c17
-rw-r--r--sysdeps/stub/sigaltstack.c10
-rw-r--r--sysdeps/stub/sigblock.c8
-rw-r--r--sysdeps/stub/sigintr.c10
-rw-r--r--sysdeps/stub/signal.c9
-rw-r--r--sysdeps/stub/sigpause.c8
-rw-r--r--sysdeps/stub/sigpending.c12
-rw-r--r--sysdeps/stub/sigprocmask.c13
-rw-r--r--sysdeps/stub/sigreturn.c8
-rw-r--r--sysdeps/stub/sigsetmask.c8
-rw-r--r--sysdeps/stub/sigstack.c10
-rw-r--r--sysdeps/stub/sigsuspend.c8
-rw-r--r--sysdeps/stub/sigvec.c11
-rw-r--r--sysdeps/stub/sleep.c8
-rw-r--r--sysdeps/stub/socket.c9
-rw-r--r--sysdeps/stub/socketpair.c10
-rw-r--r--sysdeps/stub/sstk.c12
-rw-r--r--sysdeps/stub/start.c3
-rw-r--r--sysdeps/stub/statfs.c3
-rw-r--r--sysdeps/stub/stime.c10
-rw-r--r--sysdeps/stub/stty.c12
-rw-r--r--sysdeps/stub/swapoff.c2
-rw-r--r--sysdeps/stub/swapon.c8
-rw-r--r--sysdeps/stub/symlink.c11
-rw-r--r--sysdeps/stub/sync.c7
-rw-r--r--sysdeps/stub/syscall.c8
-rw-r--r--sysdeps/stub/sysconf.c4
-rw-r--r--sysdeps/stub/sysd-stdio.c57
-rw-r--r--sysdeps/stub/system.c9
-rw-r--r--sysdeps/stub/tcdrain.c10
-rw-r--r--sysdeps/stub/tcflow.c13
-rw-r--r--sysdeps/stub/tcflush.c17
-rw-r--r--sysdeps/stub/tcgetattr.c20
-rw-r--r--sysdeps/stub/tcgetpgrp.c10
-rw-r--r--sysdeps/stub/tcsendbrk.c11
-rw-r--r--sysdeps/stub/tcsetattr.c24
-rw-r--r--sysdeps/stub/tcsetpgrp.c12
-rw-r--r--sysdeps/stub/telldir.c14
-rw-r--r--sysdeps/stub/tempname.c15
-rw-r--r--sysdeps/stub/time.c4
-rw-r--r--sysdeps/stub/times.c10
-rw-r--r--sysdeps/stub/truncate.c10
-rw-r--r--sysdeps/stub/ttyname.c8
-rw-r--r--sysdeps/stub/ttyname_r.c4
-rw-r--r--sysdeps/stub/ualarm.c10
-rw-r--r--sysdeps/stub/ulimit.c4
-rw-r--r--sysdeps/stub/umask.c8
-rw-r--r--sysdeps/stub/unlink.c14
-rw-r--r--sysdeps/stub/usleep.c8
-rw-r--r--sysdeps/stub/ustat.c2
-rw-r--r--sysdeps/stub/utime.c15
-rw-r--r--sysdeps/stub/utimes.c12
-rw-r--r--sysdeps/stub/vhangup.c7
-rw-r--r--sysdeps/stub/wait.c8
-rw-r--r--sysdeps/stub/wait3.c13
-rw-r--r--sysdeps/stub/wait4.c13
-rw-r--r--sysdeps/stub/waitpid.c15
-rw-r--r--sysdeps/stub/write.c15
-rw-r--r--sysdeps/stub/writev.c11
-rw-r--r--sysdeps/stub/xmknod.c4
-rw-r--r--sysdeps/stub/xstat.c4
222 files changed, 1022 insertions, 958 deletions
diff --git a/sysdeps/stub/__longjmp.c b/sysdeps/stub/__longjmp.c
index d7f38f974b..ec74f776d9 100644
--- a/sysdeps/stub/__longjmp.c
+++ b/sysdeps/stub/__longjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <setjmp.h>
 
@@ -25,12 +24,14 @@ Cambridge, MA 02139, USA.  */
    setjmp call there to return VAL, or 1 if VAL is 0.  */
 __NORETURN
 void
-DEFUN(__longjmp, (env, val), CONST __jmp_buf env AND int val)
+__longjmp (env, val)
+     const __jmp_buf env;
+     int val;
 {
   if (val == 0)
     val = 1;
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   /* No way to signal failure.	*/
 }
 
diff --git a/sysdeps/stub/accept.c b/sysdeps/stub/accept.c
index 429f2aaefb..e9a774c026 100644
--- a/sysdeps/stub/accept.c
+++ b/sysdeps/stub/accept.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/socket.h>
 
@@ -26,10 +25,12 @@ Cambridge, MA 02139, USA.  */
    peer and *ADDR_LEN to the address's actual length, and return the
    new socket's descriptor, or -1 for errors.  */
 int
-DEFUN(accept, (fd, addr, addr_len),
-      int fd AND struct sockaddr *addr AND size_t *addr_len)
+accept (fd, addr, addr_len)
+     int fd;
+     struct sockaddr *addr;
+     size_t *addr_len;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/access.c b/sysdeps/stub/access.c
index 06ddbb5c12..6779ea0606 100644
--- a/sysdeps/stub/access.c
+++ b/sysdeps/stub/access.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,23 +16,24 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <unistd.h>
 
 /* Test for access to FILE.  */
 int
-DEFUN(__access, (file, type), CONST char *file AND int type)
+__access (file, type)
+     const char *file;
+     int type;
 {
   if (file == NULL || (type & ~(R_OK|W_OK|X_OK|F_OK)) != 0)
     {
-      errno = EINVAL;
-      return(-1);
+      __set_errno (EINVAL);
+      return -1;
     }
 
-  errno = ENOSYS;
-  return(-1);
+  __set_errno (ENOSYS);
+  return -1;
 }
 stub_warning (access)
 
diff --git a/sysdeps/stub/acct.c b/sysdeps/stub/acct.c
index 1b547f3ec4..0bed4d99f0 100644
--- a/sysdeps/stub/acct.c
+++ b/sysdeps/stub/acct.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
@@ -24,9 +23,10 @@ Cambridge, MA 02139, USA.  */
    a record for each process as it terminates, to this file.  If NAME is NULL,
    turn accounting off.  This call is restricted to the super-user.  */
 int
-DEFUN(acct, (name), CONST char *name)
+acct (name)
+     const char *name;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/adjtime.c b/sysdeps/stub/adjtime.c
index 933e2ef7a3..3496121a17 100644
--- a/sysdeps/stub/adjtime.c
+++ b/sysdeps/stub/adjtime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/time.h>
 
@@ -25,11 +24,11 @@ Cambridge, MA 02139, USA.  */
    of time adjustment remaining to be done from the last `__adjtime' call.
    This call is restricted to the super-user.  */
 int
-DEFUN(__adjtime, (delta, olddelta),
-      CONST struct timeval *delta AND
-      struct timeval *olddelta)
+__adjtime (delta, olddelta)
+     const struct timeval *delta;
+     struct timeval *olddelta;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (adjtime)
diff --git a/sysdeps/stub/alarm.c b/sysdeps/stub/alarm.c
index 78cf673e71..9c4e71fc2d 100644
--- a/sysdeps/stub/alarm.c
+++ b/sysdeps/stub/alarm.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
@@ -28,9 +27,10 @@ Cambridge, MA 02139, USA.  */
    to 0 and check its value after calling `alarm', and this might tell you.
    The signal may come late due to processor scheduling.  */
 unsigned int
-DEFUN(alarm, (seconds), unsigned int seconds)
+alarm (seconds)
+     unsigned int seconds;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return 0;
 }
 
diff --git a/sysdeps/stub/bind.c b/sysdeps/stub/bind.c
index 38ad46aa87..7f4d8145b8 100644
--- a/sysdeps/stub/bind.c
+++ b/sysdeps/stub/bind.c
@@ -16,16 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/socket.h>
 
 /* Give the socket FD the local address ADDR (which is LEN bytes long).  */
 int
-DEFUN(bind, (fd, addr, len),
-      int fd AND const struct sockaddr *addr AND size_t len)
+bind (fd, addr, len)
+     int fd;
+     const struct sockaddr *addr;
+     size_t len;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/brk.c b/sysdeps/stub/brk.c
index 3a48ea2e17..a4ebbf01f7 100644
--- a/sysdeps/stub/brk.c
+++ b/sysdeps/stub/brk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,15 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
+#include <unistd.h>
 
 /* Set the end of the process's data space to ADDR.
    Return 0 if successful, -1 if not.  */
 int
-DEFUN(__brk, (addr), PTR addr)
+__brk (addr)
+     void *addr;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (brk)
diff --git a/sysdeps/stub/chdir.c b/sysdeps/stub/chdir.c
index f73c98142a..7e5d825d3a 100644
--- a/sysdeps/stub/chdir.c
+++ b/sysdeps/stub/chdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,23 +16,23 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <unistd.h>
 
 /* Change the current directory to PATH.  */
 int
-DEFUN(__chdir, (path), CONST char *path)
+__chdir (path)
+     const char *path;
 {
   if (path == NULL)
     {
-      errno = EINVAL;
-      return(-1);
+      __set_errno (EINVAL);
+      return -1;
     }
 
-  errno = ENOSYS;
-  return(-1);
+  __set_errno (ENOSYS);
+  return -1;
 }
 stub_warning (chdir)
 
diff --git a/sysdeps/stub/chflags.c b/sysdeps/stub/chflags.c
index a906e1b323..9380108283 100644
--- a/sysdeps/stub/chflags.c
+++ b/sysdeps/stub/chflags.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,22 +16,23 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <sys/stat.h>
 
 /* Change the flags of FILE to FLAGS.  */
 int
-DEFUN(chflags, (file, flags), CONST char *file AND int flags)
+chflags (file, flags)
+     const char *file;
+     int flags;
 {
   if (file == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/chmod.c b/sysdeps/stub/chmod.c
index 3259d3e121..e76566cb83 100644
--- a/sysdeps/stub/chmod.c
+++ b/sysdeps/stub/chmod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <sys/stat.h>
@@ -24,15 +23,17 @@ Cambridge, MA 02139, USA.  */
 
 /* Change the protections of FILE to MODE.  */
 int
-DEFUN(__chmod, (file, mode), CONST char *file AND mode_t mode)
+__chmod (file, mode)
+     const char *file;
+     mode_t mode;
 {
   if (file == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (chmod)
diff --git a/sysdeps/stub/chown.c b/sysdeps/stub/chown.c
index e9db1ed86f..32dd189145 100644
--- a/sysdeps/stub/chown.c
+++ b/sysdeps/stub/chown.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <unistd.h>
@@ -24,16 +23,18 @@ Cambridge, MA 02139, USA.  */
 
 /* Change the owner and group of FILE.  */
 int
-DEFUN(__chown, (file, owner, group),
-      CONST char *file AND uid_t owner AND gid_t group)
+__chown (file, owner, group)
+     const char *file;
+     uid_t owner;
+     gid_t group;
 {
   if (file == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (chown)
diff --git a/sysdeps/stub/chroot.c b/sysdeps/stub/chroot.c
index a18d349329..f77010b66e 100644
--- a/sysdeps/stub/chroot.c
+++ b/sysdeps/stub/chroot.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
 /* Make PATH be the root directory (the starting point for absolute paths).
    This call is restricted to the super-user.  */
 int
-DEFUN(chroot, (path), CONST char *path)
+chroot (path)
+     const char *path;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/clock.c b/sysdeps/stub/clock.c
index c22192bd86..b0df84a94b 100644
--- a/sysdeps/stub/clock.c
+++ b/sysdeps/stub/clock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <sys/times.h>
 #include <time.h>
 #include <errno.h>
 
 /* Return the time used by the program so far (user time + system time).  */
 clock_t
-DEFUN_VOID(clock)
+clock ()
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return (clock_t) -1;
 }
 
diff --git a/sysdeps/stub/close.c b/sysdeps/stub/close.c
index efa80a708d..9374990c09 100644
--- a/sysdeps/stub/close.c
+++ b/sysdeps/stub/close.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,21 +16,21 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
 /* Close the file descriptor FD.  */
 int
-DEFUN(__close, (fd), int fd)
+__close (fd)
+     int fd;
 {
   if (fd < 0)
     {
-      errno = EBADF;
+      __set_errno (EBADF);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (close)
diff --git a/sysdeps/stub/closedir.c b/sysdeps/stub/closedir.c
index 5fb2ed3e7d..20735563bb 100644
--- a/sysdeps/stub/closedir.c
+++ b/sysdeps/stub/closedir.c
@@ -26,7 +26,7 @@ Cambridge, MA 02139, USA.  */
 int
 __closedir (DIR *dirp)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 weak_alias (__closedir, closedir)
diff --git a/sysdeps/stub/connect.c b/sysdeps/stub/connect.c
index 49300f3a09..0d642cbcea 100644
--- a/sysdeps/stub/connect.c
+++ b/sysdeps/stub/connect.c
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/socket.h>
 
@@ -25,10 +24,12 @@ Cambridge, MA 02139, USA.  */
    and the only address from which to accept transmissions.
    Return 0 on success, -1 for errors.  */
 int
-DEFUN(connect, (fd, addr, len),
-      int fd AND const struct sockaddr *addr AND size_t len)
+connect (fd, addr, len)
+     int fd;
+     const struct sockaddr *addr;
+     size_t len;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/ctermid.c b/sysdeps/stub/ctermid.c
index 1025d686d7..5504c4745e 100644
--- a/sysdeps/stub/ctermid.c
+++ b/sysdeps/stub/ctermid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stdio.h>
 
@@ -25,9 +24,10 @@ Cambridge, MA 02139, USA.  */
    If S is not NULL, the name is copied into it (it should be at
    least L_ctermid bytes long), otherwise a static buffer is used.  */
 char *
-DEFUN(ctermid, (s), char *s)
+ctermid (s)
+     char *s;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return NULL;
 }
 
diff --git a/sysdeps/stub/cuserid.c b/sysdeps/stub/cuserid.c
index 655ddaf2a5..9d92b5449c 100644
--- a/sysdeps/stub/cuserid.c
+++ b/sysdeps/stub/cuserid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <stdio.h>
 #include <errno.h>
 
@@ -24,9 +23,10 @@ Cambridge, MA 02139, USA.  */
    If S is not NULL, it points to a buffer of at least L_cuserid bytes
    into which the name is copied; otherwise, a static buffer is used.  */
 char *
-DEFUN(cuserid, (s), char *s)
+cuserid (s)
+     char *s;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return NULL;
 }
 
diff --git a/sysdeps/stub/dirfd.c b/sysdeps/stub/dirfd.c
index 9ec19696f3..06707cdd60 100644
--- a/sysdeps/stub/dirfd.c
+++ b/sysdeps/stub/dirfd.c
@@ -1,5 +1,5 @@
 /* dirfd -- Return the file desciptor used by a DIR stream.  Stub version.
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 1996 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
@@ -25,7 +25,7 @@ int
 dirfd (dirp)
      FILE *dirp;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/dup.c b/sysdeps/stub/dup.c
index f15a1bef3b..6c0f63e6e3 100644
--- a/sysdeps/stub/dup.c
+++ b/sysdeps/stub/dup.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <unistd.h>
 
 /* Duplicate FD, returning a new file descriptor open on the same file.  */
 int
-DEFUN(__dup, (fd), int fd)
+__dup (fd)
+     int fd;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (dup)
diff --git a/sysdeps/stub/dup2.c b/sysdeps/stub/dup2.c
index a0f7aad47d..dd37b28892 100644
--- a/sysdeps/stub/dup2.c
+++ b/sysdeps/stub/dup2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <unistd.h>
@@ -25,11 +24,13 @@ Cambridge, MA 02139, USA.  */
 /* Duplicate FD to FD2, closing the old FD2 and making FD2 be
    open the same file as FD is.  Return FD2 or -1.  */
 int
-DEFUN(__dup2, (fd, fd2), int fd AND int fd2)
+__dup2 (fd, fd2)
+     int fd;
+     int fd2;
 {
   if (fd < 0 || fd2 < 0)
     {
-      errno = EBADF;
+      __set_errno (EBADF);
       return -1;
     }
 
@@ -37,7 +38,7 @@ DEFUN(__dup2, (fd, fd2), int fd AND int fd2)
     /* No way to check that they are valid.  */
     return fd2;
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (dup2)
diff --git a/sysdeps/stub/errnos.h b/sysdeps/stub/errnos.h
index 11708086bf..0a0f80a19d 100644
--- a/sysdeps/stub/errnos.h
+++ b/sysdeps/stub/errnos.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1996 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
@@ -36,3 +36,5 @@ Cambridge, MA 02139, USA.  */
 #define ENFILE  9
 #define EMFILE  10
 #endif
+
+#define __set_errno(val) errno = (val)
diff --git a/sysdeps/stub/euidaccess.c b/sysdeps/stub/euidaccess.c
index 1769e0dd17..79296a77f4 100644
--- a/sysdeps/stub/euidaccess.c
+++ b/sysdeps/stub/euidaccess.c
@@ -1,5 +1,5 @@
 /* Test for access to FILE using effective UID and GID.  Stub version.
-Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+Copyright (C) 1991, 1995, 1996 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
@@ -28,11 +28,11 @@ euidaccess (file, type)
 {
   if (file == NULL || (type & ~(R_OK|W_OK|X_OK|F_OK)) != 0)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (euidaccess)
diff --git a/sysdeps/stub/execve.c b/sysdeps/stub/execve.c
index 680d23757e..61a5df3015 100644
--- a/sysdeps/stub/execve.c
+++ b/sysdeps/stub/execve.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <unistd.h>
@@ -25,17 +24,18 @@ Cambridge, MA 02139, USA.  */
 /* Replace the current process, executing PATH with arguments ARGV and
    environment ENVP.  ARGV and ENVP are terminated by NULL pointers.  */
 int
-DEFUN(__execve, (path, argv, envp),
-      CONST char *path AND
-      char *CONST argv[] AND char *CONST envp[])
+__execve (path, argv, envp)
+     const char *path;
+     char *const argv[];
+     char *const envp[];
 {
   if (path == NULL || argv == NULL || envp == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (execve)
diff --git a/sysdeps/stub/fchdir.c b/sysdeps/stub/fchdir.c
index ba36ed626a..8eb7700361 100644
--- a/sysdeps/stub/fchdir.c
+++ b/sysdeps/stub/fchdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <unistd.h>
 
 /* Change the current directory to FD.  */
 int
-DEFUN(fchdir, (fd), int fd)
+fchdir (fd)
+     int fd;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS(;
   return -1;
 }
 
diff --git a/sysdeps/stub/fchflags.c b/sysdeps/stub/fchflags.c
index e9640d2375..4f59ad3480 100644
--- a/sysdeps/stub/fchflags.c
+++ b/sysdeps/stub/fchflags.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,22 +16,23 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <sys/stat.h>
 
 /* Change the flags of the file FD refers to to FLAGS.  */
 int
-DEFUN(fchflags, (fd, flags), int fd AND int flags)
+fchflags (fd, flags)
+     int fd;
+     int flags;
 {
   if (fd < 0)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/fchmod.c b/sysdeps/stub/fchmod.c
index 43d4919c9b..f8c5c80214 100644
--- a/sysdeps/stub/fchmod.c
+++ b/sysdeps/stub/fchmod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <sys/stat.h>
@@ -24,15 +23,17 @@ Cambridge, MA 02139, USA.  */
 
 /* Change the protections of the file FD refers to to MODE.  */
 int
-DEFUN(__fchmod, (fd, mode), int fd AND mode_t mode)
+__fchmod (fd, mode)
+     int fd;
+     mode_t mode;
 {
   if (fd < 0)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL(;
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (fchmod)
diff --git a/sysdeps/stub/fchown.c b/sysdeps/stub/fchown.c
index 4af1d0d429..16f7f11a06 100644
--- a/sysdeps/stub/fchown.c
+++ b/sysdeps/stub/fchown.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <unistd.h>
@@ -24,16 +23,18 @@ Cambridge, MA 02139, USA.  */
 
 /* Change the owner and group of the file referred to by FD.  */
 int
-DEFUN(__fchown, (fd, owner, group),
-      int fd AND uid_t owner AND gid_t group)
+__fchown (fd, owner, group)
+     int fd;
+     uid_t owner;
+     gid_t group;
 {
   if (fd < 0)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (fchown)
diff --git a/sysdeps/stub/fcntl.c b/sysdeps/stub/fcntl.c
index e35021a496..21839aab5a 100644
--- a/sysdeps/stub/fcntl.c
+++ b/sysdeps/stub/fcntl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,21 +16,22 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <fcntl.h>
 
 /* Perform file control operations on FD.  */
 int
-DEFUN(__fcntl, (fd, cmd), int fd AND int cmd DOTS)
+__fcntl (fd, cmd)
+     int fd;
+     int cmd;
 {
   if (fd < 0)
     {
-      errno = EBADF;
+      __set_errno (EBADF);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (fcntl)
diff --git a/sysdeps/stub/fdopen.c b/sysdeps/stub/fdopen.c
index 4ab921bfd1..3ce07395e2 100644
--- a/sysdeps/stub/fdopen.c
+++ b/sysdeps/stub/fdopen.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,15 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stdio.h>
 
 /* Open a new stream on a given system file descriptor.  */
 FILE *
-DEFUN(fdopen, (fd, mode), int fd AND CONST char *mode)
+fdopen (fd, mode)
+     int fd;
+     const char *mode;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return NULL;
 }
 
diff --git a/sysdeps/stub/fexecve.c b/sysdeps/stub/fexecve.c
index c0990f510c..0772ed5da5 100644
--- a/sysdeps/stub/fexecve.c
+++ b/sysdeps/stub/fexecve.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <unistd.h>
@@ -25,17 +24,18 @@ Cambridge, MA 02139, USA.  */
 /* Execute the file FD refers to, overlaying the running program image.
    ARGV and ENVP are passed to the new program, as for `execve'.  */
 int
-DEFUN(fexecve, (fd, argv, envp),
-      int fd AND
-      char *CONST argv[] AND char *CONST envp[])
+fexecve (fd, argv, envp)
+     int fd;
+     char *const argv[];
+     char *const envp[];
 {
   if (fd < 0 || argv == NULL || envp == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/flock.c b/sysdeps/stub/flock.c
index bdd7858393..d74f8264a7 100644
--- a/sysdeps/stub/flock.c
+++ b/sysdeps/stub/flock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,17 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/file.h>
 
 /* Apply or remove an advisory lock, according to OPERATION,
    on the file FD refers to.  */
 int
-DEFUN(__flock, (fd, operation),
-      int fd AND int operation)
+__flock (fd, operation)
+     int fd;
+     int operation;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/fork.c b/sysdeps/stub/fork.c
index 0b0b63afd0..ffb95e7b13 100644
--- a/sysdeps/stub/fork.c
+++ b/sysdeps/stub/fork.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
@@ -25,9 +24,9 @@ Cambridge, MA 02139, USA.  */
    Return -1 for errors, 0 to the new process,
    and the process ID of the new process to the old process.  */
 int
-DEFUN_VOID(__fork)
+__fork ()
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (fork)
diff --git a/sysdeps/stub/fpathconf.c b/sysdeps/stub/fpathconf.c
index 75880fd647..36b1369dad 100644
--- a/sysdeps/stub/fpathconf.c
+++ b/sysdeps/stub/fpathconf.c
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <unistd.h>
@@ -24,18 +23,20 @@ Cambridge, MA 02139, USA.  */
 
 /* Get file-specific information about descriptor FD.  */
 long int
-DEFUN(__fpathconf, (fd, name), int fd AND int name)
+__fpathconf (fd, name)
+     int fd;
+     int name;
 {
   if (fd < 0)
     {
-      errno = EBADF;
+      __set_errno (EBADF);
       return -1;
     }
 
   switch (name)
     {
     default:
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
 
     case _PC_LINK_MAX:
@@ -51,7 +52,7 @@ DEFUN(__fpathconf, (fd, name), int fd AND int name)
       break;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/fstatfs.c b/sysdeps/stub/fstatfs.c
index 5ef5ccd1b9..9bc09000bf 100644
--- a/sysdeps/stub/fstatfs.c
+++ b/sysdeps/stub/fstatfs.c
@@ -25,10 +25,9 @@ Cambridge, MA 02139, USA.  */
 int
 __fstatfs (int fd, struct statfs *buf)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (statfs)
 
 weak_alias (__fstatfs, fstatfs)
-
diff --git a/sysdeps/stub/fsync.c b/sysdeps/stub/fsync.c
index 84780da828..6091159d5c 100644
--- a/sysdeps/stub/fsync.c
+++ b/sysdeps/stub/fsync.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,15 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
 /* Make all changes done to FD actually appear on disk.  */
 int
-DEFUN(fsync, (fd), int fd)
+fsync (fd)
+     int fd;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/ftruncate.c b/sysdeps/stub/ftruncate.c
index f9474dd4e2..75d6bbc7df 100644
--- a/sysdeps/stub/ftruncate.c
+++ b/sysdeps/stub/ftruncate.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <sys/types.h>
 #include <errno.h>
 
 /* Truncate the file FD refers to to LENGTH bytes.  */
 int
-DEFUN(ftruncate, (fd, length),
-      int fd AND off_t length)
+ftruncate (fd, length)
+     int fd;
+     off_t length;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/fxstat.c b/sysdeps/stub/fxstat.c
index 7c1eeff2cb..4318a08ecb 100644
--- a/sysdeps/stub/fxstat.c
+++ b/sysdeps/stub/fxstat.c
@@ -26,22 +26,22 @@ __fxstat (int vers, int fd, struct stat *buf)
 {
   if (vers != _STAT_VER)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
   if (fd < 0)
     {
-      errno = EBADF;
+      __set_errno (EBADF);
       return -1;
     }
   else if (buf == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (__fxstat)
diff --git a/sysdeps/stub/getcwd.c b/sysdeps/stub/getcwd.c
index 2aca49091e..4318b5b65e 100644
--- a/sysdeps/stub/getcwd.c
+++ b/sysdeps/stub/getcwd.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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,7 +30,7 @@ Cambridge, MA 02139, USA.  */
 char *
 __getcwd (char *buf, size_t size)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return NULL;
 }
 weak_alias (__getcwd, getcwd)
diff --git a/sysdeps/stub/getdents.c b/sysdeps/stub/getdents.c
index 8cf890a4aa..6e7793a72c 100644
--- a/sysdeps/stub/getdents.c
+++ b/sysdeps/stub/getdents.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,18 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <stddef.h>
 #include <errno.h>
 #include <sys/types.h>
 
 int
-DEFUN(__getdirentries, (fd, buf, nbytes, basep),
-      int fd AND char *buf AND size_t nbytes AND off_t *basep)
+__getdirentries (fd, buf, nbytes, basep)
+     int fd;
+     char *buf;
+     size_t nbytes;
+     off_t *basep;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (getdirentries)
diff --git a/sysdeps/stub/getdomain.c b/sysdeps/stub/getdomain.c
index c2159df012..5156bbd445 100644
--- a/sysdeps/stub/getdomain.c
+++ b/sysdeps/stub/getdomain.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
@@ -24,10 +23,11 @@ Cambridge, MA 02139, USA.  */
    The result is null-terminated if LEN is large enough for the full
    name and the terminator.  */
 int
-DEFUN(getdomainname, (name, len),
-      char *name AND size_t len)
+getdomainname (name, len)
+     char *name;
+     size_t len;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/getdtsz.c b/sysdeps/stub/getdtsz.c
index e9c9b61ba6..cf3dd916be 100644
--- a/sysdeps/stub/getdtsz.c
+++ b/sysdeps/stub/getdtsz.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
 /* Return the maximum number of file descriptors
    the current process could possibly have.  */
 int
-DEFUN_VOID(__getdtablesize)
+__getdtablesize ()
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (getdtablesize)
diff --git a/sysdeps/stub/getegid.c b/sysdeps/stub/getegid.c
index 6e4e611e59..cbba8e44c5 100644
--- a/sysdeps/stub/getegid.c
+++ b/sysdeps/stub/getegid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,15 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
 /* Get the effective group ID of the calling process.  */
 __gid_t
-DEFUN_VOID(__getegid)
+__getegid ()
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (getegid)
diff --git a/sysdeps/stub/getenv.c b/sysdeps/stub/getenv.c
index a53e25bd96..fab9f08c75 100644
--- a/sysdeps/stub/getenv.c
+++ b/sysdeps/stub/getenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stdlib.h>
 
 /* Return the value of the environment variable NAME.  */
 char *
-DEFUN(getenv, (name), CONST char *name)
+getenv (name)
+     const char *name;
 {
-  errno = ENOSYS;
-  return(NULL);
+  __set_errno (ENOSYS);
+  return NULL;
 }
 
 
diff --git a/sysdeps/stub/geteuid.c b/sysdeps/stub/geteuid.c
index f5f437576c..7c470fa1db 100644
--- a/sysdeps/stub/geteuid.c
+++ b/sysdeps/stub/geteuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,16 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
 
 /* Get the effective user ID of the calling process.  */
 __uid_t
-DEFUN_VOID(__geteuid)
+__geteuid ()
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (geteuid)
diff --git a/sysdeps/stub/getgid.c b/sysdeps/stub/getgid.c
index f2bfa7696a..a4e7204c16 100644
--- a/sysdeps/stub/getgid.c
+++ b/sysdeps/stub/getgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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
@@ -16,16 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 #include <sys/types.h>
 
 /* Get the real group ID of the calling process.  */
 gid_t
-DEFUN_VOID(__getgid)
+__getgid ()
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (getgid)
diff --git a/sysdeps/stub/getgroups.c b/sysdeps/stub/getgroups.c
index f98d966346..7d766d7639 100644
--- a/sysdeps/stub/getgroups.c
+++ b/sysdeps/stub/getgroups.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <unistd.h>
@@ -28,14 +27,16 @@ Cambridge, MA 02139, USA.  */
    the calling process is in.  Otherwise, fill in the group IDs
    of its supplementary groups in LIST and return the number written.  */
 int
-DEFUN(__getgroups, (size, list), int size AND gid_t *list)
+__getgroups (size, list)
+     int size;
+     gid_t *list;
 {
 #if defined (NGROUPS_MAX) && NGROUPS_MAX == 0
   /* The system has no supplementary groups.  */
   return 0;
 #endif
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/gethostid.c b/sysdeps/stub/gethostid.c
index 8ff3827f51..83c5755100 100644
--- a/sysdeps/stub/gethostid.c
+++ b/sysdeps/stub/gethostid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,15 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
 /* Return the current machine's Internet number.  */
 long int
-DEFUN_VOID(gethostid)
+gethostid ()
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1L;
 }
 
diff --git a/sysdeps/stub/gethostname.c b/sysdeps/stub/gethostname.c
index 1cf3c7bf26..d815f2da0e 100644
--- a/sysdeps/stub/gethostname.c
+++ b/sysdeps/stub/gethostname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
@@ -24,10 +23,11 @@ Cambridge, MA 02139, USA.  */
    The result is null-terminated if LEN is large enough for the full
    name and the terminator.  */
 int
-DEFUN(__gethostname, (name, len),
-      char *name AND size_t len)
+__gethostname (name, len)
+     char *name;
+     size_t len;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (gethostname)
diff --git a/sysdeps/stub/getitimer.c b/sysdeps/stub/getitimer.c
index 75b5488e0e..77b4ebd4ed 100644
--- a/sysdeps/stub/getitimer.c
+++ b/sysdeps/stub/getitimer.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <stddef.h>
 #include <errno.h>
 #include <sys/time.h>
@@ -24,16 +23,17 @@ Cambridge, MA 02139, USA.  */
 /* Set *VALUE to the current setting of timer WHICH.
    Return 0 on success, -1 on errors.  */
 int
-DEFUN(__getitimer, (which, value),
-      enum __itimer_which which AND struct itimerval *value)
+__getitimer (which, value)
+     enum __itimer_which which;
+     struct itimerval *value;
 {
   if (value == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (getitimer)
diff --git a/sysdeps/stub/getlogin.c b/sysdeps/stub/getlogin.c
index d350bfb843..484c159855 100644
--- a/sysdeps/stub/getlogin.c
+++ b/sysdeps/stub/getlogin.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <stddef.h>
 #include <errno.h>
 #include <unistd.h>
@@ -24,9 +23,9 @@ Cambridge, MA 02139, USA.  */
 /* Return the login name of the user, or NULL if it can't be determined.
    The returned pointer, if not NULL, is good only until the next call.  */
 char *
-DEFUN_VOID(getlogin)
+getlogin ()
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return NULL;
 }
 
diff --git a/sysdeps/stub/getlogin_r.c b/sysdeps/stub/getlogin_r.c
index bf29c7c982..fa9bb75d41 100644
--- a/sysdeps/stub/getlogin_r.c
+++ b/sysdeps/stub/getlogin_r.c
@@ -28,7 +28,7 @@ getlogin_r (name, name_len)
      char *name;
      size_t name_len;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return errno;
 }
 
diff --git a/sysdeps/stub/getpagesize.c b/sysdeps/stub/getpagesize.c
index 1ee441513d..2c55df1a15 100644
--- a/sysdeps/stub/getpagesize.c
+++ b/sysdeps/stub/getpagesize.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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
@@ -16,15 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 
 /* Return the system page size.  */
 size_t
-DEFUN_VOID(__getpagesize)
+__getpagesize ()
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return 0;
 }
 stub_warning (getpagesize)
diff --git a/sysdeps/stub/getpeername.c b/sysdeps/stub/getpeername.c
index 79497ca8aa..85256ad7ed 100644
--- a/sysdeps/stub/getpeername.c
+++ b/sysdeps/stub/getpeername.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,18 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/socket.h>
 
 /* Put the address of the peer connected to socket FD into *ADDR
    (which is *LEN bytes long), and its actual length into *LEN.  */
 int
-DEFUN(getpeername, (fd, addr, len),
-      int fd AND struct sockaddr *addr AND size_t *len)
+getpeername (fd, addr, len)
+     int fd;
+     struct sockaddr *addr;
+     size_t *len;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/getpgid.c b/sysdeps/stub/getpgid.c
index 44efc12c10..e6cada2fda 100644
--- a/sysdeps/stub/getpgid.c
+++ b/sysdeps/stub/getpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,14 +16,13 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
-#include <errno.h>
 #include <unistd.h>
 #include <sys/types.h>
 
 /* Get the process group ID of process PID.  */
 int
-DEFUN(__getpgid, (pid), pid_t pid)
+__getpgid (pid)
+     pid_t pid;
 {
   return pid;
 }
diff --git a/sysdeps/stub/getpid.c b/sysdeps/stub/getpid.c
index 270c90947b..c2926b10a5 100644
--- a/sysdeps/stub/getpid.c
+++ b/sysdeps/stub/getpid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
 
 /* Get the process ID of the calling process.  */
 int
-DEFUN_VOID(__getpid)
+__getpid ()
 {
-  errno = ENOSYS;
-  return(-1);
+  __set_errno (ENOSYS);
+  return -1;
 }
 stub_warning (getpid)
 
diff --git a/sysdeps/stub/getppid.c b/sysdeps/stub/getppid.c
index d6547c709b..e5cc73f575 100644
--- a/sysdeps/stub/getppid.c
+++ b/sysdeps/stub/getppid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
 
 /* Get the parent process ID of the calling process.  */
 int
-DEFUN_VOID(__getppid)
+__getppid ()
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (getppid)
diff --git a/sysdeps/stub/getpriority.c b/sysdeps/stub/getpriority.c
index eb6b43d834..599fed2478 100644
--- a/sysdeps/stub/getpriority.c
+++ b/sysdeps/stub/getpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/resource.h>
 
@@ -25,10 +24,11 @@ Cambridge, MA 02139, USA.  */
    or user (as specified by WHO) is used.  A lower priority number means higher
    priority.  Priorities range from PRIO_MIN to PRIO_MAX.  */
 int
-DEFUN(getpriority, (which, who),
-      enum __priority_which which AND int who)
+getpriority (which, who)
+     enum __priority_which which;
+     int who;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/getrlimit.c b/sysdeps/stub/getrlimit.c
index a3f31448bc..9e41e076a5 100644
--- a/sysdeps/stub/getrlimit.c
+++ b/sysdeps/stub/getrlimit.c
@@ -24,7 +24,7 @@ Cambridge, MA 02139, USA.  */
 int
 __getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 weak_alias (__getrlimit, getrlimit)
diff --git a/sysdeps/stub/getrusage.c b/sysdeps/stub/getrusage.c
index 6417c8d9d1..c13ae7a0fc 100644
--- a/sysdeps/stub/getrusage.c
+++ b/sysdeps/stub/getrusage.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <sys/resource.h>
 #include <errno.h>
 
 /* Return resource usage information on process indicated by WHO
    and put it in *USAGE.  Returns 0 for success, -1 for failure.  */
 int
-DEFUN(__getrusage, (who, usage),
-      enum __rusage_who who AND struct rusage *usage)
+__getrusage (who, usage)
+     enum __rusage_who who;
+     struct rusage *usage;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (getrusage)
diff --git a/sysdeps/stub/getsid.c b/sysdeps/stub/getsid.c
index af474c5e4d..9ae0c8442c 100644
--- a/sysdeps/stub/getsid.c
+++ b/sysdeps/stub/getsid.c
@@ -1,5 +1,5 @@
 /* getsid -- Return session ID of a process.  Stub version.
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 1996 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
@@ -24,6 +24,6 @@ Cambridge, MA 02139, USA.  */
 pid_t
 getsid (pid_t pid)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return (pid_t) -1;
 }
diff --git a/sysdeps/stub/getsockname.c b/sysdeps/stub/getsockname.c
index a587e26e9e..17bb2b8a24 100644
--- a/sysdeps/stub/getsockname.c
+++ b/sysdeps/stub/getsockname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/socket.h>
 
 /* Put the local address of FD into *ADDR and its length in *LEN.  */
 int
-DEFUN(getsockname, (fd, addr, len),
-      int fd AND struct sockaddr *addr AND size_t *len)
+getsockname (fd, addr, len)
+     int fd;
+     struct sockaddr *addr;
+     size_t *len;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/getsockopt.c b/sysdeps/stub/getsockopt.c
index ab34d8b09c..e3ea53d79f 100644
--- a/sysdeps/stub/getsockopt.c
+++ b/sysdeps/stub/getsockopt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/socket.h>
 
@@ -24,11 +23,14 @@ Cambridge, MA 02139, USA.  */
    into OPTVAL (which is *OPTLEN bytes long), and set *OPTLEN to the value's
    actual length.  Returns 0 on success, -1 for errors.  */
 int
-DEFUN(getsockopt, (fd, level, optname, optval, optlen),
-      int fd AND int level AND int optname AND
-      PTR optval AND size_t *optlen)
+getsockopt (fd, level, optname, optval, optlen)
+     int fd;
+     int level;
+     int optname;
+     void *optval;
+     size_t *optlen;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/getsysstats.c b/sysdeps/stub/getsysstats.c
index c8fe700ded..1d0781d834 100644
--- a/sysdeps/stub/getsysstats.c
+++ b/sysdeps/stub/getsysstats.c
@@ -48,21 +48,21 @@ int
 __get_phys_pages ()
 {
   /* We have no general way to determine this value.  */
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 weak_alias (__get_phys_pages, get_phys_pages)
 
-link_warning (get_phys_pages, "warning: get_phys_pages will always fail")
+stub_warning (get_phys_pages)
 
 
 int
 __get_avphys_pages ()
 {
   /* We have no general way to determine this value.  */
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 weak_alias (__get_avphys_pages, get_avphys_pages)
 
-link_warning (get_avphys_pages, "warning: get_avphys_pages will always fail")
+stub_warning (get_avphys_pages)
diff --git a/sysdeps/stub/gettimeofday.c b/sysdeps/stub/gettimeofday.c
index 74e4619df9..f6f38f2800 100644
--- a/sysdeps/stub/gettimeofday.c
+++ b/sysdeps/stub/gettimeofday.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/time.h>
 
@@ -24,10 +23,11 @@ Cambridge, MA 02139, USA.  */
    putting it into *TV and *TZ.  If TZ is NULL, *TZ is not filled.
    Returns 0 on success, -1 on errors.  */
 int
-DEFUN(__gettimeofday, (tv, tz),
-      struct timeval *tv AND struct timezone *tz)
+__gettimeofday (tv, tz)
+     struct timeval *tv;
+     struct timezone *tz;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (gettimeofday)
diff --git a/sysdeps/stub/getuid.c b/sysdeps/stub/getuid.c
index ebdd2688bc..2c843e4c8e 100644
--- a/sysdeps/stub/getuid.c
+++ b/sysdeps/stub/getuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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
@@ -16,16 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 #include <sys/types.h>
 
 /* Get the real user ID of the calling process.  */
 uid_t
-DEFUN_VOID(__getuid)
+__getuid ()
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (getuid)
diff --git a/sysdeps/stub/gtty.c b/sysdeps/stub/gtty.c
index b702dda29a..c06d075ffd 100644
--- a/sysdeps/stub/gtty.c
+++ b/sysdeps/stub/gtty.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,23 +16,23 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sgtty.h>
 #include <stddef.h>
 
 /* Fill in *PARAMS with terminal parameters associated with FD.  */
 int
-DEFUN(gtty, (fd, params),
-      int fd AND struct sgttyb *params)
+gtty (fd, params)
+     int fd;
+     struct sgttyb *params;
 {
   if (params == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/ioctl.c b/sysdeps/stub/ioctl.c
index 579ddab9b7..23d13cd0d0 100644
--- a/sysdeps/stub/ioctl.c
+++ b/sysdeps/stub/ioctl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 93, 94, 95, 96 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
@@ -16,17 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/ioctl.h>
 
 /* Perform the I/O control operation specified by REQUEST on FD.
    The actual type and use of ARG and the return value depend on REQUEST.  */
 int
-DEFUN(__ioctl, (fd, request),
-      int fd AND unsigned long int request DOTS)
+__ioctl (fd, request)
+     int fd;
+     unsigned long int request;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (ioctl)
diff --git a/sysdeps/stub/isatty.c b/sysdeps/stub/isatty.c
index ae9510b313..45e9500a28 100644
--- a/sysdeps/stub/isatty.c
+++ b/sysdeps/stub/isatty.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,15 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
 /* Return 1 if FD is a terminal, 0 if not.  */
 int
-DEFUN(__isatty, (fd), int fd)
+__isatty (fd)
+     int fd;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/isfdtype.c b/sysdeps/stub/isfdtype.c
index 560efd83fc..5baf9e52a1 100644
--- a/sysdeps/stub/isfdtype.c
+++ b/sysdeps/stub/isfdtype.c
@@ -17,13 +17,14 @@ 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.  */
 
+#include <errno.h>
 #include <sys/stat.h>
 
 
 int
 isfdtype (int fildes, int fdtype)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (isfdtype)
diff --git a/sysdeps/stub/kill.c b/sysdeps/stub/kill.c
index b9a8b0e3c2..013b27c368 100644
--- a/sysdeps/stub/kill.c
+++ b/sysdeps/stub/kill.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <signal.h>
 
@@ -25,9 +24,11 @@ Cambridge, MA 02139, USA.  */
    send SIG to all processes in the current process's process group.
    If PID is < -1, send SIG to all processes in process group - PID.  */
 int
-DEFUN(__kill, (pid, sig), int pid AND int sig)
+__kill (pid, sig)
+     int pid;
+     int sig;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (kill)
diff --git a/sysdeps/stub/killpg.c b/sysdeps/stub/killpg.c
index 6e8424d4a3..047760b527 100644
--- a/sysdeps/stub/killpg.c
+++ b/sysdeps/stub/killpg.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <signal.h>
 
@@ -25,9 +24,11 @@ Cambridge, MA 02139, USA.  */
    If PGRP is zero, send SIG to all processes in
    the current process's process group.  */
 int
-DEFUN(killpg, (pgrp, sig), __pid_t pgrp AND int sig)
+killpg (pgrp, sig)
+     __pid_t pgrp;
+     int sig;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/libc-lock.h b/sysdeps/stub/libc-lock.h
index ca2d77c220..58c60e589e 100644
--- a/sysdeps/stub/libc-lock.h
+++ b/sysdeps/stub/libc-lock.h
@@ -25,9 +25,9 @@ Cambridge, MA 02139, USA.  */
    initialized with __libc_lock_init before it can be used (or define it
    with __libc_lock_define_initialized, below).  Use `extern' for CLASS to
    declare a lock defined in another module.  In public structure
-   definitions, the lock element must come last, because its storage size
-   will not be known outside of libc.  (Or you can use a pointer to the
-   lock structure; i.e. NAME begins with a `*'.)  */
+   definitions you must use a pointer to the lock structure (i.e., NAME
+   begins with a `*'), because its storage size will not be known outside
+   of libc.  */
 #define __libc_lock_define(CLASS,NAME)
 
 /* Define an initialized lock variable NAME with storage class CLASS.  */
diff --git a/sysdeps/stub/link.c b/sysdeps/stub/link.c
index c5ea71374a..643223dc7f 100644
--- a/sysdeps/stub/link.c
+++ b/sysdeps/stub/link.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <unistd.h>
@@ -24,15 +23,17 @@ Cambridge, MA 02139, USA.  */
 
 /* Make a link to FROM called TO.  */
 int
-DEFUN(__link, (from, to), CONST char *from AND CONST char *to)
+__link (from, to)
+     const char *from;
+     const char *to;
 {
   if (from == NULL || to == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (link)
diff --git a/sysdeps/stub/listen.c b/sysdeps/stub/listen.c
index 6b7d4df938..c042b1ca40 100644
--- a/sysdeps/stub/listen.c
+++ b/sysdeps/stub/listen.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/socket.h>
 
@@ -24,10 +23,11 @@ Cambridge, MA 02139, USA.  */
    N connection requests will be queued before further requests are refused.
    Returns 0 on success, -1 for errors.  */
 int
-DEFUN(listen, (fd, n),
-      int fd AND unsigned int n)
+listen (fd, n)
+     int fd;
+     unsigned int n;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/lseek.c b/sysdeps/stub/lseek.c
index 6d9c3660fb..e285cb5016 100644
--- a/sysdeps/stub/lseek.c
+++ b/sysdeps/stub/lseek.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,18 +16,20 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 #include <sys/types.h>
 
 /* Seek to OFFSET on FD, starting from WHENCE.  */
 off_t
-DEFUN(__lseek, (fd, offset, whence), int fd AND off_t offset AND int whence)
+__lseek (fd, offset, whence)
+     int fd;
+     off_t offset;
+     int whence;
 {
   if (fd < 0)
     {
-      errno = EBADF;
+      __set_errno (EBADF);
       return -1;
     }
   switch (whence)
@@ -37,11 +39,11 @@ DEFUN(__lseek, (fd, offset, whence), int fd AND off_t offset AND int whence)
     case SEEK_END:
       break;
     default:
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (lseek)
diff --git a/sysdeps/stub/lxstat.c b/sysdeps/stub/lxstat.c
index 5729925ff3..edbe2fc6d4 100644
--- a/sysdeps/stub/lxstat.c
+++ b/sysdeps/stub/lxstat.c
@@ -27,11 +27,11 @@ __lxstat (int vers, const char *file, struct stat *buf)
 {
   if (vers != _STAT_VER || file == NULL || buf == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (__lxstat)
diff --git a/sysdeps/stub/madvise.c b/sysdeps/stub/madvise.c
index e3dbacdfe3..dbe2c7cb38 100644
--- a/sysdeps/stub/madvise.c
+++ b/sysdeps/stub/madvise.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 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
@@ -26,7 +26,7 @@ Cambridge, MA 02139, USA.  */
 int
 madvise (caddr_t addr, size_t len, int advice)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/mkdir.c b/sysdeps/stub/mkdir.c
index 9822b5f8b8..251ea11520 100644
--- a/sysdeps/stub/mkdir.c
+++ b/sysdeps/stub/mkdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <sys/stat.h>
@@ -25,15 +24,17 @@ Cambridge, MA 02139, USA.  */
 
 /* Create a directory named PATH with protections MODE.  */
 int
-DEFUN(__mkdir, (path, mode), CONST char *path AND mode_t mode)
+__mkdir (path, mode)
+     const char *path;
+     mode_t mode;
 {
   if (path == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (mkdir)
diff --git a/sysdeps/stub/mkfifo.c b/sysdeps/stub/mkfifo.c
index d8aa88283c..eaf0d2f2c2 100644
--- a/sysdeps/stub/mkfifo.c
+++ b/sysdeps/stub/mkfifo.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <sys/stat.h>
@@ -25,15 +24,17 @@ Cambridge, MA 02139, USA.  */
 
 /* Create a named pipe (FIFO) named PATH with protections MODE.  */
 int
-DEFUN(mkfifo, (path, mode), CONST char *path AND mode_t mode)
+mkfifo (path, mode)
+     const char *path;
+     mode_t mode;
 {
   if (path == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/mkstemp.c b/sysdeps/stub/mkstemp.c
index 1adf6c0215..47dd7125b3 100644
--- a/sysdeps/stub/mkstemp.c
+++ b/sysdeps/stub/mkstemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <string.h>
 #include <errno.h>
 
@@ -25,15 +24,16 @@ Cambridge, MA 02139, USA.  */
    they are replaced with a string that makes the filename unique.
    Returns a file descriptor open on the file for reading and writing.  */
 int
-DEFUN(mkstemp, (template), char *template)
+mkstemp (template)
+     char *template;
 {
-  if (strcmp(&template[strlen(template) - 6], "XXXXXX"))
+  if (strcmp (&template[strlen (template) - 6], "XXXXXX"))
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/mktemp.c b/sysdeps/stub/mktemp.c
index ad660232d7..06fe3de0c4 100644
--- a/sysdeps/stub/mktemp.c
+++ b/sysdeps/stub/mktemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <string.h>
 #include <errno.h>
 
@@ -24,15 +23,16 @@ Cambridge, MA 02139, USA.  */
    The last six characters of TEMPLATE must be "XXXXXX";
    they are replaced with a string that makes the filename unique.  */
 char *
-DEFUN(mktemp, (template), char *template)
+mktemp (template)
+     char *template;
 {
-  if (strcmp(&template[strlen(template) - 6], "XXXXXX"))
+  if (strcmp (&template[strlen (template) - 6], "XXXXXX"))
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return template;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return NULL;
 }
 
diff --git a/sysdeps/stub/mmap.c b/sysdeps/stub/mmap.c
index e230c9d8a4..f127eae916 100644
--- a/sysdeps/stub/mmap.c
+++ b/sysdeps/stub/mmap.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 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
@@ -32,7 +32,7 @@ Cambridge, MA 02139, USA.  */
 caddr_t
 __mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return (caddr_t) -1;
 }
 
diff --git a/sysdeps/stub/morecore.c b/sysdeps/stub/morecore.c
index cb669277b0..cda38cfee9 100644
--- a/sysdeps/stub/morecore.c
+++ b/sysdeps/stub/morecore.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <stddef.h>
 #include <errno.h>
 
@@ -27,9 +26,10 @@ Cambridge, MA 02139, USA.  */
    and return the start of data space, or NULL on errors.
    If INCREMENT is negative, shrink data space.  */
 __ptr_t
-DEFUN(__default_morecore, (increment), ptrdiff_t increment)
+__default_morecore (increment)
+     ptrdiff_t increment;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return NULL;
 }
 
diff --git a/sysdeps/stub/mprotect.c b/sysdeps/stub/mprotect.c
index 2626e4b4b8..81e54cd776 100644
--- a/sysdeps/stub/mprotect.c
+++ b/sysdeps/stub/mprotect.c
@@ -27,7 +27,7 @@ Cambridge, MA 02139, USA.  */
 int
 __mprotect (caddr_t addr, size_t len, int prot)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 weak_alias (__mprotect, mprotect)
diff --git a/sysdeps/stub/msgctl.c b/sysdeps/stub/msgctl.c
index 8212f096c1..5c2eea700e 100644
--- a/sysdeps/stub/msgctl.c
+++ b/sysdeps/stub/msgctl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
 
@@ -29,7 +29,7 @@ msgctl (msqid, cmd, buf)
      int cmd;
      struct msqid_ds *buf;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/msgget.c b/sysdeps/stub/msgget.c
index 3ee2b3dacd..343c6d8a8b 100644
--- a/sysdeps/stub/msgget.c
+++ b/sysdeps/stub/msgget.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
 
@@ -28,7 +28,7 @@ msgget (key, msgflg)
      key_t key;
      int msgflg;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/msgrcv.c b/sysdeps/stub/msgrcv.c
index 3d5dfc5523..863824946d 100644
--- a/sysdeps/stub/msgrcv.c
+++ b/sysdeps/stub/msgrcv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
 
@@ -34,7 +34,7 @@ msgrcv (msqid, msgp, msgsz, msgtyp, msgflg)
      long msgtyp;
      int msgflg;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/msgsnd.c b/sysdeps/stub/msgsnd.c
index 77d188017d..04df3d9f70 100644
--- a/sysdeps/stub/msgsnd.c
+++ b/sysdeps/stub/msgsnd.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
 
@@ -33,7 +33,7 @@ msgsnd (msqid, msgp, msgsz, msgflg)
      size_t msgsz;
      int msgflg;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/msync.c b/sysdeps/stub/msync.c
index a01c474422..21421b73f1 100644
--- a/sysdeps/stub/msync.c
+++ b/sysdeps/stub/msync.c
@@ -27,7 +27,7 @@ Cambridge, MA 02139, USA.  */
 int
 msync (caddr_t addr, size_t len)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/munmap.c b/sysdeps/stub/munmap.c
index ba61e0f97a..55b674ec22 100644
--- a/sysdeps/stub/munmap.c
+++ b/sysdeps/stub/munmap.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 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
@@ -26,7 +26,7 @@ Cambridge, MA 02139, USA.  */
 int
 __munmap (caddr_t addr, size_t len)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/nanosleep.c b/sysdeps/stub/nanosleep.c
index 97cdd50da0..0995bb9654 100644
--- a/sysdeps/stub/nanosleep.c
+++ b/sysdeps/stub/nanosleep.c
@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA.  */
 int
 nanosleep (const struct timespec *requested_time, struct timespec *remaining)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (nanosleep)
diff --git a/sysdeps/stub/nice.c b/sysdeps/stub/nice.c
index 5c3768a7e5..ae7f88f6a5 100644
--- a/sysdeps/stub/nice.c
+++ b/sysdeps/stub/nice.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
 /* Increment the scheduling priority of the calling process by INCR.
    The superuser may use a negative INCR to decrement the priority.  */
 int
-DEFUN(nice, (incr), int incr)
+nice (incr)
+     int incr;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/nlist.c b/sysdeps/stub/nlist.c
index 1407033114..3d421d7cb2 100644
--- a/sysdeps/stub/nlist.c
+++ b/sysdeps/stub/nlist.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <nlist.h>
 #include <stddef.h>
@@ -25,16 +24,17 @@ Cambridge, MA 02139, USA.  */
    which is terminated by an element with a NULL `n_un.n_name' member,
    and fill in the elements of NL.  */
 int
-DEFUN(nlist, (file, nl),
-      CONST char *file AND struct nlist *nl)
+nlist (file, nl)
+     const char *file;
+     struct nlist *nl;
 {
   if (nl == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/open.c b/sysdeps/stub/open.c
index af0d2723f8..08c4b780ef 100644
--- a/sysdeps/stub/open.c
+++ b/sysdeps/stub/open.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <stdarg.h>
@@ -25,13 +24,15 @@ Cambridge, MA 02139, USA.  */
 /* Open FILE with access OFLAG.  If OFLAG includes O_CREAT,
    a third argument is the file protection.  */
 int
-DEFUN(__open, (file, oflag), CONST char *file AND int oflag DOTS)
+__open (file, oflag)
+     const char *file;
+     int oflag;
 {
   int mode;
 
   if (file == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
@@ -43,7 +44,7 @@ DEFUN(__open, (file, oflag), CONST char *file AND int oflag DOTS)
       va_end(arg);
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (open)
diff --git a/sysdeps/stub/opendir.c b/sysdeps/stub/opendir.c
index f0d7784d1e..f32a6b04c2 100644
--- a/sysdeps/stub/opendir.c
+++ b/sysdeps/stub/opendir.c
@@ -25,7 +25,7 @@ Cambridge, MA 02139, USA.  */
 DIR *
 __opendir (const char *name)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return NULL;
 }
 weak_alias (__opendir, opendir)
diff --git a/sysdeps/stub/pathconf.c b/sysdeps/stub/pathconf.c
index 1a544c3882..92891fd518 100644
--- a/sysdeps/stub/pathconf.c
+++ b/sysdeps/stub/pathconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <unistd.h>
@@ -24,11 +23,13 @@ Cambridge, MA 02139, USA.  */
 
 /* Get file-specific information about PATH.  */
 long int
-DEFUN(__pathconf, (path, name), CONST char *path AND int name)
+__pathconf (path, name)
+     const char *path;
+     int name;
 {
   if (path == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
   return __fpathconf (0, name);
diff --git a/sysdeps/stub/pause.c b/sysdeps/stub/pause.c
index b2a7adde76..8a885014bc 100644
--- a/sysdeps/stub/pause.c
+++ b/sysdeps/stub/pause.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996 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
@@ -26,7 +26,7 @@ Cambridge, MA 02139, USA.  */
 int
 pause ()
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/pipe.c b/sysdeps/stub/pipe.c
index acef99b112..c3ed56b299 100644
--- a/sysdeps/stub/pipe.c
+++ b/sysdeps/stub/pipe.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 #include <stddef.h>
@@ -26,15 +25,16 @@ Cambridge, MA 02139, USA.  */
    bytes written on PIPEDES[1] can be read from PIPEDES[0].
    Returns 0 if successful, -1 if not.  */
 int
-DEFUN(__pipe, (__pipedes), int __pipedes[2])
+__pipe (__pipedes)
+     int __pipedes[2];
 {
   if (__pipedes == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (pipe)
diff --git a/sysdeps/stub/pipestream.c b/sysdeps/stub/pipestream.c
index afa2c4735d..36f6f1b80f 100644
--- a/sysdeps/stub/pipestream.c
+++ b/sysdeps/stub/pipestream.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <stddef.h>
 #include <signal.h>
 #include <stdio.h>
@@ -26,30 +25,33 @@ Cambridge, MA 02139, USA.  */
 /* Open a new stream that is a one-way pipe to a
    child process running the given shell command.  */
 FILE *
-DEFUN(popen, (command, mode), CONST char *command AND CONST char *mode)
+popen (command, mode)
+     const char *command;
+     const char *mode;
 {
   if (command == NULL || mode == NULL || (*mode != 'r' && *mode != 'w'))
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return NULL;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return NULL;
 }
 
 /* Close a stream opened by popen and return its status.
    Returns -1 if the stream was not opened by popen.  */
 int
-DEFUN(pclose, (stream), register FILE *stream)
+pclose (stream)
+     register FILE *stream;
 {
   if (!__validfp (stream) || !stream->__ispipe)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/poll.c b/sysdeps/stub/poll.c
index 40fc2c91c7..9c7a65d2ce 100644
--- a/sysdeps/stub/poll.c
+++ b/sysdeps/stub/poll.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 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
@@ -31,7 +31,7 @@ poll (fds, nfds, timeout)
      unsigned long int nfds;
      int timeout;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/profil.c b/sysdeps/stub/profil.c
index ab8e1d4ed6..eb5538fd46 100644
--- a/sysdeps/stub/profil.c
+++ b/sysdeps/stub/profil.c
@@ -1,5 +1,5 @@
 /* Low-level statistical profiling support function.  Stub version.
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 1996 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
@@ -34,7 +34,7 @@ profil (u_short *sample_buffer, size_t size, size_t offset, u_int scale)
     /* Disable profiling.  */
     return 0;
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (profil)
diff --git a/sysdeps/stub/ptrace.c b/sysdeps/stub/ptrace.c
index 31fbbb1b05..d3a2d57a2f 100644
--- a/sysdeps/stub/ptrace.c
+++ b/sysdeps/stub/ptrace.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 95, 96 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/ptrace.h>
 #include <sys/types.h>
@@ -32,11 +31,12 @@ Cambridge, MA 02139, USA.  */
      pid_t PID, void *ADDR, int DATA, void *ADDR2
    after PID.  */
 int
-DEFUN(ptrace, (request), enum __ptrace_request request DOTS)
+ptrace (request)
+     enum __ptrace_request request;
 {
   pid_t pid;
-  PTR addr;
-  PTR addr2;
+  void *addr;
+  void *addr2;
   int data;
   va_list ap;
 
@@ -63,7 +63,7 @@ DEFUN(ptrace, (request), enum __ptrace_request request DOTS)
     case PTRACE_SETFPAREGS:
       va_start(ap, request);
       pid = va_arg(ap, pid_t);
-      addr = va_arg(ap, PTR);
+      addr = va_arg(ap, void *);
       va_end(ap);
       break;
 
@@ -72,7 +72,7 @@ DEFUN(ptrace, (request), enum __ptrace_request request DOTS)
     case PTRACE_POKEUSER:
       va_start(ap, request);
       pid = va_arg(ap, pid_t);
-      addr = va_arg(ap, PTR);
+      addr = va_arg(ap, void *);
       data = va_arg(ap, int);
       va_end(ap);
       break;
@@ -83,18 +83,18 @@ DEFUN(ptrace, (request), enum __ptrace_request request DOTS)
     case PTRACE_WRITETEXT:
       va_start(ap, request);
       pid = va_arg(ap, pid_t);
-      addr = va_arg(ap, PTR);
+      addr = va_arg(ap, void *);
       data = va_arg(ap, int);
-      addr2 = va_arg(ap, PTR);
+      addr2 = va_arg(ap, void *);
       va_end(ap);
       break;
 
     default:
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/putenv.c b/sysdeps/stub/putenv.c
index 3d845d8eaa..d50b4a5b2d 100644
--- a/sysdeps/stub/putenv.c
+++ b/sysdeps/stub/putenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stdlib.h>
 
 /* Put STRING, which is of the form "NAME=VALUE", in the environment.
    If there is no `=', remove NAME from the environment.  */
 int
-DEFUN(putenv, (string), CONST char *string)
+putenv (string)
+     const char *string;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/raise.c b/sysdeps/stub/raise.c
index ea89874f92..cac49df7de 100644
--- a/sysdeps/stub/raise.c
+++ b/sysdeps/stub/raise.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,15 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <signal.h>
 #include <errno.h>
 
 /* Raise the signal SIG.  */
 int
-DEFUN(raise, (sig), int sig)
+raise (sig)
+     int sig;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/read.c b/sysdeps/stub/read.c
index 014313216b..724f8f8578 100644
--- a/sysdeps/stub/read.c
+++ b/sysdeps/stub/read.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,32 +16,31 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 #include <stddef.h>
 
 /* Read NBYTES into BUF from FD.  Return the number read or -1.  */
 ssize_t
-DEFUN(__read, (fd, buf, nbytes),
-      int fd AND PTR buf AND size_t nbytes)
+__libc_read (int fd, void *buf, size_t nbytes)
 {
   if (nbytes == 0)
     return 0;
   if (fd < 0)
     {
-      errno = EBADF;
+      __set_errno (EBADF);
       return -1;
     }
   if (buf == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (read)
 
-weak_alias (__read, read)
+weak_alias (__libc_read, __read)
+weak_alias (__libc_read, read)
diff --git a/sysdeps/stub/readdir.c b/sysdeps/stub/readdir.c
index d210906dbd..1555706d0e 100644
--- a/sysdeps/stub/readdir.c
+++ b/sysdeps/stub/readdir.c
@@ -24,7 +24,7 @@ Cambridge, MA 02139, USA.  */
 struct dirent *
 __readdir (DIR *dirp)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return NULL;
 }
 weak_alias (__readdir, readdir)
diff --git a/sysdeps/stub/readlink.c b/sysdeps/stub/readlink.c
index b640a8db0f..99c852569d 100644
--- a/sysdeps/stub/readlink.c
+++ b/sysdeps/stub/readlink.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
@@ -24,10 +23,12 @@ Cambridge, MA 02139, USA.  */
    LEN bytes of BUF.  The contents are not null-terminated.
    Returns the number of characters read, or -1 for errors.  */
 int
-DEFUN(__readlink, (path, buf, len),
-      CONST char *path AND char *buf AND size_t len)
+__readlink (path, buf, len)
+     const char *path;
+     char *buf;
+     size_t len;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (readlink)
diff --git a/sysdeps/stub/readv.c b/sysdeps/stub/readv.c
index 03d6bf9613..b537499b07 100644
--- a/sysdeps/stub/readv.c
+++ b/sysdeps/stub/readv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 #include <sys/uio.h>
@@ -27,10 +26,12 @@ Cambridge, MA 02139, USA.  */
    Operates just like `read' (see <unistd.h>) except that data are
    put in VECTOR instead of a contiguous buffer.  */
 int
-DEFUN(readv, (fd, vector, count),
-      int fd AND CONST struct iovec *vector AND size_t count)
+readv (fd, vector, count)
+     int fd;
+     const struct iovec *vector;
+     size_t count;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/reboot.c b/sysdeps/stub/reboot.c
index 5cc05eb5cb..8db83af97a 100644
--- a/sysdeps/stub/reboot.c
+++ b/sysdeps/stub/reboot.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,15 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
 /* Reboot the system.  */
 int
-DEFUN(reboot, (howto), int howto)
+reboot (howto)
+     int howto;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/recv.c b/sysdeps/stub/recv.c
index 21c9cfa1b2..e09ef4fba1 100644
--- a/sysdeps/stub/recv.c
+++ b/sysdeps/stub/recv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,19 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/socket.h>
 
 /* Read N bytes into BUF from socket FD.
    Returns the number read or -1 for errors.  */
 int
-DEFUN(recv, (fd, buf, n, flags),
-      int fd AND PTR buf AND size_t n AND int flags)
+recv (fd, buf, n, flags)
+     int fd;
+     void *buf;
+     size_t n;
+     int flags;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/recvfrom.c b/sysdeps/stub/recvfrom.c
index aca6d23791..47973ed896 100644
--- a/sysdeps/stub/recvfrom.c
+++ b/sysdeps/stub/recvfrom.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/socket.h>
 
@@ -24,11 +23,15 @@ Cambridge, MA 02139, USA.  */
    at address ADDR (which is ADDR_LEN bytes long).
    Returns the number read or -1 for errors.  */
 int
-DEFUN(recvfrom, (fd, buf, n, flags, addr, addr_len),
-      int fd AND PTR buf AND size_t n AND int flags AND
-      struct sockaddr *addr AND size_t *addr_len)
+recvfrom (fd, buf, n, flags, addr, addr_len)
+     int fd;
+     void *buf;
+     size_t n;
+     int flags;
+     struct sockaddr *addr;
+     size_t *addr_len;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/recvmsg.c b/sysdeps/stub/recvmsg.c
index eecff02084..27f463ca41 100644
--- a/sysdeps/stub/recvmsg.c
+++ b/sysdeps/stub/recvmsg.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,18 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/socket.h>
 
 /* Receive a message as described by MESSAGE from socket FD.
    Returns the number of bytes read or -1 for errors.  */
 int
-DEFUN(recvmsg, (fd, message, flags),
-      int fd AND struct msghdr *message AND int flags)
+recvmsg (fd, message, flags)
+     int fd;
+     struct msghdr *message;
+     int flags;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/remove.c b/sysdeps/stub/remove.c
index c044e0aac0..a8a4d3cb36 100644
--- a/sysdeps/stub/remove.c
+++ b/sysdeps/stub/remove.c
@@ -1,5 +1,5 @@
 /* ANSI C `remove' function to delete a file or directory.  Stub version.
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 1996 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
@@ -24,7 +24,7 @@ int
 remove (file)
      const char *file;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/rename.c b/sysdeps/stub/rename.c
index e880d7908b..b0a8521c86 100644
--- a/sysdeps/stub/rename.c
+++ b/sysdeps/stub/rename.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,23 +16,24 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <stdio.h>
 #include <errno.h>
 
 
 /* Rename the file OLD to NEW.  */
 int
-DEFUN(rename, (old, new), CONST char *old AND CONST char *new)
+rename (old, new)
+     const char *old;
+     const char *new;
 {
   if (old == NULL || new == NULL)
     {
-      errno = EINVAL;
-      return(-1);
+      __set_errno (EINVAL);
+      return -1;
     }
 
-  errno = ENOSYS;
-  return(-1);
+  __set_errno (ENOSYS);
+  return -1;
 }
 
 
diff --git a/sysdeps/stub/revoke.c b/sysdeps/stub/revoke.c
index 295dc2bb5e..94107ef89a 100644
--- a/sysdeps/stub/revoke.c
+++ b/sysdeps/stub/revoke.c
@@ -1,5 +1,5 @@
 /* Revoke the access of all descriptors currently open on a file.
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 1996 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
@@ -24,7 +24,7 @@ int
 revoke (file)
      const char *file;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (revoke)
diff --git a/sysdeps/stub/rewinddir.c b/sysdeps/stub/rewinddir.c
index d4f0ce9fa0..1ad85c4cac 100644
--- a/sysdeps/stub/rewinddir.c
+++ b/sysdeps/stub/rewinddir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <dirent.h>
@@ -24,9 +23,10 @@ Cambridge, MA 02139, USA.  */
 
 /* Rewind DIRP to the beginning of the directory.  */
 void
-DEFUN(rewinddir, (dirp), DIR *dirp)
+rewinddir (dirp)
+     DIR *dirp;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   /* No way to indicate failure.	*/
 }
 
diff --git a/sysdeps/stub/rmdir.c b/sysdeps/stub/rmdir.c
index 828a261a13..7e54ee42be 100644
--- a/sysdeps/stub/rmdir.c
+++ b/sysdeps/stub/rmdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <unistd.h>
@@ -24,15 +23,16 @@ Cambridge, MA 02139, USA.  */
 
 /* Remove the directory PATH.  */
 int
-DEFUN(__rmdir, (path), CONST char *path)
+__rmdir (path)
+     const char *path;
 {
   if (path == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (rmdir)
diff --git a/sysdeps/stub/sbrk.c b/sysdeps/stub/sbrk.c
index 46d9ecde60..0e9d07dc1a 100644
--- a/sysdeps/stub/sbrk.c
+++ b/sysdeps/stub/sbrk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 
 /* Extend the process's data space by INCREMENT.
    If INCREMENT is negative, shrink data space by - INCREMENT.
    Return the address of the start of data space, or -1 for errors.  */
-PTR
-DEFUN(__sbrk, (increment), int increment)
+void *
+__sbrk (increment)
+     int increment;
 {
-  errno = ENOSYS;
-  return (PTR) -1;
+  __set_errno (ENOSYS);
+  return (void *) -1;
 }
 stub_warning (sbrk)
 
diff --git a/sysdeps/stub/sched_getp.c b/sysdeps/stub/sched_getp.c
index 0da92bcd2c..e908638b5e 100644
--- a/sysdeps/stub/sched_getp.c
+++ b/sysdeps/stub/sched_getp.c
@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA.  */
 int
 __sched_getparam (pid_t pid, struct sched_param *param)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (sched_getparam)
diff --git a/sysdeps/stub/sched_gets.c b/sysdeps/stub/sched_gets.c
index bb64838908..9fe4921d53 100644
--- a/sysdeps/stub/sched_gets.c
+++ b/sysdeps/stub/sched_gets.c
@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA.  */
 int
 __sched_getscheduler (pid_t pid)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (sched_getscheduler)
diff --git a/sysdeps/stub/sched_primax.c b/sysdeps/stub/sched_primax.c
index 7ff5af3731..cf76994cf5 100644
--- a/sysdeps/stub/sched_primax.c
+++ b/sysdeps/stub/sched_primax.c
@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA.  */
 int
 __sched_get_priority_max (int algorithm)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (sched_get_priority_max)
diff --git a/sysdeps/stub/sched_primin.c b/sysdeps/stub/sched_primin.c
index 370f10c91c..2f79194a23 100644
--- a/sysdeps/stub/sched_primin.c
+++ b/sysdeps/stub/sched_primin.c
@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA.  */
 int
 __sched_get_priority_min (int algorithm)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (sched_get_priority_min)
diff --git a/sysdeps/stub/sched_rr_gi.c b/sysdeps/stub/sched_rr_gi.c
index b818561287..f23aacbda4 100644
--- a/sysdeps/stub/sched_rr_gi.c
+++ b/sysdeps/stub/sched_rr_gi.c
@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA.  */
 int
 __sched_rr_get_interval (pid_t pid, struct timespec *t)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (sched_rr_get_interval)
diff --git a/sysdeps/stub/sched_setp.c b/sysdeps/stub/sched_setp.c
index 513c717b03..c29bcc7149 100644
--- a/sysdeps/stub/sched_setp.c
+++ b/sysdeps/stub/sched_setp.c
@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA.  */
 int
 __sched_setparam (pid_t pid, const struct sched_param *param)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (sched_setparam)
diff --git a/sysdeps/stub/sched_sets.c b/sysdeps/stub/sched_sets.c
index 98008e6138..b845c2e864 100644
--- a/sysdeps/stub/sched_sets.c
+++ b/sysdeps/stub/sched_sets.c
@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA.  */
 int
 __sched_setscheduler (pid_t pid, int policy, const struct sched_param *param)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (sched_setscheduler)
diff --git a/sysdeps/stub/sched_yield.c b/sysdeps/stub/sched_yield.c
index 244ac15e1b..6c37285fbb 100644
--- a/sysdeps/stub/sched_yield.c
+++ b/sysdeps/stub/sched_yield.c
@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA.  */
 int
 __sched_yield (void)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (sched_yield)
diff --git a/sysdeps/stub/seekdir.c b/sysdeps/stub/seekdir.c
index 449aa62e1e..fe40c8b51d 100644
--- a/sysdeps/stub/seekdir.c
+++ b/sysdeps/stub/seekdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <sys/types.h>
 #include <errno.h>
 #include <stddef.h>
@@ -24,15 +23,17 @@ Cambridge, MA 02139, USA.  */
 
 /* Seek to position POS in DIRP.  */
 void
-DEFUN(seekdir, (dirp, pos), DIR *dirp AND off_t pos)
+seekdir (dirp, pos)
+     DIR *dirp
+     off_t pos;
 {
   if (dirp == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
 }
 
 
diff --git a/sysdeps/stub/select.c b/sysdeps/stub/select.c
index 837f0adab4..1c5e12fc75 100644
--- a/sysdeps/stub/select.c
+++ b/sysdeps/stub/select.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <sys/time.h>
 #include <sys/types.h>
 #include <errno.h>
@@ -27,11 +26,14 @@ Cambridge, MA 02139, USA.  */
    after waiting the interval specified therein.  Returns the number of ready
    descriptors, or -1 for errors.  */
 int
-DEFUN(__select, (nfds, readfds, writefds, exceptfds, timeout),
-      int nfds AND fd_set *readfds AND fd_set *writefds AND
-      fd_set *exceptfds AND struct timeval *timeout)
+__select (nfds, readfds, writefds, exceptfds, timeout)
+     int nfds;
+     fd_set *readfds;
+     fd_set *writefds;
+     fd_set *exceptfds;
+     struct timeval *timeout;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (select)
diff --git a/sysdeps/stub/semctl.c b/sysdeps/stub/semctl.c
index 8f2fe99400..cf44af8456 100644
--- a/sysdeps/stub/semctl.c
+++ b/sysdeps/stub/semctl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
 
@@ -30,7 +30,7 @@ semctl (semid, semnum, cmd, arg)
      int cmd;
      union semun arg;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/semget.c b/sysdeps/stub/semget.c
index 3ccf2717d4..327bc8e19d 100644
--- a/sysdeps/stub/semget.c
+++ b/sysdeps/stub/semget.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
 
@@ -29,7 +29,7 @@ semget (key, nsems, semflg)
      int nsems;
      int semflg;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/semop.c b/sysdeps/stub/semop.c
index 2bba8628e6..29bf159fee 100644
--- a/sysdeps/stub/semop.c
+++ b/sysdeps/stub/semop.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
 
@@ -28,7 +28,7 @@ semop (semid, sops, nsops)
      struct sembuf *sops;
      unsigned int nsops;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/send.c b/sysdeps/stub/send.c
index 3832185b9e..e921fd74bd 100644
--- a/sysdeps/stub/send.c
+++ b/sysdeps/stub/send.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,18 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/socket.h>
 
 /* Send N bytes of BUF to socket FD.  Returns the number sent or -1.  */
 int
-DEFUN(send, (fd, buf, n, flags),
-      int fd AND PTR buf AND size_t n AND int flags)
+send (fd, buf, n, flags)
+     int fd;
+     void *buf;
+     size_t n;
+     int flags;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/sendmsg.c b/sysdeps/stub/sendmsg.c
index 2066e52168..12d1698985 100644
--- a/sysdeps/stub/sendmsg.c
+++ b/sysdeps/stub/sendmsg.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,18 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/socket.h>
 
 /* Send a message described MESSAGE on socket FD.
    Returns the number of bytes sent, or -1 for errors.  */
 int
-DEFUN(sendmsg, (fd, message, flags),
-      int fd AND CONST struct msghdr *message AND int flags)
+sendmsg (fd, message, flags)
+     int fd;
+     const struct msghdr *message;
+     int flags;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/sendto.c b/sysdeps/stub/sendto.c
index e26c88751c..26353919a1 100644
--- a/sysdeps/stub/sendto.c
+++ b/sysdeps/stub/sendto.c
@@ -16,18 +16,21 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/socket.h>
 
 /* Send N bytes of BUF on socket FD to peer at address ADDR (which is
    ADDR_LEN bytes long).  Returns the number sent, or -1 for errors.  */
 int
-DEFUN(sendto, (fd, buf, n, flags, addr, addr_len),
-      int fd AND PTR buf AND size_t n AND int flags AND
-      const struct sockaddr *addr AND size_t addr_len)
+sendto (fd, buf, n, flags, addr, addr_len)
+     int fd;
+     void *buf;
+     size_t n;
+     int flags;
+     const struct sockaddr *addr;
+     size_t addr_len;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/setdomain.c b/sysdeps/stub/setdomain.c
index 052b45b9bc..891141b481 100644
--- a/sysdeps/stub/setdomain.c
+++ b/sysdeps/stub/setdomain.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 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
@@ -16,17 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
 /* Set the name of the current YP domain to NAME, which is LEN bytes long.
    This call is restricted to the super-user.  */
 int
-DEFUN(setdomainname, (name, len),
-      __const char *name AND size_t len)
+setdomainname (name, len)
+     const char *name;
+     size_t len;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/setegid.c b/sysdeps/stub/setegid.c
index 3429c67911..573eb63ef6 100644
--- a/sysdeps/stub/setegid.c
+++ b/sysdeps/stub/setegid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1995, 1996 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
@@ -16,15 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
 /* Set the effective group ID of the calling process to GID.  */
 int
-DEFUN(setegid, (gid), __gid_t gid)
+setegid (gid)
+     __gid_t gid;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/setenv.c b/sysdeps/stub/setenv.c
index 998c055f50..f318475718 100644
--- a/sysdeps/stub/setenv.c
+++ b/sysdeps/stub/setenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,15 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <stdlib.h>
 #include <errno.h>
 
 int
-DEFUN(setenv, (name, value, replace),
-      CONST char *name AND CONST char *value AND int replace)
+setenv (name, value, replace)
+     const char *name;
+     const char *value;
+     int replace;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/seteuid.c b/sysdeps/stub/seteuid.c
index e86e9a5898..53b318ec57 100644
--- a/sysdeps/stub/seteuid.c
+++ b/sysdeps/stub/seteuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,15 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
 /* Set the effective user ID of the calling process to UID.  */
 int
-DEFUN(seteuid, (uid), __uid_t uid)
+seteuid (uid)
+     __uid_t uid;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/setgid.c b/sysdeps/stub/setgid.c
index df1adbbac7..a51eb48e2d 100644
--- a/sysdeps/stub/setgid.c
+++ b/sysdeps/stub/setgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 #include <sys/types.h>
@@ -26,9 +25,10 @@ Cambridge, MA 02139, USA.  */
    and effective group IDs, and the saved set-group-ID to GID;
    if not, the effective group ID is set to GID.  */
 int
-DEFUN(__setgid, (gid), gid_t gid)
+__setgid (gid)
+     gid_t gid;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (setgid)
diff --git a/sysdeps/stub/setgroups.c b/sysdeps/stub/setgroups.c
index c5955a014e..0fa96315cd 100644
--- a/sysdeps/stub/setgroups.c
+++ b/sysdeps/stub/setgroups.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/types.h>
 #include <grp.h>
 
 /* Set the group set for the current user to GROUPS (N of them).  */
 int
-DEFUN(setgroups, (n, groups), size_t n AND CONST gid_t *groups)
+setgroups (n, groups)
+     size_t n;
+     const gid_t *groups;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/sethostid.c b/sysdeps/stub/sethostid.c
index d12b93bc6d..30f24eea20 100644
--- a/sysdeps/stub/sethostid.c
+++ b/sysdeps/stub/sethostid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
 /* Set the current machine's Internet number to ID.
    This call is restricted to the super-user.  */
 int
-DEFUN(sethostid, (id), long int id)
+sethostid (id)
+     long int id;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/sethostname.c b/sysdeps/stub/sethostname.c
index 81fa5fb742..aeb678910d 100644
--- a/sysdeps/stub/sethostname.c
+++ b/sysdeps/stub/sethostname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
 /* Set the name of the current host to NAME, which is LEN bytes long.
    This call is restricted to the super-user.  */
 int
-DEFUN(sethostname, (name, len),
-      CONST char *name AND size_t len)
+sethostname (name, len)
+     const char *name;
+     size_t len;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/setitimer.c b/sysdeps/stub/setitimer.c
index 6ba7031184..737257fa7f 100644
--- a/sysdeps/stub/setitimer.c
+++ b/sysdeps/stub/setitimer.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <stddef.h>
 #include <errno.h>
 #include <sys/time.h>
@@ -25,17 +24,18 @@ Cambridge, MA 02139, USA.  */
    set *OLD to the old value of timer WHICH.
    Returns 0 on success, -1 on errors.  */
 int
-DEFUN(__setitimer, (which, new, old),
-      enum __itimer_which which AND
-      struct itimerval *new AND struct itimerval *old)
+__setitimer (which, new, old)
+     enum __itimer_which which;
+     struct itimerval *new;
+     struct itimerval *old;
 {
   if (new == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (setitimer)
diff --git a/sysdeps/stub/setjmp.c b/sysdeps/stub/setjmp.c
index 01f58121d5..b38b0bd984 100644
--- a/sysdeps/stub/setjmp.c
+++ b/sysdeps/stub/setjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1995, 1996 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
@@ -27,7 +27,7 @@ __sigsetjmp (jmp_buf env, int savemask)
   /* Save the signal mask if requested.  */
   __sigjmp_save (env, savemask);
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   /* No way to signal failure.	*/
   return 0;
 }
diff --git a/sysdeps/stub/setlogin.c b/sysdeps/stub/setlogin.c
index a406bc54d8..30e7b54bbb 100644
--- a/sysdeps/stub/setlogin.c
+++ b/sysdeps/stub/setlogin.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,15 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
 /* Set the login name returned by `getlogin'.  */
 int
-DEFUN(setlogin, (name), CONST char *name)
+setlogin (name)
+     const char *name;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/setpgid.c b/sysdeps/stub/setpgid.c
index c694215067..6527a3e0bb 100644
--- a/sysdeps/stub/setpgid.c
+++ b/sysdeps/stub/setpgid.c
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
@@ -24,9 +23,11 @@ Cambridge, MA 02139, USA.  */
    If PID is zero, the current process's process group ID is set.
    If PGID is zero, the process ID of the process is used.  */
 int
-DEFUN(__setpgid, (pid, pgid), int pid AND int pgid)
+__setpgid (pid, pgid)
+     int pid;
+     int pgid;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (setpgid)
diff --git a/sysdeps/stub/setpriority.c b/sysdeps/stub/setpriority.c
index 255306e142..382a6cad20 100644
--- a/sysdeps/stub/setpriority.c
+++ b/sysdeps/stub/setpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,18 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/resource.h>
 
 /* Set the priority of all processes specified by WHICH and WHO
    to PRIO.  Returns 0 on success, -1 on errors.  */
 int
-DEFUN(setpriority, (which, who, prio),
-      enum __priority_which which AND int who AND int prio)
+setpriority (which, who, prio)
+     enum __priority_which which;
+     int who;
+     int prio;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/setregid.c b/sysdeps/stub/setregid.c
index 017dd08692..0b31afd8be 100644
--- a/sysdeps/stub/setregid.c
+++ b/sysdeps/stub/setregid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 #include <sys/types.h>
@@ -24,10 +23,11 @@ Cambridge, MA 02139, USA.  */
 /* Set the real group ID of the calling process to RGID,
    and the effective group ID of the calling process to EGID.  */
 int
-DEFUN(__setregid, (effective_gid, real_gid),
-      gid_t effective_gid AND gid_t real_gid)
+__setregid (effective_gid, real_gid)
+     gid_t effective_gid;
+     gid_t real_gid;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (setregid)
diff --git a/sysdeps/stub/setreuid.c b/sysdeps/stub/setreuid.c
index 7640d2f674..b6f9399bc3 100644
--- a/sysdeps/stub/setreuid.c
+++ b/sysdeps/stub/setreuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 #include <sys/types.h>
@@ -24,10 +23,11 @@ Cambridge, MA 02139, USA.  */
 /* Set the real user ID of the calling process to RUID,
    and the effective user ID of the calling process to EUID.  */
 int
-DEFUN(__setreuid, (effective_uid, real_uid),
-      uid_t effective_uid AND uid_t real_uid)
+__setreuid (effective_uid, real_uid)
+     uid_t effective_uid;
+     uid_t real_uid;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (setreuid)
diff --git a/sysdeps/stub/setrlimit.c b/sysdeps/stub/setrlimit.c
index 2affcc76b8..79b96235b7 100644
--- a/sysdeps/stub/setrlimit.c
+++ b/sysdeps/stub/setrlimit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <sys/resource.h>
 #include <errno.h>
 
@@ -24,8 +23,9 @@ Cambridge, MA 02139, USA.  */
    Only the super-user can increase hard limits.
    Return 0 if successful, -1 if not (and sets errno).  */
 int
-DEFUN(setrlimit, (resource, rlimits),
-      enum __rlimit_resource resource AND struct rlimit *rlimits)
+setrlimit (resource, rlimits)
+     enum __rlimit_resource resource;
+     struct rlimit *rlimits;
 {
   errno = ENOSYS;
   return -1;
diff --git a/sysdeps/stub/setsid.c b/sysdeps/stub/setsid.c
index 9baf1ee4ef..3f0bb3a57b 100644
--- a/sysdeps/stub/setsid.c
+++ b/sysdeps/stub/setsid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
@@ -25,9 +24,9 @@ Cambridge, MA 02139, USA.  */
    The process group IDs of the session and the calling process
    are set to the process ID of the calling process, which is returned.  */
 int
-DEFUN_VOID(__setsid)
+__setsid ()
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (setsid)
diff --git a/sysdeps/stub/setsockopt.c b/sysdeps/stub/setsockopt.c
index c1933afe38..546ca4b0c0 100644
--- a/sysdeps/stub/setsockopt.c
+++ b/sysdeps/stub/setsockopt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/socket.h>
 
@@ -24,11 +23,14 @@ Cambridge, MA 02139, USA.  */
    to *OPTVAL (which is OPTLEN bytes long).
    Returns 0 on success, -1 for errors.  */
 int
-DEFUN(setsockopt, (fd, level, optname, optval, optlen),
-      int fd AND int level AND int optname AND
-      PTR optval AND size_t optlen)
+setsockopt (fd, level, optname, optval, optlen)
+     int fd;
+     int level;
+     int optname;
+     void *optval;
+     size_t optlen;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/settimeofday.c b/sysdeps/stub/settimeofday.c
index 7d654cde57..7b94e88e47 100644
--- a/sysdeps/stub/settimeofday.c
+++ b/sysdeps/stub/settimeofday.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/time.h>
 
 /* Set the current time of day and timezone information.
    This call is restricted to the super-user.  */
 int
-DEFUN(__settimeofday, (tv, tz),
-      CONST struct timeval *tv AND CONST struct timezone *tz)
+__settimeofday (tv, tz)
+     const struct timeval *tv;
+     const struct timezone *tz;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (settimeofday)
diff --git a/sysdeps/stub/setuid.c b/sysdeps/stub/setuid.c
index 3415925967..122888619b 100644
--- a/sysdeps/stub/setuid.c
+++ b/sysdeps/stub/setuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 #include <sys/types.h>
@@ -26,9 +25,10 @@ Cambridge, MA 02139, USA.  */
    and effective user IDs, and the saved set-user-ID to UID;
    if not, the effective user ID is set to UID.  */
 int
-DEFUN(__setuid, (uid), uid_t uid)
+__setuid (uid)
+     uid_t uid;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (setuid)
diff --git a/sysdeps/stub/shmat.c b/sysdeps/stub/shmat.c
index 099f2279d2..9d5629b06c 100644
--- a/sysdeps/stub/shmat.c
+++ b/sysdeps/stub/shmat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
 
@@ -30,7 +30,7 @@ shmat (shmid, shmaddr, shmflg)
      char *shmaddr;
      int shmflg;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return (char *) -1;
 }
 
diff --git a/sysdeps/stub/shmctl.c b/sysdeps/stub/shmctl.c
index 75a4613166..a3b37076ff 100644
--- a/sysdeps/stub/shmctl.c
+++ b/sysdeps/stub/shmctl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
 
@@ -28,7 +28,7 @@ shmctl (shmid, cmd, buf)
      int cmd;
      struct shmid_ds *buf;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/shmdt.c b/sysdeps/stub/shmdt.c
index 8affa6c15a..8cca7743b6 100644
--- a/sysdeps/stub/shmdt.c
+++ b/sysdeps/stub/shmdt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
 
@@ -27,7 +27,7 @@ int
 shmdt (shmaddr)
      char *shmaddr;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/shmget.c b/sysdeps/stub/shmget.c
index d59ff90c99..63c5443701 100644
--- a/sysdeps/stub/shmget.c
+++ b/sysdeps/stub/shmget.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
 
@@ -29,7 +29,7 @@ shmget (key, size, shmflg)
      int size;
      int shmflg;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/shutdown.c b/sysdeps/stub/shutdown.c
index 501d532184..cce3dd702b 100644
--- a/sysdeps/stub/shutdown.c
+++ b/sysdeps/stub/shutdown.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/socket.h>
 
@@ -27,10 +26,11 @@ Cambridge, MA 02139, USA.  */
      2 = No more receptions or transmissions.
    Returns 0 on success, -1 for errors.  */
 int
-DEFUN(shutdown, (fd, how),
-      int fd AND int how)
+shutdown (fd, how)
+     int fd;
+     int how;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/sigaction.c b/sysdeps/stub/sigaction.c
index 7321140acd..1344d45044 100644
--- a/sysdeps/stub/sigaction.c
+++ b/sysdeps/stub/sigaction.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <signal.h>
 
@@ -24,17 +23,19 @@ Cambridge, MA 02139, USA.  */
 /* If ACT is not NULL, change the action for SIG to *ACT.
    If OACT is not NULL, put the old action for SIG in *OACT.  */
 int
-DEFUN(__sigaction, (sig, act, oact),
-      int sig AND CONST struct sigaction *act AND struct sigaction *OACT)
+__sigaction (sig, act, oact)
+     int sig;
+     const struct sigaction *act;
+     struct sigaction *OACT;
 {
   if (sig <= 0 || sig >= NSIG)
     {
-      errno = EINVAL;
-      return(-1);
+      __set_errno (EINVAL);
+      return -1;
     }
 
-  errno = ENOSYS;
-  return(-1);
+  __set_errno (ENOSYS);
+  return -1;
 }
 stub_warning (sigaction)
 
diff --git a/sysdeps/stub/sigaltstack.c b/sysdeps/stub/sigaltstack.c
index 01a547c2a5..f348a5372b 100644
--- a/sysdeps/stub/sigaltstack.c
+++ b/sysdeps/stub/sigaltstack.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,17 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <signal.h>
 
 /* 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.  */
 int
-DEFUN(sigaltstack, (ss, oss),
-      CONST struct sigaltstack *ss AND struct sigaltstack *oss)
+sigaltstack (ss, oss)
+     const struct sigaltstack *ss;
+     struct sigaltstack *oss;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/sigblock.c b/sysdeps/stub/sigblock.c
index 7c7469eee7..320027f89c 100644
--- a/sysdeps/stub/sigblock.c
+++ b/sysdeps/stub/sigblock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,15 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <signal.h>
 
 /* Block signals in MASK, returning the old mask.  */
 int
-DEFUN(__sigblock, (mask), int mask)
+__sigblock (mask)
+     int mask;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (sigblock)
diff --git a/sysdeps/stub/sigintr.c b/sysdeps/stub/sigintr.c
index a15b2c11b4..f98f98803a 100644
--- a/sysdeps/stub/sigintr.c
+++ b/sysdeps/stub/sigintr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <signal.h>
 
@@ -24,10 +23,11 @@ Cambridge, MA 02139, USA.  */
    (causing them to fail with EINTR); if INTERRUPT is zero, make system
    calls be restarted after signal SIG.  */
 int
-DEFUN(siginterrupt, (sig, interrupt),
-      int sig AND int interrupt)
+siginterrupt (sig, interrupt)
+     int sig;
+     int interrupt;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/signal.c b/sysdeps/stub/signal.c
index 2bd9b4217f..6ee587acb3 100644
--- a/sysdeps/stub/signal.c
+++ b/sysdeps/stub/signal.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <signal.h>
 
@@ -24,9 +23,11 @@ Cambridge, MA 02139, USA.  */
 /* Set the handler for the signal SIG to HANDLER,
    returning the old handler, or SIG_ERR on error.  */
 __sighandler_t
-DEFUN(signal, (sig, handler), int sig AND __sighandler_t handler)
+signal (sig, handler)
+     int sig;
+     __sighandler_t handler;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return SIG_ERR;
 }
 
diff --git a/sysdeps/stub/sigpause.c b/sysdeps/stub/sigpause.c
index a307422d06..54d23ee262 100644
--- a/sysdeps/stub/sigpause.c
+++ b/sysdeps/stub/sigpause.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,14 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <signal.h>
 
 int
-DEFUN(__sigpause, (mask), int mask)
+__sigpause (mask)
+     int mask;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (sigpause)
diff --git a/sysdeps/stub/sigpending.c b/sysdeps/stub/sigpending.c
index def44ed1a1..81096db731 100644
--- a/sysdeps/stub/sigpending.c
+++ b/sysdeps/stub/sigpending.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <signal.h>
@@ -24,15 +23,16 @@ Cambridge, MA 02139, USA.  */
 
 /* Store in SET all signals that are blocked and pending.  */
 int
-DEFUN(sigpending, (set), sigset_t *set)
+sigpending (set)
+     sigset_t *set;
 {
   if (set == NULL)
     {
-      errno = EINVAL;
-      return(-1);
+      __set_errno (EINVAL);
+      return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/sigprocmask.c b/sysdeps/stub/sigprocmask.c
index a89f683d54..48623be13b 100644
--- a/sysdeps/stub/sigprocmask.c
+++ b/sysdeps/stub/sigprocmask.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <signal.h>
 
@@ -25,8 +24,10 @@ Cambridge, MA 02139, USA.  */
    according to HOW, which may be SIG_BLOCK, SIG_UNBLOCK or SIG_SETMASK.
    If OSET is not NULL, store the old set of blocked signals in *OSET.  */
 int
-DEFUN(__sigprocmask, (how, set, oset),
-      int how AND CONST sigset_t *set AND sigset_t *oset)
+__sigprocmask (how, set, oset)
+     int how;
+     const sigset_t *set;
+     sigset_t *oset;
 {
   switch (how)
     {
@@ -35,11 +36,11 @@ DEFUN(__sigprocmask, (how, set, oset),
     case SIG_SETMASK:
       break;
     default:
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/sigreturn.c b/sysdeps/stub/sigreturn.c
index d4370e4b34..7a2db5b4cc 100644
--- a/sysdeps/stub/sigreturn.c
+++ b/sysdeps/stub/sigreturn.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1995, 1996 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
@@ -16,14 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <signal.h>
 #include <errno.h>
 
 int
-DEFUN(__sigreturn, (context), struct sigcontext *context)
+__sigreturn (context)
+     struct sigcontext *context;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (sigreturn)
diff --git a/sysdeps/stub/sigsetmask.c b/sysdeps/stub/sigsetmask.c
index ab4ae811ac..7bb5eab0fd 100644
--- a/sysdeps/stub/sigsetmask.c
+++ b/sysdeps/stub/sigsetmask.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,14 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <signal.h>
 
 int
-DEFUN(__sigsetmask, (mask), int mask)
+__sigsetmask (mask)
+     int mask;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (sigsetmask)
diff --git a/sysdeps/stub/sigstack.c b/sysdeps/stub/sigstack.c
index a9da1e699e..79f21c4790 100644
--- a/sysdeps/stub/sigstack.c
+++ b/sysdeps/stub/sigstack.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <signal.h>
 
 /* 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.  */
 int
-DEFUN(sigstack, (ss, oss),
-      CONST struct sigstack *ss AND struct sigstack *oss)
+sigstack (ss, oss)
+     const struct sigstack *ss;
+     struct sigstack *oss;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/sigsuspend.c b/sysdeps/stub/sigsuspend.c
index da7ff85a83..ce604f8cb4 100644
--- a/sysdeps/stub/sigsuspend.c
+++ b/sysdeps/stub/sigsuspend.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <signal.h>
 
@@ -24,9 +23,10 @@ Cambridge, MA 02139, USA.  */
 /* Change the set of blocked signals to SET,
    wait until a signal arrives, and restore the set of blocked signals.  */
 int
-DEFUN(sigsuspend, (set), CONST sigset_t *set)
+sigsuspend (set)
+     const sigset_t *set;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/sigvec.c b/sysdeps/stub/sigvec.c
index af8e24dc64..62505a7d68 100644
--- a/sysdeps/stub/sigvec.c
+++ b/sysdeps/stub/sigvec.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <signal.h>
 #include <errno.h>
 
@@ -26,10 +25,12 @@ Cambridge, MA 02139, USA.  */
    reset to SIG_DFL before `sv_handler' is entered.  If OVEC is non-NULL,
    it is filled in with the old information for SIG.  */
 int
-DEFUN(__sigvec, (sig, vec, ovec),
-      int sig AND CONST struct sigvec *vec AND struct sigvec *ovec)
+__sigvec (sig, vec, ovec)
+     int sig;
+     const struct sigvec *vec;
+     struct sigvec *ovec;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (sigvec)
diff --git a/sysdeps/stub/sleep.c b/sysdeps/stub/sleep.c
index 88c7120a27..9ba448f586 100644
--- a/sysdeps/stub/sleep.c
+++ b/sysdeps/stub/sleep.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <signal.h>
 #include <time.h>
 #include <unistd.h>
@@ -30,9 +29,10 @@ Cambridge, MA 02139, USA.  */
    signal afterwards is undefined.  There is no return value to indicate
    error, but if `sleep' returns SECONDS, it probably didn't work.  */
 unsigned int
-DEFUN(sleep, (seconds), unsigned int seconds)
+sleep (seconds)
+     unsigned int seconds;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return seconds;
 }
 
diff --git a/sysdeps/stub/socket.c b/sysdeps/stub/socket.c
index 26f550db87..52017cbbde 100644
--- a/sysdeps/stub/socket.c
+++ b/sysdeps/stub/socket.c
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/socket.h>
 
@@ -24,10 +23,12 @@ Cambridge, MA 02139, USA.  */
    protocol PROTOCOL.  If PROTOCOL is zero, one is chosen automatically.
    Returns a file descriptor for the new socket, or -1 for errors.  */
 int
-DEFUN(socket, (domain, type, protocol),
-      int domain AND int type AND int protocol)
+socket (domain, type, protocol)
+     int domain;
+     int type;
+     int protocol;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/socketpair.c b/sysdeps/stub/socketpair.c
index bc9b4b50f2..938e08f50e 100644
--- a/sysdeps/stub/socketpair.c
+++ b/sysdeps/stub/socketpair.c
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/socket.h>
 
@@ -25,10 +24,13 @@ Cambridge, MA 02139, USA.  */
    descriptors for them in FDS[0] and FDS[1].  If PROTOCOL is zero,
    one will be chosen automatically.  Returns 0 on success, -1 for errors.  */
 int
-DEFUN(socketpair, (domain, type, protocol, fds),
-      int domain AND int type AND int protocol AND int fds[2])
+socketpair (domain, type, protocol, fds)
+     int domain;
+     int type;
+     int protocol;
+     int fds[2];
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/sstk.c b/sysdeps/stub/sstk.c
index e49bc31ee3..d7486737fa 100644
--- a/sysdeps/stub/sstk.c
+++ b/sysdeps/stub/sstk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 
 /* Increase the size of the stack by INCREMENT,
    and return the address of the bottom of the stack.  */
-PTR
-DEFUN(sstk, (increment), int increment)
+void *
+sstk (increment)
+     int increment;
 {
-  errno = ENOSYS;
-  return (PTR) -1;
+  __set_errno (ENOSYS);
+  return (void *) -1;
 }
 
 stub_warning (sstk)
diff --git a/sysdeps/stub/start.c b/sysdeps/stub/start.c
index 9d412011f9..c16582d9b3 100644
--- a/sysdeps/stub/start.c
+++ b/sysdeps/stub/start.c
@@ -12,4 +12,5 @@ int __data_start = 0;
 weak_alias (__data_start, data_start)
 #endif
 
-volatile int errno;
+volatile int __errno;
+string_alias (__errno, errno)
diff --git a/sysdeps/stub/statfs.c b/sysdeps/stub/statfs.c
index 1aa2feeae6..72a93b2b9a 100644
--- a/sysdeps/stub/statfs.c
+++ b/sysdeps/stub/statfs.c
@@ -25,10 +25,9 @@ Cambridge, MA 02139, USA.  */
 int
 __statfs (const char *file, struct statfs *buf)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (statfs)
 
 weak_alias (__statfs, statfs)
-
diff --git a/sysdeps/stub/stime.c b/sysdeps/stub/stime.c
index 231e762808..4a58dd8924 100644
--- a/sysdeps/stub/stime.c
+++ b/sysdeps/stub/stime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <time.h>
 #include <stddef.h>
@@ -24,15 +23,16 @@ Cambridge, MA 02139, USA.  */
 /* Set the system clock to *WHEN.  */
 
 int
-DEFUN(stime, (when), CONST time_t *when)
+stime (when)
+     const time_t *when;
 {
   if (when == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/stty.c b/sysdeps/stub/stty.c
index dec67c2cc3..e4fd33b9ee 100644
--- a/sysdeps/stub/stty.c
+++ b/sysdeps/stub/stty.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,23 +16,23 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sgtty.h>
 #include <stddef.h>
 
 /* Set the terminal parameters associated with FD to *PARAMS.  */
 int
-DEFUN(stty, (fd, params),
-      int fd AND CONST struct sgttyb *params)
+stty (fd, params)
+     int fd;
+     const struct sgttyb *params;
 {
   if (params == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/swapoff.c b/sysdeps/stub/swapoff.c
index d082bbcd53..66e2650149 100644
--- a/sysdeps/stub/swapoff.c
+++ b/sysdeps/stub/swapoff.c
@@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA.  */
 int
 swapoff (const char *path)
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/swapon.c b/sysdeps/stub/swapon.c
index 825f353a88..d990befb0a 100644
--- a/sysdeps/stub/swapon.c
+++ b/sysdeps/stub/swapon.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
 /* Make the block special device PATH available to the system for swapping.
    This call is restricted to the super-user.  */
 int
-DEFUN(swapon, (path), CONST char *path)
+swapon (path)
+     const char *path;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/symlink.c b/sysdeps/stub/symlink.c
index c8e6f1242a..d02e218d2b 100644
--- a/sysdeps/stub/symlink.c
+++ b/sysdeps/stub/symlink.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <unistd.h>
@@ -24,15 +23,17 @@ Cambridge, MA 02139, USA.  */
 
 /* Make a link to FROM called TO.  */
 int
-DEFUN(__symlink, (from, to), CONST char *from AND CONST char *to)
+__symlink (from, to)
+     const char *from;
+     const char *to;
 {
   if (from == NULL || to == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (symlink)
diff --git a/sysdeps/stub/sync.c b/sysdeps/stub/sync.c
index 34ddf2f0de..b775ee8dd2 100644
--- a/sysdeps/stub/sync.c
+++ b/sysdeps/stub/sync.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,15 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
 /* Make all changes done to all files actually appear on disk.  */
 int
-DEFUN_VOID(sync)
+sync ()
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/syscall.c b/sysdeps/stub/syscall.c
index d2a5b3ca33..f08ab3d851 100644
--- a/sysdeps/stub/syscall.c
+++ b/sysdeps/stub/syscall.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <sysdep.h>
 #include <errno.h>
 
@@ -24,9 +23,10 @@ Cambridge, MA 02139, USA.  */
    This only makes sense in certain operating systems.  */
 
 int
-DEFUN(syscall, (callno), int callno DOTS)
+syscall (callno)
+     int callno;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/sysconf.c b/sysdeps/stub/sysconf.c
index 1351b48fe0..43ad6d93a9 100644
--- a/sysdeps/stub/sysconf.c
+++ b/sysdeps/stub/sysconf.c
@@ -32,7 +32,7 @@ __sysconf (name)
   switch (name)
     {
     default:
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
 
     case _SC_TZNAME_MAX:
@@ -173,7 +173,7 @@ __sysconf (name)
       break;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/sysd-stdio.c b/sysdeps/stub/sysd-stdio.c
index c74823a7a4..75976c2d3d 100644
--- a/sysdeps/stub/sysd-stdio.c
+++ b/sysdeps/stub/sysd-stdio.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 95, 96 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stdio.h>
 
@@ -24,20 +23,24 @@ Cambridge, MA 02139, USA.  */
 /* Read up to N chars into BUF from COOKIE.
    Return how many chars were read, 0 for EOF or -1 for error.  */
 int
-DEFUN(__stdio_read, (cookie, buf, n),
-      PTR cookie AND register char *buf AND register size_t n)
+__stdio_read (cookie, buf, n)
+     void *cookie;
+     register char *buf;
+     register size_t n;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
 /* Write up to N chars from BUF to COOKIE.
    Return how many chars were written or -1 for error.  */
 int
-DEFUN(__stdio_write, (cookie, buf, n),
-      PTR cookie AND register CONST char *buf AND register size_t n)
+__stdio_write (cookie, buf, n)
+     void *cookie;
+     register const char *buf;
+     register size_t n;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
@@ -45,19 +48,22 @@ DEFUN(__stdio_write, (cookie, buf, n),
    The new file position is stored in *POS.
    Returns zero if successful, nonzero if not.  */
 int
-DEFUN(__stdio_seek, (cookie, pos, whence),
-      PTR cookie AND fpos_t *pos AND int whence)
+__stdio_seek (cookie, pos, whence)
+     void *cookie;
+     fpos_t *pos;
+     int whence;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
 /* Close the file associated with COOKIE.
    Return 0 for success or -1 for failure.  */
 int
-DEFUN(__stdio_close, (cookie), PTR cookie)
+__stdio_close (cookie)
+      void *cookie;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
@@ -65,21 +71,24 @@ DEFUN(__stdio_close, (cookie), PTR cookie)
    or -1 for errors.  If COOKIE does not relate to any POSIX.1 file
    descriptor, this should return -1 with errno set to EOPNOTSUPP.  */
 int
-DEFUN(__stdio_fileno, (cookie), PTR cookie)
+__stdio_fileno (cookie)
+     void *cookie;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
 
 /* Open FILENAME with the mode in M.
    Store the magic cookie associated with the opened file in *COOKIEPTR.
-   Return zero on success and nonzero on failure.  */   
+   Return zero on success and nonzero on failure.  */
 int
-DEFUN(__stdio_open, (filename, m, cookieptr),
-      CONST char *filename AND __io_mode m AND PTR *cookieptr)
+__stdio_open (filename, m, cookieptr)
+     const char *filename;
+     __io_mode m;
+     void **cookieptr;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
@@ -87,11 +96,13 @@ DEFUN(__stdio_open, (filename, m, cookieptr),
 /* Open FILENAME with the mode in M.  Use the same magic cookie
    already in *COOKIEPTR if possible, closing the old cookie with CLOSEFN.  */
 int
-DEFUN(__stdio_reopen, (filename, m, cookieptr),
-      CONST char *filename AND __io_mode m AND
-      PTR *cookieptr AND __io_close_fn closefn)
+__stdio_reopen (filename, m, cookieptr)
+     const char *filename;
+     __io_mode m;
+     void **cookieptr;
+     __io_close_fn closefn;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/system.c b/sysdeps/stub/system.c
index 75c0747a1e..8cb192d7ed 100644
--- a/sysdeps/stub/system.c
+++ b/sysdeps/stub/system.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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
@@ -16,21 +16,22 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stdlib.h>
 
 
 /* Execute LINE as a shell command.  */
 int
-DEFUN(system, (line), CONST char *line)
+__libc_system (line)
+     const char *line;
 {
   if (line == NULL)
     return 0;			/* This indicates no command processor.  */
 
-  errno = ENOSYS;
+  __sys_errno (ENOSYS);
   return -1;
 }
+weak_alias (__libc_system, system)
 
 
 stub_warning (system)
diff --git a/sysdeps/stub/tcdrain.c b/sysdeps/stub/tcdrain.c
index 20f2b86195..4d52f34009 100644
--- a/sysdeps/stub/tcdrain.c
+++ b/sysdeps/stub/tcdrain.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,23 +16,23 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <termios.h>
 
 /* Wait for pending output to be written on FD.  */
 int
-DEFUN(tcdrain, (fd), int fd)
+__libc_tcdrain (int fd)
 {
   if (fd < 0)
     {
-      errno = EBADF;
+      __set_errno (EBADF);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
+weak_alias (__libc_tcdrain, tcdrain)
 
 
 stub_warning (tcdrain)
diff --git a/sysdeps/stub/tcflow.c b/sysdeps/stub/tcflow.c
index 5ccc9d5646..1dbda79719 100644
--- a/sysdeps/stub/tcflow.c
+++ b/sysdeps/stub/tcflow.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,17 +16,18 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <termios.h>
 
 /* Suspend or restart transmission on FD.  */
 int
-DEFUN(tcflow, (fd, action), int fd AND int action)
+tcflow (fd, action)
+     int fd;
+     int action;
 {
   if (fd < 0)
     {
-      errno = EBADF;
+      __set_errno (EBADF);
       return -1;
     }
 
@@ -39,11 +40,11 @@ DEFUN(tcflow, (fd, action), int fd AND int action)
       break;
 
     default:
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/tcflush.c b/sysdeps/stub/tcflush.c
index 3e9f7efa3a..16cc1c4d91 100644
--- a/sysdeps/stub/tcflush.c
+++ b/sysdeps/stub/tcflush.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996 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
@@ -16,13 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <termios.h>
 
 /* Flush pending data on FD.  */
 int
-DEFUN(tcflush, (fd, queue_selector), int fd AND int queue_selector)
+tcflush (fd, queue_selector)
+     int fd;
+     int queue_selector;
 {
   switch (queue_selector)
     {
@@ -32,19 +33,13 @@ DEFUN(tcflush, (fd, queue_selector), int fd AND int queue_selector)
       break;
 
     default:
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
 
-#ifdef	 HAVE_GNU_LD
-
-#include <gnu-stabs.h>
-
 stub_warning(tcflush);
-
-#endif	/* GNU stabs.  */
diff --git a/sysdeps/stub/tcgetattr.c b/sysdeps/stub/tcgetattr.c
index 70208491ed..da6e545499 100644
--- a/sysdeps/stub/tcgetattr.c
+++ b/sysdeps/stub/tcgetattr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,29 +16,29 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <termios.h>
 
 /* Put the state of FD into *TERMIOS_P.  */
 int
-DEFUN(__tcgetattr, (fd, termios_p),
-      int fd AND struct termios *termios_p)
+__tcgetattr (fd, termios_p)
+     int fd;
+     struct termios *termios_p;
 {
   if (fd < 0)
     {
-      errno = EBADF;
-      return(-1);
+      __set_errno (EBADF);
+      return -1;
     }
   if (termios_p == NULL)
     {
-      errno = EINVAL;
-      return(-1);
+      __set_errno (EINVAL);
+      return -1;
     }
 
-  errno = ENOSYS;
-  return(-1);
+  __set_errno (ENOSYS);
+  return -1;
 }
 stub_warning (tcgetattr)
 
diff --git a/sysdeps/stub/tcgetpgrp.c b/sysdeps/stub/tcgetpgrp.c
index 1e1ebfa923..3b901a9662 100644
--- a/sysdeps/stub/tcgetpgrp.c
+++ b/sysdeps/stub/tcgetpgrp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,22 +16,22 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 #include <sys/types.h>
 
 /* Return the foreground process group ID of FD.  */
 pid_t
-DEFUN(tcgetpgrp, (fd), int fd)
+tcgetpgrp (fd)
+     int fd;
 {
   if (fd < 0)
     {
-      errno = EBADF;
+      __set_errno (EBADF);
       return (pid_t) -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return (pid_t) -1;
 }
 
diff --git a/sysdeps/stub/tcsendbrk.c b/sysdeps/stub/tcsendbrk.c
index 6d8be7403c..80ee6f4d53 100644
--- a/sysdeps/stub/tcsendbrk.c
+++ b/sysdeps/stub/tcsendbrk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,21 +16,22 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <termios.h>
 
 /* Send zero bits on FD.  */
 int
-DEFUN(tcsendbreak, (fd, duration), int fd AND int duration)
+tcsendbreak (fd, duration)
+     int fd;
+     int duration;
 {
   if (fd < 0)
     {
-      errno = EBADF;
+      __set_errno (EBADF);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/tcsetattr.c b/sysdeps/stub/tcsetattr.c
index 89ee7d7c32..ce1dae094f 100644
--- a/sysdeps/stub/tcsetattr.c
+++ b/sysdeps/stub/tcsetattr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,26 +16,27 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <termios.h>
 
-static int EXFUN(bad_speed, (speed_t speed));
+static int bad_speed __P ((speed_t speed));
 
 /* Set the state of FD to *TERMIOS_P.  */
 int
-DEFUN(tcsetattr, (fd, optional_actions, termios_p),
-      int fd AND int optional_actions AND CONST struct termios *termios_p)
+tcsetattr (fd, optional_actions, termios_p)
+     int fd;
+     int optional_actions;
+     const struct termios *termios_p;
 {
   if (fd < 0)
     {
-      errno = EBADF;
+      __set_errno (EBADF);
       return -1;
     }
   if (termios_p == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
   switch (optional_actions)
@@ -45,7 +46,7 @@ DEFUN(tcsetattr, (fd, optional_actions, termios_p),
     case TCSAFLUSH:
       break;
     default:
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
@@ -53,18 +54,19 @@ DEFUN(tcsetattr, (fd, optional_actions, termios_p),
       bad_speed(termios_p->__ispeed == 0 ?
 		termios_p->__ospeed : termios_p->__ispeed))
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
 
 /* Stricknine checking.  */
 static int
-DEFUN(bad_speed, (speed), speed_t speed)
+bad_speed (speed)
+     speed_t speed;
 {
   switch (speed)
     {
diff --git a/sysdeps/stub/tcsetpgrp.c b/sysdeps/stub/tcsetpgrp.c
index 3dbe34e29c..3a97fef975 100644
--- a/sysdeps/stub/tcsetpgrp.c
+++ b/sysdeps/stub/tcsetpgrp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,23 +16,23 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 #include <sys/types.h>
 
 /* Set the foreground process group ID of FD set PGRP_ID.  */
 int
-DEFUN(tcsetpgrp, (fd, pgrp_id),
-      int fd AND pid_t pgrp_id)
+tcsetpgrp (fd, pgrp_id)
+     int fd;
+     pid_t pgrp_id;
 {
   if (fd < 0)
     {
-      errno = EBADF;
+      __set_errno (EBADF);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/telldir.c b/sysdeps/stub/telldir.c
index ce00e09fb4..811ce74000 100644
--- a/sysdeps/stub/telldir.c
+++ b/sysdeps/stub/telldir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/types.h>
 #include <stddef.h>
@@ -24,16 +23,17 @@ Cambridge, MA 02139, USA.  */
 
 /* Return the current position of DIRP.  */
 off_t
-DEFUN(telldir, (dirp), DIR *dirp)
+telldir (dirp)
+     DIR *dirp;
 {
   if (dirp == NULL)
     {
-      errno = EINVAL;
-      return(-1);
+      __set_errno (EINVAL);
+      return -1;
     }
 
-  errno = ENOSYS;
-  return((off_t) -1);
+  __set_errno (ENOSYS);
+  return (off_t) -1;
 }
 
 
diff --git a/sysdeps/stub/tempname.c b/sysdeps/stub/tempname.c
index 42b1c32022..939c70fb0d 100644
--- a/sysdeps/stub/tempname.c
+++ b/sysdeps/stub/tempname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 95, 96 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stdio.h>
 
@@ -27,13 +26,15 @@ Cambridge, MA 02139, USA.  */
    Return the generated filename or NULL if one could not
    be generated, putting the length of the string in *LENPTR.  */
 char *
-DEFUN(__stdio_gen_tempname, (dir, pfx, dir_search, lenptr),
-      CONST char *dir AND CONST char *pfx AND
-      int dir_search AND size_t *lenptr AND
-      FILE **streamptr)
+__stdio_gen_tempname (dir, pfx, dir_search, lenptr)
+     const char *dir;
+     const char *pfx;
+     int dir_search;
+     size_t *lenptr;
+     FILE **streamptr;
 {
   *lenptr = 0;
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return NULL;
 }
 
diff --git a/sysdeps/stub/time.c b/sysdeps/stub/time.c
index cb208bcf0b..d410be3894 100644
--- a/sysdeps/stub/time.c
+++ b/sysdeps/stub/time.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996 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
@@ -24,7 +24,7 @@ time_t
 time (timer)
      time_t *timer;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
 
   if (timer != NULL)
     *timer = (time_t) -1;
diff --git a/sysdeps/stub/times.c b/sysdeps/stub/times.c
index 2b47ec2f1d..ab33dcae33 100644
--- a/sysdeps/stub/times.c
+++ b/sysdeps/stub/times.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/times.h>
 #include <stddef.h>
@@ -26,15 +25,16 @@ Cambridge, MA 02139, USA.  */
    Return the elapsed real time, or (clock_t) -1 for errors.
    All times are in CLK_TCKths of a second.  */
 clock_t
-DEFUN(__times, (buffer), struct tms *buffer)
+__times (buffer)
+     struct tms *buffer;
 {
   if (buffer == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return (clock_t) -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return (clock_t) -1;
 }
 stub_warning (times)
diff --git a/sysdeps/stub/truncate.c b/sysdeps/stub/truncate.c
index 1367332792..1134c6a4d9 100644
--- a/sysdeps/stub/truncate.c
+++ b/sysdeps/stub/truncate.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <sys/types.h>
 #include <errno.h>
 
 /* Truncate PATH to LENGTH bytes.  */
 int
-DEFUN(truncate, (path, length),
-      CONST char *path AND off_t length)
+truncate (path, length)
+     const char *path;
+     off_t length;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/ttyname.c b/sysdeps/stub/ttyname.c
index a243e85053..0d251f4ee0 100644
--- a/sysdeps/stub/ttyname.c
+++ b/sysdeps/stub/ttyname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <unistd.h>
@@ -27,9 +26,10 @@ char *__ttyname = NULL;
 /* Return the pathname of the terminal FD is open on, or NULL on errors.
    The returned storage is good only until the next call to this function.  */
 char *
-DEFUN(ttyname, (fd), int fd)
+ttyname (fd)
+     int fd;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return NULL;
 }
 
diff --git a/sysdeps/stub/ttyname_r.c b/sysdeps/stub/ttyname_r.c
index 67350d9ed3..7a05629c43 100644
--- a/sysdeps/stub/ttyname_r.c
+++ b/sysdeps/stub/ttyname_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -28,7 +28,7 @@ ttyname_r (fd, buf, buflen)
      char *buf;
      int buflen;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/ualarm.c b/sysdeps/stub/ualarm.c
index ead365b157..ffc4e51853 100644
--- a/sysdeps/stub/ualarm.c
+++ b/sysdeps/stub/ualarm.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 
 /* Set an alarm to go off (generating a SIGALRM signal) in VALUE microseconds.
@@ -25,10 +24,11 @@ Cambridge, MA 02139, USA.  */
 
    Returns the number of microseconds remaining before the alarm.  */
 unsigned int
-DEFUN(ualarm, (value, interval),
-      unsigned int value AND unsigned int interval)
+ualarm (value, interval)
+     unsigned int value;
+     unsigned int interval;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/ulimit.c b/sysdeps/stub/ulimit.c
index 84633c4e14..e633a6aeed 100644
--- a/sysdeps/stub/ulimit.c
+++ b/sysdeps/stub/ulimit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996 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
@@ -32,7 +32,7 @@ __ulimit (cmd, newlimit)
      int cmd;
      long int newlimit;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 weak_alias (__ulimit, ulimit)
diff --git a/sysdeps/stub/umask.c b/sysdeps/stub/umask.c
index 18c85b74b7..fea20c2972 100644
--- a/sysdeps/stub/umask.c
+++ b/sysdeps/stub/umask.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <sys/stat.h>
 #include <errno.h>
 #include <sys/types.h>
 
 /* Set the file creation mask to MASK, returning the old mask.  */
 mode_t
-DEFUN(__umask, (mask), mode_t mask)
+__umask (mask)
+     mode_t mask;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (umask)
diff --git a/sysdeps/stub/unlink.c b/sysdeps/stub/unlink.c
index 7f8e249f27..6fe7c9de00 100644
--- a/sysdeps/stub/unlink.c
+++ b/sysdeps/stub/unlink.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <stddef.h>
 #include <unistd.h>
@@ -24,16 +23,17 @@ Cambridge, MA 02139, USA.  */
 
 /* Remove the link named NAME.  */
 int
-DEFUN(__unlink, (name), CONST char *name)
+__unlink (name)
+     const char *name;
 {
   if (name == NULL)
     {
-      errno = EINVAL;
-      return(-1);
+      __set_errno (EINVAL);
+      return -1;
     }
 
-  errno = ENOSYS;
-  return(-1);
+  __set_errno (ENOSYS);
+  return -1;
 }
 stub_warning (unlink)
 
diff --git a/sysdeps/stub/usleep.c b/sysdeps/stub/usleep.c
index c1cae9c7c6..4f3f232f63 100644
--- a/sysdeps/stub/usleep.c
+++ b/sysdeps/stub/usleep.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,14 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 
 /* Sleep USECONDS microseconds, or until a previously set timer goes off.  */
 unsigned int
-DEFUN(usleep, (useconds), unsigned int useconds)
+usleep (useconds)
+     unsigned int useconds;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/ustat.c b/sysdeps/stub/ustat.c
index baa98fd5e8..8e909f9f40 100644
--- a/sysdeps/stub/ustat.c
+++ b/sysdeps/stub/ustat.c
@@ -26,7 +26,7 @@ ustat (dev, ust)
      dev_t dev;
      struct ustat * ust;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (ustat)
diff --git a/sysdeps/stub/utime.c b/sysdeps/stub/utime.c
index 641960dd1b..374ed1d140 100644
--- a/sysdeps/stub/utime.c
+++ b/sysdeps/stub/utime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <utime.h>
 
@@ -24,16 +23,18 @@ Cambridge, MA 02139, USA.  */
 /* Set the access and modification times of FILE to those given in TIMES.
    If TIMES is NULL, set them to the current time.  */
 int
-DEFUN(utime, (file, times), CONST char *file AND CONST struct utimbuf *times)
+utime (file, times)
+     const char *file;
+     const struct utimbuf *times;
 {
   if (file == NULL)
     {
-      errno = EINVAL;
-      return(-1);
+      __set_errno (EINVAL);
+      return -1;
     }
 
-  errno = ENOSYS;
-  return(-1);
+  __set_errno (ENOSYS);
+  return -1;
 }
 
 
diff --git a/sysdeps/stub/utimes.c b/sysdeps/stub/utimes.c
index 5afc3d7eb4..824f2412ee 100644
--- a/sysdeps/stub/utimes.c
+++ b/sysdeps/stub/utimes.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <sys/time.h>
 #include <errno.h>
 #include <stddef.h>
@@ -24,16 +23,17 @@ Cambridge, MA 02139, USA.  */
 /* Change the access time of FILE to TVP[0] and
    the modification time of FILE to TVP[1].  */
 int
-DEFUN(__utimes, (file, tvp),
-      CONST char *file AND struct timeval tvp[2])
+__utimes (file, tvp)
+     const char *file;
+     struct timeval tvp[2];
 {
   if (file == NULL || tvp == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/vhangup.c b/sysdeps/stub/vhangup.c
index 6a7a994365..532fd64387 100644
--- a/sysdeps/stub/vhangup.c
+++ b/sysdeps/stub/vhangup.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 
@@ -24,9 +23,9 @@ Cambridge, MA 02139, USA.  */
    with the control terminal, and then send a SIGHUP signal to the process
    group of the control terminal.  */
 int
-DEFUN_VOID(vhangup)
+vhangup ()
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/wait.c b/sysdeps/stub/wait.c
index 97b78417b6..a41a2471a8 100644
--- a/sysdeps/stub/wait.c
+++ b/sysdeps/stub/wait.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,16 +16,16 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <sys/wait.h>
 #include <errno.h>
 
 /* Wait for a child to die.  When one does, put its status in *STAT_LOC
    and return its process ID.  For errors, return (pid_t) -1.  */
 __pid_t
-DEFUN(__wait, (stat_loc), __WAIT_STATUS_DEFN stat_loc)
+__wait (stat_loc)
+     __WAIT_STATUS_DEFN stat_loc;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (wait)
diff --git a/sysdeps/stub/wait3.c b/sysdeps/stub/wait3.c
index c1640dde8a..b5ea8e37b5 100644
--- a/sysdeps/stub/wait3.c
+++ b/sysdeps/stub/wait3.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/wait.h>
 #include <sys/types.h>
@@ -27,16 +26,18 @@ Cambridge, MA 02139, USA.  */
    there.  If the WUNTRACED bit is set in OPTIONS, return status for stopped
    children; otherwise don't.  */
 pid_t
-DEFUN(__wait3, (stat_loc, options, usage),
-      __WAIT_STATUS_DEFN stat_loc AND int options AND struct rusage *usage)
+__wait3 (stat_loc, options, usage)
+     __WAIT_STATUS_DEFN stat_loc;
+     int options;
+     struct rusage *usage;
 {
   if ((options & ~(WNOHANG|WUNTRACED)) != 0)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return (pid_t) -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return (pid_t) -1;
 }
 stub_warning (wait3)
diff --git a/sysdeps/stub/wait4.c b/sysdeps/stub/wait4.c
index 2062d4b2cc..bf273438ca 100644
--- a/sysdeps/stub/wait4.c
+++ b/sysdeps/stub/wait4.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 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
@@ -16,17 +16,18 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <errno.h>
 
 pid_t
-DEFUN(__wait4, (pid, stat_loc, options, usage),
-      pid_t pid AND __WAIT_STATUS_DEFN stat_loc AND int options AND
-      struct rusage *usage)
+__wait4 (pid, stat_loc, options, usage)
+     pid_t pid;
+     __WAIT_STATUS_DEFN stat_loc;
+     int options;
+     struct rusage *usage;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return (pid_t) -1;
 }
 stub_warning (wait4)
diff --git a/sysdeps/stub/waitpid.c b/sysdeps/stub/waitpid.c
index 22eb019eb5..09ba5a8f92 100644
--- a/sysdeps/stub/waitpid.c
+++ b/sysdeps/stub/waitpid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <sys/wait.h>
 #include <sys/types.h>
@@ -35,18 +34,18 @@ Cambridge, MA 02139, USA.  */
    Return (pid_t) -1 for errors.  If the WUNTRACED bit is set in OPTIONS,
    return status for stopped children; otherwise don't.  */
 pid_t
-DEFUN(__waitpid, (pid, stat_loc, options),
-      pid_t pid AND int *stat_loc AND int options)
+__libc_waitpid (pid_t pid, int *stat_loc, int options)
 {
   if ((options & ~(WNOHANG|WUNTRACED)) != 0)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return (pid_t) -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return (pid_t) -1;
 }
-stub_warning (waitpid)
+weak_alias (__libc_waitpid, __waitpid)
+weak_alias (__libc_waitpid, waitpid)
 
-weak_alias (__waitpid, waitpid)
+stub_warning (waitpid)
diff --git a/sysdeps/stub/write.c b/sysdeps/stub/write.c
index deb4851e06..69778c376f 100644
--- a/sysdeps/stub/write.c
+++ b/sysdeps/stub/write.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <sysdep.h>
 #include <errno.h>
 #include <unistd.h>
@@ -24,25 +23,25 @@ Cambridge, MA 02139, USA.  */
 
 /* Write NBYTES of BUF to FD.  Return the number written, or -1.  */
 ssize_t
-DEFUN(__write, (fd, buf, nbytes),
-      int fd AND CONST PTR buf AND size_t nbytes)
+__libc_write (int fd, const void *buf, size_t nbytes)
 {
   if (nbytes == 0)
     return 0;
   if (fd < 0)
     {
-      errno = EBADF;
+      __set_errno (EBADF);
       return -1;
     }
   if (buf == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (write)
 
-weak_alias (__write, write)
+weak_alias (__libc_write, __write)
+weak_alias (__libc_write, write)
diff --git a/sysdeps/stub/writev.c b/sysdeps/stub/writev.c
index f1d574948d..593880c0e9 100644
--- a/sysdeps/stub/writev.c
+++ b/sysdeps/stub/writev.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <unistd.h>
 #include <sys/uio.h>
@@ -27,10 +26,12 @@ Cambridge, MA 02139, USA.  */
    Operates just like `write' (see <unistd.h>) except that the data
    are taken from VECTOR instead of a contiguous buffer.  */
 int
-DEFUN(writev, (fd, vector, count),
-      int fd AND CONST struct iovec *vector AND size_t count)
+writev (fd, vector, count)
+     int fd;
+     const struct iovec *vector;
+     size_t count;
 {
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 
diff --git a/sysdeps/stub/xmknod.c b/sysdeps/stub/xmknod.c
index 6d365cbe0c..48d8b4f113 100644
--- a/sysdeps/stub/xmknod.c
+++ b/sysdeps/stub/xmknod.c
@@ -28,11 +28,11 @@ __xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
 {
   if (vers != _MKNOD_VER)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (__xmknod)
diff --git a/sysdeps/stub/xstat.c b/sysdeps/stub/xstat.c
index ad67aa9fec..a487062fdf 100644
--- a/sysdeps/stub/xstat.c
+++ b/sysdeps/stub/xstat.c
@@ -26,11 +26,11 @@ __xstat (int vers, const char *file, struct stat *buf)
 {
   if (vers != _STAT_VER || file == NULL || buf == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
-  errno = ENOSYS;
+  __set_errno (ENOSYS);
   return -1;
 }
 stub_warning (stat)