-#ifdef HAVE_TERMIOS
-#define HAVE_TCATTR
-#endif
-
-#ifdef HAVE_TCATTR
-
-#define EMACS_GET_TTY_1(fd, p) (tcgetattr ((fd), &(p)->main) != -1)
-#define EMACS_SET_TTY_1(fd, p, waitp) \
- (tcsetattr ((fd), (waitp) ? TCSAFLUSH : TCSADRAIN, &(p)->main) != -1)
-
-#else
-#ifdef HAVE_TERMIO
-
-#define EMACS_GET_TTY_1(fd, p) (ioctl ((fd), TCGETA, &(p)->main) != -1)
-#define EMACS_SET_TTY_1(fd, p, waitp) \
- (ioctl ((fd), (waitp) ? TCSETAW : TCSETAF, &(p)->main) != -1)
-
-#else
-#ifdef VMS
-
-/* These definitions will really only work in sysdep.c, because of their
- use of input_iosb. I don't know enough about VMS QIO to fix this. */
-#define EMACS_GET_TTY_1(fd, p) \
- SYS$QIOW (0, (fd), IO$_SENSEMODE, (p), 0, 0, \
- &(p)->main.class, 12, 0, 0, 0, 0);
-#define EMACS_SET_TTY_1(fd, p, waitp) \
- SYS$QIOW (0, (fd), IO$_SETMODE, &input_iosb, 0, 0, \
- &(p)->main.class, 12, 0, 0, 0, 0);
-
-#else
-
-#define EMACS_GET_TTY_1(fd, p) (ioctl ((fd), TIOCGETP, &(p)->main) != -1)
-#define EMACS_SET_TTY_1(fd, p, waitp) \
- (ioctl ((fd), (waitp) ? TIOCSETP : TIOCSETN, &(p)->main) != -1)
-
-#endif
-#endif
-#endif
-
-#ifdef TIOCGLTC