Currently no prototype for ioctl() is picked up when compiling on cygwin: The only prototype there is in (which must be included directly), but the zsh sources include that header only if it defines TIOCGWINSZ (and doesn't), and cygwin's doesn't define TIOCGWINSZ (but does). So I've changed configure.ac and Src/system.h (see attached patch) such that configure now checks whether ioctl() is declared in but not in or , and if this is the case then 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