diff options
-rw-r--r-- | include/signal.h | 47 | ||||
-rw-r--r-- | libc/sysdeps/linux/alpha/bits/signum.h | 19 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/bits/signum.h | 22 | ||||
-rw-r--r-- | libc/sysdeps/linux/hppa/bits/signum.h | 20 | ||||
-rw-r--r-- | libc/sysdeps/linux/mips/bits/signum.h | 23 | ||||
-rw-r--r-- | libc/sysdeps/linux/sparc/bits/signum.h | 20 |
6 files changed, 35 insertions, 116 deletions
diff --git a/include/signal.h b/include/signal.h index 2946f9c5f..b42800f51 100644 --- a/include/signal.h +++ b/include/signal.h @@ -57,12 +57,35 @@ typedef __sigset_t sigset_t; #include <bits/types.h> #include <bits/signum.h> +/* Fake signal functions. */ +#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ +#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ +#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ +#ifdef __USE_UNIX98 +# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ +#endif +/* Biggest signal number + 1 (including real-time signals). */ +#ifndef _NSIG /* if arch has not defined it in bits/signum.h... */ +# define _NSIG 65 +#endif +#ifdef __USE_MISC +# define NSIG _NSIG +#endif +/* Real-time signal range */ +#define SIGRTMIN (__libc_current_sigrtmin()) +#define SIGRTMAX (__libc_current_sigrtmax()) +/* These are the hard limits of the kernel. These values should not be + used directly at user level. */ +#ifndef __SIGRTMIN /* if arch has not defined it in bits/signum.h... */ +# define __SIGRTMIN 32 +#endif +#define __SIGRTMAX (_NSIG - 1) + + #if defined __USE_XOPEN || defined __USE_XOPEN2K # ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined -#endif -#ifdef __USE_XOPEN # endif # ifndef __uid_t_defined typedef __uid_t uid_t; @@ -79,10 +102,10 @@ typedef void (*__sighandler_t) (int); requested. */ extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) __THROW; -#ifdef __USE_GNU +# ifdef __USE_GNU extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) __THROW; -#endif +# endif #endif /* __UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL__ */ /* Set the handler for the signal SIG to HANDLER, returning the old @@ -118,14 +141,14 @@ extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) #ifdef __USE_POSIX extern int kill (__pid_t __pid, int __sig) __THROW; libc_hidden_proto(kill) -#endif /* Use POSIX. */ +#endif #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Send SIG to all processes in process group PGRP. If PGRP is zero, send SIG to all processes in the current process's process group. */ extern int killpg (__pid_t __pgrp, int __sig) __THROW; -#endif /* Use BSD || X/Open Unix. */ +#endif __BEGIN_NAMESPACE_STD /* Raise signal SIG, i.e., send SIG to yourself. */ @@ -195,10 +218,6 @@ extern int siggetmask (void) __THROW __attribute_deprecated__; #endif /* Use BSD. */ -#ifdef __USE_MISC -# define NSIG _NSIG -#endif - #ifdef __USE_GNU typedef __sighandler_t sighandler_t; #endif @@ -316,12 +335,12 @@ extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val) #ifdef __USE_BSD -#ifdef __UCLIBC_HAS_SYS_SIGLIST__ +# ifdef __UCLIBC_HAS_SYS_SIGLIST__ /* Names of the signals. This variable exists only for compatibility. Use `strsignal' instead (see <string.h>). */ -#define _sys_siglist sys_siglist +# define _sys_siglist sys_siglist extern __const char *__const sys_siglist[_NSIG]; -#endif /* __UCLIBC_HAS_SYS_SIGLIST__ */ +# endif /* Structure passed to `sigvec'. */ struct sigvec @@ -404,7 +423,7 @@ extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __THROW; be defined here. */ # include <bits/pthreadtypes.h> # include <bits/sigthread.h> -#endif /* use Unix98 */ +#endif /* The following functions are used internally in the C library and in other code which need deep insights. */ diff --git a/libc/sysdeps/linux/alpha/bits/signum.h b/libc/sysdeps/linux/alpha/bits/signum.h index 477c13175..46dca8c08 100644 --- a/libc/sysdeps/linux/alpha/bits/signum.h +++ b/libc/sysdeps/linux/alpha/bits/signum.h @@ -19,15 +19,6 @@ #ifdef _SIGNAL_H -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ -#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ -#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ - -#ifdef __USE_UNIX98 -# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ -#endif - /* * Linux/AXP has different signal numbers that Linux/i386: I'm trying * to make it OSF/1 binary compatible, at least for normal binaries. @@ -69,14 +60,4 @@ #define SIGPWR SIGINFO #define SIGIOT SIGABRT -#define _NSIG 65 /* Biggest signal number + 1. */ - -#define SIGRTMIN (__libc_current_sigrtmin ()) -#define SIGRTMAX (__libc_current_sigrtmax ()) - -/* These are the hard limits of the kernel. These values should not be - used directly at user level. */ -#define __SIGRTMIN 32 -#define __SIGRTMAX (_NSIG - 1) - #endif /* <signal.h> included. */ diff --git a/libc/sysdeps/linux/common/bits/signum.h b/libc/sysdeps/linux/common/bits/signum.h index a18ac113a..81d38f5c5 100644 --- a/libc/sysdeps/linux/common/bits/signum.h +++ b/libc/sysdeps/linux/common/bits/signum.h @@ -19,17 +19,6 @@ #ifdef _SIGNAL_H -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ -#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ -#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ - -#ifdef __USE_UNIX98 -# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ -#endif - - -/* Signals. */ #define SIGHUP 1 /* Hangup (POSIX). */ #define SIGINT 2 /* Interrupt (ANSI). */ #define SIGQUIT 3 /* Quit (POSIX). */ @@ -66,15 +55,4 @@ #define SIGSYS 31 /* Bad system call. */ #define SIGUNUSED 31 -#define _NSIG 65 /* Biggest signal number + 1 - (including real-time signals). */ - -#define SIGRTMIN (__libc_current_sigrtmin ()) -#define SIGRTMAX (__libc_current_sigrtmax ()) - -/* These are the hard limits of the kernel. These values should not be - used directly at user level. */ -#define __SIGRTMIN 32 -#define __SIGRTMAX (_NSIG - 1) - #endif /* <signal.h> included. */ diff --git a/libc/sysdeps/linux/hppa/bits/signum.h b/libc/sysdeps/linux/hppa/bits/signum.h index bf46006c8..d1d0f38bf 100644 --- a/libc/sysdeps/linux/hppa/bits/signum.h +++ b/libc/sysdeps/linux/hppa/bits/signum.h @@ -19,17 +19,6 @@ #ifdef _SIGNAL_H -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ -#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ -#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ - -#ifdef __USE_UNIX98 -# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ -#endif - - -/* Signals. */ #define SIGHUP 1 /* Hangup (POSIX). */ #define SIGINT 2 /* Interrupt (ANSI). */ #define SIGQUIT 3 /* Quit (POSIX). */ @@ -68,15 +57,6 @@ #define SIGXFSZ 34 /* File size limit exceeded (4.2 BSD). */ #define SIGSTKFLT 36 /* Stack fault. */ -#define _NSIG 65 /* Biggest signal number + 1 - (including real-time signals). */ - -#define SIGRTMIN (__libc_current_sigrtmin ()) -#define SIGRTMAX (__libc_current_sigrtmax ()) - -/* These are the hard limits of the kernel. These values should not be - used directly at user level. */ #define __SIGRTMIN 37 -#define __SIGRTMAX (_NSIG - 1) #endif /* <signal.h> included. */ diff --git a/libc/sysdeps/linux/mips/bits/signum.h b/libc/sysdeps/linux/mips/bits/signum.h index 6176b90b9..b9c64e675 100644 --- a/libc/sysdeps/linux/mips/bits/signum.h +++ b/libc/sysdeps/linux/mips/bits/signum.h @@ -19,16 +19,6 @@ #ifdef _SIGNAL_H -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ -#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ -#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ - -#ifdef __USE_UNIX98 -# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ -#endif - - #define SIGHUP 1 /* Hangup (POSIX). */ #define SIGINT 2 /* Interrupt (ANSI). */ #define SIGQUIT 3 /* Quit (POSIX). */ @@ -64,16 +54,7 @@ #define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */ #define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */ - -#define _NSIG 129 /* Biggest signal number + 1 - (including real-time signals). */ - -#define SIGRTMIN (__libc_current_sigrtmin ()) -#define SIGRTMAX (__libc_current_sigrtmax ()) - -/* These are the hard limits of the kernel. These values should not be - used directly at user level. */ -#define __SIGRTMIN 32 -#define __SIGRTMAX (_NSIG - 1) +/* Biggest signal number + 1 (including real-time signals). */ +#define _NSIG 129 #endif /* <signal.h> included. */ diff --git a/libc/sysdeps/linux/sparc/bits/signum.h b/libc/sysdeps/linux/sparc/bits/signum.h index 6b58ec29d..2dcbb3ca9 100644 --- a/libc/sysdeps/linux/sparc/bits/signum.h +++ b/libc/sysdeps/linux/sparc/bits/signum.h @@ -19,15 +19,6 @@ #ifdef _SIGNAL_H -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ -#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ -#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ - -#ifdef __USE_UNIX98 -# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ -#endif - /* * Linux/SPARC has different signal numbers that Linux/i386: I'm trying * to make it OSF/1 binary compatible, at least for normal binaries. @@ -70,15 +61,4 @@ #define SIGUSR1 30 #define SIGUSR2 31 -#define _NSIG 65 /* Biggest signal number + 1 - (including real-time signals). */ - -#define SIGRTMIN (__libc_current_sigrtmin ()) -#define SIGRTMAX (__libc_current_sigrtmax ()) - -/* These are the hard limits of the kernel. These values should not be - used directly at user level. */ -#define __SIGRTMIN 32 -#define __SIGRTMAX (_NSIG - 1) - #endif /* <signal.h> included. */ |