[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] testsuite for poll(2)

From: Eric Blake
Subject: Re: [PATCH] testsuite for poll(2)
Date: Fri, 12 Sep 2008 17:01:09 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

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 

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]