about summary refs log tree commit diff
path: root/sysdeps/stub/dup2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/stub/dup2.c')
-rw-r--r--sysdeps/stub/dup2.c11
1 files changed, 6 insertions, 5 deletions
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)