Isatty is broken under windows but this not the right fix. In fact isatty under windows is equivalent to test if a file is a char device.
Gnat has a better work arround Bastien Le 28 déc. 2011 14:20, "Paolo Bonzini" <bonz...@gnu.org> a écrit : On 12/24/2011 01:59 PM, Eli Zaretskii wrote: > + return > + isatty (fd) > +#ifdef __MINGW32__ > + /* Without the lseek call, Windows isatty returns non-zero for the > + null device as well. */ > +&& lseek (fd, SEEK_CUR, 0) == -1 > +#endif > This fix to isatty should be done in gnulib. Otherwise the patch looks good. Refactoring can be done later. Paolo