1 /* Generic termios.h */
9 #define TERMIO_TYPE struct termios
10 #define TERMFLAG_TYPE tcflag_t
11 #define GETATTR( fd, tiop ) tcgetattr((fd), (tiop))
12 #define SETATTR( fd, tiop ) tcsetattr((fd), TCSANOW /* 0 */, (tiop))
13 #define GETFLAGS( tio ) ((tio).c_lflag)
14 #define SETFLAGS( tio, flags ) ((tio).c_lflag = (flags))
16 #elif defined( HAVE_SGTTY_H )
19 #ifdef HAVE_SYS_IOCTL_H
20 #include <sys/ioctl.h>
23 #define TERMIO_TYPE struct sgttyb
24 #define TERMFLAG_TYPE int
25 #define GETATTR( fd, tiop ) ioctl((fd), TIOCGETP, (caddr_t)(tiop))
26 #define SETATTR( fd, tiop ) ioctl((fd), TIOCSETP, (caddr_t)(tiop))
27 #define GETFLAGS( tio ) ((tio).sg_flags)
28 #define SETFLAGS( tio, flags ) ((tio).sg_flags = (flags))
30 #endif /* HAVE_SGTTY_H */
32 #endif /* _AC_TERMIOS_H */