diff --git a/utils/magsgtty.h b/utils/magsgtty.h index 59e0678a..a0847d74 100644 --- a/utils/magsgtty.h +++ b/utils/magsgtty.h @@ -21,44 +21,18 @@ #ifndef _MAGIC__UTILS__MAGSGTTY_H #define _MAGIC__UTILS__MAGSGTTY_H -/* maybe this can be #ifndef HAVE_TERMIO_H */ -#if !defined(SYSV) && !defined(CYGWIN) - -# ifdef ALPHA -# undef MAX -# undef MIN +#if defined(HAVE_TERMIOS_H) /* POSIX */ +# include +#elif defined(HAVE_TERMIO_H) /* SYSV */ +# include +# include +#else /* Fallback for older BSD/V7 systems */ +# if defined(HAVE_SGTTY_H) +# include +# elif defined(HAVE_SYS_IOCTL_COMPAT_H) +# include # endif - -/* unclear what platform requires this OpenBSD/FreeBSD ? */ -# ifndef COMPAT_43TTY -# define COMPAT_43TTY -# endif - -#ifdef HAVE_SYS_IOCTL_H -#include +# include #endif -#if defined(HAVE_TERMIOS_H) -#include -#elif defined(HAVE_SYS_IOCTL_COMPAT_H) -/* unclear which platform(s) require and the structure - * of this file is such that it will try to include it by default, better - * to invert the #if and only select this on the known platforms that need - * it so that goes by default, which exists on MacOSX, Linux, etc.. - * many possible solutions to make this work by default: - * HAVE_SYS_IOCTL_COMPAT_H ? HAVE_TERMIOS_H ? !defined(linux) at top (MaxOSX is BSD type) - */ -#include /* replaced sgtty.h */ -#elif defined(HAVE_SGTTY_H) -#include /* legacy - struct sgttyb{} defn */ -#endif - -#else - -#if defined(HAVE_TERMIO_H) -#include -#endif - -#endif /* !SYSV && !CYGWIN */ - #endif /* _MAGIC__UTILS__MAGSGTTY_H */