From owner-dev-commits-src-branches@freebsd.org Tue Feb 16 00:46:11 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F094540DE3; Tue, 16 Feb 2021 00:46:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dfj2V2DhWz4S19; Tue, 16 Feb 2021 00:46:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A75D32727C; Tue, 16 Feb 2021 00:46:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 11G0k97Q006074; Tue, 16 Feb 2021 00:46:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G0k92R006073; Tue, 16 Feb 2021 00:46:09 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:46:09 GMT Message-Id: <202102160046.11G0k92R006073@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: d751393cdd2a - stable/13 - MFC e673debe7db8ba95e4ee3b549d2570e71d19b596: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d751393cdd2a2e3757c1eeed43565a85a67daafb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:46:11 -0000 The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=d751393cdd2a2e3757c1eeed43565a85a67daafb commit d751393cdd2a2e3757c1eeed43565a85a67daafb Author: Cy Schubert AuthorDate: 2021-02-03 03:18:48 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:49 +0000 MFC e673debe7db8ba95e4ee3b549d2570e71d19b596: Simplify BSD macro tests. All FreeBSD and NetBSD are BSD >= 199306 and have been for a long time. (cherry picked from commit e673debe7db8ba95e4ee3b549d2570e71d19b596) --- contrib/ipfilter/ipsend/sbpf.c | 3 --- contrib/ipfilter/ipsend/sock.c | 4 ---- contrib/ipfilter/man/ipf.4 | 4 ++-- contrib/ipfilter/tools/ipfsyncd.c | 2 +- contrib/ipfilter/tools/ipmon.c | 2 +- sys/contrib/ipfilter/netinet/ip_compat.h | 4 ++-- sys/contrib/ipfilter/netinet/ip_fil_freebsd.c | 4 ---- sys/contrib/ipfilter/netinet/ip_log.c | 2 +- sys/contrib/ipfilter/netinet/mlfk_ipl.c | 8 -------- 9 files changed, 7 insertions(+), 26 deletions(-) diff --git a/contrib/ipfilter/ipsend/sbpf.c b/contrib/ipfilter/ipsend/sbpf.c index fcb66bc9ca2f..97559650f3b4 100644 --- a/contrib/ipfilter/ipsend/sbpf.c +++ b/contrib/ipfilter/ipsend/sbpf.c @@ -12,9 +12,6 @@ #include #include #include -#if BSD < 199103 -#include -#endif #if (__FreeBSD_version >= 300000) # include #else diff --git a/contrib/ipfilter/ipsend/sock.c b/contrib/ipfilter/ipsend/sock.c index a39f9de16345..ddb59eb029f8 100644 --- a/contrib/ipfilter/ipsend/sock.c +++ b/contrib/ipfilter/ipsend/sock.c @@ -95,11 +95,7 @@ struct proc *proc; #endif -#if BSD < 199103 -static struct proc *getproc(void); -#else static struct kinfo_proc *getproc(void); -#endif int kmemcpy(buf, pos, n) diff --git a/contrib/ipfilter/man/ipf.4 b/contrib/ipfilter/man/ipf.4 index 9b82e01bfc76..73a17a0cc8d3 100644 --- a/contrib/ipfilter/man/ipf.4 +++ b/contrib/ipfilter/man/ipf.4 @@ -60,7 +60,7 @@ typedef struct frentry { struct frentry *fr_grp; int fr_ref; /* reference count - for grouping */ void *fr_ifa; -#if BSD >= 199306 +#ifdef BSD void *fr_oifa; #endif /* @@ -93,7 +93,7 @@ typedef struct frentry { int (*fr_func)(int, ip_t *, fr_info_t *)); char fr_icode; /* return ICMP code */ char fr_ifname[IFNAMSIZ]; -#if BSD > 199306 +#ifdef BSD char fr_oifname[IFNAMSIZ]; #endif struct frdest fr_tif; /* "to" interface */ diff --git a/contrib/ipfilter/tools/ipfsyncd.c b/contrib/ipfilter/tools/ipfsyncd.c index 0ccc15542f6b..a75075059763 100644 --- a/contrib/ipfilter/tools/ipfsyncd.c +++ b/contrib/ipfilter/tools/ipfsyncd.c @@ -131,7 +131,7 @@ main(argc, argv) if (!debuglevel) { -#if BSD >= 199306 +#ifdef BSD daemon(0, 0); #else int fd = open("/dev/null", O_RDWR); diff --git a/contrib/ipfilter/tools/ipmon.c b/contrib/ipfilter/tools/ipmon.c index f14cef832722..9022f12b6149 100644 --- a/contrib/ipfilter/tools/ipmon.c +++ b/contrib/ipfilter/tools/ipmon.c @@ -1702,7 +1702,7 @@ int main(argc, argv) if (make_daemon && ((config.log != stdout) || (ipmonopts & IPMON_SYSLOG))) { -#if BSD >= 199306 +#ifdef BSD daemon(0, !(ipmonopts & IPMON_SYSLOG)); #else int pid; diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h index 490e939f7f37..3de517b4559d 100644 --- a/sys/contrib/ipfilter/netinet/ip_compat.h +++ b/sys/contrib/ipfilter/netinet/ip_compat.h @@ -424,12 +424,12 @@ extern mb_t *allocmbt(size_t); # define USE_QUAD_T # define U_QUAD_T unsigned long long # define QUAD_T long long -#else /* BSD > 199306 */ +#else /* BSD */ # if !defined(U_QUAD_T) # define U_QUAD_T u_long # define QUAD_T long # endif -#endif /* BSD > 199306 */ +#endif /* BSD */ #ifdef USE_INET6 diff --git a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c index 338c4e24c03a..39fe0933f417 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c @@ -288,14 +288,12 @@ ipfioctl(dev, cmd, data, mode, p) SPL_INT(s); CURVNET_SET(TD_TO_VNET(p)); -#if (BSD >= 199306) if (securelevel_ge(p->p_cred, 3) && (mode & FWRITE)) { V_ipfmain.ipf_interror = 130001; CURVNET_RESTORE(); return EPERM; } -#endif unit = GET_MINOR(dev); if ((IPL_LOGMAX < unit) || (unit < 0)) { @@ -382,11 +380,9 @@ ipf_send_reset(fin) } m->m_len = sizeof(*tcp2) + hlen; -#if (BSD >= 199103) m->m_data += max_linkhdr; m->m_pkthdr.len = m->m_len; m->m_pkthdr.rcvif = (struct ifnet *)0; -#endif ip = mtod(m, struct ip *); bzero((char *)ip, hlen); #ifdef USE_INET6 diff --git a/sys/contrib/ipfilter/netinet/ip_log.c b/sys/contrib/ipfilter/netinet/ip_log.c index e5bf6a78bf1b..d7acaf1ebf4e 100644 --- a/sys/contrib/ipfilter/netinet/ip_log.c +++ b/sys/contrib/ipfilter/netinet/ip_log.c @@ -734,7 +734,7 @@ ipf_log_read(softc, unit, uio) return EIO; } -# if (defined(BSD) && (BSD >= 199101)) || defined(__FreeBSD__) +# if defined(BSD) uio->uio_rw = UIO_READ; # endif diff --git a/sys/contrib/ipfilter/netinet/mlfk_ipl.c b/sys/contrib/ipfilter/netinet/mlfk_ipl.c index 0b9fdb76263e..1f4daf28824d 100644 --- a/sys/contrib/ipfilter/netinet/mlfk_ipl.c +++ b/sys/contrib/ipfilter/netinet/mlfk_ipl.c @@ -536,12 +536,8 @@ static int ipfclose(dev, flags * called during packet processing and cause an inconsistancy to appear in * the filter lists. */ -#if (BSD >= 199306) static int ipfread(dev, uio, ioflag) int ioflag; -#else -static int ipfread(dev, uio) -#endif #ifdef __FreeBSD_version struct cdev *dev; #else @@ -583,12 +579,8 @@ static int ipfread(dev, uio) * called during packet processing and cause an inconsistancy to appear in * the filter lists. */ -#if (BSD >= 199306) static int ipfwrite(dev, uio, ioflag) int ioflag; -#else -static int ipfwrite(dev, uio) -#endif #ifdef __FreeBSD_version struct cdev *dev; #else