From 27ec88afb518866209c0c57333dd48c02609623a Mon Sep 17 00:00:00 2001 From: robert Date: Sun, 1 Sep 2002 21:53:46 +0000 Subject: - Let their manual pages show the reader that the bzero(3) and bcopy(3) functions are prototyped in and not in anymore. - Add a sentence about that to the respective HISTORY sections. In the C source files: - Include or depending on what function is to be compiled. - Use ANSI-C function definitions. --- lib/libc/string/bcopy.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'lib/libc/string/bcopy.c') diff --git a/lib/libc/string/bcopy.c b/lib/libc/string/bcopy.c index 2a6343b..8f8a8cf 100644 --- a/lib/libc/string/bcopy.c +++ b/lib/libc/string/bcopy.c @@ -40,8 +40,6 @@ static char sccsid[] = "@(#)bcopy.c 8.1 (Berkeley) 6/4/93"; #include __FBSDID("$FreeBSD$"); -#include - /* * sizeof(word) MUST BE A POWER OF TWO * SO THAT wmask BELOW IS ALL ONES @@ -56,21 +54,22 @@ typedef int word; /* "word" used for optimal copy speed */ * This is the routine that actually implements * (the portable versions of) bcopy, memcpy, and memmove. */ -#ifdef MEMCOPY +#if defined(MEMCOPY) || defined(MEMMOVE) +#include + void * -memcpy(dst0, src0, length) +#ifdef MEMCOPY +memcpy #else -#ifdef MEMMOVE -void * -memmove(dst0, src0, length) +memmove +#endif +(void *dst0, const void *src0, size_t length) #else +#include + void -bcopy(src0, dst0, length) -#endif +bcopy(const void *src0, void *dst0, size_t length) #endif - void *dst0; - const void *src0; - size_t length; { char *dst = dst0; const char *src = src0; -- cgit v1.1