Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: missing ioctl() prototype on cygwin



Currently no prototype for ioctl() is picked up when compiling on
cygwin:  The only prototype there is in <sys/ioctl.h> (which must
be included directly), but the zsh sources include that header only
if it defines TIOCGWINSZ (and <termios.h> doesn't), and cygwin's
<sys/ioctl.h> doesn't define TIOCGWINSZ (but <termios.h> does).

So I've changed configure.ac and Src/system.h (see attached patch)
such that configure now checks whether ioctl() is declared in
<sys/ioctl.h> but not in <unistd.h> or <termios.h>, and if this is
the case then <sys/ioctl.h> gets included.

Note that I removed the test for CLOBBERS_TYPEAHEAD in Src/system.h,
since I couldn't find any reference to that symbol anywhere else
(except in the ChangeLogs).

Regards,
Thorsten Dahlheimer

Attachment: ioctl.patch
Description: Binary data



Messages sorted by: Reverse Date, Date, Thread, Author