diff options
Diffstat (limited to 'lib/libc/string')
-rw-r--r-- | lib/libc/string/strerror.c | 8 | ||||
-rw-r--r-- | lib/libc/string/strlcat.c | 5 | ||||
-rw-r--r-- | lib/libc/string/strlcpy.c | 5 |
3 files changed, 5 insertions, 13 deletions
diff --git a/lib/libc/string/strerror.c b/lib/libc/string/strerror.c index 0c20ac3..02fba0c 100644 --- a/lib/libc/string/strerror.c +++ b/lib/libc/string/strerror.c @@ -37,11 +37,9 @@ static char sccsid[] = "@(#)strerror.c 8.1 (Berkeley) 6/4/93"; #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include "namespace.h" #include <errno.h> #include <stdio.h> #include <string.h> -#include "un-namespace.h" #define UPREFIX "Unknown error: " @@ -71,8 +69,8 @@ errstr(int num, char *buf, size_t len) } while (uerr /= 10); if (num < 0) *--t = '-'; - _strlcpy(buf, UPREFIX, len); - _strlcat(buf, t, len); + strlcpy(buf, UPREFIX, len); + strlcat(buf, t, len); } int @@ -83,7 +81,7 @@ strerror_r(int errnum, char *strerrbuf, size_t buflen) errstr(errnum, strerrbuf, buflen); return (EINVAL); } - if (_strlcpy(strerrbuf, sys_errlist[errnum], buflen) >= buflen) + if (strlcpy(strerrbuf, sys_errlist[errnum], buflen) >= buflen) return (ERANGE); return (0); } diff --git a/lib/libc/string/strlcat.c b/lib/libc/string/strlcat.c index cd9fc43..2c2fa56 100644 --- a/lib/libc/string/strlcat.c +++ b/lib/libc/string/strlcat.c @@ -33,12 +33,9 @@ static char *rcsid = "$OpenBSD: strlcat.c,v 1.2 1999/06/17 16:28:58 millert Exp #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include "namespace.h" #include <sys/types.h> #include <string.h> -#include "un-namespace.h" -__weak_reference(_strlcat, strlcat); /* * Appends src to string dst of size siz (unlike strncat, siz is the * full size of dst, not space left). At most siz-1 characters @@ -47,7 +44,7 @@ __weak_reference(_strlcat, strlcat); * If retval >= siz, truncation occurred. */ size_t -_strlcat(dst, src, siz) +strlcat(dst, src, siz) char *dst; const char *src; size_t siz; diff --git a/lib/libc/string/strlcpy.c b/lib/libc/string/strlcpy.c index 74f511d..a8a6cb7 100644 --- a/lib/libc/string/strlcpy.c +++ b/lib/libc/string/strlcpy.c @@ -33,18 +33,15 @@ static char *rcsid = "$OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include "namespace.h" #include <sys/types.h> #include <string.h> -#include "un-namespace.h" -__weak_reference(_strlcpy, strlcpy); /* * Copy src to string dst of size siz. At most siz-1 characters * will be copied. Always NUL terminates (unless siz == 0). * Returns strlen(src); if retval >= siz, truncation occurred. */ -size_t _strlcpy(dst, src, siz) +size_t strlcpy(dst, src, siz) char *dst; const char *src; size_t siz; |