Changed terminal io defines

This commit is contained in:
Michiel Broek
2004-11-30 19:33:53 +00:00
parent 5b2f97b243
commit b04eb35add
5 changed files with 259 additions and 13 deletions

View File

@@ -57,7 +57,6 @@
#include <errno.h>
#include <sys/fcntl.h>
#include <unistd.h>
#include <termios.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <dirent.h>
@@ -93,6 +92,50 @@
#include <pthread.h>
#include <sys/poll.h>
/* used to use #elif, but native braindead hpux 9.00 c compiler didn't
* * understand it */
#ifdef HAVE_TERMIOS_H
/* get rid of warnings on SCO ODT 3.2 */
struct termios;
# include <termios.h>
# define USE_TERMIOS
#else
# if defined(HAVE_SYS_TERMIOS_H)
# include <sys/termios.h>
# define USE_TERMIOS
# else
# if defined(HAVE_TERMIO_H)
# include <termio.h>
# define USE_TERMIO
# else
# if defined(HAVE_SYS_TERMIO_H)
# include <sys/termio.h>
# define USE_TERMIO
# else
# if defined(HAVE_SGTTY_H)
# include <sgtty.h>
# define USE_SGTTY
# ifdef LLITOUT
extern long Locmode; /* Saved "local mode" for 4.x BSD "new driver" */
extern long Locbit; /* Bit SUPPOSED to disable output translations */
# endif
# else
# error neither termio.h nor sgtty.h found. Cannot continue.
# endif
# endif
# endif
# endif
#endif
#ifdef USE_SGTTY
# ifdef TIOCSBRK
# define CANBREAK
# endif
#endif
#ifdef USE_TERMIO
# define CANBREAK
#endif
#include <stddef.h>
#include <fcntl.h>
#if defined(__FreeBSD__) || defined(__NetBSD__)