From: Joshua Elsasser Date: Sun, 9 Jun 2013 04:36:48 +0000 (-0700) Subject: Hopefully fix the windows build to grovel time structures correctly. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=77641d60a8b001bf3ccc755f3fb9881ee8d4753f;p=sbcl.git Hopefully fix the windows build to grovel time structures correctly. 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. --- diff --git a/src/runtime/pthreads_win32.h b/src/runtime/pthreads_win32.h index b91c0f9..a8f99a8 100644 --- a/src/runtime/pthreads_win32.h +++ b/src/runtime/pthreads_win32.h @@ -16,8 +16,12 @@ typedef int sigset_t; /* 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 */ @@ -42,7 +46,9 @@ typedef int sigset_t; #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 diff --git a/tools-for-build/grovel-headers.c b/tools-for-build/grovel-headers.c index 315c6cd..9be8744 100644 --- a/tools-for-build/grovel-headers.c +++ b/tools-for-build/grovel-headers.c @@ -31,6 +31,7 @@ #include #include #include + #include #undef boolean #else #include @@ -60,6 +61,10 @@ #include #endif +#ifdef _WIN32 + #include "pthreads_win32.h" +#endif + #include "wrap.h" #include "gc.h"