more POSIX and ANSI compliance (from karels)
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 4 May 1995 13:04:49 +0000 (05:04 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 4 May 1995 13:04:49 +0000 (05:04 -0800)
SCCS-vsn: sys/sys/signal.h 8.3
SCCS-vsn: sys/hp300/include/signal.h 8.2
SCCS-vsn: sys/i386/include/signal.h 8.2
SCCS-vsn: sys/pmax/include/signal.h 8.2
SCCS-vsn: sys/sparc/include/signal.h 8.2

usr/src/sys/hp300/include/signal.h
usr/src/sys/i386/include/signal.h
usr/src/sys/pmax/include/signal.h
usr/src/sys/sparc/include/signal.h
usr/src/sys/sys/signal.h

index 65d0d68..3446f2f 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)signal.h    8.1 (Berkeley) %G%
+ *     @(#)signal.h    8.2 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -13,9 +13,8 @@
 
 typedef int sig_atomic_t;
 
 
 typedef int sig_atomic_t;
 
-#ifndef _POSIX_SOURCE
+#if !defined(_POSIX_SOURCE) && !defined(_ANSI_SOURCE)
 #include <machine/trap.h>      /* codes for SIGILL, SIGFPE */
 #include <machine/trap.h>      /* codes for SIGILL, SIGFPE */
-#endif
 
 /*
  * Information pushed on stack when a signal is delivered.
 
 /*
  * Information pushed on stack when a signal is delivered.
@@ -33,3 +32,4 @@ struct        sigcontext {
        int     sc_pc;          /* pc to restore */
        int     sc_ps;          /* psl to restore */
 };
        int     sc_pc;          /* pc to restore */
        int     sc_ps;          /* psl to restore */
 };
+#endif
index 65d0d68..3446f2f 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)signal.h    8.1 (Berkeley) %G%
+ *     @(#)signal.h    8.2 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -13,9 +13,8 @@
 
 typedef int sig_atomic_t;
 
 
 typedef int sig_atomic_t;
 
-#ifndef _POSIX_SOURCE
+#if !defined(_POSIX_SOURCE) && !defined(_ANSI_SOURCE)
 #include <machine/trap.h>      /* codes for SIGILL, SIGFPE */
 #include <machine/trap.h>      /* codes for SIGILL, SIGFPE */
-#endif
 
 /*
  * Information pushed on stack when a signal is delivered.
 
 /*
  * Information pushed on stack when a signal is delivered.
@@ -33,3 +32,4 @@ struct        sigcontext {
        int     sc_pc;          /* pc to restore */
        int     sc_ps;          /* psl to restore */
 };
        int     sc_pc;          /* pc to restore */
        int     sc_ps;          /* psl to restore */
 };
+#endif
index b34a891..f382bc2 100644 (file)
@@ -7,7 +7,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)signal.h    8.1 (Berkeley) %G%
+ *     @(#)signal.h    8.2 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -16,6 +16,9 @@
 
 typedef int sig_atomic_t;
 
 
 typedef int sig_atomic_t;
 
+#if !defined(_POSIX_SOURCE) && !defined(_ANSI_SOURCE)
+#include <machine/trap.h>      /* codes for SIGILL, SIGFPE */
+
 /*
  * Information pushed on stack when a signal is delivered.
  * This is used by the kernel to restore state following
 /*
  * Information pushed on stack when a signal is delivered.
  * This is used by the kernel to restore state following
@@ -32,3 +35,4 @@ struct        sigcontext {
        int     sc_fpregs[33];  /* fp regs 0 to 31 and csr */
        int     sc_fpc_eir;     /* floating point exception instruction reg */
 };
        int     sc_fpregs[33];  /* fp regs 0 to 31 and csr */
        int     sc_fpc_eir;     /* floating point exception instruction reg */
 };
+#endif
index bb64855..c23e7fc 100644 (file)
@@ -13,7 +13,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)signal.h    8.1 (Berkeley) %G%
+ *     @(#)signal.h    8.2 (Berkeley) %G%
  *
  * from: $Header: signal.h,v 1.5 92/11/26 02:04:46 torek Exp $
  */
  *
  * from: $Header: signal.h,v 1.5 92/11/26 02:04:46 torek Exp $
  */
@@ -21,6 +21,7 @@
 #ifndef LOCORE
 typedef int sig_atomic_t;
 
 #ifndef LOCORE
 typedef int sig_atomic_t;
 
+#if !defined(_POSIX_SOURCE) && !defined(_ANSI_SOURCE)
 /*
  * Information pushed on stack when a signal is delivered.
  * This is used by the kernel to restore state following
 /*
  * Information pushed on stack when a signal is delivered.
  * This is used by the kernel to restore state following
@@ -41,6 +42,7 @@ struct sigcontext {
        int     sc_g1;                  /* %g1 to restore */
        int     sc_o0;                  /* %o0 to restore */
 };
        int     sc_g1;                  /* %g1 to restore */
        int     sc_o0;                  /* %o0 to restore */
 };
