00001 /* rlwinsize.h -- an attempt to isolate some of the system-specific defines 00002 for `struct winsize' and TIOCGWINSZ. */ 00003 00004 /* Copyright (C) 1997 Free Software Foundation, Inc. 00005 00006 This file contains the Readline Library (the Library), a set of 00007 routines for providing Emacs style line input to programs that ask 00008 for it. 00009 00010 The Library is free software; you can redistribute it and/or modify 00011 it under the terms of the GNU General Public License as published by 00012 the Free Software Foundation; either version 2, or (at your option) 00013 any later version. 00014 00015 The Library is distributed in the hope that it will be useful, but 00016 WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 General Public License for more details. 00019 00020 The GNU General Public License is often shipped with GNU software, and 00021 is generally kept in a file called COPYING or LICENSE. If you do not 00022 have a copy of the license, write to the Free Software Foundation, 00023 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ 00024 00025 #if !defined (_RLWINSIZE_H_) 00026 #define _RLWINSIZE_H_ 00027 00028 #if defined (HAVE_CONFIG_H) 00029 # include "config.h" 00030 #endif 00031 00032 /* Try to find the definitions of `struct winsize' and TIOGCWINSZ */ 00033 00034 #if defined (GWINSZ_IN_SYS_IOCTL) && !defined (TIOCGWINSZ) 00035 # include <sys/ioctl.h> 00036 #endif /* GWINSZ_IN_SYS_IOCTL && !TIOCGWINSZ */ 00037 00038 #if defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL) 00039 # include <termios.h> 00040 #endif /* STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */ 00041 00042 /* Not in either of the standard places, look around. */ 00043 #if !defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL) 00044 # if defined (HAVE_SYS_STREAM_H) 00045 # include <sys/stream.h> 00046 # endif /* HAVE_SYS_STREAM_H */ 00047 # if defined (HAVE_SYS_PTEM_H) /* SVR4.2, at least, has it here */ 00048 # include <sys/ptem.h> 00049 # define _IO_PTEM_H /* work around SVR4.2 1.1.4 bug */ 00050 # endif /* HAVE_SYS_PTEM_H */ 00051 # if defined (HAVE_SYS_PTE_H) /* ??? */ 00052 # include <sys/pte.h> 00053 # endif /* HAVE_SYS_PTE_H */ 00054 #endif /* !STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */ 00055 00056 #endif /* _RL_WINSIZE_H */ 00057