View | Details | Raw Unified | Return to bug 232185
Collapse All | Expand All

(-)b/include/strings.h (+3 lines)
Lines 42-49 typedef __size_t size_t; Link Here
42
__BEGIN_DECLS
42
__BEGIN_DECLS
43
#if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112
43
#if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112
44
int	 bcmp(const void *, const void *, size_t) __pure;	/* LEGACY */
44
int	 bcmp(const void *, const void *, size_t) __pure;	/* LEGACY */
45
#define	 bcmp(b1, b2, len) __builtin_memcmp((b1), (b2), (len))
45
void	 bcopy(const void *, void *, size_t);			/* LEGACY */
46
void	 bcopy(const void *, void *, size_t);			/* LEGACY */
47
#define	 bcopy(from, to, len) __builtin_memmove((to), (from), (len))
46
void	 bzero(void *, size_t);					/* LEGACY */
48
void	 bzero(void *, size_t);					/* LEGACY */
49
#define	 bzero(buf, len) __builtin_memset((buf), 0, (len))
47
#endif
50
#endif
48
#if __BSD_VISIBLE
51
#if __BSD_VISIBLE
49
void	 explicit_bzero(void *, size_t);
52
void	 explicit_bzero(void *, size_t);
(-)b/lib/libc/amd64/string/bcopy.S (+1 lines)
Lines 53-58 ENTRY(bcopy) Link Here
53
#if defined(MEMCOPY) || defined(MEMMOVE)
53
#if defined(MEMCOPY) || defined(MEMMOVE)
54
	movq	%rdi,%rax	/* return dst */
54
	movq	%rdi,%rax	/* return dst */
55
#else
55
#else
56
	jmp 1
56
	xchgq	%rdi,%rsi
57
	xchgq	%rdi,%rsi
57
#endif
58
#endif
58
	movq	%rdx,%rcx
59
	movq	%rdx,%rcx
(-)b/lib/libc/string/bcmp.c (-1 / +1 lines)
Lines 41-47 __FBSDID("$FreeBSD$"); Link Here
41
 * bcmp -- vax cmpc3 instruction
41
 * bcmp -- vax cmpc3 instruction
42
 */
42
 */
