[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: termios.h not included if sys/ioctl.h provides struct winsize
From: |
Chet Ramey |
Subject: |
Re: termios.h not included if sys/ioctl.h provides struct winsize |
Date: |
Tue, 13 Aug 2024 11:33:37 -0400 |
User-agent: |
Mozilla Thunderbird |
On 8/12/24 10:18 PM, Grisha Levit wrote:
On e.g. Alpine Linux, the following are set by configure:
bash_cv_struct_winsize_ioctl='yes'
bash_cv_struct_winsize_termios='yes'
bash_cv_struct_winsize_header='ioctl_h'
ac_cv_func_tcgetwinsize='yes'
and so config.h ends up with:
#define STRUCT_WINSIZE_IN_SYS_IOCTL 1
/* #undef STRUCT_WINSIZE_IN_TERMIOS */
#define HAVE_TCGETWINSIZE 1
This causes termios.h to not get included by lib/sh/winsize.c:
#if defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined
(STRUCT_WINSIZE_IN_SYS_IOCTL)
# include <termios.h>
#endif
and a build failure:
Thanks for the report. The fix is to include <termios.h> if HAVE_TCGETWINSIZE
is defined.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/