diff options
author | peter <peter@FreeBSD.org> | 2001-08-21 02:32:59 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-08-21 02:32:59 +0000 |
commit | 4694b279a2481f10ddcc8cd86ff0e76951aadbb3 (patch) | |
tree | 40d1cc2f5d263a610792abdef4a9830d0ec80755 | |
parent | d8dc7487e066d160df2e7004c8bd108e3334c4b1 (diff) | |
download | FreeBSD-src-4694b279a2481f10ddcc8cd86ff0e76951aadbb3.zip FreeBSD-src-4694b279a2481f10ddcc8cd86ff0e76951aadbb3.tar.gz |
Make COMPAT_43 optional again. XXX we need COMPAT_FBSD3 etc for this
stuff.
-rw-r--r-- | sys/alpha/alpha/machdep.c | 8 | ||||
-rw-r--r-- | sys/amd64/amd64/machdep.c | 11 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 11 | ||||
-rw-r--r-- | sys/ia64/ia64/machdep.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_sig.c | 2 | ||||
-rw-r--r-- | sys/pc98/i386/machdep.c | 11 | ||||
-rw-r--r-- | sys/pc98/pc98/machdep.c | 11 | ||||
-rw-r--r-- | sys/powerpc/aim/machdep.c | 6 | ||||
-rw-r--r-- | sys/powerpc/powerpc/machdep.c | 6 |
9 files changed, 64 insertions, 4 deletions
diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index 8123ec2..34dcfe0 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -1225,6 +1225,7 @@ DELAY(int n) * frame pointer, it returns to the user * specified pc, psl. */ +#ifdef COMPAT_43 void osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) { @@ -1329,6 +1330,7 @@ osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) frame->tf_regs[FRAME_T12] = (u_int64_t)catcher; /* t12 is pv */ alpha_pal_wrusp((unsigned long)sip); } +#endif void sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) @@ -1341,10 +1343,12 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) PROC_LOCK(p); psp = p->p_sigacts; +#ifdef COMPAT_43 if (SIGISMEMBER(psp->ps_osigset, sig)) { osendsig(catcher, sig, mask, code); return; } +#endif frame = p->p_frame; oonstack = sigonstack(alpha_pal_rdusp()); @@ -1480,6 +1484,7 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) * make sure that the user has not modified the * state to gain improper privileges. */ +#ifdef COMPAT_43 int osigreturn(struct proc *p, struct osigreturn_args /* { @@ -1538,6 +1543,7 @@ osigreturn(struct proc *p, p->p_addr->u_pcb.pcb_fp_control = ksc.sc_fp_control; return (EJUSTRETURN); } +#endif int sigreturn(struct proc *p, @@ -1549,8 +1555,10 @@ sigreturn(struct proc *p, struct pcb *pcb; unsigned long val; +#ifdef COMPAT_43 if (((struct osigcontext*)uap->sigcntxp)->sc_regs[R_ZERO] == 0xACEDBADE) return osigreturn(p, (struct osigreturn_args *)uap); +#endif ucp = uap->sigcntxp; pcb = &p->p_addr->u_pcb; diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 7bc1d3d..a642353 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -154,7 +154,9 @@ SYSCTL_INT(_machdep, OID_AUTO, ispc98, CTLFLAG_RD, &ispc98, 0, ""); int physmem = 0; int cold = 1; +#ifdef COMPAT_43 static void osendsig __P((sig_t catcher, int sig, sigset_t *mask, u_long code)); +#endif static int sysctl_hw_physmem(SYSCTL_HANDLER_ARGS) @@ -416,6 +418,7 @@ again: * frame pointer, it returns to the user * specified pc, psl. */ +#ifdef COMPAT_43 static void osendsig(catcher, sig, mask, code) sig_t catcher; @@ -560,6 +563,7 @@ osendsig(catcher, sig, mask, code) load_gs(_udatasel); regs->tf_ss = _udatasel; } +#endif void sendsig(catcher, sig, mask, code) @@ -578,11 +582,13 @@ sendsig(catcher, sig, mask, code) p = curproc; PROC_LOCK(p); psp = p->p_sigacts; +#ifdef COMPAT_43 if (SIGISMEMBER(psp->ps_osigset, sig)) { PROC_UNLOCK(p); osendsig(catcher, sig, mask, code); return; } +#endif regs = p->p_frame; oonstack = sigonstack(regs->tf_esp); @@ -719,6 +725,7 @@ sendsig(catcher, sig, mask, code) * make sure that the user has not modified the * state to gain improper privileges. */ +#ifdef COMPAT_43 int osigreturn(p, uap) struct proc *p; @@ -828,6 +835,7 @@ osigreturn(p, uap) regs->tf_eflags = eflags; return (EJUSTRETURN); } +#endif int sigreturn(p, uap) @@ -841,11 +849,11 @@ sigreturn(p, uap) int cs, eflags; ucp = uap->sigcntxp; +#ifdef COMPAT_43 if (!useracc((caddr_t)ucp, sizeof(struct osigcontext), VM_PROT_READ)) return (EFAULT); if (((struct osigcontext *)ucp)->sc_trapno == 0x01d516) return (osigreturn(p, (struct osigreturn_args *)uap)); - /* * Since ucp is not an osigcontext but a ucontext_t, we have to * check again if all of it is accessible. A ucontext_t is @@ -853,6 +861,7 @@ sigreturn(p, uap) * being valid for the size of an osigcontext, now check for * it being valid for a whole, new-style ucontext_t. */ +#endif if (!useracc((caddr_t)ucp, sizeof(*ucp), VM_PROT_READ)) return (EFAULT); diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 7bc1d3d..a642353 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -154,7 +154,9 @@ SYSCTL_INT(_machdep, OID_AUTO, ispc98, CTLFLAG_RD, &ispc98, 0, ""); int physmem = 0; int cold = 1; +#ifdef COMPAT_43 static void osendsig __P((sig_t catcher, int sig, sigset_t *mask, u_long code)); +#endif static int sysctl_hw_physmem(SYSCTL_HANDLER_ARGS) @@ -416,6 +418,7 @@ again: * frame pointer, it returns to the user * specified pc, psl. */ +#ifdef COMPAT_43 static void osendsig(catcher, sig, mask, code) sig_t catcher; @@ -560,6 +563,7 @@ osendsig(catcher, sig, mask, code) load_gs(_udatasel); regs->tf_ss = _udatasel; } +#endif void sendsig(catcher, sig, mask, code) @@ -578,11 +582,13 @@ sendsig(catcher, sig, mask, code) p = curproc; PROC_LOCK(p); psp = p->p_sigacts; +#ifdef COMPAT_43 if (SIGISMEMBER(psp->ps_osigset, sig)) { PROC_UNLOCK(p); osendsig(catcher, sig, mask, code); return; } +#endif regs = p->p_frame; oonstack = sigonstack(regs->tf_esp); @@ -719,6 +725,7 @@ sendsig(catcher, sig, mask, code) * make sure that the user has not modified the * state to gain improper privileges. */ +#ifdef COMPAT_43 int osigreturn(p, uap) struct proc *p; @@ -828,6 +835,7 @@ osigreturn(p, uap) regs->tf_eflags = eflags; return (EJUSTRETURN); } +#endif int sigreturn(p, uap) @@ -841,11 +849,11 @@ sigreturn(p, uap) int cs, eflags; ucp = uap->sigcntxp; +#ifdef COMPAT_43 if (!useracc((caddr_t)ucp, sizeof(struct osigcontext), VM_PROT_READ)) return (EFAULT); if (((struct osigcontext *)ucp)->sc_trapno == 0x01d516) return (osigreturn(p, (struct osigreturn_args *)uap)); - /* * Since ucp is not an osigcontext but a ucontext_t, we have to * check again if all of it is accessible. A ucontext_t is @@ -853,6 +861,7 @@ sigreturn(p, uap) * being valid for the size of an osigcontext, now check for * it being valid for a whole, new-style ucontext_t. */ +#endif if (!useracc((caddr_t)ucp, sizeof(*ucp), VM_PROT_READ)) return (EFAULT); diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index f915782..8a6d335 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -898,6 +898,7 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) * make sure that the user has not modified the * state to gain improper privileges. */ +#ifdef COMPAT_43 int osigreturn(struct proc *p, struct osigreturn_args /* { @@ -906,6 +907,7 @@ osigreturn(struct proc *p, { return EOPNOTSUPP; } +#endif /* * System call to cleanup state after a signal diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 4784e40..0ab24e6 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -326,11 +326,13 @@ do_sigaction(p, sig, act, oact, old) else SIGADDSET(p->p_sigcatch, sig); } +#ifdef COMPAT_43 if (ps->ps_sigact[_SIG_IDX(sig)] == SIG_IGN || ps->ps_sigact[_SIG_IDX(sig)] == SIG_DFL || !old) SIGDELSET(ps->ps_osigset, sig); else SIGADDSET(ps->ps_osigset, sig); +#endif } PROC_UNLOCK(p); return (0); diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index 48eef49..698a770 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -164,7 +164,9 @@ SYSCTL_INT(_machdep, OID_AUTO, ispc98, CTLFLAG_RD, &ispc98, 0, ""); int physmem = 0; int cold = 1; +#ifdef COMPAT_43 static void osendsig __P((sig_t catcher, int sig, sigset_t *mask, u_long code)); +#endif static int sysctl_hw_physmem(SYSCTL_HANDLER_ARGS) @@ -420,6 +422,7 @@ again: * frame pointer, it returns to the user * specified pc, psl. */ +#ifdef COMPAT_43 static void osendsig(catcher, sig, mask, code) sig_t catcher; @@ -564,6 +567,7 @@ osendsig(catcher, sig, mask, code) load_gs(_udatasel); regs->tf_ss = _udatasel; } +#endif void sendsig(catcher, sig, mask, code) @@ -582,11 +586,13 @@ sendsig(catcher, sig, mask, code) p = curproc; PROC_LOCK(p); psp = p->p_sigacts; +#ifdef COMPAT_43 if (SIGISMEMBER(psp->ps_osigset, sig)) { PROC_UNLOCK(p); osendsig(catcher, sig, mask, code); return; } +#endif regs = p->p_frame; oonstack = sigonstack(regs->tf_esp); @@ -723,6 +729,7 @@ sendsig(catcher, sig, mask, code) * make sure that the user has not modified the * state to gain improper privileges. */ +#ifdef COMPAT_43 int osigreturn(p, uap) struct proc *p; @@ -831,6 +838,7 @@ osigreturn(p, uap) regs->tf_eflags = eflags; return (EJUSTRETURN); } +#endif int sigreturn(p, uap) @@ -844,11 +852,11 @@ sigreturn(p, uap) int cs, eflags; ucp = uap->sigcntxp; +#ifdef COMPAT_43 if (!useracc((caddr_t)ucp, sizeof(struct osigcontext), VM_PROT_READ)) return (EFAULT); if (((struct osigcontext *)ucp)->sc_trapno == 0x01d516) return (osigreturn(p, (struct osigreturn_args *)uap)); - /* * Since ucp is not an osigcontext but a ucontext_t, we have to * check again if all of it is accessible. A ucontext_t is @@ -858,6 +866,7 @@ sigreturn(p, uap) */ if (!useracc((caddr_t)ucp, sizeof(*ucp), VM_PROT_READ)) return (EFAULT); +#endif regs = p->p_frame; eflags = ucp->uc_mcontext.mc_eflags; diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index 48eef49..698a770 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -164,7 +164,9 @@ SYSCTL_INT(_machdep, OID_AUTO, ispc98, CTLFLAG_RD, &ispc98, 0, ""); int physmem = 0; int cold = 1; +#ifdef COMPAT_43 static void osendsig __P((sig_t catcher, int sig, sigset_t *mask, u_long code)); +#endif static int sysctl_hw_physmem(SYSCTL_HANDLER_ARGS) @@ -420,6 +422,7 @@ again: * frame pointer, it returns to the user * specified pc, psl. */ +#ifdef COMPAT_43 static void osendsig(catcher, sig, mask, code) sig_t catcher; @@ -564,6 +567,7 @@ osendsig(catcher, sig, mask, code) load_gs(_udatasel); regs->tf_ss = _udatasel; } +#endif void sendsig(catcher, sig, mask, code) @@ -582,11 +586,13 @@ sendsig(catcher, sig, mask, code) p = curproc; PROC_LOCK(p); psp = p->p_sigacts; +#ifdef COMPAT_43 if (SIGISMEMBER(psp->ps_osigset, sig)) { PROC_UNLOCK(p); osendsig(catcher, sig, mask, code); return; } +#endif regs = p->p_frame; oonstack = sigonstack(regs->tf_esp); @@ -723,6 +729,7 @@ sendsig(catcher, sig, mask, code) * make sure that the user has not modified the * state to gain improper privileges. */ +#ifdef COMPAT_43 int osigreturn(p, uap) struct proc *p; @@ -831,6 +838,7 @@ osigreturn(p, uap) regs->tf_eflags = eflags; return (EJUSTRETURN); } +#endif int sigreturn(p, uap) @@ -844,11 +852,11 @@ sigreturn(p, uap) int cs, eflags; ucp = uap->sigcntxp; +#ifdef COMPAT_43 if (!useracc((caddr_t)ucp, sizeof(struct osigcontext), VM_PROT_READ)) return (EFAULT); if (((struct osigcontext *)ucp)->sc_trapno == 0x01d516) return (osigreturn(p, (struct osigreturn_args *)uap)); - /* * Since ucp is not an osigcontext but a ucontext_t, we have to * check again if all of it is accessible. A ucontext_t is @@ -858,6 +866,7 @@ sigreturn(p, uap) */ if (!useracc((caddr_t)ucp, sizeof(*ucp), VM_PROT_READ)) return (EFAULT); +#endif regs = p->p_frame; eflags = ucp->uc_mcontext.mc_eflags; diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c index 586210b..cbd8fd2 100644 --- a/sys/powerpc/aim/machdep.c +++ b/sys/powerpc/aim/machdep.c @@ -142,7 +142,9 @@ int restore_ofw_mapping(void); void install_extint(void (*)(void)); +#ifdef COMPAT_43 void osendsig(sig_t, int, sigset_t *, u_long); +#endif struct msgbuf *msgbufp = 0; @@ -789,6 +791,7 @@ delay(unsigned n) } #endif +#ifdef COMPAT_43 void osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) { @@ -796,6 +799,7 @@ osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) /* XXX: To be done */ return; } +#endif void sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) @@ -805,6 +809,7 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) return; } +#ifdef COMPAT_43 int osigreturn(struct proc *p, struct osigreturn_args *uap) { @@ -812,6 +817,7 @@ osigreturn(struct proc *p, struct osigreturn_args *uap) /* XXX: To be done */ return(ENOSYS); } +#endif int sigreturn(struct proc *p, struct sigreturn_args *uap) diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c index 586210b..cbd8fd2 100644 --- a/sys/powerpc/powerpc/machdep.c +++ b/sys/powerpc/powerpc/machdep.c @@ -142,7 +142,9 @@ int restore_ofw_mapping(void); void install_extint(void (*)(void)); +#ifdef COMPAT_43 void osendsig(sig_t, int, sigset_t *, u_long); +#endif struct msgbuf *msgbufp = 0; @@ -789,6 +791,7 @@ delay(unsigned n) } #endif +#ifdef COMPAT_43 void osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) { @@ -796,6 +799,7 @@ osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) /* XXX: To be done */ return; } +#endif void sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) @@ -805,6 +809,7 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) return; } +#ifdef COMPAT_43 int osigreturn(struct proc *p, struct osigreturn_args *uap) { @@ -812,6 +817,7 @@ osigreturn(struct proc *p, struct osigreturn_args *uap) /* XXX: To be done */ return(ENOSYS); } +#endif int sigreturn(struct proc *p, struct sigreturn_args *uap) |