diff options
| -rw-r--r-- | sys/alpha/alpha/machdep.c | 3 | ||||
| -rw-r--r-- | sys/alpha/include/sigframe.h | 8 | ||||
| -rw-r--r-- | sys/alpha/include/signal.h | 5 | ||||
| -rw-r--r-- | sys/amd64/amd64/genassym.c | 1 | ||||
| -rw-r--r-- | sys/amd64/amd64/machdep.c | 3 | ||||
| -rw-r--r-- | sys/amd64/include/sigframe.h | 3 | ||||
| -rw-r--r-- | sys/amd64/include/signal.h | 5 | ||||
| -rw-r--r-- | sys/i386/i386/genassym.c | 1 | ||||
| -rw-r--r-- | sys/i386/i386/machdep.c | 3 | ||||
| -rw-r--r-- | sys/i386/include/sigframe.h | 3 | ||||
| -rw-r--r-- | sys/i386/include/signal.h | 5 | ||||
| -rw-r--r-- | sys/sys/_sigset.h | 7 | ||||
| -rw-r--r-- | sys/sys/signal.h | 7 | ||||
| -rw-r--r-- | sys/sys/signalvar.h | 2 |
14 files changed, 44 insertions, 12 deletions
diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index da5b444bfa52..6b8023d99163 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -128,6 +128,7 @@ #include <vm/vm_pager.h> #include <sys/user.h> #include <sys/ptrace.h> +#include <sys/ucontext.h> #include <machine/clock.h> #include <machine/md_var.h> #include <machine/reg.h> @@ -1506,7 +1507,7 @@ osigreturn(struct thread *td, int sigreturn(struct thread *td, struct sigreturn_args /* { - ucontext_t *sigcntxp; + const struct __ucontext *sigcntxp; } */ *uap) { ucontext_t uc, *ucp; diff --git a/sys/alpha/include/sigframe.h b/sys/alpha/include/sigframe.h index 4ed62f4d75cb..eb8039b8532a 100644 --- a/sys/alpha/include/sigframe.h +++ b/sys/alpha/include/sigframe.h @@ -31,15 +31,17 @@ #ifndef _MACHINE_SIGFRAME_H_ #define _MACHINE_SIGFRAME_H_ 1 +#ifdef _KERNEL struct osigframe { struct osigcontext sf_sc; osiginfo_t sf_si; }; +#endif struct sigframe { - unsigned long __spare__; - ucontext_t sf_uc; - siginfo_t sf_si; + unsigned long __spare__; + struct __ucontext sf_uc; + siginfo_t sf_si; }; #endif /* _MACHINE_SIGFRAME_H_ */ diff --git a/sys/alpha/include/signal.h b/sys/alpha/include/signal.h index 4bc7b29a0c7f..4b20eac2df1c 100644 --- a/sys/alpha/include/signal.h +++ b/sys/alpha/include/signal.h @@ -42,6 +42,10 @@ typedef long sig_atomic_t; #define MINSIGSTKSZ (1024 * 4) /* + * Only the kernel should need these old type definitions. + */ +#ifdef _KERNEL +/* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following * execution of the signal handler. It is also made available @@ -70,6 +74,7 @@ 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 /* * The sequence of the fields should match those in diff --git a/sys/amd64/amd64/genassym.c b/sys/amd64/amd64/genassym.c index f2c4a298d23c..1fe8a2e0bd6f 100644 --- a/sys/amd64/amd64/genassym.c +++ b/sys/amd64/amd64/genassym.c @@ -50,6 +50,7 @@ #include <sys/mutex.h> #include <sys/socket.h> #include <sys/resourcevar.h> +#include <sys/ucontext.h> #include <sys/user.h> #include <machine/bootinfo.h> #include <machine/tss.h> diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index c6bdb57d8482..43a4c8bb6d31 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -72,6 +72,7 @@ #include <sys/msgbuf.h> #include <sys/sysent.h> #include <sys/sysctl.h> +#include <sys/ucontext.h> #include <sys/vmmeter.h> #include <sys/bus.h> #include <sys/eventhandler.h> @@ -706,7 +707,7 @@ int sigreturn(td, uap) struct thread *td; struct sigreturn_args /* { - ucontext_t *sigcntxp; + const __ucontext *sigcntxp; } */ *uap; { struct proc *p = td->td_proc; diff --git a/sys/amd64/include/sigframe.h b/sys/amd64/include/sigframe.h index 27be404b8a11..947743d2c0c0 100644 --- a/sys/amd64/include/sigframe.h +++ b/sys/amd64/include/sigframe.h @@ -34,7 +34,7 @@ /* * Signal frames, arguments passed to application signal handlers. */ - +#ifdef _KERNEL struct osigframe { /* * The first four members may be used by applications. @@ -69,6 +69,7 @@ struct osigframe { /* In the SA_SIGINFO case, sf_arg2 points here. */ osiginfo_t sf_siginfo; }; +#endif struct sigframe { /* diff --git a/sys/amd64/include/signal.h b/sys/amd64/include/signal.h index 74accc8d0efd..603a14f70fee 100644 --- a/sys/amd64/include/signal.h +++ b/sys/amd64/include/signal.h @@ -54,6 +54,10 @@ typedef int sig_atomic_t; #include <machine/trap.h> /* codes for SIGILL, SIGFPE */ /* + * Only the kernel should need these old type definitions. + */ +#ifdef _KERNEL +/* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following * execution of the signal handler. It is also made available @@ -85,6 +89,7 @@ struct osigcontext { int sc_trapno; int sc_err; }; +#endif /* * The sequence of the fields/registers in struct sigcontext should match diff --git a/sys/i386/i386/genassym.c b/sys/i386/i386/genassym.c index f2c4a298d23c..1fe8a2e0bd6f 100644 --- a/sys/i386/i386/genassym.c +++ b/sys/i386/i386/genassym.c @@ -50,6 +50,7 @@ #include <sys/mutex.h> #include <sys/socket.h> #include <sys/resourcevar.h> +#include <sys/ucontext.h> #include <sys/user.h> #include <machine/bootinfo.h> #include <machine/tss.h> diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index c6bdb57d8482..43a4c8bb6d31 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -72,6 +72,7 @@ #include <sys/msgbuf.h> #include <sys/sysent.h> #include <sys/sysctl.h> +#include <sys/ucontext.h> #include <sys/vmmeter.h> #include <sys/bus.h> #include <sys/eventhandler.h> @@ -706,7 +707,7 @@ int sigreturn(td, uap) struct thread *td; struct sigreturn_args /* { - ucontext_t *sigcntxp; + const __ucontext *sigcntxp; } */ *uap; { struct proc *p = td->td_proc; diff --git a/sys/i386/include/sigframe.h b/sys/i386/include/sigframe.h index 27be404b8a11..947743d2c0c0 100644 --- a/sys/i386/include/sigframe.h +++ b/sys/i386/include/sigframe.h @@ -34,7 +34,7 @@ /* * Signal frames, arguments passed to application signal handlers. */ - +#ifdef _KERNEL struct osigframe { /* * The first four members may be used by applications. @@ -69,6 +69,7 @@ struct osigframe { /* In the SA_SIGINFO case, sf_arg2 points here. */ osiginfo_t sf_siginfo; }; +#endif struct sigframe { /* diff --git a/sys/i386/include/signal.h b/sys/i386/include/signal.h index 74accc8d0efd..603a14f70fee 100644 --- a/sys/i386/include/signal.h +++ b/sys/i386/include/signal.h @@ -54,6 +54,10 @@ typedef int sig_atomic_t; #include <machine/trap.h> /* codes for SIGILL, SIGFPE */ /* + * Only the kernel should need these old type definitions. + */ +#ifdef _KERNEL +/* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following * execution of the signal handler. It is also made available @@ -85,6 +89,7 @@ struct osigcontext { int sc_trapno; int sc_err; }; +#endif /* * The sequence of the fields/registers in struct sigcontext should match diff --git a/sys/sys/_sigset.h b/sys/sys/_sigset.h index 440a678fd41c..b1ae12b8c450 100644 --- a/sys/sys/_sigset.h +++ b/sys/sys/_sigset.h @@ -247,8 +247,11 @@ typedef struct sigaltstack { #define SS_DISABLE 0x0004 /* disable taking signals on alternate stack */ #define SIGSTKSZ (MINSIGSTKSZ + 32768) /* recommended stack size */ -/* Have enough typedefs for this now. XXX */ -#include <sys/ucontext.h> +/* + * Forward declaration for __ucontext so that sigreturn can use it + * without having to include <ucontext.h>. + */ +struct __ucontext; /* * 4.3 compatibility: diff --git a/sys/sys/signal.h b/sys/sys/signal.h index 440a678fd41c..b1ae12b8c450 100644 --- a/sys/sys/signal.h +++ b/sys/sys/signal.h @@ -247,8 +247,11 @@ typedef struct sigaltstack { #define SS_DISABLE 0x0004 /* disable taking signals on alternate stack */ #define SIGSTKSZ (MINSIGSTKSZ + 32768) /* recommended stack size */ -/* Have enough typedefs for this now. XXX */ -#include <sys/ucontext.h> +/* + * Forward declaration for __ucontext so that sigreturn can use it + * without having to include <ucontext.h>. + */ +struct __ucontext; /* * 4.3 compatibility: diff --git a/sys/sys/signalvar.h b/sys/sys/signalvar.h index 2ad0960d3c75..2105bc3ae1b5 100644 --- a/sys/sys/signalvar.h +++ b/sys/sys/signalvar.h @@ -60,6 +60,7 @@ struct sigacts { sigset_t ps_usertramp; /* SunOS compat; libc sigtramp XXX */ }; +#ifdef _KERNEL /* * Compatibility. */ @@ -80,6 +81,7 @@ struct osigaction { }; typedef void __osiginfohandler_t __P((int, osiginfo_t *, void *)); +#endif /* _KERNEL */ /* additional signal action values, used only temporarily/internally */ #define SIG_CATCH ((__sighandler_t *)2) |
