1 /* exp_tty_in.h - internal tty support definitions */
3 /* Definitions for handling termio inclusion are localized here */
4 /* This file should be included only if direct access to tty structures are */
5 /* required. This file is necessary to avoid mismatch between gcc's and */
6 /* vendor's include files */
8 /* Written by Rob Savoye <rob@cygnus.com>. Mon Feb 22 11:16:53 RMT 1993 */
10 #ifndef __EXP_TTY_IN_H__
11 #define __EXP_TTY_IN_H__
13 #include "expect_cf.h"
16 #include "sys/types.h"
20 * Set up some macros to isolate tty differences
23 /* On some hosts, termio is incomplete (broken) and sgtty is a better
24 choice. At the same time, termio has some definitions for modern
25 stuff like window sizes that sgtty lacks - that's why termio.h
26 is included even when we claim the basic style is sgtty
29 /* test for pyramid may be unnecessary, but only Pyramid people have */
30 /* complained - notably pclink@qus102.qld.npb.telecom.com.au (Rick) */
31 #if defined(pyr) && defined(HAVE_TERMIO) && defined(HAVE_SGTTYB)
35 /* on ISC SVR3.2, termios is skeletal and termio is a better choice. */
36 /* sgttyb must also be avoided because it redefines same things that */
38 /* note that both SVR3.2 and AIX lacks TCGETS or TCGETA in termios.h */
39 /* but SVR3.2 lacks both TCSETATTR and TCGETS/A */
40 #if defined(HAVE_TERMIO) && defined(HAVE_TERMIOS) && !defined(HAVE_TCGETS_OR_TCGETA_IN_TERMIOS_H) && !defined(HAVE_TCSETATTR)
45 #if defined(HAVE_TERMIO) && !defined(HAVE_TERMIOS)
48 # define TERMINAL termio
50 # define TCGETS TCGETA
51 # define TCSETS TCSETA
52 # define TCSETSW TCSETAW
53 # define TCSETSF TCSETAF
57 #if defined(HAVE_SGTTYB) && !defined(HAVE_TERMIOS)
61 # define TCGETS TIOCGETP
62 # define TCSETS TIOCSETP
65 # define TCSETSW TIOCSETN
67 # define TERMINAL sgttyb
68 # ifdef HAVE_SYS_FCNTL_H
69 # include <sys/fcntl.h>
74 # include <sys/ioctl.h>
78 #if defined(HAVE_TERMIOS)
82 # define TERMINAL termios
83 # if !defined(TCGETS) || !defined(TCSETS)
84 # define TCGETS TCGETA
85 # define TCSETS TCSETA
86 # define TCSETSW TCSETAW
87 # define TCSETSF TCSETAF
91 /* This section was written by: Don Libes, NIST, 2/6/90 */
93 typedef struct TERMINAL exp_tty;
94 extern exp_tty exp_tty_original;
95 extern exp_tty exp_tty_current;
96 extern exp_tty exp_tty_cooked;
100 #endif /* __EXP_TTY_IN_H__ */