#ifndef __EXP_TTY_IN_H__
#define __EXP_TTY_IN_H__
#include "expect_cf.h"
#ifdef __MACHTEN__
#include "sys/types.h"
#endif
#if defined(pyr) && defined(HAVE_TERMIO) && defined(HAVE_SGTTYB)
#undef HAVE_SGTTYB
#endif
#if defined(HAVE_TERMIO) && defined(HAVE_TERMIOS) && !defined(HAVE_TCGETS_OR_TCGETA_IN_TERMIOS_H) && !defined(HAVE_TCSETATTR)
# undef HAVE_TERMIOS
# undef HAVE_SGTTYB
#endif
#if defined(HAVE_TERMIO) && !defined(HAVE_TERMIOS)
# include <termio.h>
# undef POSIX
# define TERMINAL termio
# ifndef TCGETS
# define TCGETS TCGETA
# define TCSETS TCSETA
# define TCSETSW TCSETAW
# define TCSETSF TCSETAF
# endif
#endif
#if defined(HAVE_SGTTYB) && !defined(HAVE_TERMIOS)
# undef HAVE_TERMIO
# undef POSIX
#ifndef TCGETS
# define TCGETS TIOCGETP
# define TCSETS TIOCSETP
#endif
#ifndef TCSETSW
# define TCSETSW TIOCSETN
#endif
# define TERMINAL sgttyb
# ifdef HAVE_SYS_FCNTL_H
# include <sys/fcntl.h>
# else
# include <fcntl.h>
# endif
# include <sgtty.h>
# include <sys/ioctl.h>
#endif
#if defined(HAVE_TERMIOS)
# undef HAVE_TERMIO
# undef HAVE_SGTTYB
# include <termios.h>
# define TERMINAL termios
# if !defined(TCGETS) || !defined(TCSETS)
# define TCGETS TCGETA
# define TCSETS TCSETA
# define TCSETSW TCSETAW
# define TCSETSF TCSETAF
# endif
#endif
typedef struct TERMINAL exp_tty;
extern exp_tty exp_tty_original;
extern exp_tty exp_tty_current;
extern exp_tty exp_tty_cooked;
#include "exp_tty.h"
#endif