termdep.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* termdep.h -- system things that terminal.c depends on.
  2. $Id$
  3. Copyright 1993, 1996, 1997, 1998, 2001, 2002, 2007, 2012, 2013, 2014, 2016
  4. Free Software Foundation, Inc.
  5. This program is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. Originally written by Brian Fox. */
  16. #ifndef INFO_TERMDEP_H
  17. #define INFO_TERMDEP_H
  18. /* NeXT supplies <termios.h> but it is broken. Probably Autoconf should
  19. have a separate test, but anyway ... */
  20. #ifdef NeXT
  21. #undef HAVE_TERMIOS_H
  22. #endif
  23. #ifdef HAVE_TERMIOS_H
  24. # include <termios.h>
  25. #else
  26. # if defined (HAVE_TERMIO_H)
  27. # include <termio.h>
  28. # if defined (HAVE_SYS_PTEM_H)
  29. # if defined (M_UNIX) || !defined (M_XENIX)
  30. # include <sys/stream.h>
  31. # include <sys/ptem.h>
  32. # undef TIOCGETC
  33. # else /* M_XENIX */
  34. # define tchars tc
  35. # endif /* M_XENIX */
  36. # endif /* HAVE_SYS_PTEM_H */
  37. # else /* !HAVE_TERMIO_H */
  38. # ifndef __MINGW32__
  39. # include <sgtty.h>
  40. # endif
  41. # endif /* !HAVE_TERMIO_H */
  42. #endif /* !HAVE_TERMIOS_H */
  43. #ifdef HAVE_SYS_IOCTL_H
  44. # include <sys/ioctl.h>
  45. #endif
  46. #ifdef HAVE_SYS_TTOLD_H
  47. # include <sys/ttold.h>
  48. #endif /* HAVE_SYS_TTOLD_H */
  49. #ifdef _WIN32
  50. extern unsigned sleep (unsigned);
  51. #endif
  52. #endif /* not INFO_TERMDEP_H */