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.
This commit is contained in:
phk 2004-06-11 11:16:26 +00:00
parent 31644ac9d8
commit 86602fc06c
33 changed files with 84 additions and 106 deletions

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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>

View File

@ -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);

View File

@ -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>

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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);

View File

@ -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 {

View File

@ -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.

View File

@ -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_

View File

@ -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);

View File

@ -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 */

View File

@ -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:

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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 */
/*