fix test-poll compilation failure on Cygwin
authorPaolo Bonzini <bonzini@gnu.org>
Fri, 12 Sep 2008 18:20:38 +0000 (20:20 +0200)
committerPaolo Bonzini <bonzini@gnu.org>
Fri, 12 Sep 2008 18:21:00 +0000 (20:21 +0200)
2008-09-12  Paolo Bonzini  <bonzini@gnu.org>

* modules/poll-tests: Do not check for io.h.
* tests/test-poll.c: Check for __MSVCRT__ instead.

ChangeLog
modules/poll-tests
tests/test-poll.c

index ac15d94..8d416fa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2008-09-12  Paolo Bonzini  <bonzini@gnu.org>
 
+       * modules/poll-tests: Do not check for io.h.
+       * tests/test-poll.c: Check for __MSVCRT__ instead.
+
+2008-09-12  Paolo Bonzini  <bonzini@gnu.org>
+
        * lib/sys_socket.in.h (EINPROGRESS): Define for Winsock case.
        * modules/poll-tests: Add inet_pton, stdbool, sockets.
        * tests/test-poll.c: Use them.  Use _pipe on Windows.
index 7c44a48..33e277f 100644 (file)
@@ -11,7 +11,7 @@ inet_pton
 sockets
 
 configure.ac:
-AC_CHECK_HEADERS_ONCE([io.h unistd.h sys/wait.h])
+AC_CHECK_HEADERS_ONCE([unistd.h sys/wait.h])
 
 Makefile.am:
 TESTS += test-poll
index 0dbcb54..1f66a63 100644 (file)
@@ -31,7 +31,7 @@
 #include <errno.h>
 #include "sockets.h"
 
-#ifdef HAVE_IO_H
+#ifdef __MSVCRT__
 #include <io.h>
 #define pipe(x) _pipe(x, 256, O_BINARY)
 #endif