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