Mercurial > hg > octave-lojdl > gnulib-hg
changeset 10424:bee99b6a668d
Change the test for native Windows.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 13 Sep 2008 12:37:06 +0200 |
parents | 51c125f4cd8d |
children | 44359c143462 |
files | ChangeLog tests/test-poll.c |
diffstat | 2 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-09-13 Bruno Haible <bruno@clisp.org> + + * tests/test-poll.c: Use #if for native Windows, rather than testing + __MSVCRT__. + 2008-09-13 Yoann Vandoorselaere <yoann.v@prelude-ids.com> Bruno Haible <bruno@clisp.org>
--- a/tests/test-poll.c +++ b/tests/test-poll.c @@ -31,7 +31,11 @@ #include <errno.h> #include "sockets.h" -#ifdef __MSVCRT__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# define WIN32_NATIVE +#endif + +#ifdef WIN32_NATIVE #include <io.h> #define pipe(x) _pipe(x, 256, O_BINARY) #endif @@ -123,7 +127,7 @@ if (!blocking) { -#ifdef __MSVCRT__ +#ifdef WIN32_NATIVE unsigned long iMode = 1; ioctlsocket (s, FIONBIO, (void *) &iMode); @@ -241,7 +245,7 @@ static void test_accept_first (void) { -#ifndef __MSVCRT__ +#ifndef WIN32_NATIVE int s = open_server_socket (); struct sockaddr_in ia; socklen_t addrlen;