]> granicus.if.org Git - python/commitdiff
Fixed symbol search for defining NSIG. It now also checks _NSIG
authorMarc-André Lemburg <mal@egenix.com>
Tue, 4 Jul 2000 14:17:33 +0000 (14:17 +0000)
committerMarc-André Lemburg <mal@egenix.com>
Tue, 4 Jul 2000 14:17:33 +0000 (14:17 +0000)
which some C libs define (e.g. glibc).

Added a fallback default value for NSIG which hopefully provides
enough room for signal slots.

Modules/signalmodule.c

index f75ec43118613423a574c5b84171a760c94d908f..1c11fdd250310917e4bf906046a1e628cca5ebb2 100644 (file)
@@ -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