| 1 | /* Terminal interface definitions for GDB, the GNU Debugger. |
| 2 | Copyright (C) 1986, 1989, 1991 Free Software Foundation, Inc. |
| 3 | |
| 4 | This file is part of GDB. |
| 5 | |
| 6 | GDB is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by |
| 8 | the Free Software Foundation; either version 1, or (at your option) |
| 9 | any later version. |
| 10 | |
| 11 | GDB is distributed in the hope that it will be useful, |
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | GNU General Public License for more details. |
| 15 | |
| 16 | You should have received a copy of the GNU General Public License |
| 17 | along with GDB; see the file COPYING. If not, write to |
| 18 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ |
| 19 | |
| 20 | |
| 21 | /* Define a common set of macros -- BSD based -- and redefine whatever |
| 22 | the system offers to make it look like that. */ |
| 23 | |
| 24 | #ifdef HAVE_TERMIO |
| 25 | |
| 26 | #include <termio.h> |
| 27 | |
| 28 | #undef TIOCGETP |
| 29 | #define TIOCGETP TCGETA |
| 30 | #undef TIOCSETN |
| 31 | #define TIOCSETN TCSETA |
| 32 | #undef TIOCSETP |
| 33 | #define TIOCSETP TCSETAF |
| 34 | #define TERMINAL struct termio |
| 35 | |
| 36 | #ifdef NO_JOB_CONTROL |
| 37 | # undef TIOCGPGRP |
| 38 | # undef TIOCGPGRP |
| 39 | #endif |
| 40 | |
| 41 | #else /* no termio */ |
| 42 | |
| 43 | #include <fcntl.h> |
| 44 | #include <sgtty.h> |
| 45 | #include <sys/ioctl.h> |
| 46 | #define TERMINAL struct sgttyb |
| 47 | |
| 48 | #endif /* no termio */ |
| 49 | |
| 50 | extern void new_tty (); |