Re: reading from non-blocking pipes on Windows

2011-04-30 Thread Bruno Haible
I wrote on 2011-04-14: > * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT_SCANF, > _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM): New macros. > (fgetc, fgets, fread, fscanf, getc, getchar, gets, scanf, vfscanf, > vscanf): New declarations. Oops, this leads to compilation errors in C++ m

reading from non-blocking pipes on Windows

2011-04-14 Thread Bruno Haible
The other failure of the non-blocking I/O on pipes test on mingw is because when read() is called on a non-blocking pipe fd with an empty buffer, it fails with EINVAL. Whereas POSIX says that it should fail with EAGAIN. This fixes it, by adding a 'read' module for the function read() and overrides