From 65b98213e4a12997a519e34695250d9f3a4d6bc7 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 21 Nov 2012 13:41:58 -0500 Subject: [PATCH] add back NSIG, removed from powerpc in last commit, but for all archs unlike the previous definition, NSIG/_NSIG is supposed to be one more than the highest signal number. adding this will allow simplifying libc-internal code that makes signal-related syscalls, which can be done as a later step. some apps might use it too; while this usage is questionable, it's at least not insane. --- arch/arm/bits/signal.h | 2 ++ arch/i386/bits/signal.h | 2 ++ arch/microblaze/bits/signal.h | 2 ++ arch/mips/bits/signal.h | 2 ++ arch/powerpc/bits/signal.h | 2 ++ arch/x86_64/bits/signal.h | 2 ++ include/signal.h | 1 + 7 files changed, 13 insertions(+) diff --git a/arch/arm/bits/signal.h b/arch/arm/bits/signal.h index 328388d4..2f83cb99 100644 --- a/arch/arm/bits/signal.h +++ b/arch/arm/bits/signal.h @@ -71,3 +71,5 @@ struct sigcontext #define SIGPWR 30 #define SIGSYS 31 #define SIGUNUSED SIGSYS + +#define _NSIG 65 diff --git a/arch/i386/bits/signal.h b/arch/i386/bits/signal.h index ab9a92cb..f899663c 100644 --- a/arch/i386/bits/signal.h +++ b/arch/i386/bits/signal.h @@ -80,3 +80,5 @@ struct sigcontext { #define SIGPWR 30 #define SIGSYS 31 #define SIGUNUSED SIGSYS + +#define _NSIG 65 diff --git a/arch/microblaze/bits/signal.h b/arch/microblaze/bits/signal.h index 0358245d..ed900390 100644 --- a/arch/microblaze/bits/signal.h +++ b/arch/microblaze/bits/signal.h @@ -73,3 +73,5 @@ struct sigcontext #define SIGPWR 30 #define SIGSYS 31 #define SIGUNUSED SIGSYS + +#define _NSIG 65 diff --git a/arch/mips/bits/signal.h b/arch/mips/bits/signal.h index f51c29b9..603aed3e 100644 --- a/arch/mips/bits/signal.h +++ b/arch/mips/bits/signal.h @@ -82,3 +82,5 @@ struct sigcontext #define SIGXCPU 30 #define SIGXFSZ 31 #define SIGUNUSED SIGSYS + +#define _NSIG 129 diff --git a/arch/powerpc/bits/signal.h b/arch/powerpc/bits/signal.h index a5c311ba..56b599ef 100644 --- a/arch/powerpc/bits/signal.h +++ b/arch/powerpc/bits/signal.h @@ -114,3 +114,5 @@ typedef struct __ucontext { #define SIGPWR 30 #define SIGSYS 31 #define SIGUNUSED SIGSYS + +#define _NSIG 65 diff --git a/arch/x86_64/bits/signal.h b/arch/x86_64/bits/signal.h index 11375b9a..cfe7dbbc 100644 --- a/arch/x86_64/bits/signal.h +++ b/arch/x86_64/bits/signal.h @@ -78,3 +78,5 @@ struct sigcontext { #define SIGPWR 30 #define SIGSYS 31 #define SIGUNUSED SIGSYS + +#define _NSIG 65 diff --git a/include/signal.h b/include/signal.h index 1014440d..bef8ae04 100644 --- a/include/signal.h +++ b/include/signal.h @@ -217,6 +217,7 @@ void (*bsd_signal(int, void (*)(int)))(int); int sigisemptyset(const sigset_t *); #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define NSIG _NSIG #endif #include -- 2.25.1