Paolo Bonzini <bonzini <at> gnu.org> writes: > > Here is the final patch I pushed for Windows compatibility of tests. It > does not test much because the socket syscalls are not compatible > enough, but it compiles at least (using the Debian mingw32 and wine > packages).
But it breaks on cygwin. > > #ifdef HAVE_IO_H > #include <io.h> > +#define pipe(x) _pipe(x, 256, O_BINARY) > #endif Cygwin also has <io.h>, but this redefinition of pipe breaks cygwin's <unistd.h>. You need to further restrict this definition to native windows environments. In file included from /usr/include/unistd.h:4, from ../../gltests/test-poll.c:39: /usr/include/sys/unistd.h:127: error: parse error before numeric constant make[4]: *** [test-poll.o] Error 1 $ head -n 127 /usr/include/sys/unistd.h | tail -n1 int _EXFUN(pipe, (int __fildes[2] )); where _EXFUN results in 'pipe(int __fildes[2])'. -- Eric Blake