summaryrefslogtreecommitdiffstats
path: root/Modules/signalmodule.c
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2000-07-04 14:17:33 (GMT)
committerMarc-André Lemburg <mal@egenix.com>2000-07-04 14:17:33 (GMT)
commit8bcfb8a5e09f15f6bf8dfb9f282192d03eac4fd8 (patch)
treeb310c6233561c4dccde2f856d12af3e7c99c31a3 /Modules/signalmodule.c
parent1e7205a62aaa5779824681407d753abed2d45b28 (diff)
downloadcpython-8bcfb8a5e09f15f6bf8dfb9f282192d03eac4fd8.zip
cpython-8bcfb8a5e09f15f6bf8dfb9f282192d03eac4fd8.tar.gz
cpython-8bcfb8a5e09f15f6bf8dfb9f282192d03eac4fd8.tar.bz2
Fixed symbol search for defining NSIG. It now also checks _NSIG
which some C libs define (e.g. glibc). Added a fallback default value for NSIG which hopefully provides enough room for signal slots.
Diffstat (limited to 'Modules/signalmodule.c')
-rw-r--r--Modules/signalmodule.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index f75ec43..1c11fdd 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -35,11 +35,15 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#endif
#ifndef NSIG
-#ifdef _SIGMAX
-#define NSIG (_SIGMAX + 1) /* For QNX */
-#else
-#define NSIG (SIGMAX + 1) /* for djgpp */
-#endif
+# if defined(_NSIG)
+# define NSIG _NSIG /* For BSD/SysV */
+# elif defined(_SIGMAX)
+# define NSIG (_SIGMAX + 1) /* For QNX */
+# elif defined(SIGMAX)
+# define NSIG (SIGMAX + 1) /* For djgpp */
+# else
+# define NSIG 64 /* Use a reasonable default value */
+# endif
#endif