summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/memset.c
diff options
context:
space:
mode:
authorrobert <robert@FreeBSD.org>2002-09-01 21:53:46 +0000
committerrobert <robert@FreeBSD.org>2002-09-01 21:53:46 +0000
commit27ec88afb518866209c0c57333dd48c02609623a (patch)
treee5800830b427bd6f024dc17e7f70e2cde2514fa4 /lib/libc/string/memset.c
parentce650f8c333de3130e1beb1e3caa213af385e085 (diff)
downloadFreeBSD-src-27ec88afb518866209c0c57333dd48c02609623a.zip
FreeBSD-src-27ec88afb518866209c0c57333dd48c02609623a.tar.gz
- Let their manual pages show the reader that the bzero(3) and
bcopy(3) functions are prototyped in <strings.h> and not in <string.h> anymore. - Add a sentence about that to the respective HISTORY sections. In the C source files: - Include <string.h> or <strings.h> depending on what function is to be compiled. - Use ANSI-C function definitions.
Diffstat (limited to 'lib/libc/string/memset.c')
-rw-r--r--lib/libc/string/memset.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/libc/string/memset.c b/lib/libc/string/memset.c
index 462dbe9..17683ae 100644
--- a/lib/libc/string/memset.c
+++ b/lib/libc/string/memset.c
@@ -43,30 +43,28 @@ __FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <limits.h>
-#include <string.h>
#define wsize sizeof(u_int)
#define wmask (wsize - 1)
#ifdef BZERO
+#include <strings.h>
+
#define RETURN return
#define VAL 0
#define WIDEVAL 0
void
-bzero(dst0, length)
- void *dst0;
- size_t length;
+bzero(void *dst0, size_t length)
#else
+#include <string.h>
+
#define RETURN return (dst0)
#define VAL c0
#define WIDEVAL c
void *
-memset(dst0, c0, length)
- void *dst0;
- int c0;
- size_t length;
+memset(void *dst0, int c0, size_t length)
#endif
{
size_t t;
OpenPOWER on IntegriCloud