summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2005-12-18 15:42:54 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2005-12-18 15:42:54 +0000
commitc0aa54c9b441f7548fa6ba79a87594b2168fd120 (patch)
treece4f0244876984a28ae20dcac381e003f4fe12e7 /sys/arch
parentb82cd7c01a322762d9e140071e45089d72905e97 (diff)
Don't include cdefs.h if _LOCORE is defined and hide some more defines
unless __BSD_VISIBLE or _LOCORE are set. OK deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/arm/include/signal.h17
-rw-r--r--sys/arch/sparc/include/signal.h5
-rw-r--r--sys/arch/sparc64/include/signal.h11
3 files changed, 13 insertions, 20 deletions
diff --git a/sys/arch/arm/include/signal.h b/sys/arch/arm/include/signal.h
index 121b03d4120..33f907ad336 100644
--- a/sys/arch/arm/include/signal.h
+++ b/sys/arch/arm/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.2 2005/12/14 21:46:30 millert Exp $ */
+/* $OpenBSD: signal.h,v 1.3 2005/12/18 15:42:52 millert Exp $ */
/* $NetBSD: signal.h,v 1.5 2003/10/18 17:57:21 briggs Exp $ */
/*
@@ -47,16 +47,12 @@
#ifndef _ARM32_SIGNAL_H_
#define _ARM32_SIGNAL_H_
+#ifndef _LOCORE
#include <sys/cdefs.h>
-#ifndef _LOCORE
typedef int sig_atomic_t;
-#endif
-
-#define __HAVE_SIGINFO
#if __BSD_VISIBLE
-#ifndef _LOCORE
/*
* Information pushed on stack when a signal is delivered.
* This is used by the kernel to restore state following
@@ -64,7 +60,6 @@ typedef int sig_atomic_t;
* to the handler to allow it to restore state properly if
* a non-standard exit is performed.
*/
-
struct sigcontext {
int sc_onstack; /* sigstack state to restore */
int sc_mask; /* signal mask to restore (old style) */
@@ -92,17 +87,16 @@ struct sigcontext {
sigset_t sc_mask; /* signal mask to restore (new style) */
#endif
};
-
+#endif /* __BSD_VISIBLE */
#endif /* !_LOCORE */
-/* Signals codes */
+#if defined(_LOCORE) || __BSD_VISIBLE
/*
* SIGFPE codes
*
* see ieeefp.h for definition of FP exception codes
*/
-
#define SIG_CODE_FPE_CODE_MASK 0x00000f00 /* Mask for exception code */
#define SIG_CODE_FPE_CODE_SHIFT 8 /* Shift for exception code */
#define SIG_CODE_FPE_TYPE_MASK 0x000000ff /* Mask for specific code */
@@ -125,11 +119,10 @@ struct sigcontext {
* should be treated as undefined (in practice it is the bottom 4 bits
* of the fault address).
*/
-
#define SIG_CODE_BUS_ADDR_MASK 0xfffffff0
#define SIG_CODE_BUS_TYPE_MASK 0x0000000f
#define SIG_CODE_SEGV_ADDR_MASK SIG_CODE_BUS_ADDR_MASK
#define SIG_CODE_SEGV_TYPE_MASK SIG_CODE_BUS_TYPE_MASK
-#endif /* __BSD_VISIBLE */
+#endif /* _LOCORE || __BSD_VISIBLE */
#endif /* !_ARM32_SIGNAL_H_ */
diff --git a/sys/arch/sparc/include/signal.h b/sys/arch/sparc/include/signal.h
index 8d98f56b107..8d219014984 100644
--- a/sys/arch/sparc/include/signal.h
+++ b/sys/arch/sparc/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.6 2005/12/17 05:02:18 millert Exp $ */
+/* $OpenBSD: signal.h,v 1.7 2005/12/18 15:42:53 millert Exp $ */
/* $NetBSD: signal.h,v 1.4 1996/02/01 22:32:35 mycroft Exp $ */
/*
@@ -80,6 +80,7 @@ struct sigcontext {
#define SC_O0_OFFSET 28
#endif /* _LOCORE */
+#if defined(_LOCORE) || __BSD_VISIBLE
/*
* `Code' arguments to signal handlers. The names, and the funny numbering.
* are defined so as to match up with what SunOS uses; I have no idea why
@@ -92,5 +93,5 @@ struct sigcontext {
#define FPE_FLTUND_TRAP 0xcc /* underflow */
#define FPE_FLTOPERR_TRAP 0xd0 /* operand error */
#define FPE_FLTOVF_TRAP 0xd4 /* overflow */
-
+#endif /* _LOCORE || __BSD_VISIBLE */
#endif /* !_SPARC_SIGNAL_H_ */
diff --git a/sys/arch/sparc64/include/signal.h b/sys/arch/sparc64/include/signal.h
index ddab3c9d73e..48a5ebc4595 100644
--- a/sys/arch/sparc64/include/signal.h
+++ b/sys/arch/sparc64/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.6 2005/12/14 21:46:31 millert Exp $ */
+/* $OpenBSD: signal.h,v 1.7 2005/12/18 15:42:53 millert Exp $ */
/* $NetBSD: signal.h,v 1.10 2001/05/09 19:50:49 kleink Exp $ */
/*
@@ -44,15 +44,12 @@
#ifndef _SPARC64_SIGNAL_H_
#define _SPARC64_SIGNAL_H_
+#ifndef _LOCORE
#include <sys/cdefs.h>
-#ifndef _LOCORE
typedef int sig_atomic_t;
-#endif
#if __BSD_VISIBLE
-#ifndef _LOCORE
-
/*
* Information pushed on stack when a signal is delivered.
* This is used by the kernel to restore state following
@@ -74,8 +71,10 @@ struct sigcontext {
long sc_o0; /* %o0 to restore */
int sc_mask; /* signal mask to restore (new style) */
};
+#endif /* __BSD_VISIBLE */
#endif /* _LOCORE */
+#if defined(_LOCORE) || __BSD_VISIBLE
/*
* `Code' arguments to signal handlers. The names, and the funny numbering.
* are defined so as to match up with what SunOS uses; I have no idea why
@@ -88,6 +87,6 @@ struct sigcontext {
#define FPE_FLTUND_TRAP 0xcc /* underflow */
#define FPE_FLTOPERR_TRAP 0xd0 /* operand error */
#define FPE_FLTOVF_TRAP 0xd4 /* overflow */
+#endif
-#endif /* __BSD_VISIBLE */
#endif /* !_SPARC64_SIGNAL_H_ */