diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/alpha/include/signal.h | 15 | ||||
-rw-r--r-- | sys/amd64/include/signal.h | 12 | ||||
-rw-r--r-- | sys/arm/include/signal.h | 9 | ||||
-rw-r--r-- | sys/i386/include/signal.h | 12 | ||||
-rw-r--r-- | sys/ia64/include/signal.h | 18 | ||||
-rw-r--r-- | sys/powerpc/include/signal.h | 19 | ||||
-rw-r--r-- | sys/sparc64/include/signal.h | 14 |
7 files changed, 69 insertions, 30 deletions
diff --git a/sys/alpha/include/signal.h b/sys/alpha/include/signal.h index 4b20eac..da32b41 100644 --- a/sys/alpha/include/signal.h +++ b/sys/alpha/include/signal.h @@ -31,15 +31,18 @@ #ifndef _ALPHA_SIGNAL_H_ #define _ALPHA_SIGNAL_H_ -typedef long sig_atomic_t; +#include <sys/cdefs.h> +#include <sys/_sigset.h> -#ifndef _ANSI_SOURCE +typedef long sig_atomic_t; +#if __XSI_VISIBLE /* * Minimum signal stack size. The current signal frame * for Alpha is 808 bytes large. */ #define MINSIGSTKSZ (1024 * 4) +#endif /* * Only the kernel should need these old type definitions. @@ -74,14 +77,15 @@ struct osigcontext { unsigned long sc_traparg_a2; /* a2 argument to trap at exception */ long sc_xxx2[3]; /* sc_fp_trap_pc, sc_fp_trigger_sum, sc_fp_trigger_inst */ }; -#endif +#endif /* _KERNEL */ +#if __BSD_VISIBLE /* * The sequence of the fields should match those in * mcontext_t. Keep them in sync! */ struct sigcontext { - sigset_t sc_mask; /* signal mask to restore */ + struct __sigset sc_mask; /* signal mask to restore */ long sc_onstack; /* sigstack state to restore */ unsigned long sc_regs[32]; /* integer register set (see above) */ long sc_ps; /* ps to restore */ @@ -100,5 +104,6 @@ struct sigcontext { #define sc_sp sc_regs[R_SP] -#endif /* !_ANSI_SOURCE */ +#endif /* __BSD_VISIBLE */ + #endif /* !_ALPHA_SIGNAL_H_*/ diff --git a/sys/amd64/include/signal.h b/sys/amd64/include/signal.h index bf76791..9fcca63 100644 --- a/sys/amd64/include/signal.h +++ b/sys/amd64/include/signal.h @@ -37,20 +37,24 @@ #ifndef _MACHINE_SIGNAL_H_ #define _MACHINE_SIGNAL_H_ +#include <sys/cdefs.h> +#include <sys/_sigset.h> + /* * Machine-dependent signal definitions */ typedef int sig_atomic_t; -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) - +#if __XSI_VISIBLE /* * Minimum signal stack size. The current signal frame * for i386 is 408 bytes large. */ #define MINSIGSTKSZ (512 * 4) +#endif +#if __BSD_VISIBLE #include <machine/trap.h> /* codes for SIGILL, SIGFPE */ /* @@ -96,7 +100,7 @@ struct osigcontext { * those in mcontext_t. */ struct sigcontext { - sigset_t sc_mask; /* signal mask to restore */ + struct __sigset sc_mask; /* signal mask to restore */ int sc_onstack; /* sigstack state to restore */ int sc_gs; /* machine state (struct trapframe): */ int sc_fs; @@ -135,6 +139,6 @@ struct sigcontext { #define sc_ps sc_efl #define sc_eflags sc_efl -#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */ +#endif /* __BSD_VISIBLE */ #endif /* !_MACHINE_SIGNAL_H_ */ diff --git a/sys/arm/include/signal.h b/sys/arm/include/signal.h index 973cda7..7073fa4 100644 --- a/sys/arm/include/signal.h +++ b/sys/arm/include/signal.h @@ -39,12 +39,15 @@ #ifndef _MACHINE_SIGNAL_H_ #define _MACHINE_SIGNAL_H_ -typedef long sig_atomic_t; +#include <sys/cdefs.h> -#ifndef _ANSI_SOURCE +typedef long sig_atomic_t; +#if __XSI_VISIBLE #define MINSIGSTKSZ (1024 * 4) +#endif +#if __BSD_VISIBLE typedef int osigset_t; struct osigcontext { @@ -53,6 +56,6 @@ struct osigcontext { struct sigcontext { }; -#endif /* !_ANSI_SOURCE */ +#endif #endif /* !_MACHINE_SIGNAL_H_ */ diff --git a/sys/i386/include/signal.h b/sys/i386/include/signal.h index bf76791..9fcca63 100644 --- a/sys/i386/include/signal.h +++ b/sys/i386/include/signal.h @@ -37,20 +37,24 @@ #ifndef _MACHINE_SIGNAL_H_ #define _MACHINE_SIGNAL_H_ +#include <sys/cdefs.h> +#include <sys/_sigset.h> + /* * Machine-dependent signal definitions */ typedef int sig_atomic_t; -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) - +#if __XSI_VISIBLE /* * Minimum signal stack size. The current signal frame * for i386 is 408 bytes large. */ #define MINSIGSTKSZ (512 * 4) +#endif +#if __BSD_VISIBLE #include <machine/trap.h> /* codes for SIGILL, SIGFPE */ /* @@ -96,7 +100,7 @@ struct osigcontext { * those in mcontext_t. */ struct sigcontext { - sigset_t sc_mask; /* signal mask to restore */ + struct __sigset sc_mask; /* signal mask to restore */ int sc_onstack; /* sigstack state to restore */ int sc_gs; /* machine state (struct trapframe): */ int sc_fs; @@ -135,6 +139,6 @@ struct sigcontext { #define sc_ps sc_efl #define sc_eflags sc_efl -#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */ +#endif /* __BSD_VISIBLE */ #endif /* !_MACHINE_SIGNAL_H_ */ diff --git a/sys/ia64/include/signal.h b/sys/ia64/include/signal.h index 760396c..58c3c1f 100644 --- a/sys/ia64/include/signal.h +++ b/sys/ia64/include/signal.h @@ -31,10 +31,12 @@ #ifndef _MACHINE_SIGNAL_H_ #define _MACHINE_SIGNAL_H_ -typedef long sig_atomic_t; +#include <sys/cdefs.h> +#include <sys/_sigset.h> -#ifndef _ANSI_SOURCE +typedef long sig_atomic_t; +#if __BSD_VISIBLE /* portable macros for SIGFPE/ARITHTRAP */ #define FPE_INTOVF 1 /* integer overflow */ #define FPE_INTDIV 2 /* integer divide by zero */ @@ -46,12 +48,17 @@ typedef long sig_atomic_t; #define FPE_FLTSUB 8 /* subscript out of range */ #define BUS_SEGM_FAULT 30 /* segment protection base */ +#endif +#if __XSI_VISIBLE /* * Minimum signal stack size. The current signal frame * for IA-64 is 2656 bytes large. */ #define MINSIGSTKSZ (3072 * 4) +#endif + +#ifdef _KERNEL #ifndef _IA64_FPREG_DEFINED @@ -78,12 +85,15 @@ struct osigcontext { int _not_used; }; +#endif /* !_KERNEL */ + +#if __BSD_VISIBLE /* * The sequence of the fields should match those in * mcontext_t. Keep them in sync! */ struct sigcontext { - sigset_t sc_mask; /* signal mask to restore */ + struct __sigset sc_mask; /* signal mask to restore */ unsigned long sc_onstack; unsigned long sc_flags; unsigned long sc_nat; @@ -103,6 +113,6 @@ struct sigcontext { unsigned long sc_gr[32]; struct ia64_fpreg sc_fr[128]; }; +#endif /* __BSD_VISIBLE */ -#endif /* !_ANSI_SOURCE */ #endif /* !_MACHINE_SIGNAL_H_*/ diff --git a/sys/powerpc/include/signal.h b/sys/powerpc/include/signal.h index ea9c9be..55b16dd 100644 --- a/sys/powerpc/include/signal.h +++ b/sys/powerpc/include/signal.h @@ -35,16 +35,22 @@ #ifndef _MACHINE_SIGNAL_H_ #define _MACHINE_SIGNAL_H_ +#include <sys/cdefs.h> + +#if __XSI_VISIBLE #define MINSIGSTKSZ (512 * 4) +#endif typedef int sig_atomic_t; +#ifdef _KERNEL typedef unsigned int osigset_t; -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ - !defined(_XOPEN_SOURCE) #include <machine/frame.h> +/* + * XXX why do we have compatibility structs for a new platform? + */ #if defined(__LIBC12_SOURCE__) || defined(_KERNEL) struct sigcontext13 { int sc_onstack; /* saved onstack flag */ @@ -57,15 +63,18 @@ struct osigcontext { int sc_onstack; /* saved onstack flag */ int __sc_mask13; /* saved signal mask (old style) */ struct trapframe sc_frame; /* saved registers */ - sigset_t sc_mask; /* saved signal mask (new style) */ + struct __sigset sc_mask; /* saved signal mask (new style) */ }; +#endif /* _KERNEL */ + +#if __BSD_VISIBLE struct sigcontext { int sc_onstack; /* saved onstack flag */ int __sc_mask13; /* saved signal mask (old style) */ struct trapframe sc_frame; /* saved registers */ - sigset_t sc_mask; /* saved signal mask (new style) */ + struct __sigset sc_mask; /* saved signal mask (new style) */ }; +#endif -#endif /* !_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE */ #endif /* !_MACHINE_SIGNAL_H_ */ diff --git a/sys/sparc64/include/signal.h b/sys/sparc64/include/signal.h index f751d0b..753077c 100644 --- a/sys/sparc64/include/signal.h +++ b/sys/sparc64/include/signal.h @@ -38,22 +38,26 @@ #ifndef _MACHINE_SIGNAL_H_ #define _MACHINE_SIGNAL_H_ -typedef long sig_atomic_t; +#include <sys/cdefs.h> -#ifndef _ANSI_SOURCE +typedef long sig_atomic_t; +#if __XSI_VISIBLE #define MINSIGSTKSZ (1024 * 4) +#endif +#if _KERNEL typedef int osigset_t; struct osigcontext { int dummy; }; +#endif +#if __BSD_VISIBLE struct sigcontext { - int dummy; + int _dummy; }; - -#endif /* !_ANSI_SOURCE */ +#endif /* __BSD_VISIBLE */ #endif /* !_MACHINE_SIGNAL_H_ */ |