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.

Reviewed by:	imp, markj
Differential Revision:	https://reviews.freebsd.org/D32235
This commit is contained in:
Kyle Evans 2021-09-29 22:01:34 -05:00
parent 0f43c5b55c
commit cfb9be5062
10 changed files with 3 additions and 79 deletions

View File

@ -73,14 +73,6 @@ __FBSDID("$FreeBSD$");
# include <fcntl.h> /* for O_RDONLY, etc */
#endif
#ifndef USE_BFUNCS
# include <memory.h>
/* 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"

View File

@ -66,14 +66,6 @@ __FBSDID("$FreeBSD$");
# include <fcntl.h> /* for O_RDONLY, etc */
#endif
#ifndef USE_BFUNCS
# include <memory.h>
/* 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"

View File

@ -15,15 +15,6 @@
#include <errno.h>
#include <syslog.h>
#ifndef USE_BFUNCS
# include <memory.h>
/* 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"

View File

@ -10,17 +10,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <syslog.h>
#include <time.h>
#ifndef USE_BFUNCS
#include <memory.h>
/* 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"

View File

@ -37,14 +37,7 @@ SOFTWARE.
#include <sys/types.h>
#include <stdlib.h>
#ifndef USE_BFUNCS
#include <memory.h>
/* 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 <strings.h>
#include "hash.h"

View File

@ -38,14 +38,6 @@
#endif
#include <syslog.h>
#ifndef USE_BFUNCS
/* Yes, memcpy is OK here (no overlapped copies). */
#include <memory.h>
#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

View File

@ -17,14 +17,9 @@ extern int ether_hostton();
#endif
#include <netdb.h>
#include <strings.h>
#include <syslog.h>
#ifndef USE_BFUNCS
#include <memory.h>
/* 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"

View File

@ -46,14 +46,6 @@ SOFTWARE.
#include <assert.h>
#include <syslog.h>
#ifndef USE_BFUNCS
#include <memory.h>
/* 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"

View File

@ -55,14 +55,6 @@ SOFTWARE.
#include <ctype.h>
#include <syslog.h>
#ifndef USE_BFUNCS
#include <memory.h>
/* 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"

View File

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