From 54898f0a60a82dd7e9225e97288cb85eeb77f476 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 13 Sep 2008 12:37:06 +0200 Subject: [PATCH 1/1] Change the test for native Windows. --- ChangeLog | 5 +++++ tests/test-poll.c | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index fa4447556..99133b4e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-09-13 Bruno Haible + + * tests/test-poll.c: Use #if for native Windows, rather than testing + __MSVCRT__. + 2008-09-13 Yoann Vandoorselaere Bruno Haible diff --git a/tests/test-poll.c b/tests/test-poll.c index 1f66a6385..5e8d70614 100644 --- a/tests/test-poll.c +++ b/tests/test-poll.c @@ -31,7 +31,11 @@ #include #include "sockets.h" -#ifdef __MSVCRT__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# define WIN32_NATIVE +#endif + +#ifdef WIN32_NATIVE #include #define pipe(x) _pipe(x, 256, O_BINARY) #endif @@ -123,7 +127,7 @@ connect_to_socket (int blocking) if (!blocking) { -#ifdef __MSVCRT__ +#ifdef WIN32_NATIVE unsigned long iMode = 1; ioctlsocket (s, FIONBIO, (void *) &iMode); @@ -241,7 +245,7 @@ test_connect_first (void) static void test_accept_first (void) { -#ifndef __MSVCRT__ +#ifndef WIN32_NATIVE int s = open_server_socket (); struct sockaddr_in ia; socklen_t addrlen; -- 2.11.0