Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8bcfb8a

Browse files
committed
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.
1 parent 1e7205a commit 8bcfb8a

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

Modules/signalmodule.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,15 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
3535
#endif
3636

3737
#ifndef NSIG
38-
#ifdef _SIGMAX
39-
#define NSIG (_SIGMAX + 1) /* For QNX */
40-
#else
41-
#define NSIG (SIGMAX + 1) /* for djgpp */
42-
#endif
38+
# if defined(_NSIG)
39+
# define NSIG _NSIG /* For BSD/SysV */
40+
# elif defined(_SIGMAX)
41+
# define NSIG (_SIGMAX + 1) /* For QNX */
42+
# elif defined(SIGMAX)
43+
# define NSIG (SIGMAX + 1) /* For djgpp */
44+
# else
45+
# define NSIG 64 /* Use a reasonable default value */
46+
# endif
4347
#endif
4448

4549

0 commit comments

Comments
 (0)