-/* 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
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>
#include <sysv_termio.h>
-CONST speed_t __unix_speeds[] =
+const speed_t __unix_speeds[] =
{
0,
50,
/* 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;
if (termios_p == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
switch (optional_actions)
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;
}
if (buf.c_cflag == -1)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}