From nobody Wed Oct 06 07:16:14 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 84CEB12DBBFF; Wed, 6 Oct 2021 07:16:14 +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 4HPQjV32nnz3pf0; Wed, 6 Oct 2021 07:16:14 +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 49A701C034; Wed, 6 Oct 2021 07:16:14 +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 1967GEpj039069; Wed, 6 Oct 2021 07:16:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1967GEjU039068; Wed, 6 Oct 2021 07:16:14 GMT (envelope-from git) Date: Wed, 6 Oct 2021 07:16:14 GMT Message-Id: <202110060716.1967GEjU039068@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: a5f959ea48a0 - stable/12 - bootp: remove the USE_BFUNCS knob List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: a5f959ea48a0ae4b2e818246c6cb7140d69fe28c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=a5f959ea48a0ae4b2e818246c6cb7140d69fe28c commit a5f959ea48a0ae4b2e818246c6cb7140d69fe28c Author: Kyle Evans AuthorDate: 2021-09-30 03:01:34 +0000 Commit: Kyle Evans CommitDate: 2021-10-06 07:15:58 +0000 bootp: remove the USE_BFUNCS knob We'd likely be better served by converting these to the equivalent mem* calls, but just kill the knob for now. The b* macros being defined get in the way of _FORTIFY_SOURCE. (cherry picked from commit cfb9be506285cd65120f9686d532130a3757ce56) --- libexec/bootpd/bootpd.c | 8 -------- libexec/bootpd/bootpgw/bootpgw.c | 8 -------- libexec/bootpd/dovend.c | 9 --------- libexec/bootpd/dumptab.c | 9 +-------- libexec/bootpd/hash.c | 9 +-------- libexec/bootpd/hwaddr.c | 8 -------- libexec/bootpd/lookup.c | 7 +------ libexec/bootpd/readfile.c | 8 -------- libexec/bootpd/tools/bootpef/bootpef.c | 8 -------- libexec/bootpd/tools/bootptest/bootptest.h | 8 -------- 10 files changed, 3 insertions(+), 79 deletions(-) diff --git a/libexec/bootpd/bootpd.c b/libexec/bootpd/bootpd.c index 6787ea4ff3b3..6822f877ad51 100644 --- a/libexec/bootpd/bootpd.c +++ b/libexec/bootpd/bootpd.c @@ -73,14 +73,6 @@ __FBSDID("$FreeBSD$"); # include /* for O_RDONLY, etc */ #endif -#ifndef USE_BFUNCS -# include -/* Yes, memcpy is OK here (no overlapped copies). */ -# define bcopy(a,b,c) memcpy(b,a,c) -# define bzero(p,l) memset(p,0,l) -# define bcmp(a,b,c) memcmp(a,b,c) -#endif - #include "bootp.h" #include "hash.h" #include "hwaddr.h" diff --git a/libexec/bootpd/bootpgw/bootpgw.c b/libexec/bootpd/bootpgw/bootpgw.c index 2e2df9e71a2a..3c128c03a9a6 100644 --- a/libexec/bootpd/bootpgw/bootpgw.c +++ b/libexec/bootpd/bootpgw/bootpgw.c @@ -66,14 +66,6 @@ __FBSDID("$FreeBSD$"); # include /* for O_RDONLY, etc */ #endif -#ifndef USE_BFUNCS -# include -/* Yes, memcpy is OK here (no overlapped copies). */ -# define bcopy(a,b,c) memcpy(b,a,c) -# define bzero(p,l) memset(p,0,l) -# define bcmp(a,b,c) memcmp(a,b,c) -#endif - #include "bootp.h" #include "getif.h" #include "hwaddr.h" diff --git a/libexec/bootpd/dovend.c b/libexec/bootpd/dovend.c index cb0b4a0448c4..65543a2700c0 100644 --- a/libexec/bootpd/dovend.c +++ b/libexec/bootpd/dovend.c @@ -15,15 +15,6 @@ #include #include -#ifndef USE_BFUNCS -# include -/* Yes, memcpy is OK here (no overlapped copies). */ -# define bcopy(a,b,c) memcpy(b,a,c) -# define bzero(p,l) memset(p,0,l) -# define bcmp(a,b,c) memcmp(a,b,c) -# define index strchr -#endif - #include "bootp.h" #include "bootpd.h" #include "report.h" diff --git a/libexec/bootpd/dumptab.c b/libexec/bootpd/dumptab.c index 43e94ec4cef2..daab93f609a6 100644 --- a/libexec/bootpd/dumptab.c +++ b/libexec/bootpd/dumptab.c @@ -10,17 +10,10 @@ #include #include +#include #include #include -#ifndef USE_BFUNCS -#include -/* Yes, memcpy is OK here (no overlapped copies). */ -#define bcopy(a,b,c) memcpy(b,a,c) -#define bzero(p,l) memset(p,0,l) -#define bcmp(a,b,c) memcmp(a,b,c) -#endif - #include "bootp.h" #include "hash.h" #include "hwaddr.h" diff --git a/libexec/bootpd/hash.c b/libexec/bootpd/hash.c index 64f49d3b957d..1641a8a092cd 100644 --- a/libexec/bootpd/hash.c +++ b/libexec/bootpd/hash.c @@ -37,14 +37,7 @@ SOFTWARE. #include #include - -#ifndef USE_BFUNCS -#include -/* Yes, memcpy is OK here (no overlapped copies). */ -#define bcopy(a,b,c) memcpy(b,a,c) -#define bzero(p,l) memset(p,0,l) -#define bcmp(a,b,c) memcmp(a,b,c) -#endif +#include #include "hash.h" diff --git a/libexec/bootpd/hwaddr.c b/libexec/bootpd/hwaddr.c index ff996157b911..293c75a6b3be 100644 --- a/libexec/bootpd/hwaddr.c +++ b/libexec/bootpd/hwaddr.c @@ -38,14 +38,6 @@ #endif #include -#ifndef USE_BFUNCS -/* Yes, memcpy is OK here (no overlapped copies). */ -#include -#define bcopy(a,b,c) memcpy(b,a,c) -#define bzero(p,l) memset(p,0,l) -#define bcmp(a,b,c) memcmp(a,b,c) -#endif - #ifndef ATF_INUSE /* Not defined on some systems (i.e. Linux) */ #define ATF_INUSE 0 #endif diff --git a/libexec/bootpd/lookup.c b/libexec/bootpd/lookup.c index 54b3f62242f7..391a1d826d6e 100644 --- a/libexec/bootpd/lookup.c +++ b/libexec/bootpd/lookup.c @@ -17,14 +17,9 @@ extern int ether_hostton(); #endif #include +#include #include -#ifndef USE_BFUNCS -#include -/* Yes, memcpy is OK here (no overlapped copies). */ -#define bcopy(a,b,c) memcpy(b,a,c) -#endif - #include "bootp.h" #include "lookup.h" #include "report.h" diff --git a/libexec/bootpd/readfile.c b/libexec/bootpd/readfile.c index 900d0377279f..c09639300310 100644 --- a/libexec/bootpd/readfile.c +++ b/libexec/bootpd/readfile.c @@ -46,14 +46,6 @@ SOFTWARE. #include #include -#ifndef USE_BFUNCS -#include -/* Yes, memcpy is OK here (no overlapped copies). */ -#define bcopy(a,b,c) memcpy(b,a,c) -#define bzero(p,l) memset(p,0,l) -#define bcmp(a,b,c) memcmp(a,b,c) -#endif - #include "bootp.h" #include "hash.h" #include "hwaddr.h" diff --git a/libexec/bootpd/tools/bootpef/bootpef.c b/libexec/bootpd/tools/bootpef/bootpef.c index 04089c87b560..7ed3786d892e 100644 --- a/libexec/bootpd/tools/bootpef/bootpef.c +++ b/libexec/bootpd/tools/bootpef/bootpef.c @@ -55,14 +55,6 @@ SOFTWARE. #include #include -#ifndef USE_BFUNCS -#include -/* Yes, memcpy is OK here (no overlapped copies). */ -#define bcopy(a,b,c) memcpy(b,a,c) -#define bzero(p,l) memset(p,0,l) -#define bcmp(a,b,c) memcmp(a,b,c) -#endif - #include "bootp.h" #include "hash.h" #include "hwaddr.h" diff --git a/libexec/bootpd/tools/bootptest/bootptest.h b/libexec/bootpd/tools/bootptest/bootptest.h index 2df35dea7ffc..2d9e451bddef 100644 --- a/libexec/bootpd/tools/bootptest/bootptest.h +++ b/libexec/bootpd/tools/bootptest/bootptest.h @@ -6,14 +6,6 @@ #define ESRC(p) (p) #define EDST(p) (p) -#ifndef USE_BFUNCS -/* Use mem/str functions */ -/* There are no overlapped copies, so memcpy is OK. */ -#define bcopy(a,b,c) memcpy(b,a,c) -#define bzero(p,l) memset(p,0,l) -#define bcmp(a,b,c) memcmp(a,b,c) -#endif - extern int vflag; /* verbose flag */ /* global pointers to beginning and end of current packet (during printing) */