summaryrefslogtreecommitdiff
path: root/common/lib/libc/string
diff options
context:
space:
mode:
authorhe <he@NetBSD.org>2008-03-29 14:03:22 +0000
committerhe <he@NetBSD.org>2008-03-29 14:03:22 +0000
commit73e50f111b1824bc24bd4d6834c97050e11bea2e (patch)
treedab6927b63a55521a4c06f5235927ecca69e7f80 /common/lib/libc/string
parentc7e03d2b5871eecbbe1ea738e6952320dc85e613 (diff)
Do like the non-__OPTIMIZE_SIZE__ variant, and compile memset() unless
BZERO is defined, instead of requiring MEMSET to be defined. Avoids violating the principle of least astonishment, and also fixes the build of stand/ and kernels for (at least) alpha.
Diffstat (limited to 'common/lib/libc/string')
-rw-r--r--common/lib/libc/string/memset.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/common/lib/libc/string/memset.c b/common/lib/libc/string/memset.c
index 68f46daa6a8..27ed4cf47f7 100644
--- a/common/lib/libc/string/memset.c
+++ b/common/lib/libc/string/memset.c
@@ -1,4 +1,4 @@
-/* $NetBSD: memset.c,v 1.5 2008/03/29 12:25:32 he Exp $ */
+/* $NetBSD: memset.c,v 1.6 2008/03/29 14:03:22 he Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)memset.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: memset.c,v 1.5 2008/03/29 12:25:32 he Exp $");
+__RCSID("$NetBSD: memset.c,v 1.6 2008/03/29 14:03:22 he Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -151,8 +151,7 @@ bzero(void *dstv, size_t length)
while (length-- > 0)
*dst++ = 0;
}
-#endif
-#ifdef MEMSET
+#else
void *
memset(void *dstv, int c, size_t length)
{
@@ -161,5 +160,5 @@ memset(void *dstv, int c, size_t length)
*dst++ = c;
return dstv;
}
-#endif
+#endif /* BZERO */
#endif /* __OPTIMIZE_SIZE__ */