bug-gnulib
[Top][All Lists]
Advanced

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

Re: [bug-gnulib] nanosleep module and mingw32


From: Bruno Haible
Subject: Re: [bug-gnulib] nanosleep module and mingw32
Date: Thu, 18 May 2006 22:23:49 +0200
User-agent: KMail/1.5

Hello,

> I get the following error when using the nanosleep module and
> crosscompiling to W32 with the Debian mingw32 package and
> ./configure --host=i586-mingw32msvc :
>
> ../gnulib/libgnu.a(nanosleep.o):nanosleep.c:(.text+0x64): undefined
> reference to `_select'
>
> The attached patch fixes this for me.

Thanks for the report. Indeed, although both <winsock.h> and <winsock2.h>
declare the 'select' function, <winsock2.h> is usually preferred nowadays.

> +#ifdef _WIN32

The conditional for Woe32 platforms, excluding Cygwin (which has normal Unix 
API),
is
   #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__

Also, it's stylistically preferrable to put platform dependent include files
after the last platform-independent include file, not before.

Bruno





reply via email to

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