1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

vm_core.h: NSIG is a BSDism.

Surprisingly, this constant (been there since around 1983) has
never been a part of any standards until now.  We have to find
out the appropriate value.

NSIG_MAX is expected to become a part of forthcoming POSIX.
See: http://austingroupbugs.net/view.php?id=741

_SIG_MAXSIG is here because that is greater than NSIG. See
Python's relevant discussion: https://bugs.python.org/issue20584


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shyouhei 2018-10-19 03:33:48 +00:00
parent ad564b87ad
commit 00c9a6188b

View file

@ -86,8 +86,18 @@
#include <setjmp.h>
#include <signal.h>
#ifndef NSIG
# define NSIG (_SIGMAX + 1) /* For QNX */
#if defined(NSIG_MAX) /* POSIX issue 8 */
# undef NSIG
# define NSIG NSIG_MAX
#elif defined(_SIG_MAXSIG) /* FreeBSD */
# undef NSIG
# define NSIG _SIG_MAXSIG
#elif defined(_SIGMAX) /* QNX */
# define NSIG (_SIGMAX + 1)
#elif defined(NSIG) /* 99% of everything else */
# /* take it */
#else /* Last resort */
# define NSIG (sizeof(sigset_t) * CHAR_BIT + 1)
#endif
#define RUBY_NSIG NSIG