Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / ntp / include / ntp_tty.h
blob05d5242c4f0b1bec8bac26788632f0b2dfe71c62
1 /* $NetBSD: ntp_tty.h,v 1.2 2003/12/04 16:23:36 drochner Exp $ */
3 /*
4 * ntp_tty.h - header file for serial lines handling
5 */
7 #ifndef NTP_TTY_H
8 #define NTP_TTY_H
10 #if defined(HAVE_BSD_TTYS)
11 #include <sgtty.h>
12 #define TTY struct sgttyb
13 #endif /* HAVE_BSD_TTYS */
15 #if defined(HAVE_SYSV_TTYS)
16 #include <termio.h>
17 #define TTY struct termio
18 #ifndef tcsetattr
19 #define tcsetattr(fd, cmd, arg) ioctl(fd, cmd, arg)
20 #endif
21 #ifndef TCSANOW
22 #define TCSANOW TCSETA
23 #endif
24 #ifndef TCIFLUSH
25 #define TCIFLUSH 0
26 #endif
27 #ifndef TCOFLUSH
28 #define TCOFLUSH 1
29 #endif
30 #ifndef TCIOFLUSH
31 #define TCIOFLUSH 2
32 #endif
33 #ifndef tcflush
34 #define tcflush(fd, arg) ioctl(fd, TCFLSH, arg)
35 #endif
36 #endif /* HAVE_SYSV_TTYS */
38 #if defined(HAVE_TERMIOS)
39 # ifdef TERMIOS_NEEDS__SVID3
40 # define _SVID3
41 # endif
42 # include <termios.h>
43 # ifdef TERMIOS_NEEDS__SVID3
44 # undef _SVID3
45 # endif
46 #define TTY struct termios
47 #endif
49 #if defined(HAVE_SYS_MODEM_H)
50 #include <sys/modem.h>
51 #endif
53 #if !defined(SYSV_TTYS) && !defined(STREAM) & !defined(BSD_TTYS)
54 #define BSD_TTYS
55 #endif /* SYSV_TTYS STREAM BSD_TTYS */
57 #endif /* NTP_TTY_H */