Simplify (and robustify) regular PACKing
[sbcl.git] / src / runtime / pthreads_win32.h
index 2d4b066..a8f99a8 100644 (file)
@@ -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
@@ -180,7 +186,10 @@ int pthread_cond_signal(pthread_cond_t *cond);
 int pthread_cond_timedwait(pthread_cond_t * cond, pthread_mutex_t * mutex, const struct timespec * abstime);
 int pthread_cond_wait(pthread_cond_t * cond, pthread_mutex_t * mutex);
 
-#define ETIMEDOUT 123 //Something
+/* some MinGWs seem to include it, others not: */
+#ifndef ETIMEDOUT
+# define ETIMEDOUT 123 //Something
+#endif
 
 int sched_yield();