provide NSIG under _BSD_SOURCE (default) as well as _GNU_SOURCE
authorRich Felker <dalias@aerifal.cx>
Sat, 1 Dec 2012 02:00:18 +0000 (21:00 -0500)
committerRich Felker <dalias@aerifal.cx>
Sat, 1 Dec 2012 02:00:18 +0000 (21:00 -0500)
this fixes a regression related to the changes made to bits/signal.h
between 0.9.7 and 0.9.8 that broke some (non-portable) software.

include/signal.h

index 860f742..89080ab 100644 (file)
@@ -208,6 +208,10 @@ void (*sigset(int, void (*)(int)))(int);
 #define SIGSTKSZ 8192
 #endif
 
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+#define NSIG _NSIG
+#endif
+
 #ifdef _BSD_SOURCE
 typedef void (*sig_t)(int);
 #endif
@@ -218,7 +222,6 @@ void (*bsd_signal(int, void (*)(int)))(int);
 int sigisemptyset(const sigset_t *);
 #define SA_NOMASK SA_NODEFER
 #define SA_ONESHOT SA_RESETHAND
-#define NSIG _NSIG
 #endif
 
 #include <bits/signal.h>