about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/tcsetattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/tcsetattr.c')
-rw-r--r--sysdeps/unix/sysv/tcsetattr.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/sysdeps/unix/sysv/tcsetattr.c b/sysdeps/unix/sysv/tcsetattr.c
index 230a258e42..76d0192e5b 100644
--- a/sysdeps/unix/sysv/tcsetattr.c
+++ b/sysdeps/unix/sysv/tcsetattr.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 <stddef.h>
 #include <termios.h>
@@ -25,7 +24,7 @@ Cambridge, MA 02139, USA.  */
 #include <sysv_termio.h>
 
 
-CONST speed_t __unix_speeds[] =
+const speed_t __unix_speeds[] =
   {
     0,
     50,
@@ -48,8 +47,10 @@ CONST speed_t __unix_speeds[] =
 
 /* 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;
 {
   struct __sysv_termio buf;
   int ioctl_function;
@@ -57,7 +58,7 @@ DEFUN(tcsetattr, (fd, optional_actions, termios_p),
 
   if (termios_p == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
   switch (optional_actions)
@@ -72,13 +73,13 @@ DEFUN(tcsetattr, (fd, optional_actions, termios_p),
       ioctl_function = _TCSETAF;
       break;
     default:
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
 
   if (termios_p->__ispeed != termios_p->__ospeed)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }
   buf.c_cflag = -1;
@@ -89,7 +90,7 @@ DEFUN(tcsetattr, (fd, optional_actions, termios_p),
     }
   if (buf.c_cflag == -1)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return -1;
     }