summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-12-15 09:49:15 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-12-15 09:49:15 +0000
commitcb17b1ef4c28b7cd2dbad63df659375b23b9254a (patch)
tree800c160622d0c98f48a94c07600f0285c49f4d30 /include
parent885f507317b6c8576ba2e298c2249d27ea6f8404 (diff)
remove some duplicates in bits/signum.h. No code changes.
include/signal.h | 42 +++++++++++++++++++------------- libc/sysdeps/linux/alpha/bits/signum.h | 19 -------------- libc/sysdeps/linux/common/bits/signum.h | 22 ---------------- libc/sysdeps/linux/hppa/bits/signum.h | 17 ------------ libc/sysdeps/linux/mips/bits/signum.h | 23 +---------------- libc/sysdeps/linux/sparc/bits/signum.h | 20 --------------- 6 files changed, 27 insertions(+), 116 deletions(-)
Diffstat (limited to 'include')
-rw-r--r--include/signal.h42
1 files changed, 25 insertions, 17 deletions
diff --git a/include/signal.h b/include/signal.h
index c2b8b7476..b42800f51 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -56,18 +56,31 @@ typedef __sigset_t sigset_t;
#include <bits/types.h>
#include <bits/signum.h>
-//TODO vda: pull out of bits/signum.h the following,
-//which is the same for all arches:
-//#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 SIGRTMIN (__libc_current_sigrtmin())
-//#define SIGRTMAX (__libc_current_sigrtmax())
-//#define __SIGRTMIN -- dont pull, it's arch specific
-//#define __SIGRTMAX (_NSIG - 1)
+
+/* 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
@@ -205,11 +218,6 @@ extern int siggetmask (void) __THROW __attribute_deprecated__;
#endif /* Use BSD. */
-/* Biggest signal number + 1 (including real-time signals). */
-#ifdef __USE_MISC
-# define NSIG _NSIG
-#endif
-
#ifdef __USE_GNU
typedef __sighandler_t sighandler_t;
#endif