Deal with signal trampoline being const.

This commit is contained in:
matt 2003-09-27 00:57:45 +00:00
parent 2546f51a33
commit 3ce59aebf3
2 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_sig.c,v 1.161 2003/09/26 22:14:19 matt Exp $ */
/* $NetBSD: kern_sig.c,v 1.162 2003/09/27 00:57:45 matt Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.161 2003/09/26 22:14:19 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.162 2003/09/27 00:57:45 matt Exp $");
#include "opt_ktrace.h"
#include "opt_compat_sunos.h"
@ -262,7 +262,7 @@ sigactsfree(struct proc *p)
int
sigaction1(struct proc *p, int signum, const struct sigaction *nsa,
struct sigaction *osa, void *tramp, int vers)
struct sigaction *osa, const void *tramp, int vers)
{
struct sigacts *ps;
int prop;
@ -273,13 +273,13 @@ sigaction1(struct proc *p, int signum, const struct sigaction *nsa,
/*
* Trampoline ABI version 0 is reserved for the legacy
* kernel-provided on-stack trampoline. Conversely, if
* we are using a non-0 ABI version, we must have a
* trampoline.
* kernel-provided on-stack trampoline. Conversely, if we are
* using a non-0 ABI version, we must have a trampoline. Only
* validate the vers if a new sigaction was supplied.
*/
if ((vers != 0 && tramp == NULL) ||
#ifdef SIGTRAMP_VALID
!SIGTRAMP_VALID(vers) ||
(nsa != NULL && !SIGTRAMP_VALID(vers)) ||
#endif
(vers == 0 && tramp != NULL))
return (EINVAL);

View File

@ -1,4 +1,4 @@
/* $NetBSD: signalvar.h,v 1.46 2003/09/26 12:02:57 simonb Exp $ */
/* $NetBSD: signalvar.h,v 1.47 2003/09/27 00:57:45 matt Exp $ */
/*
* Copyright (c) 1991, 1993
@ -47,7 +47,7 @@
struct sigacts {
struct sigact_sigdesc {
struct sigaction sd_sigact;
void *sd_tramp;
const void *sd_tramp;
int sd_vers;
} sa_sigdesc[NSIG]; /* disposition of signals */
@ -164,7 +164,7 @@ int killpg1 __P((struct proc *, struct ksiginfo *, int, int));
struct lwp *proc_unstop __P((struct proc *p));
int sigaction1 __P((struct proc *, int, const struct sigaction *,
struct sigaction *, void *, int));
struct sigaction *, const void *, int));
int sigprocmask1 __P((struct proc *, int, const sigset_t *, sigset_t *));
void sigpending1 __P((struct proc *, sigset_t *));
int sigsuspend1 __P((struct proc *, const sigset_t *));