summaryrefslogtreecommitdiff
path: root/libc/string
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-11-26 01:21:10 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-11-26 01:21:10 +0000
commitd8ea341e64250c2f4636c559562e8904037eda74 (patch)
tree5df7693726ec3a9f73e4d622b8312d42e8f31e03 /libc/string
parent873228f50b0a83833e0f498010ffe3dcc75a9258 (diff)
libc/string: need additional work to remove libc_hidden_proto's properly
Diffstat (limited to 'libc/string')
-rw-r--r--libc/string/memchr.c2
-rw-r--r--libc/string/memcpy.c2
-rw-r--r--libc/string/mempcpy.c2
-rw-r--r--libc/string/strcat.c2
-rw-r--r--libc/string/strchr.c2
-rw-r--r--libc/string/strchrnul.c2
-rw-r--r--libc/string/strcmp.c3
-rw-r--r--libc/string/strcpy.c9
-rw-r--r--libc/string/strlcpy.c21
-rw-r--r--libc/string/strlen.c2
-rw-r--r--libc/string/strnlen.c2
-rw-r--r--libc/string/strpbrk.c2
-rw-r--r--libc/string/strspn.c2
13 files changed, 16 insertions, 37 deletions
diff --git a/libc/string/memchr.c b/libc/string/memchr.c
index 413999722..5e60f6554 100644
--- a/libc/string/memchr.c
+++ b/libc/string/memchr.c
@@ -13,8 +13,6 @@
# define Wmemchr memchr
#endif
-libc_hidden_proto(Wmemchr)
-
Wvoid *Wmemchr(const Wvoid *s, Wint c, size_t n)
{
register const Wuchar *r = (const Wuchar *) s;
diff --git a/libc/string/memcpy.c b/libc/string/memcpy.c
index dc2986778..aa8d4ee38 100644
--- a/libc/string/memcpy.c
+++ b/libc/string/memcpy.c
@@ -13,8 +13,6 @@
# define Wmemcpy memcpy
#endif
-libc_hidden_proto(Wmemcpy)
-
Wvoid *Wmemcpy(Wvoid * __restrict s1, const Wvoid * __restrict s2, size_t n)
{
register Wchar *r1 = s1;
diff --git a/libc/string/mempcpy.c b/libc/string/mempcpy.c
index 91896434b..e7605146a 100644
--- a/libc/string/mempcpy.c
+++ b/libc/string/mempcpy.c
@@ -15,8 +15,6 @@
# define Wmempcpy mempcpy
#endif
-libc_hidden_proto(Wmempcpy)
-
Wvoid *Wmempcpy(Wvoid * __restrict s1, const Wvoid * __restrict s2, size_t n)
{
register Wchar *r1 = s1;
diff --git a/libc/string/strcat.c b/libc/string/strcat.c
index 40a9be111..63619bcc8 100644
--- a/libc/string/strcat.c
+++ b/libc/string/strcat.c
@@ -13,8 +13,6 @@
# define Wstrcat strcat
#endif
-libc_hidden_proto(Wstrcat)
-
Wchar *Wstrcat(Wchar * __restrict s1, register const Wchar * __restrict s2)
{
register Wchar *s = s1;
diff --git a/libc/string/strchr.c b/libc/string/strchr.c
index 329545e9f..462b7b1f1 100644
--- a/libc/string/strchr.c
+++ b/libc/string/strchr.c
@@ -13,8 +13,6 @@
# define Wstrchr strchr
#endif
-libc_hidden_proto(Wstrchr)
-
Wchar *Wstrchr(register const Wchar *s, Wint c)
{
do {
diff --git a/libc/string/strchrnul.c b/libc/string/strchrnul.c
index 6fe7f6c3d..d2d7df307 100644
--- a/libc/string/strchrnul.c
+++ b/libc/string/strchrnul.c
@@ -15,8 +15,6 @@
# define Wstrchrnul strchrnul
#endif
-libc_hidden_proto(Wstrchrnul)
-
Wchar *Wstrchrnul(register const Wchar *s, Wint c)
{
--s;
diff --git a/libc/string/strcmp.c b/libc/string/strcmp.c
index 5477adf3a..abae61812 100644
--- a/libc/string/strcmp.c
+++ b/libc/string/strcmp.c
@@ -15,8 +15,6 @@
# define Wstrcoll strcoll
#endif
-libc_hidden_proto(Wstrcmp)
-
int Wstrcmp(register const Wchar *s1, register const Wchar *s2)
{
#ifdef WANT_WIDE
@@ -40,7 +38,6 @@ int Wstrcmp(register const Wchar *s1, register const Wchar *s2)
libc_hidden_def(Wstrcmp)
#ifndef __UCLIBC_HAS_LOCALE__
-libc_hidden_proto(Wstrcoll)
strong_alias(Wstrcmp,Wstrcoll)
libc_hidden_def(Wstrcoll)
#endif
diff --git a/libc/string/strcpy.c b/libc/string/strcpy.c
index cda4094ac..568efbf60 100644
--- a/libc/string/strcpy.c
+++ b/libc/string/strcpy.c
@@ -13,8 +13,6 @@
# define Wstrcpy strcpy
#endif
-libc_hidden_proto(Wstrcpy)
-
Wchar *Wstrcpy(Wchar * __restrict s1, const Wchar * __restrict s2)
{
register Wchar *s = s1;
@@ -29,4 +27,9 @@ Wchar *Wstrcpy(Wchar * __restrict s1, const Wchar * __restrict s2)
return s1;
}
-libc_hidden_def(Wstrcpy)
+
+#ifdef WANT_WIDE
+/* wcscpy does not need libc_hidden_def */
+#else
+libc_hidden_def(strcpy)
+#endif
diff --git a/libc/string/strlcpy.c b/libc/string/strlcpy.c
index 4bdf0daa6..0ccfc0e8a 100644
--- a/libc/string/strlcpy.c
+++ b/libc/string/strlcpy.c
@@ -9,14 +9,10 @@
#ifdef WANT_WIDE
# define Wstrlcpy __wcslcpy
-# define Wstrxfrm wcsxfrm
#else
-/* Experimentally off - libc_hidden_proto(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. */
@@ -49,16 +45,19 @@ size_t Wstrlcpy(register Wchar *__restrict dst,
return src - src0;
}
-#ifndef WANT_WIDE
-libc_hidden_def(strlcpy)
+#ifdef WANT_WIDE
+
#ifndef __UCLIBC_HAS_LOCALE__
-/* Experimentally off - libc_hidden_proto(strxfrm) */
-strong_alias(strlcpy,strxfrm)
-libc_hidden_def(strxfrm)
+strong_alias(__wcslcpy,wcsxfrm)
+libc_hidden_def(wcsxfrm)
#endif
+
#else
+
+libc_hidden_def(strlcpy)
#ifndef __UCLIBC_HAS_LOCALE__
-strong_alias(__wcslcpy,wcsxfrm)
-libc_hidden_def(wcsxfrm)
+strong_alias(strlcpy,strxfrm)
+libc_hidden_def(strxfrm)
#endif
+
#endif
diff --git a/libc/string/strlen.c b/libc/string/strlen.c
index 2edb6e4e8..021a8cabc 100644
--- a/libc/string/strlen.c
+++ b/libc/string/strlen.c
@@ -13,8 +13,6 @@
# define Wstrlen strlen
#endif
-libc_hidden_proto(Wstrlen)
-
size_t Wstrlen(const Wchar *s)
{
register const Wchar *p;
diff --git a/libc/string/strnlen.c b/libc/string/strnlen.c
index 8fbc25c11..98267e51b 100644
--- a/libc/string/strnlen.c
+++ b/libc/string/strnlen.c
@@ -15,8 +15,6 @@
# define Wstrnlen strnlen
#endif
-libc_hidden_proto(Wstrnlen)
-
size_t Wstrnlen(const Wchar *s, size_t max)
{
register const Wchar *p = s;
diff --git a/libc/string/strpbrk.c b/libc/string/strpbrk.c
index abeb84380..ddfc75172 100644
--- a/libc/string/strpbrk.c
+++ b/libc/string/strpbrk.c
@@ -13,8 +13,6 @@
# define Wstrpbrk strpbrk
#endif
-libc_hidden_proto(Wstrpbrk)
-
Wchar *Wstrpbrk(const Wchar *s1, const Wchar *s2)
{
register const Wchar *s;
diff --git a/libc/string/strspn.c b/libc/string/strspn.c
index ca83ef900..942b6f308 100644
--- a/libc/string/strspn.c
+++ b/libc/string/strspn.c
@@ -13,8 +13,6 @@
# define Wstrspn strspn
#endif
-libc_hidden_proto(Wstrspn)
-
size_t Wstrspn(const Wchar *s1, const Wchar *s2)
{
register const Wchar *s = s1;