Simon Josefsson wrote: > Wouldn't this be a good situation to have nanosleep depend on the > unistd module, and make the replacement unistd.h include winsock2.h on > mingw32 platforms? After all, nanosleep.c include unistd.h, and > unistd.h define select on some platforms.
But <unistd.h> is not supposed to declare select() in POSIX: see http://www.opengroup.org/onlinepubs/009695399/functions/select.html POSIX says <sys/select.h> should declare it. <unistd.h> is unrelated. Since gnulib's policy is to let the programs write code in POSIX syntax, I vote for a module that creates a <sys/select.h> file in the build directory. On most platforms it would need to include <sys/time.h> too; on Woe32 it would use <winsock.h>. full-header-path.m4 comes in handy here. Bruno