diff options
author | phk <phk@FreeBSD.org> | 2004-06-11 11:16:26 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-06-11 11:16:26 +0000 |
commit | 86602fc06c6eef73f48ce541f6b8d2b6af993629 (patch) | |
tree | eeeded1f490a2da21f50d2e6f81efd45f8326e90 /sys | |
parent | 31644ac9d825eba99a73dc4d36f6f2c06879799d (diff) | |
download | FreeBSD-src-86602fc06c6eef73f48ce541f6b8d2b6af993629.zip FreeBSD-src-86602fc06c6eef73f48ce541f6b8d2b6af993629.tar.gz |
Deorbit COMPAT_SUNOS.
We inherited this from the sparc32 port of BSD4.4-Lite1. We have neither
a sparc32 port nor a SunOS4.x compatibility desire these days.
Diffstat (limited to 'sys')
33 files changed, 84 insertions, 106 deletions
diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index b374cbf..005e56e 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -1180,7 +1180,7 @@ osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) SIGISMEMBER(psp->ps_sigonstack, sig)) { sip = (osiginfo_t *)((caddr_t)td->td_sigstk.ss_sp + td->td_sigstk.ss_size - rndfsize); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) td->td_sigstk.ss_flags |= SS_ONSTACK; #endif } else @@ -1304,7 +1304,7 @@ freebsd4_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) SIGISMEMBER(psp->ps_sigonstack, sig)) { sfp = (struct sigframe4 *)((caddr_t)td->td_sigstk.ss_sp + td->td_sigstk.ss_size - rndfsize); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) td->td_sigstk.ss_flags |= SS_ONSTACK; #endif } else @@ -1428,7 +1428,7 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) SIGISMEMBER(psp->ps_sigonstack, sig)) { sfp = (struct sigframe *)((caddr_t)td->td_sigstk.ss_sp + td->td_sigstk.ss_size - rndfsize); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) td->td_sigstk.ss_flags |= SS_ONSTACK; #endif } else @@ -1543,7 +1543,7 @@ osigreturn(struct thread *td, return (EINVAL); PROC_LOCK(p); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) /* * Restore the user-supplied information */ @@ -1633,7 +1633,7 @@ freebsd4_sigreturn(struct thread *td, alpha_pal_wrusp(uc.uc_mcontext.mc_regs[R_SP]); PROC_LOCK(p); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) if (uc.uc_mcontext.mc_onstack & 1) td->td_sigstk.ss_flags |= SS_ONSTACK; else @@ -1709,7 +1709,7 @@ sigreturn(struct thread *td, alpha_pal_wrusp(uc.uc_mcontext.mc_regs[R_SP]); PROC_LOCK(p); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) if (uc.uc_mcontext.mc_onstack & 1) td->td_sigstk.ss_flags |= SS_ONSTACK; else diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 6eae41f..5376514 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -262,7 +262,7 @@ sendsig(catcher, sig, mask, code) SIGISMEMBER(psp->ps_sigonstack, sig)) { sp = td->td_sigstk.ss_sp + td->td_sigstk.ss_size - sizeof(struct sigframe); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) td->td_sigstk.ss_flags |= SS_ONSTACK; #endif } else @@ -403,7 +403,7 @@ sigreturn(td, uap) bcopy(&ucp->uc_mcontext.mc_rdi, regs, sizeof(*regs)); PROC_LOCK(p); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) if (ucp->uc_mcontext.mc_onstack & 1) td->td_sigstk.ss_flags |= SS_ONSTACK; else diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 8a81dec..2be8fdf 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1299,7 +1299,7 @@ linux_reboot(struct thread *td, struct linux_reboot_args *args) /* * The FreeBSD native getpid(2), getgid(2) and getuid(2) also modify - * td->td_retval[1] when COMPAT_43 or COMPAT_SUNOS is defined. This + * td->td_retval[1] when COMPAT_43 is defined. This * globbers registers that are assumed to be preserved. The following * lightweight syscalls fixes this. See also linux_getgid16() and * linux_getuid16() in linux_uid16.c. diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c index 06318eb..aa0528f 100644 --- a/sys/compat/linux/linux_uid16.c +++ b/sys/compat/linux/linux_uid16.c @@ -190,7 +190,7 @@ linux_getgroups16(struct thread *td, struct linux_getgroups16_args *args) /* * The FreeBSD native getgid(2) and getuid(2) also modify td->td_retval[1] - * when COMPAT_43 or COMPAT_SUNOS is defined. This globbers registers that + * when COMPAT_43 is defined. This globbers registers that * are assumed to be preserved. The following lightweight syscalls fixes * this. See also linux_getpid(2), linux_getgid(2) and linux_getuid(2) in * linux_misc.c diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 0072a36..73862c8 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -210,12 +210,6 @@ options MUTEX_PROFILING # options COMPAT_43 -# -# Be compatible with SunOS. The COMPAT_43 option above pulls in most -# (all?) of the changes that this option turns on. -# -options COMPAT_SUNOS - # Enable FreeBSD4 compatibility syscalls options COMPAT_FREEBSD4 diff --git a/sys/conf/options b/sys/conf/options index f527029..03fc6c6 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -52,7 +52,6 @@ ALQ CODA_COMPAT_5 opt_coda.h COMPAT_43 opt_compat.h COMPAT_FREEBSD4 opt_compat.h -COMPAT_SUNOS opt_compat.h COMPILING_LINT opt_global.h CONSPEED opt_comconsole.h CY_PCI_FASTINTR diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index 9dc95b3..7065327 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -1539,7 +1539,7 @@ sioioctl(dev, cmd, data, flag, td) int mynor; int s; struct tty *tp; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) int oldcmd; struct termios term; #endif @@ -1580,7 +1580,7 @@ sioioctl(dev, cmd, data, flag, td) } } tp = com->tp; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) term = tp->t_termios; oldcmd = cmd; error = ttsetcompat(tp, &cmd, data, &term); diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c index e99e737..c6b6b2c 100644 --- a/sys/dev/digi/digi.c +++ b/sys/dev/digi/digi.c @@ -1072,7 +1072,7 @@ digiioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) struct digi_softc *sc; struct digi_p *port; struct tty *tp; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) int oldcmd; struct termios term; #endif @@ -1226,7 +1226,7 @@ digiioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) } tp = port->tp; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) term = tp->t_termios; oldcmd = cmd; error = ttsetcompat(tp, &cmd, data, &term); diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c index d77c9a1..fc5241d 100644 --- a/sys/dev/rp/rp.c +++ b/sys/dev/rp/rp.c @@ -1236,7 +1236,7 @@ rpioctl(dev, cmd, data, flag, td) int error = 0; int arg, flags, result, ChanStatus; struct termios *t; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) u_long oldcmd; struct termios term; #endif @@ -1284,7 +1284,7 @@ rpioctl(dev, cmd, data, flag, td) tp = rp->rp_tty; cp = &rp->rp_channel; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) term = tp->t_termios; oldcmd = cmd; error = ttsetcompat(tp, &cmd, data, &term); diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index e79c1ca..2a3601f 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -47,7 +47,7 @@ static const char si_copyright1[] = "@(#) Copyright (C) Specialix International #include <sys/param.h> #include <sys/systm.h> -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) #include <sys/ioctl_compat.h> #endif #include <sys/tty.h> diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index a63625f..740cd26 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -1972,7 +1972,7 @@ sioioctl(dev, cmd, data, flag, td) int mynor; int s; struct tty *tp; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) u_long oldcmd; struct termios term; #endif @@ -2015,7 +2015,7 @@ sioioctl(dev, cmd, data, flag, td) } } tp = com->tp; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) term = tp->t_termios; oldcmd = cmd; error = ttsetcompat(tp, &cmd, data, &term); diff --git a/sys/dev/sx/sx.c b/sys/dev/sx/sx.c index ae50e32..5588ab7 100644 --- a/sys/dev/sx/sx.c +++ b/sys/dev/sx/sx.c @@ -35,7 +35,7 @@ #include <sys/param.h> #include <sys/systm.h> -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) #include <sys/ioctl_compat.h> #endif #include <sys/tty.h> diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index b28a0f0..82ab31b 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -539,7 +539,7 @@ ucomioctl(dev_t dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) int error; int s; int d; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) u_long oldcmd; struct termios term; #endif @@ -552,7 +552,7 @@ ucomioctl(dev_t dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) DPRINTF(("ucomioctl: cmd = 0x%08lx\n", cmd)); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) term = tp->t_termios; oldcmd = cmd; error = ttsetcompat(tp, &cmd, data, &term); diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index e1eb8ee..3a41bbe 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -275,7 +275,7 @@ osendsig(catcher, sig, mask, code) SIGISMEMBER(psp->ps_sigonstack, sig)) { fp = (struct osigframe *)(td->td_sigstk.ss_sp + td->td_sigstk.ss_size - sizeof(struct osigframe)); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) td->td_sigstk.ss_flags |= SS_ONSTACK; #endif } else @@ -415,7 +415,7 @@ freebsd4_sendsig(catcher, sig, mask, code) SIGISMEMBER(psp->ps_sigonstack, sig)) { sfp = (struct sigframe4 *)(td->td_sigstk.ss_sp + td->td_sigstk.ss_size - sizeof(struct sigframe4)); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) td->td_sigstk.ss_flags |= SS_ONSTACK; #endif } else @@ -552,7 +552,7 @@ sendsig(catcher, sig, mask, code) SIGISMEMBER(psp->ps_sigonstack, sig)) { sp = td->td_sigstk.ss_sp + td->td_sigstk.ss_size - sizeof(struct sigframe); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) td->td_sigstk.ss_flags |= SS_ONSTACK; #endif } else @@ -769,7 +769,7 @@ osigreturn(td, uap) regs->tf_eflags = eflags; PROC_LOCK(p); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) if (scp->sc_onstack & 1) td->td_sigstk.ss_flags |= SS_ONSTACK; else @@ -876,7 +876,7 @@ freebsd4_sigreturn(td, uap) } PROC_LOCK(p); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) if (ucp->uc_mcontext.mc_onstack & 1) td->td_sigstk.ss_flags |= SS_ONSTACK; else @@ -986,7 +986,7 @@ sigreturn(td, uap) } PROC_LOCK(p); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) if (ucp->uc_mcontext.mc_onstack & 1) td->td_sigstk.ss_flags |= SS_ONSTACK; else diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index 17fa6e4..ca75d2c 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -878,7 +878,7 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) sbs = (u_int64_t)td->td_sigstk.ss_sp; sbs = (sbs + 15) & ~15; sfp = (struct sigframe *)(sbs + td->td_sigstk.ss_size); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) td->td_sigstk.ss_flags |= SS_ONSTACK; #endif } else @@ -994,7 +994,7 @@ sigreturn(struct thread *td, set_mcontext(td, &uc.uc_mcontext); PROC_LOCK(p); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) if (sigonstack(tf->tf_special.sp)) td->td_sigstk.ss_flags |= SS_ONSTACK; else diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 0f2dbad..e684efd 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -978,7 +978,7 @@ close(td, uap) return (error); } -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) /* * Return status information about a file descriptor. */ @@ -1015,7 +1015,7 @@ ofstat(td, uap) done2: return (error); } -#endif /* COMPAT_43 || COMPAT_SUNOS */ +#endif /* COMPAT_43 */ /* * Return status information about a file descriptor. diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index d30a94b..ab2ae0a 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -84,7 +84,7 @@ getpid(struct thread *td, struct getpid_args *uap) struct proc *p = td->td_proc; td->td_retval[0] = p->p_pid; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) PROC_LOCK(p); td->td_retval[1] = p->p_pptr->p_pid; PROC_UNLOCK(p); @@ -216,7 +216,7 @@ getuid(struct thread *td, struct getuid_args *uap) { td->td_retval[0] = td->td_ucred->cr_ruid; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) td->td_retval[1] = td->td_ucred->cr_uid; #endif return (0); @@ -253,7 +253,7 @@ getgid(struct thread *td, struct getgid_args *uap) { td->td_retval[0] = td->td_ucred->cr_rgid; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) td->td_retval[1] = td->td_ucred->cr_groups[0]; #endif return (0); diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index a172644..dd9ad4d 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -474,7 +474,7 @@ pri_to_rtp(struct ksegrp *kg, struct rtprio *rtp) rtp->type = kg->kg_pri_class; } -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) #ifndef _SYS_SYSPROTO_H_ struct osetrlimit_args { u_int which; @@ -541,7 +541,7 @@ ogetrlimit(td, uap) error = copyout(&olim, uap->rlp, sizeof(olim)); return (error); } -#endif /* COMPAT_43 || COMPAT_SUNOS */ +#endif /* COMPAT_43 */ #ifndef _SYS_SYSPROTO_H_ struct __setrlimit_args { diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 81f5bbb..e3466a9 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -235,7 +235,7 @@ sigonstack(size_t sp) struct thread *td = curthread; return ((td->td_pflags & TDP_ALTSTACK) ? -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) ((td->td_sigstk.ss_size == 0) ? (td->td_sigstk.ss_flags & SS_ONSTACK) : ((sp - (size_t)td->td_sigstk.ss_sp) < td->td_sigstk.ss_size)) @@ -347,12 +347,6 @@ kern_sigaction(td, sig, act, oact, flags) SIGADDSET(ps->ps_signodefer, sig); else SIGDELSET(ps->ps_signodefer, sig); -#ifdef COMPAT_SUNOS - if (act->sa_flags & SA_USERTRAMP) - SIGADDSET(ps->ps_usertramp, sig); - else - SIGDELSET(ps->ps_usertramp, sig); -#endif if (sig == SIGCHLD) { if (act->sa_flags & SA_NOCLDSTOP) ps->ps_flag |= PS_NOCLDSTOP; @@ -1000,7 +994,7 @@ osigpending(td, uap) } #endif /* COMPAT_43 */ -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) /* * Generalized interface signal handler, 4.3-compatible. */ @@ -1037,9 +1031,6 @@ osigvec(td, uap) OSIG2SIG(vec.sv_mask, nsap->sa_mask); nsap->sa_flags = vec.sv_flags; nsap->sa_flags ^= SA_RESTART; /* opposite of SV_INTERRUPT */ -#ifdef COMPAT_SUNOS - nsap->sa_flags |= SA_USERTRAMP; -#endif } error = kern_sigaction(td, uap->signum, nsap, osap, KSA_OSIGSET); if (osap && !error) { @@ -1048,9 +1039,6 @@ osigvec(td, uap) vec.sv_flags = osap->sa_flags; vec.sv_flags &= ~SA_NOCLDWAIT; vec.sv_flags ^= SA_RESTART; -#ifdef COMPAT_SUNOS - vec.sv_flags &= ~SA_NOCLDSTOP; -#endif error = copyout(&vec, uap->osv, sizeof(vec)); } return (error); @@ -1106,7 +1094,7 @@ osigsetmask(td, uap) PROC_UNLOCK(p); return (0); } -#endif /* COMPAT_43 || COMPAT_SUNOS */ +#endif /* COMPAT_43 */ /* * Suspend process until signal, providing mask to be set @@ -1200,7 +1188,7 @@ osigsuspend(td, uap) } #endif /* COMPAT_43 */ -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) #ifndef _SYS_SYSPROTO_H_ struct osigstack_args { struct sigstack *nss; @@ -1237,7 +1225,7 @@ osigstack(td, uap) return (error); } -#endif /* COMPAT_43 || COMPAT_SUNOS */ +#endif /* COMPAT_43 */ #ifndef _SYS_SYSPROTO_H_ struct sigaltstack_args { @@ -1416,7 +1404,7 @@ kill(td, uap) /* NOTREACHED */ } -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) #ifndef _SYS_SYSPROTO_H_ struct okillpg_args { int pgid; @@ -1437,7 +1425,7 @@ okillpg(td, uap) return (EINVAL); return (killpg1(td, uap->signum, uap->pgid, 0)); } -#endif /* COMPAT_43 || COMPAT_SUNOS */ +#endif /* COMPAT_43 */ /* * Send a signal to a process group. diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c index d112fa9..f52dd98 100644 --- a/sys/kern/kern_xxx.c +++ b/sys/kern/kern_xxx.c @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); #include <sys/utsname.h> -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) #ifndef _SYS_SYSPROTO_H_ struct gethostname_args { @@ -121,7 +121,7 @@ ogethostid(td, uap) *(long *)(td->td_retval) = hostid; return (0); } -#endif /* COMPAT_43 || COMPAT_SUNOS */ +#endif /* COMPAT_43 */ #ifdef COMPAT_43 #ifndef _SYS_SYSPROTO_H_ diff --git a/sys/kern/tty.c b/sys/kern/tty.c index f81186f..aeecbb8 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -83,7 +83,7 @@ __FBSDID("$FreeBSD$"); #include <sys/mutex.h> #include <sys/namei.h> #include <sys/sx.h> -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) #include <sys/ioctl_compat.h> #endif #include <sys/proc.h> @@ -769,7 +769,7 @@ ttioctl(struct tty *tp, u_long cmd, void *data, int flag) case TIOCSTI: case TIOCSTOP: case TIOCSWINSZ: -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) case TIOCLBIC: case TIOCLBIS: case TIOCLSET: @@ -1130,7 +1130,7 @@ ttioctl(struct tty *tp, u_long cmd, void *data, int flag) *(int *)data = tp->t_timeout / hz; break; default: -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) return (ttcompat(tp, cmd, data, flag)); #else return (ENOIOCTL); diff --git a/sys/kern/tty_compat.c b/sys/kern/tty_compat.c index 53db787..1cd0dd1 100644 --- a/sys/kern/tty_compat.c +++ b/sys/kern/tty_compat.c @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); /* * mapping routines for old line discipline (yuck) */ -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) #include <sys/param.h> #include <sys/systm.h> @@ -485,4 +485,4 @@ ttcompatsetlflags(tp, t) t->c_lflag = lflag; t->c_cflag = cflag; } -#endif /* COMPAT_43 || COMPAT_SUNOS */ +#endif /* COMPAT_43 */ diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 85511c9..96ccbf4 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$"); #include <sys/lock.h> #include <sys/mutex.h> #include <sys/sx.h> -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) #include <sys/ioctl_compat.h> #endif #include <sys/proc.h> @@ -738,7 +738,7 @@ ptyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) case TIOCSETP: case TIOCSETN: #endif -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) case TIOCSETC: case TIOCSLTC: case TIOCLBIS: diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index cce7396..9ea94f4 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -103,7 +103,7 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, /* * System call interface to the socket abstraction. */ -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) #define COMPAT_OLDSOCK #endif diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 3ce9c98..50ab8ed 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -1733,7 +1733,7 @@ lseek(td, uap) return (0); } -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) /* * Reposition read/write file offset. */ @@ -1888,7 +1888,7 @@ eaccess(td, uap) return (error); } -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) /* * Get file status; this version follows links. */ @@ -1991,7 +1991,7 @@ cvtstat(st, ost) ost->st_flags = st->st_flags; ost->st_gen = st->st_gen; } -#endif /* COMPAT_43 || COMPAT_SUNOS */ +#endif /* COMPAT_43 */ /* * Get file status; this version follows links. @@ -2965,7 +2965,7 @@ ftruncate(td, uap) return (error); } -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) /* * Truncate a file given its path name. */ @@ -3021,7 +3021,7 @@ oftruncate(td, uap) nuap.length = uap->length; return (ftruncate(td, &nuap)); } -#endif /* COMPAT_43 || COMPAT_SUNOS */ +#endif /* COMPAT_43 */ /* * Sync an open file. diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 3ce9c98..50ab8ed 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1733,7 +1733,7 @@ lseek(td, uap) return (0); } -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) /* * Reposition read/write file offset. */ @@ -1888,7 +1888,7 @@ eaccess(td, uap) return (error); } -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) /* * Get file status; this version follows links. */ @@ -1991,7 +1991,7 @@ cvtstat(st, ost) ost->st_flags = st->st_flags; ost->st_gen = st->st_gen; } -#endif /* COMPAT_43 || COMPAT_SUNOS */ +#endif /* COMPAT_43 */ /* * Get file status; this version follows links. @@ -2965,7 +2965,7 @@ ftruncate(td, uap) return (error); } -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) /* * Truncate a file given its path name. */ @@ -3021,7 +3021,7 @@ oftruncate(td, uap) nuap.length = uap->length; return (ftruncate(td, &nuap)); } -#endif /* COMPAT_43 || COMPAT_SUNOS */ +#endif /* COMPAT_43 */ /* * Sync an open file. diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index 12c8243..708c4a7 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -2945,7 +2945,7 @@ sioioctl(dev, cmd, data, flag, td) int mynor; int s; struct tty *tp; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) u_long oldcmd; struct termios term; #endif @@ -2988,7 +2988,7 @@ sioioctl(dev, cmd, data, flag, td) } } tp = com->tp; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) term = tp->t_termios; oldcmd = cmd; error = ttsetcompat(tp, &cmd, data, &term); diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index 15d83e1..a3a0b97 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -292,7 +292,7 @@ osendsig(catcher, sig, mask, code) SIGISMEMBER(psp->ps_sigonstack, sig)) { fp = (struct osigframe *)(td->td_sigstk.ss_sp + td->td_sigstk.ss_size - sizeof(struct osigframe)); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) td->td_sigstk.ss_flags |= SS_ONSTACK; #endif } else @@ -432,7 +432,7 @@ freebsd4_sendsig(catcher, sig, mask, code) SIGISMEMBER(psp->ps_sigonstack, sig)) { sfp = (struct sigframe4 *)(td->td_sigstk.ss_sp + td->td_sigstk.ss_size - sizeof(struct sigframe4)); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) td->td_sigstk.ss_flags |= SS_ONSTACK; #endif } else @@ -569,7 +569,7 @@ sendsig(catcher, sig, mask, code) SIGISMEMBER(psp->ps_sigonstack, sig)) { sp = td->td_sigstk.ss_sp + td->td_sigstk.ss_size - sizeof(struct sigframe); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) td->td_sigstk.ss_flags |= SS_ONSTACK; #endif } else @@ -786,7 +786,7 @@ osigreturn(td, uap) regs->tf_eflags = eflags; PROC_LOCK(p); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) if (scp->sc_onstack & 1) td->td_sigstk.ss_flags |= SS_ONSTACK; else @@ -893,7 +893,7 @@ freebsd4_sigreturn(td, uap) } PROC_LOCK(p); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) if (ucp->uc_mcontext.mc_onstack & 1) td->td_sigstk.ss_flags |= SS_ONSTACK; else @@ -1003,7 +1003,7 @@ sigreturn(td, uap) } PROC_LOCK(p); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) if (ucp->uc_mcontext.mc_onstack & 1) td->td_sigstk.ss_flags |= SS_ONSTACK; else diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index 15d83e1..a3a0b97 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -292,7 +292,7 @@ osendsig(catcher, sig, mask, code) SIGISMEMBER(psp->ps_sigonstack, sig)) { fp = (struct osigframe *)(td->td_sigstk.ss_sp + td->td_sigstk.ss_size - sizeof(struct osigframe)); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) td->td_sigstk.ss_flags |= SS_ONSTACK; #endif } else @@ -432,7 +432,7 @@ freebsd4_sendsig(catcher, sig, mask, code) SIGISMEMBER(psp->ps_sigonstack, sig)) { sfp = (struct sigframe4 *)(td->td_sigstk.ss_sp + td->td_sigstk.ss_size - sizeof(struct sigframe4)); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) td->td_sigstk.ss_flags |= SS_ONSTACK; #endif } else @@ -569,7 +569,7 @@ sendsig(catcher, sig, mask, code) SIGISMEMBER(psp->ps_sigonstack, sig)) { sp = td->td_sigstk.ss_sp + td->td_sigstk.ss_size - sizeof(struct sigframe); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) td->td_sigstk.ss_flags |= SS_ONSTACK; #endif } else @@ -786,7 +786,7 @@ osigreturn(td, uap) regs->tf_eflags = eflags; PROC_LOCK(p); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) if (scp->sc_onstack & 1) td->td_sigstk.ss_flags |= SS_ONSTACK; else @@ -893,7 +893,7 @@ freebsd4_sigreturn(td, uap) } PROC_LOCK(p); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) if (ucp->uc_mcontext.mc_onstack & 1) td->td_sigstk.ss_flags |= SS_ONSTACK; else @@ -1003,7 +1003,7 @@ sigreturn(td, uap) } PROC_LOCK(p); -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) if (ucp->uc_mcontext.mc_onstack & 1) td->td_sigstk.ss_flags |= SS_ONSTACK; else diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c index 12c8243..708c4a7 100644 --- a/sys/pc98/pc98/sio.c +++ b/sys/pc98/pc98/sio.c @@ -2945,7 +2945,7 @@ sioioctl(dev, cmd, data, flag, td) int mynor; int s; struct tty *tp; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) u_long oldcmd; struct termios term; #endif @@ -2988,7 +2988,7 @@ sioioctl(dev, cmd, data, flag, td) } } tp = com->tp; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) term = tp->t_termios; oldcmd = cmd; error = ttsetcompat(tp, &cmd, data, &term); diff --git a/sys/sys/ioctl.h b/sys/sys/ioctl.h index e792ca5..530e2d4 100644 --- a/sys/sys/ioctl.h +++ b/sys/sys/ioctl.h @@ -72,8 +72,8 @@ struct ttysize { * Compatibility with old terminal driver * * Source level -> #define USE_OLD_TTY - * Kernel level -> options COMPAT_43 or COMPAT_SUNOS + * Kernel level -> options COMPAT_43 */ -#if defined(USE_OLD_TTY) || defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(USE_OLD_TTY) || defined(COMPAT_43) #include <sys/ioctl_compat.h> #endif diff --git a/sys/sys/signal.h b/sys/sys/signal.h index 337d416..a8a9577 100644 --- a/sys/sys/signal.h +++ b/sys/sys/signal.h @@ -239,9 +239,6 @@ struct sigaction { #endif #if __BSD_VISIBLE /* XXX dubious. */ -#ifdef COMPAT_SUNOS -#define SA_USERTRAMP 0x0100 /* do not bounce off kernel's sigtramp */ -#endif #endif #if __BSD_VISIBLE diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 3731bf4..28011c2 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -146,7 +146,7 @@ sstk(td, uap) return (EOPNOTSUPP); } -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) #ifndef _SYS_SYSPROTO_H_ struct getpagesize_args { int dummy; @@ -163,7 +163,7 @@ ogetpagesize(td, uap) td->td_retval[0] = PAGE_SIZE; return (0); } -#endif /* COMPAT_43 || COMPAT_SUNOS */ +#endif /* COMPAT_43 */ /* |