198944Sobrien/* Terminal interface definitions for the GDB remote server. 298944Sobrien Copyright 2002, Free Software Foundation, Inc. 398944Sobrien 498944Sobrien This file is part of GDB. 598944Sobrien 698944Sobrien This program is free software; you can redistribute it and/or modify 798944Sobrien it under the terms of the GNU General Public License as published by 898944Sobrien the Free Software Foundation; either version 2 of the License, or 998944Sobrien (at your option) any later version. 1098944Sobrien 1198944Sobrien This program is distributed in the hope that it will be useful, 1298944Sobrien but WITHOUT ANY WARRANTY; without even the implied warranty of 1398944Sobrien MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1498944Sobrien GNU General Public License for more details. 1598944Sobrien 1698944Sobrien You should have received a copy of the GNU General Public License 1798944Sobrien along with this program; if not, write to the Free Software 1898944Sobrien Foundation, Inc., 59 Temple Place - Suite 330, 1998944Sobrien Boston, MA 02111-1307, USA. */ 2098944Sobrien 2198944Sobrien#if !defined (TERMINAL_H) 2298944Sobrien#define TERMINAL_H 1 2398944Sobrien 2498944Sobrien/* Autoconf will have defined HAVE_TERMIOS_H, HAVE_TERMIO_H, 2598944Sobrien and HAVE_SGTTY_H for us as appropriate. */ 2698944Sobrien 2798944Sobrien#if defined(HAVE_TERMIOS_H) 2898944Sobrien#define HAVE_TERMIOS 2998944Sobrien#include <termios.h> 3098944Sobrien#else /* ! HAVE_TERMIOS_H */ 3198944Sobrien#if defined(HAVE_TERMIO_H) 3298944Sobrien#define HAVE_TERMIO 3398944Sobrien#include <termio.h> 3498944Sobrien 3598944Sobrien#undef TIOCGETP 3698944Sobrien#define TIOCGETP TCGETA 3798944Sobrien#undef TIOCSETN 3898944Sobrien#define TIOCSETN TCSETA 3998944Sobrien#undef TIOCSETP 4098944Sobrien#define TIOCSETP TCSETAF 4198944Sobrien#define TERMINAL struct termio 4298944Sobrien#else /* ! HAVE_TERMIO_H; default to SGTTY. */ 4398944Sobrien#define HAVE_SGTTY 4498944Sobrien#include <fcntl.h> 4598944Sobrien#include <sgtty.h> 4698944Sobrien#include <sys/ioctl.h> 4798944Sobrien#define TERMINAL struct sgttyb 4898944Sobrien#endif 4998944Sobrien#endif 5098944Sobrien 5198944Sobrien#endif /* !defined (TERMINAL_H) */ 52