summaryrefslogtreecommitdiff
path: root/libc/string/strdup.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/string/strdup.c')
-rw-r--r--libc/string/strdup.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/libc/string/strdup.c b/libc/string/strdup.c
index e2ccead9d..dff5af60a 100644
--- a/libc/string/strdup.c
+++ b/libc/string/strdup.c
@@ -9,18 +9,21 @@
#include <stdlib.h>
#ifdef WANT_WIDE
-# define __Wstrdup __wcsdup
+libc_hidden_proto(wcslen)
+libc_hidden_proto(wcscpy)
# define Wstrdup wcsdup
-# define Wstrlen __wcslen
-# define Wstrcpy __wcscpy
+# define Wstrlen wcslen
+# define Wstrcpy wcscpy
#else
-# define __Wstrdup __strdup
+libc_hidden_proto(strdup)
+libc_hidden_proto(strlen)
+libc_hidden_proto(strcpy)
# define Wstrdup strdup
-# define Wstrlen __strlen
-# define Wstrcpy __strcpy
+# define Wstrlen strlen
+# define Wstrcpy strcpy
#endif
-Wchar attribute_hidden *__Wstrdup(register const Wchar *s1)
+Wchar *Wstrdup(register const Wchar *s1)
{
register Wchar *s;
@@ -31,4 +34,6 @@ Wchar attribute_hidden *__Wstrdup(register const Wchar *s1)
return s;
}
-strong_alias(__Wstrdup,Wstrdup)
+#ifndef WANT_WIDE
+libc_hidden_def(strdup)
+#endif