gdb/gdbserver/terminal.h - gdb

Macros defined

Source code

  1. /* Terminal interface definitions for the GDB remote server.
  2.    Copyright (C) 2002-2015 Free Software Foundation, Inc.

  3.    This file is part of GDB.

  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 3 of the License, or
  7.    (at your option) any later version.

  8.    This program is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.    GNU General Public License for more details.

  12.    You should have received a copy of the GNU General Public License
  13.    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

  14. #if !defined (TERMINAL_H)
  15. #define TERMINAL_H 1

  16. /* Autoconf will have defined HAVE_TERMIOS_H, HAVE_TERMIO_H,
  17.    and HAVE_SGTTY_H for us as appropriate.  */

  18. #if defined(HAVE_TERMIOS_H)
  19. #define HAVE_TERMIOS
  20. #include <termios.h>
  21. #else /* ! HAVE_TERMIOS_H */
  22. #if defined(HAVE_TERMIO_H)
  23. #define HAVE_TERMIO
  24. #include <termio.h>

  25. #undef TIOCGETP
  26. #define TIOCGETP TCGETA
  27. #undef TIOCSETN
  28. #define TIOCSETN TCSETA
  29. #undef TIOCSETP
  30. #define TIOCSETP TCSETAF
  31. #define TERMINAL struct termio
  32. #else /* ! HAVE_TERMIO_H */
  33. #ifdef HAVE_SGTTY_H
  34. #define HAVE_SGTTY
  35. #include <fcntl.h>
  36. #include <sgtty.h>
  37. #include <sys/ioctl.h>
  38. #define TERMINAL struct sgttyb
  39. #endif
  40. #endif
  41. #endif

  42. #endif /* !defined (TERMINAL_H) */