gdb/
[deliverable/binutils-gdb.git] / readline / rlwinsize.h
CommitLineData
d60d9f65
SS
1/* rlwinsize.h -- an attempt to isolate some of the system-specific defines
2 for `struct winsize' and TIOCGWINSZ. */
3
cc88a640 4/* Copyright (C) 1997-2009 Free Software Foundation, Inc.
d60d9f65 5
cc88a640
JK
6 This file is part of the GNU Readline Library (Readline), a library
7 for reading lines of text with interactive input and history editing.
d60d9f65 8
cc88a640 9 Readline is free software: you can redistribute it and/or modify
d60d9f65 10 it under the terms of the GNU General Public License as published by
cc88a640
JK
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
d60d9f65 13
cc88a640
JK
14 Readline is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
d60d9f65 18
cc88a640
JK
19 You should have received a copy of the GNU General Public License
20 along with Readline. If not, see <http://www.gnu.org/licenses/>.
21*/
d60d9f65
SS
22
23#if !defined (_RLWINSIZE_H_)
24#define _RLWINSIZE_H_
25
26#if defined (HAVE_CONFIG_H)
27# include "config.h"
28#endif
29
30/* Try to find the definitions of `struct winsize' and TIOGCWINSZ */
31
32#if defined (GWINSZ_IN_SYS_IOCTL) && !defined (TIOCGWINSZ)
33# include <sys/ioctl.h>
34#endif /* GWINSZ_IN_SYS_IOCTL && !TIOCGWINSZ */
35
36#if defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL)
37# include <termios.h>
38#endif /* STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */
39
40/* Not in either of the standard places, look around. */
41#if !defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL)
42# if defined (HAVE_SYS_STREAM_H)
43# include <sys/stream.h>
44# endif /* HAVE_SYS_STREAM_H */
45# if defined (HAVE_SYS_PTEM_H) /* SVR4.2, at least, has it here */
46# include <sys/ptem.h>
47# define _IO_PTEM_H /* work around SVR4.2 1.1.4 bug */
48# endif /* HAVE_SYS_PTEM_H */
49# if defined (HAVE_SYS_PTE_H) /* ??? */
50# include <sys/pte.h>
51# endif /* HAVE_SYS_PTE_H */
52#endif /* !STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */
53
cc88a640
JK
54#if defined (M_UNIX) && !defined (_SCO_DS) && !defined (tcflow)
55# define tcflow(fd, action) ioctl(fd, TCXONC, action)
56#endif
d60d9f65 57
cc88a640 58#endif /* _RL_WINSIZE_H */
This page took 0.539208 seconds and 4 git commands to generate.