From 83eb4d5219f920fde59c9edd9204664f0c2f9f36 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 1 Dec 2008 18:00:04 +0000 Subject: fix sigset_t size for mips (it's the only arch with 128 signals). fix _NSIG for it. better document what's going on in sigaction(). seems to not induce any actual code changes (sans mips). --- libc/sysdeps/linux/common/bits/kernel_sigaction.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'libc/sysdeps/linux/common/bits/kernel_sigaction.h') diff --git a/libc/sysdeps/linux/common/bits/kernel_sigaction.h b/libc/sysdeps/linux/common/bits/kernel_sigaction.h index 99148e608..89aa2bb88 100644 --- a/libc/sysdeps/linux/common/bits/kernel_sigaction.h +++ b/libc/sysdeps/linux/common/bits/kernel_sigaction.h @@ -7,6 +7,10 @@ #undef NO_OLD_SIGACTION #if defined(__mips__) +/* We have libc/sysdeps/linux/mips/bits/kernel_sigaction.h, + * so this should never be used. Lets see whether it is true. */ +struct BUG_is_here { char BUG_is_here[-1]; }; + #undef HAVE_SA_RESTORER /* This is the sigaction structure from the Linux 2.1.24 kernel. */ #include @@ -18,11 +22,9 @@ struct old_kernel_sigaction { #define _KERNEL_NSIG 128 #define _KERNEL_NSIG_BPW 32 #define _KERNEL_NSIG_WORDS (_KERNEL_NSIG / _KERNEL_NSIG_BPW) - typedef struct { unsigned long sig[_KERNEL_NSIG_WORDS]; } kernel_sigset_t; - /* This is the sigaction structure from the Linux 2.1.68 kernel. */ struct kernel_sigaction { unsigned int sa_flags; @@ -31,7 +33,9 @@ struct kernel_sigaction { void (*sa_restorer)(void); int s_resv[1]; /* reserved */ }; + #elif defined(__ia64__) + #define NO_OLD_SIGACTION #undef HAVE_SA_RESTORER struct kernel_sigaction { @@ -39,7 +43,9 @@ struct kernel_sigaction { unsigned long sa_flags; sigset_t sa_mask; }; + #else + #define HAVE_SA_RESTORER /* This is the sigaction structure from the Linux 2.1.20 kernel. */ struct old_kernel_sigaction { @@ -55,6 +61,7 @@ struct kernel_sigaction { void (*sa_restorer) (void); sigset_t sa_mask; }; + #endif #ifndef NO_OLD_SIGACTION -- cgit v1.2.3