diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2020-02-18 13:17:43 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2020-02-18 13:25:12 +0300 |
commit | 40245925ce9d6b9a9c4ed6140cea39d948d10898 (patch) | |
tree | 45355d822e6cebdc912930b23aee1b5c56214c40 /winsup/cygwin/signal.cc | |
parent | f3793803a7dcdaa8319a30bea26dd4f9c9507559 (diff) |
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>
Diffstat (limited to 'winsup/cygwin/signal.cc')
-rw-r--r-- | winsup/cygwin/signal.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc index 8ac59d4b9..bd1168e90 100644 --- a/winsup/cygwin/signal.cc +++ b/winsup/cygwin/signal.cc @@ -36,7 +36,7 @@ signal (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 = signal (%d, %p)", sig, func); @@ -311,7 +311,7 @@ kill0 (pid_t pid, siginfo_t& si) { syscall_printf ("kill (%d, %d)", pid, si.si_signo); /* check that sig is in right range */ - if (si.si_signo < 0 || si.si_signo >= NSIG) + if (si.si_signo < 0 || si.si_signo >= _NSIG) { set_errno (EINVAL); syscall_printf ("signal %d out of range", si.si_signo); @@ -417,7 +417,7 @@ sigaction_worker (int sig, const struct sigaction *newact, { sig_dispatch_pending (); /* check that sig is in right range */ - if (sig <= 0 || sig >= NSIG) + if (sig <= 0 || sig >= _NSIG) set_errno (EINVAL); else { @@ -480,7 +480,7 @@ extern "C" int sigaddset (sigset_t *set, const int sig) { /* check that sig is in right range */ - if (sig <= 0 || sig >= NSIG) + if (sig <= 0 || sig >= _NSIG) { set_errno (EINVAL); syscall_printf ("SIG_ERR = sigaddset signal %d out of range", sig); @@ -495,7 +495,7 @@ extern "C" int sigdelset (sigset_t *set, const int sig) { /* check that sig is in right range */ - if (sig <= 0 || sig >= NSIG) + if (sig <= 0 || sig >= _NSIG) { set_errno (EINVAL); syscall_printf ("SIG_ERR = sigdelset signal %d out of range", sig); @@ -510,7 +510,7 @@ extern "C" int sigismember (const sigset_t *set, int sig) { /* check that sig is in right range */ - if (sig <= 0 || sig >= NSIG) + if (sig <= 0 || sig >= _NSIG) { set_errno (EINVAL); syscall_printf ("SIG_ERR = sigdelset signal %d out of range", sig); @@ -709,7 +709,7 @@ sigqueue (pid_t pid, int sig, const union sigval value) } if (sig == 0) return 0; - if (sig < 0 || sig >= NSIG) + if (sig < 0 || sig >= _NSIG) { set_errno (EINVAL); return -1; |