+#endif
 #else /* LOCORE */
 #define        SC_SP_OFFSET    8
 #define        SC_PC_OFFSET    12
 #else /* LOCORE */
 #define        SC_SP_OFFSET    8
 #define        SC_PC_OFFSET    12
@@ -50,6 +52,7 @@ struct sigcontext {
 #define        SC_O0_OFFSET    28
 #endif /* LOCORE */
 
 #define        SC_O0_OFFSET    28
 #endif /* LOCORE */
 
+#if !defined(_POSIX_SOURCE) && !defined(_ANSI_SOURCE)
 /*
  * `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
 /*
  * `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
@@ -62,3 +65,4 @@ struct sigcontext {
 #define        FPE_FLTUND_TRAP         0xcc    /* underflow */
 #define        FPE_FLTOPERR_TRAP       0xd0    /* operand error */
 #define        FPE_FLTOVF_TRAP         0xd4    /* overflow */
 #define        FPE_FLTUND_TRAP         0xcc    /* underflow */
 #define        FPE_FLTOPERR_TRAP       0xd0    /* operand error */
 #define        FPE_FLTOVF_TRAP         0xd4    /* overflow */
+#endif
index 28528a7..044f455 100644 (file)
@@ -9,17 +9,17 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)signal.h    8.2 (Berkeley) %G%
+ *     @(#)signal.h    8.3 (Berkeley) %G%
  */
 
 #ifndef        _SYS_SIGNAL_H_
 #define        _SYS_SIGNAL_H_
 
  */
 
 #ifndef        _SYS_SIGNAL_H_
 #define        _SYS_SIGNAL_H_
 
+#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
 #define NSIG   32              /* counting 0; could be 33 (mask is 1-32) */
 #define NSIG   32              /* counting 0; could be 33 (mask is 1-32) */
+#endif
 
 
-#ifndef _ANSI_SOURCE
 #include <machine/signal.h>    /* sigcontext; codes for SIGILL, SIGFPE */
 #include <machine/signal.h>    /* sigcontext; codes for SIGILL, SIGFPE */
-#endif
 
 #define        SIGHUP  1       /* hangup */
 #define        SIGINT  2       /* interrupt */
 
 #define        SIGHUP  1       /* hangup */
 #define        SIGINT  2       /* interrupt */
 #define        SIG_DFL         (void (*)(int))0
 #define        SIG_IGN         (void (*)(int))1
 #define        SIG_ERR         (void (*)(int))-1
 #define        SIG_DFL         (void (*)(int))0
 #define        SIG_IGN         (void (*)(int))1
 #define        SIG_ERR         (void (*)(int))-1
+#define        _SIGARG         int             /* one int parameter */
 #else
 #define        SIG_DFL         (void (*)())0
 #define        SIG_IGN         (void (*)())1
 #define        SIG_ERR         (void (*)())-1
 #else
 #define        SIG_DFL         (void (*)())0
 #define        SIG_IGN         (void (*)())1
 #define        SIG_ERR         (void (*)())-1
+#define        _SIGARG         void    /* unspecified parameters */
 #endif
 
 #ifndef _ANSI_SOURCE
 #endif
 
 #ifndef _ANSI_SOURCE
@@ -87,7 +89,7 @@ typedef unsigned int sigset_t;
  * Signal vector "template" used in sigaction call.
  */
 struct sigaction {
  * Signal vector "template" used in sigaction call.
  */
 struct sigaction {
-       void    (*sa_handler)();        /* signal handler */
+       void    (*sa_handler)(_SIGARG); /* signal handler */
        sigset_t sa_mask;               /* signal mask to apply */
        int     sa_flags;               /* see signal options below */
 };
        sigset_t sa_mask;               /* signal mask to apply */
        int     sa_flags;               /* see signal options below */
 };
@@ -108,7 +110,7 @@ struct      sigaction {
 #define        SIG_UNBLOCK     2       /* unblock specified signal set */
 #define        SIG_SETMASK     3       /* set specified signal set */
 
 #define        SIG_UNBLOCK     2       /* unblock specified signal set */
 #define        SIG_SETMASK     3       /* set specified signal set */
 
-#ifndef _POSIX_SOURCE
+#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
 #ifndef KERNEL
 #include <sys/cdefs.h>
 #endif
 #ifndef KERNEL
 #include <sys/cdefs.h>
 #endif
@@ -130,7 +132,7 @@ struct      sigaltstack {
  * Signal vector "template" used in sigvec call.
  */
 struct sigvec {
  * Signal vector "template" used in sigvec call.
  */
 struct sigvec {
-       void    (*sv_handler)();        /* signal handler */
+       void    (*sv_handler)(_SIGARG); /* signal handler */
        int     sv_mask;                /* signal mask to apply */
        int     sv_flags;               /* see signal options below */
 };
        int     sv_mask;                /* signal mask to apply */
        int     sv_flags;               /* see signal options below */
 };