From 62590f5a493a13fd7b167f905c3daa0c7f3433d6 Mon Sep 17 00:00:00 2001 From: Brian Cox Date: Fri, 1 Jul 2016 19:53:14 -0700 Subject: [PATCH] Improve defining NSIG when it isn't already defined --- src/core/tw_signal.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/tw_signal.cpp b/src/core/tw_signal.cpp index 172d974..4ce122d 100644 --- a/src/core/tw_signal.cpp +++ b/src/core/tw_signal.cpp @@ -78,8 +78,14 @@ void util_SignalHandler( int sig ) #if IS_UNIX +/* For the morbidly curious, here's a thread where a POSIX standards committee + wrings its hands about how to define NSIG: http://austingroupbugs.net/view.php?id=741#c1834 */ #ifndef NSIG - #define NSIG 32 +# ifdef SIGMAX +# define NSIG (SIGMAX+1) +# else +# define NSIG 32 +# endif #endif void tw_psignal(int sig, const TCHAR *str)