Cygwin: rename NSIG to _NSIG, change visibility of NSIG to MISC

NSIG is a deprecated symbol only visible under MISC visibility.
_NSIG is used widely instead, and on most systems NSIG is
defined in terms of _NSIG.

Follow suit: Change NSIG to _NSIG throughout and change visiblity
of NSIG to be defined only in __MISC_VISIBLE case.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2020-02-18 11:17:43 +01:00
parent f3793803a7
commit 40245925ce
7 changed files with 37 additions and 29 deletions

View File

@ -1166,7 +1166,7 @@ extern "C" int
sighold (int sig)
{
/* check that sig is in right range */
if (sig < 0 || sig >= NSIG)
if (sig < 0 || sig >= _NSIG)
{
set_errno (EINVAL);
syscall_printf ("signal %d out of range", sig);
@ -1182,7 +1182,7 @@ extern "C" int
sigrelse (int sig)
{
/* check that sig is in right range */
if (sig < 0 || sig >= NSIG)
if (sig < 0 || sig >= _NSIG)
{
set_errno (EINVAL);
syscall_printf ("signal %d out of range", sig);
@ -1201,7 +1201,7 @@ sigset (int sig, _sig_func_ptr func)
_sig_func_ptr prev;
/* check that sig is in right range */
if (sig < 0 || sig >= NSIG || sig == SIGKILL || sig == SIGSTOP)
if (sig < 0 || sig >= _NSIG || sig == SIGKILL || sig == SIGSTOP)
{
set_errno (EINVAL);
syscall_printf ("SIG_ERR = sigset (%d, %p)", sig, func);