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.
#define SIG_IGN ((void (*)(int, siginfo_t, void*))-1)
#define SIG_IGN ((void (*)(int, siginfo_t, void*))-1)
#define SIG_DFL ((void (*)(int, siginfo_t, void*))-2)
#define SIG_DFL ((void (*)(int, siginfo_t, void*))-2)
#define SIGHUP 1
#define SIGINT 2 /* Interactive attention */
#define SIGHUP 1
#define SIGINT 2 /* Interactive attention */
#define NSIG 32 /* maximum signal number + 1 */
#define NSIG 32 /* maximum signal number + 1 */
/* To avoid overusing system TLS, pthread provides its own */
#define PTHREAD_KEYS_MAX 128
/* To avoid overusing system TLS, pthread provides its own */
#define PTHREAD_KEYS_MAX 128
#include <windows.h>
#include <shlobj.h>
#include <wincrypt.h>
#include <windows.h>
#include <shlobj.h>
#include <wincrypt.h>
#undef boolean
#else
#include <poll.h>
#undef boolean
#else
#include <poll.h>
#include <sys/sysctl.h>
#endif
#include <sys/sysctl.h>
#endif
+#ifdef _WIN32
+ #include "pthreads_win32.h"
+#endif
+
#include "wrap.h"
#include "gc.h"
#include "wrap.h"
#include "gc.h"