diff options
author | bde <bde@FreeBSD.org> | 1995-06-28 02:14:13 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-06-28 02:14:13 +0000 |
commit | 9a6f33d13c1c65fd482f2fdb662d6c64b243e451 (patch) | |
tree | a88d5304db67310228e4f31867772eab4ff6ad9a /sys/i386 | |
parent | 0e4c96dda7b490ecec226abdfcff4e092fbc7ee6 (diff) | |
download | FreeBSD-src-9a6f33d13c1c65fd482f2fdb662d6c64b243e451.zip FreeBSD-src-9a6f33d13c1c65fd482f2fdb662d6c64b243e451.tar.gz |
Fix standards conformance bugs in <signal.h>:
include/signal.h:
There was massive namespace pollution from including <sys/types.h>.
POSIX functions were declared even when _ANSI_SOURCE is defined.
sys.sys/signal.h:
NSIG was declared even if _ANSI_SOURCE or _POSIX_SOURCE is defined.
sig_atomic_t wasn't declared if _POSIX_SOURCE is defined.
Declare a typedef for signal handling functions and use it to
unobfuscate declarations and to avoid half-baked function types
that cause unwanted compiler warnings at certain warning levels.
Fix confusing comment about SA_RESTART.
sys/i386/include/signal.h:
This has to be included to get the declaration of sig_atomic_t even
when _ANSI_SOURCE is defined, so be more careful about polluting
the ANSI namespace.
Uniformize idempotency ifdefs.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/include/signal.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/i386/include/signal.h b/sys/i386/include/signal.h index 093278f..628a236 100644 --- a/sys/i386/include/signal.h +++ b/sys/i386/include/signal.h @@ -31,11 +31,11 @@ * SUCH DAMAGE. * * @(#)signal.h 8.1 (Berkeley) 6/11/93 - * $Id: signal.h,v 1.3 1994/08/02 07:39:01 davidg Exp $ + * $Id: signal.h,v 1.4 1994/08/21 04:55:30 paul Exp $ */ -#ifndef _I386_MACHINE_SIGNAL_H_ -#define _I386_MACHINE_SIGNAL_H_ +#ifndef _MACHINE_SIGNAL_H_ +#define _MACHINE_SIGNAL_H_ /* * Machine-dependent signal definitions @@ -43,9 +43,9 @@ typedef int sig_atomic_t; -#ifndef _POSIX_SOURCE +#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) + #include <machine/trap.h> /* codes for SIGILL, SIGFPE */ -#endif /* * Information pushed on stack when a signal is delivered. @@ -78,4 +78,6 @@ struct sigcontext { # define sc_ps sc_efl }; -#endif +#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */ + +#endif /* !_MACHINE_SIGNAL_H_ */ |