1 /* Terminal interface definitions for GDB, the GNU Debugger.
2 Copyright (C) 1986, 1989, 1990, 1991, 1992, 1993, 1995, 1996, 1999, 2000,
4 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
23 #if !defined (TERMINAL_H)
27 /* If we're using autoconf, it will define HAVE_TERMIOS_H,
28 HAVE_TERMIO_H and HAVE_SGTTY_H for us. One day we can rewrite
29 ser-unix.c and inflow.c to inspect those names instead of
30 HAVE_TERMIOS, HAVE_TERMIO and the implicit HAVE_SGTTY (when neither
31 HAVE_TERMIOS or HAVE_TERMIO is set). Until then, make sure that
32 nothing has already defined the one of the names, and do the right
35 #if !defined (HAVE_TERMIOS) && !defined(HAVE_TERMIO) && !defined(HAVE_SGTTY)
36 #if defined(HAVE_TERMIOS_H)
38 #else /* ! defined (HAVE_TERMIOS_H) */
39 #if defined(HAVE_TERMIO_H)
41 #else /* ! defined (HAVE_TERMIO_H) */
42 #if defined(HAVE_SGTTY_H)
44 #endif /* ! defined (HAVE_SGTTY_H) */
45 #endif /* ! defined (HAVE_TERMIO_H) */
46 #endif /* ! defined (HAVE_TERMIOS_H) */
47 #endif /* !defined (HAVE_TERMIOS) && !defined(HAVE_TERMIO) && !defined(HAVE_SGTTY) */
49 #if defined(HAVE_TERMIOS)
53 #if !defined(_WIN32) && !defined (HAVE_TERMIOS)
55 /* Define a common set of macros -- BSD based -- and redefine whatever
56 the system offers to make it look like that. FIXME: serial.h and
57 ser-*.c deal with this in a much cleaner fashion; as soon as stuff
58 is converted to use them, can get rid of this crap. */
65 #define TIOCGETP TCGETA
67 #define TIOCSETN TCSETA
69 #define TIOCSETP TCSETAF
70 #define TERMINAL struct termio
76 #include <sys/ioctl.h>
77 #define TERMINAL struct sgttyb
82 extern void new_tty (void);
84 /* Do we have job control? Can be assumed to always be the same within
85 a given run of GDB. In inflow.c. */
86 extern int job_control
;
88 /* Set the process group of the caller to its own pid, or do nothing if
89 we lack job control. */
90 extern int gdb_setpgid (void);
92 /* Set up a serial structure describing standard input. In inflow.c. */
93 extern void initialize_stdin_serial (void);
95 #endif /* !defined (TERMINAL_H) */
This page took 0.030799 seconds and 4 git commands to generate.