1 /***********************************************************************
3 * This software is part of the ast package *
4 * Copyright (c) 1985-2010 AT&T Intellectual Property *
5 * and is licensed under the *
6 * Common Public License, Version 1.0 *
7 * by AT&T Intellectual Property *
9 * A copy of the License is available at *
10 * http://www.opensource.org/licenses/cpl1.0.txt *
11 * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
13 * Information and Software Systems Research *
17 * Glenn Fowler <gsf@research.att.com> *
18 * David Korn <dgk@research.att.com> *
19 * Phong Vo <kpv@research.att.com> *
21 ***********************************************************************/
22 /* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/tty by iffe version 2009-12-04 : : */
24 #define _def_tty_ast 1
25 #define _sys_types 1 /* #include <sys/types.h> ok */
26 #define _hdr_termios 1 /* #include <termios.h> ok */
27 #define _hdr_termio 1 /* #include <termio.h> ok */
28 #define _hdr_sgtty 1 /* #include <sgtty.h> ok */
29 #define _sys_termios 1 /* #include <sys/termios.h> ok */
30 #define _sys_termio 1 /* #include <sys/termio.h> ok */
31 #define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
32 #define _lib_tcgetattr 1 /* tcgetattr() in default lib(s) */
33 #define _lib_tcgetpgrp 1 /* tcgetpgrp() in default lib(s) */
34 #define _mac__POSIX_VDISABLE 1 /* _POSIX_VDISABLE is a macro */
37 # if _mac__POSIX_VDISABLE
38 # undef _POSIX_VDISABLE
42 # if defined(_sys_termios) && defined(_lib_tcgetattr)
43 # include <sys/termios.h>
44 # define _hdr_termios 1
47 # endif /* _sys_termios */
48 #endif /* _hdr_termios */
58 # define TCSANOW TCSETS
59 # define TCSADRAIN TCSETSW
60 # define TCSAFLUSH TCSETSF
62 /* The following corrects bugs in some implementations */
63 # if defined(TCSADFLUSH) && !defined(TCSAFLUSH)
64 # define TCSAFLUSH TCSADFLUSH
65 # endif /* TCSADFLUSH */
66 # ifndef _lib_tcgetattr
68 # define tcgetattr(fd,tty) ioctl(fd, TCGETS, tty)
70 # define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
72 # define cfgetospeed(tp) ((tp)->c_cflag & CBAUD)
73 # endif /* _lib_tcgetattr */
76 # define cfgetospeed(tp) ((tp)->c_cflag & CBAUD)
77 # define cfgetispeed(tp) ((tp)->c_cflag & CBAUD)
78 # define cfsetispeed(tp,val) ((tp)->c_cflag &=~ CBAUD,(tp)->c_cflag|=(val))
79 # define cfsetospeed(tp,val) ((tp)->c_cflag &=~ CBAUD,(tp)->c_cflag|=(val))
84 # include <sys/termio.h>
85 # define _hdr_termio 1
86 # endif /* _sys_termio */
87 # endif /* _hdr_termio */
89 # define termios termio
91 # define tcgetattr(fd,tty) ioctl(fd, TCGETA, tty)
92 # define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
95 # include <sys/bsdtty.h>
96 # endif /* _sys_bsdtty */
102 # include <sys/nttyio.h>
103 # endif /* _sys_nttyio */
104 # endif /* LPENDIN */
105 # define termios sgttyb
108 # endif /* TIOCSETN */
110 # define tcgetattr(fd,tty) ioctl(fd, TIOCGETP, tty)
111 # define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
113 # define tcgetattr(fd,tty) gtty(fd, tty)
114 # define tcsetattr(fd,action,tty) stty(fd, tty)
115 # endif /* TIOCGETP */
118 # include <sys/ttyio.h>
120 # endif /* _hdr_sgtty */
121 # endif /* hdr_termio */
125 # define TCSANOW TCSETA
126 # define TCSAFLUSH TCSETAF
129 # define TCSANOW TIOCSETN
130 # define TCSADRAIN TIOCSETN
131 # define TCSAFLUSH TIOCSETP
132 # endif /* TIOCSETN */
133 # endif /* TCSETAW */
134 # endif /* TCSANOW */
135 #endif /* _hdr_termios */
137 /* set ECHOCTL if driver can echo control charaters as ^c */
140 # define ECHOCTL LCTLECH
141 # endif /* !ECHOCTL */
145 # define ECHOCTL LNEW_CTLECH
146 # endif /* !ECHOCTL */
147 #endif /* LNEW_CTLECH */
150 # define PENDIN LNEW_PENDIN
151 # endif /* !PENDIN */
152 #endif /* LNEW_PENDIN */