It is a little misleading to say "correctly" since struct timespec
doesn't really exist on windows. Groveling the definition that we
define in our own pthreads wrapper seems the most consistent choice.
The grovel-headers.c changes have only been tested in isolation, not
with a real build. Thanks to Kyle Isom for testing, any resulting
build problems are entirely my fault.
/* 0 - Misc */
+#ifndef SIG_IGN
#define SIG_IGN ((void (*)(int, siginfo_t, void*))-1)
+#endif
+#ifndef SIG_DFL
#define SIG_DFL ((void (*)(int, siginfo_t, void*))-2)
+#endif
#define SIGHUP 1
#define SIGINT 2 /* Interactive attention */
#define SIGRTMIN 23
+#ifndef NSIG
#define NSIG 32 /* maximum signal number + 1 */
+#endif
/* To avoid overusing system TLS, pthread provides its own */
#define PTHREAD_KEYS_MAX 128
#include <windows.h>
#include <shlobj.h>
#include <wincrypt.h>
+ #include <winsock2.h>
#undef boolean
#else
#include <poll.h>
#include <sys/sysctl.h>
#endif
+#ifdef _WIN32
+ #include "pthreads_win32.h"
+#endif
+
#include "wrap.h"
#include "gc.h"