Skip to content

Commit

Permalink
Hopefully fix the windows build to grovel time structures correctly.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jre committed Jun 20, 2013
1 parent 7230b50 commit 77641d6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/runtime/pthreads_win32.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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
Expand Down
5 changes: 5 additions & 0 deletions tools-for-build/grovel-headers.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <windows.h>
#include <shlobj.h>
#include <wincrypt.h>
#include <winsock2.h>
#undef boolean
#else
#include <poll.h>
Expand Down Expand Up @@ -60,6 +61,10 @@
#include <sys/sysctl.h>
#endif

#ifdef _WIN32
#include "pthreads_win32.h"
#endif

#include "wrap.h"
#include "gc.h"

Expand Down

0 comments on commit 77641d6

Please sign in to comment.