43
int
43
int
44
bcmp(const void *b1, const void *b2, size_t length)
44
(bcmp)(const void *b1, const void *b2, size_t length)
45
{
45
{
46
	char *p1, *p2;
46
	char *p1, *p2;
47
47
(-)b/lib/libc/string/bcopy.c (-1 / +1 lines)
Lines 68-74 memmove Link Here
68
#include <strings.h>
68
#include <strings.h>
69
69
70
void
70
void
71
bcopy(const void *src0, void *dst0, size_t length)
71
(bcopy)(const void *src0, void *dst0, size_t length)
72
#endif
72
#endif
73
{
73
{
74
	char *dst = dst0;
74
	char *dst = dst0;
(-)b/lib/libc/string/memset.c (-2 / +2 lines)
Lines 53-59 __FBSDID("$FreeBSD$"); Link Here
53
#define	WIDEVAL	0
53
#define	WIDEVAL	0
54
54
55
void
55
void
56
bzero(void *dst0, size_t length)
56
(bzero)(void *dst0, size_t length)
57
#else
57
#else
58
#include <string.h>
58
#include <string.h>
59
59
Lines 62-68 bzero(void *dst0, size_t length) Link Here
62
#define	WIDEVAL	c
62
#define	WIDEVAL	c
63
63
64
void *
64
void *
65
memset(void *dst0, int c0, size_t length)
65
(memset)(void *dst0, int c0, size_t length)
66
#endif
66
#endif
67
{
67
{
68
	size_t t;
68
	size_t t;
(-)b/libexec/bootpd/Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PROG=	bootpd
4
PROG=	bootpd
5
CFLAGS+= -DETC_ETHERS
5
CFLAGS+= -DETC_ETHERS
6
CFLAGS+= -DSYSLOG -DDEBUG -DVEND_CMU
6
CFLAGS+= -DSYSLOG -DDEBUG -DVEND_CMU -DUSE_BFUNCS
7
7
8
WARNS?=	2
8
WARNS?=	2
9
9
(-)b/libexec/bootpd/bootpd.c (+2 lines)
Lines 79-84 __FBSDID("$FreeBSD$"); Link Here
79
# define bcopy(a,b,c)    memcpy(b,a,c)
79
# define bcopy(a,b,c)    memcpy(b,a,c)
80
# define bzero(p,l)      memset(p,0,l)
80
# define bzero(p,l)      memset(p,0,l)
81
# define bcmp(a,b,c)     memcmp(a,b,c)
81
# define bcmp(a,b,c)     memcmp(a,b,c)
82
#else
83
#include <strings.h>
82
#endif
84
#endif
83
85
84
#include "bootp.h"
86
#include "bootp.h"
(-)b/libexec/bootpd/bootpgw/Makefile (-1 / +1 lines)
Lines 6-12 MAN= Link Here
6
SRCS=	bootpgw.c getif.c hwaddr.c report.c rtmsg.c
6
SRCS=	bootpgw.c getif.c hwaddr.c report.c rtmsg.c
7
7
8
SRCDIR=	${.CURDIR}/..
8
SRCDIR=	${.CURDIR}/..
9
CFLAGS+=-I${SRCDIR}
9
CFLAGS+=-I${SRCDIR} -DUSE_BFUNCS
10
.PATH:	${SRCDIR}
10
.PATH:	${SRCDIR}
11
11
12
.include <bsd.prog.mk>
12
.include <bsd.prog.mk>
(-)b/libexec/bootpd/bootpgw/bootpgw.c (+2 lines)
Lines 72-77 __FBSDID("$FreeBSD$"); Link Here
72
# define bcopy(a,b,c)    memcpy(b,a,c)
72
# define bcopy(a,b,c)    memcpy(b,a,c)
73
# define bzero(p,l)      memset(p,0,l)
73
# define bzero(p,l)      memset(p,0,l)
74
# define bcmp(a,b,c)     memcmp(a,b,c)
74
# define bcmp(a,b,c)     memcmp(a,b,c)
75
#else
76
#include <strings.h>
75
#endif
77
#endif
76
78
77
#include "bootp.h"
79
#include "bootp.h"
(-)b/libexec/bootpd/dumptab.c (+2 lines)
Lines 19-24 Link Here
19
#define bcopy(a,b,c)    memcpy(b,a,c)
19
#define bcopy(a,b,c)    memcpy(b,a,c)
20
#define bzero(p,l)      memset(p,0,l)
20
#define bzero(p,l)      memset(p,0,l)
21
#define bcmp(a,b,c)     memcmp(a,b,c)
21
#define bcmp(a,b,c)     memcmp(a,b,c)
22
#else
23
#include <strings.h>
22
#endif
24
#endif
23
25
24
#include "bootp.h"
26
#include "bootp.h"
(-)b/libexec/bootpd/hash.c (+2 lines)
Lines 44-49 SOFTWARE. Link Here
44
#define bcopy(a,b,c)    memcpy(b,a,c)
44
#define bcopy(a,b,c)    memcpy(b,a,c)
45
#define bzero(p,l)      memset(p,0,l)
45
#define bzero(p,l)      memset(p,0,l)
46
#define bcmp(a,b,c)     memcmp(a,b,c)
46
#define bcmp(a,b,c)     memcmp(a,b,c)
47
#else
48
#include <strings.h>
47
#endif
49
#endif
48
50
49
#include "hash.h"
51
#include "hash.h"
(-)b/libexec/bootpd/hwaddr.c (+2 lines)
Lines 44-49 Link Here
44
#define bcopy(a,b,c)    memcpy(b,a,c)
44
#define bcopy(a,b,c)    memcpy(b,a,c)
45
#define bzero(p,l)      memset(p,0,l)
45
#define bzero(p,l)      memset(p,0,l)
46
#define bcmp(a,b,c)     memcmp(a,b,c)
46
#define bcmp(a,b,c)     memcmp(a,b,c)
47
#else
48
#include <strings.h>
47
#endif
49
#endif
48
50
49
#ifndef	ATF_INUSE	/* Not defined on some systems (i.e. Linux) */
51
#ifndef	ATF_INUSE	/* Not defined on some systems (i.e. Linux) */
(-)b/libexec/bootpd/lookup.c (+2 lines)
Lines 23-28 extern int ether_hostton(); Link Here
23
#include <memory.h>
23
#include <memory.h>
24
/* Yes, memcpy is OK here (no overlapped copies). */
24
/* Yes, memcpy is OK here (no overlapped copies). */
25
#define bcopy(a,b,c)    memcpy(b,a,c)
25
#define bcopy(a,b,c)    memcpy(b,a,c)
26
#else
27
#include <strings.h>
26
#endif
28
#endif
27
29
28
#include "bootp.h"
30
#include "bootp.h"
(-)b/libexec/bootpd/tools/bootpef/Makefile (-1 / +1 lines)
Lines 7-13 SRCS= bootpef.c dovend.c readfile.c hash.c dumptab.c lookup.c \ Link Here
7
	hwaddr.c report.c tzone.c rtmsg.c
7
	hwaddr.c report.c tzone.c rtmsg.c
8
8
9
SRCDIR=	${.CURDIR}/../..
9
SRCDIR=	${.CURDIR}/../..
10
CFLAGS+=-I${SRCDIR}
10
CFLAGS+=-I${SRCDIR} -DUSE_BFUNCS
11
.PATH:	${SRCDIR}
11
.PATH:	${SRCDIR}
12
12
13
.include <bsd.prog.mk>
13
.include <bsd.prog.mk>
(-)b/libexec/bootpd/tools/bootpef/bootpef.c (+2 lines)
Lines 61-66 SOFTWARE. Link Here
61
#define bcopy(a,b,c)    memcpy(b,a,c)
61
#define bcopy(a,b,c)    memcpy(b,a,c)
62
#define bzero(p,l)      memset(p,0,l)
62
#define bzero(p,l)      memset(p,0,l)
63
#define bcmp(a,b,c)     memcmp(a,b,c)
63
#define bcmp(a,b,c)     memcmp(a,b,c)
64
#else
65
#include <strings.h>
64
#endif
66
#endif
65
67
66
#include "bootp.h"
68
#include "bootp.h"
(-)b/libexec/bootpd/tools/bootptest/Makefile (-1 / +1 lines)
Lines 6-12 MAN= bootptest.8 Link Here
6
SRCS=	bootptest.c getether.c getif.c print-bootp.c report.c
6
SRCS=	bootptest.c getether.c getif.c print-bootp.c report.c
7
7
8
SRCDIR=	${.CURDIR}/../..
8
SRCDIR=	${.CURDIR}/../..
9
CFLAGS+=-I${SRCDIR}
9
CFLAGS+=-I${SRCDIR} -DUSE_BFUNCS
10
.PATH:	${SRCDIR}
10
.PATH:	${SRCDIR}
11
11
12
.include <bsd.prog.mk>
12
.include <bsd.prog.mk>
(-)b/libexec/bootpd/tools/bootptest/bootptest.h (+2 lines)
Lines 12-17 Link Here
12
#define bcopy(a,b,c)    memcpy(b,a,c)
12
#define bcopy(a,b,c)    memcpy(b,a,c)
13
#define bzero(p,l)      memset(p,0,l)
13
#define bzero(p,l)      memset(p,0,l)
14
#define bcmp(a,b,c)     memcmp(a,b,c)
14
#define bcmp(a,b,c)     memcmp(a,b,c)
15
#else
16
#include <strings.h>
15
#endif
17
#endif
16
18
17
extern int vflag; /* verbose flag */
19
extern int vflag; /* verbose flag */
(-)b/stand/i386/libi386/pxe.c (+2 lines)
Lines 51-56 __FBSDID("$FreeBSD$"); Link Here
51
#include "btxv86.h"
51
#include "btxv86.h"
52
#include "pxe.h"
52
#include "pxe.h"
53
53
54
#undef bcmp
55
54
/*
56
/*
55
 * Allocate the PXE buffers statically instead of sticking grimy fingers into
57
 * Allocate the PXE buffers statically instead of sticking grimy fingers into
56
 * BTX's private data area. The scratch buffer is used to send information to
58
 * BTX's private data area. The scratch buffer is used to send information to

Return to bug 232185