From af0172162f7c653cad6a11ed1c1a5459bc154465 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 14 Jan 2006 00:58:03 +0000 Subject: hidden_def/hidden_proto: convert all users (I hope) termios split, add some missing headers, other jump relocs removed --- libc/string/strlcpy.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'libc/string/strlcpy.c') diff --git a/libc/string/strlcpy.c b/libc/string/strlcpy.c index 3920db083..2f3d29fff 100644 --- a/libc/string/strlcpy.c +++ b/libc/string/strlcpy.c @@ -8,18 +8,22 @@ #include "_string.h" #ifdef WANT_WIDE -# define __Wstrlcpy __wcslcpy -# define Wstrlcpy wcslcpy +# define Wstrlcpy __wcslcpy +# define Wstrxfrm wcsxfrm #else -# define __Wstrlcpy __strlcpy # define Wstrlcpy strlcpy +# define Wstrxfrm strxfrm #endif + /* OpenBSD function: * Copy at most n-1 chars from src to dst and nul-terminate dst. * Returns strlen(src), so truncation occurred if the return value is >= n. */ -size_t attribute_hidden __Wstrlcpy(register Wchar *__restrict dst, +#ifdef WANT_WIDE +attribute_hidden +#endif +size_t Wstrlcpy(register Wchar *__restrict dst, register const Wchar *__restrict src, size_t n) { @@ -42,15 +46,16 @@ size_t attribute_hidden __Wstrlcpy(register Wchar *__restrict dst, return src - src0; } - -strong_alias(__Wstrlcpy,Wstrlcpy) - +#ifndef WANT_WIDE +libc_hidden_proto(strlcpy) +libc_hidden_def(strlcpy) +#ifndef __UCLIBC_HAS_LOCALE__ +strong_alias(strlcpy,strxfrm) +libc_hidden_proto(strxfrm) +libc_hidden_def(strxfrm) +#endif +#else #ifndef __UCLIBC_HAS_LOCALE__ -# ifdef WANT_WIDE -hidden_strong_alias(__wcslcpy,__wcsxfrm) strong_alias(__wcslcpy,wcsxfrm) -# else -hidden_strong_alias(__strlcpy,__strxfrm) -strong_alias(__strlcpy,strxfrm) -# endif +#endif #endif -- cgit v1.2.3