2002-02-25 03:49:02 +01:00
|
|
|
/* Terminal interface definitions for the GDB remote server.
|
2012-01-04 09:17:56 +01:00
|
|
|
Copyright (C) 2002, 2012 Free Software Foundation, Inc.
|
2002-02-25 03:49:02 +01:00
|
|
|
|
|
|
|
This file is part of GDB.
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2007-08-23 20:08:50 +02:00
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
2002-02-25 03:49:02 +01:00
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2007-08-23 20:08:50 +02:00
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
2002-02-25 03:49:02 +01:00
|
|
|
|
|
|
|
#if !defined (TERMINAL_H)
|
|
|
|
#define TERMINAL_H 1
|
|
|
|
|
|
|
|
/* Autoconf will have defined HAVE_TERMIOS_H, HAVE_TERMIO_H,
|
|
|
|
and HAVE_SGTTY_H for us as appropriate. */
|
|
|
|
|
|
|
|
#if defined(HAVE_TERMIOS_H)
|
|
|
|
#define HAVE_TERMIOS
|
|
|
|
#include <termios.h>
|
|
|
|
#else /* ! HAVE_TERMIOS_H */
|
|
|
|
#if defined(HAVE_TERMIO_H)
|
|
|
|
#define HAVE_TERMIO
|
|
|
|
#include <termio.h>
|
|
|
|
|
|
|
|
#undef TIOCGETP
|
|
|
|
#define TIOCGETP TCGETA
|
|
|
|
#undef TIOCSETN
|
|
|
|
#define TIOCSETN TCSETA
|
|
|
|
#undef TIOCSETP
|
|
|
|
#define TIOCSETP TCSETAF
|
|
|
|
#define TERMINAL struct termio
|
2007-02-27 18:23:34 +01:00
|
|
|
#else /* ! HAVE_TERMIO_H */
|
|
|
|
#ifdef HAVE_SGTTY_H
|
2002-02-25 03:49:02 +01:00
|
|
|
#define HAVE_SGTTY
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <sgtty.h>
|
|
|
|
#include <sys/ioctl.h>
|
|
|
|
#define TERMINAL struct sgttyb
|
|
|
|
#endif
|
|
|
|
#endif
|
2007-02-27 18:23:34 +01:00
|
|
|
#endif
|
2002-02-25 03:49:02 +01:00
|
|
|
|
|
|
|
#endif /* !defined (TERMINAL_H) */
|