135486Sache/* rlwinsize.h -- an attempt to isolate some of the system-specific defines
235486Sache   for `struct winsize' and TIOCGWINSZ. */
335486Sache
435486Sache/* Copyright (C) 1997 Free Software Foundation, Inc.
535486Sache
635486Sache   This file contains the Readline Library (the Library), a set of
735486Sache   routines for providing Emacs style line input to programs that ask
835486Sache   for it.
935486Sache
1035486Sache   The Library is free software; you can redistribute it and/or modify
1135486Sache   it under the terms of the GNU General Public License as published by
1258310Sache   the Free Software Foundation; either version 2, or (at your option)
1335486Sache   any later version.
1435486Sache
1535486Sache   The Library is distributed in the hope that it will be useful, but
1635486Sache   WITHOUT ANY WARRANTY; without even the implied warranty of
1735486Sache   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1835486Sache   General Public License for more details.
1935486Sache
2035486Sache   The GNU General Public License is often shipped with GNU software, and
2135486Sache   is generally kept in a file called COPYING or LICENSE.  If you do not
2235486Sache   have a copy of the license, write to the Free Software Foundation,
2358310Sache   59 Temple Place, Suite 330, Boston, MA 02111 USA. */
2435486Sache
2535486Sache#if !defined (_RLWINSIZE_H_)
2635486Sache#define _RLWINSIZE_H_
2735486Sache
2835486Sache#if defined (HAVE_CONFIG_H)
2935486Sache#  include "config.h"
3035486Sache#endif
3135486Sache
3235486Sache/* Try to find the definitions of `struct winsize' and TIOGCWINSZ */
3335486Sache
3435486Sache#if defined (GWINSZ_IN_SYS_IOCTL) && !defined (TIOCGWINSZ)
3535486Sache#  include <sys/ioctl.h>
3635486Sache#endif /* GWINSZ_IN_SYS_IOCTL && !TIOCGWINSZ */
3735486Sache
3835486Sache#if defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL)
3935486Sache#  include <termios.h>
4035486Sache#endif /* STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */
4135486Sache
4235486Sache/* Not in either of the standard places, look around. */
4335486Sache#if !defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL)
4435486Sache#  if defined (HAVE_SYS_STREAM_H)
4535486Sache#    include <sys/stream.h>
4635486Sache#  endif /* HAVE_SYS_STREAM_H */
4735486Sache#  if defined (HAVE_SYS_PTEM_H) /* SVR4.2, at least, has it here */
4835486Sache#    include <sys/ptem.h>
4935486Sache#    define _IO_PTEM_H          /* work around SVR4.2 1.1.4 bug */
5035486Sache#  endif /* HAVE_SYS_PTEM_H */
5135486Sache#  if defined (HAVE_SYS_PTE_H)  /* ??? */
5235486Sache#    include <sys/pte.h>
5335486Sache#  endif /* HAVE_SYS_PTE_H */
5435486Sache#endif /* !STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */
5535486Sache
5635486Sache#endif /* _RL_WINSIZE_H */
5735486Sache
58