summaryrefslogtreecommitdiff
path: root/libc/string
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-01-14 19:45:02 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-01-14 19:45:02 +0000
commit6f7dc709ed7e403af224b0fbb91e9619629eb2ec (patch)
tree349296ed6e3d73f390409bf96fa4269d1ac20ec7 /libc/string
parent2d997660372123ab6ac1ee519b22fe015eaa787b (diff)
make DODEBUG=y happy, update sysdeps/common/* copyright
Diffstat (limited to 'libc/string')
-rw-r--r--libc/string/_collate.c6
-rw-r--r--libc/string/generic/memchr.c2
-rw-r--r--libc/string/generic/memcmp.c4
-rw-r--r--libc/string/generic/memcpy.c3
-rw-r--r--libc/string/generic/memmem.c3
-rw-r--r--libc/string/generic/memmove.c2
-rw-r--r--libc/string/generic/mempcpy.c3
-rw-r--r--libc/string/generic/memrchr.c3
-rw-r--r--libc/string/generic/memset.c2
-rw-r--r--libc/string/generic/rawmemchr.c3
-rw-r--r--libc/string/generic/strcat.c2
-rw-r--r--libc/string/generic/strchr.c2
-rw-r--r--libc/string/generic/strchrnul.c3
-rw-r--r--libc/string/generic/strcmp.c2
-rw-r--r--libc/string/generic/strcpy.c2
-rw-r--r--libc/string/generic/strcspn.c2
-rw-r--r--libc/string/generic/strlen.c2
-rw-r--r--libc/string/generic/strncat.c2
-rw-r--r--libc/string/generic/strncmp.c2
-rw-r--r--libc/string/generic/strncpy.c2
-rw-r--r--libc/string/generic/strnlen.c3
-rw-r--r--libc/string/generic/strrchr.c2
-rw-r--r--libc/string/generic/strsep.c2
-rw-r--r--libc/string/generic/strspn.c2
-rw-r--r--libc/string/generic/strstr.c3
-rw-r--r--libc/string/generic/strtok_r.c2
-rw-r--r--libc/string/i386/memchr.c2
-rw-r--r--libc/string/i386/memcpy.c2
-rw-r--r--libc/string/i386/memmove.c2
-rw-r--r--libc/string/i386/memset.c2
-rw-r--r--libc/string/i386/strcat.c2
-rw-r--r--libc/string/i386/strchr.c2
-rw-r--r--libc/string/i386/strcmp.c2
-rw-r--r--libc/string/i386/strcpy.c2
-rw-r--r--libc/string/i386/strlen.c2
-rw-r--r--libc/string/i386/strncat.c2
-rw-r--r--libc/string/i386/strncmp.c2
-rw-r--r--libc/string/i386/strncpy.c2
-rw-r--r--libc/string/i386/strnlen.c2
-rw-r--r--libc/string/i386/strrchr.c2
-rw-r--r--libc/string/powerpc/memcpy.c2
-rw-r--r--libc/string/powerpc/memmove.c2
-rw-r--r--libc/string/powerpc/memset.c3
-rw-r--r--libc/string/strcasecmp.c4
-rw-r--r--libc/string/strlcpy.c2
-rw-r--r--libc/string/strncasecmp.c4
46 files changed, 60 insertions, 51 deletions
diff --git a/libc/string/_collate.c b/libc/string/_collate.c
index 5a1f33b82..755a6df21 100644
--- a/libc/string/_collate.c
+++ b/libc/string/_collate.c
@@ -514,6 +514,7 @@ static void next_weight(col_state_t *cs, int pass __LOCALE_PARAM )
} while (1);
}
+libc_hidden_proto(__XL_NPP(wcscoll))
int __XL_NPP(wcscoll) (const Wchar *s0, const Wchar *s1 __LOCALE_PARAM )
{
col_state_t ws[2];
@@ -547,7 +548,6 @@ int __XL_NPP(wcscoll) (const Wchar *s0, const Wchar *s1 __LOCALE_PARAM )
return 0;
}
-libc_hidden_proto(__XL_NPP(wcscoll))
libc_hidden_def(__XL_NPP(wcscoll))
#ifdef WANT_WIDE
@@ -555,6 +555,7 @@ libc_hidden_def(__XL_NPP(wcscoll))
extern size_t __wcslcpy(wchar_t *__restrict dst,
const wchar_t *__restrict src, size_t n);
+libc_hidden_proto(__XL_NPP(wcsxfrm))
size_t __XL_NPP(wcsxfrm)(wchar_t *__restrict ws1, const wchar_t *__restrict ws2,
size_t n __LOCALE_PARAM )
{
@@ -592,7 +593,6 @@ size_t __XL_NPP(wcsxfrm)(wchar_t *__restrict ws1, const wchar_t *__restrict ws2,
}
return count-1;
}
-libc_hidden_proto(__XL_NPP(wcsxfrm))
libc_hidden_def(__XL_NPP(wcsxfrm))
#else /* WANT_WIDE */
@@ -637,6 +637,7 @@ static size_t store(unsigned char *s, size_t count, size_t n, __uwchar_t weight)
return r;
}
+libc_hidden_proto(__XL_NPP(strxfrm))
size_t __XL_NPP(strxfrm)(char *__restrict ws1, const char *__restrict ws2, size_t n
__LOCALE_PARAM )
{
@@ -674,7 +675,6 @@ size_t __XL_NPP(strxfrm)(char *__restrict ws1, const char *__restrict ws2, size_
}
return count-1;
}
-libc_hidden_proto(__XL_NPP(strxfrm))
libc_hidden_def(__XL_NPP(strxfrm))
#endif /* WANT_WIDE */
diff --git a/libc/string/generic/memchr.c b/libc/string/generic/memchr.c
index 9942b609b..4bda5d758 100644
--- a/libc/string/generic/memchr.c
+++ b/libc/string/generic/memchr.c
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include <limits.h>
+libc_hidden_proto(memchr)
libc_hidden_proto(abort)
#include "memcopy.h"
@@ -173,5 +174,4 @@ void *memchr (const void * s, int c_in, size_t n)
return 0;
}
-libc_hidden_proto(memchr)
libc_hidden_def(memchr)
diff --git a/libc/string/generic/memcmp.c b/libc/string/generic/memcmp.c
index 13de370bb..41f15369d 100644
--- a/libc/string/generic/memcmp.c
+++ b/libc/string/generic/memcmp.c
@@ -19,9 +19,10 @@
02111-1307 USA. */
#include <string.h>
-
#include "memcopy.h"
+libc_hidden_proto(memcmp)
+
#include <endian.h>
#if __BYTE_ORDER == __BIG_ENDIAN
@@ -329,6 +330,5 @@ memcmp (const __ptr_t s1, const __ptr_t s2, size_t len)
return 0;
}
-libc_hidden_proto(memcmp)
libc_hidden_def(memcmp)
strong_alias(memcmp,bcmp)
diff --git a/libc/string/generic/memcpy.c b/libc/string/generic/memcpy.c
index 692a254f7..42e97a063 100644
--- a/libc/string/generic/memcpy.c
+++ b/libc/string/generic/memcpy.c
@@ -23,6 +23,8 @@
#include "memcopy.h"
#include "pagecopy.h"
+libc_hidden_proto(memcpy)
+
/* _wordcopy_fwd_aligned -- Copy block beginning at SRCP to
block beginning at DSTP with LEN `op_t' words (not LEN bytes!).
Both SRCP and DSTP should be aligned for memory operations on `op_t's. */
@@ -242,5 +244,4 @@ void *memcpy (void *dstpp, const void *srcpp, size_t len)
return dstpp;
}
-libc_hidden_proto(memcpy)
libc_hidden_def(memcpy)
diff --git a/libc/string/generic/memmem.c b/libc/string/generic/memmem.c
index e8982c078..386cb5e02 100644
--- a/libc/string/generic/memmem.c
+++ b/libc/string/generic/memmem.c
@@ -16,9 +16,11 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define _GNU_SOURCE
#include <string.h>
#include <stddef.h>
+libc_hidden_proto(memmem)
libc_hidden_proto(memcmp)
/* Return the first occurrence of NEEDLE in HAYSTACK. */
@@ -48,5 +50,4 @@ void *memmem (const void *haystack, size_t haystack_len,
return NULL;
}
-libc_hidden_proto(memmem)
libc_hidden_def(memmem)
diff --git a/libc/string/generic/memmove.c b/libc/string/generic/memmove.c
index 0157b148c..68caacd78 100644
--- a/libc/string/generic/memmove.c
+++ b/libc/string/generic/memmove.c
@@ -24,6 +24,7 @@
#include "memcopy.h"
#include "pagecopy.h"
+libc_hidden_proto(memmove)
libc_hidden_proto(memcpy)
static void _wordcopy_bwd_aligned (long int dstp, long int srcp, size_t len)
@@ -278,5 +279,4 @@ void *memmove (void *dest, const void *src, size_t len)
return (dest);
}
-libc_hidden_proto(memmove)
libc_hidden_def(memmove)
diff --git a/libc/string/generic/mempcpy.c b/libc/string/generic/mempcpy.c
index ea4dec2b1..ac91541a5 100644
--- a/libc/string/generic/mempcpy.c
+++ b/libc/string/generic/mempcpy.c
@@ -5,8 +5,10 @@
/* Ditch the glibc version and just wrap memcpy. */
+#define _GNU_SOURCE
#include <string.h>
+libc_hidden_proto(mempcpy)
libc_hidden_proto(memcpy)
void *mempcpy (void *dstpp, const void *srcpp, size_t len)
@@ -14,5 +16,4 @@ void *mempcpy (void *dstpp, const void *srcpp, size_t len)
memcpy(dstpp, srcpp, len);
return (void *)(((char *)dstpp) + len);
}
-libc_hidden_proto(mempcpy)
libc_hidden_def(mempcpy)
diff --git a/libc/string/generic/memrchr.c b/libc/string/generic/memrchr.c
index ab61eac72..7cb5b2246 100644
--- a/libc/string/generic/memrchr.c
+++ b/libc/string/generic/memrchr.c
@@ -22,10 +22,12 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define _GNU_SOURCE
#include <string.h>
#include <stdlib.h>
#include <limits.h>
+libc_hidden_proto(memrchr)
libc_hidden_proto(abort)
#include "memcopy.h"
@@ -172,5 +174,4 @@ void *memrchr (const void * s, int c_in, size_t n)
return 0;
}
-libc_hidden_proto(memrchr)
libc_hidden_def(memrchr)
diff --git a/libc/string/generic/memset.c b/libc/string/generic/memset.c
index 18c065cac..1df1a450f 100644
--- a/libc/string/generic/memset.c
+++ b/libc/string/generic/memset.c
@@ -19,6 +19,7 @@
#include <string.h>
#include "memcopy.h"
+libc_hidden_proto(memset)
void *memset (void *dstpp, int c, size_t len)
{
long int dstp = (long int) dstpp;
@@ -82,5 +83,4 @@ void *memset (void *dstpp, int c, size_t len)
return dstpp;
}
-libc_hidden_proto(memset)
libc_hidden_def(memset)
diff --git a/libc/string/generic/rawmemchr.c b/libc/string/generic/rawmemchr.c
index 3fc0e52f3..3c1cc01de 100644
--- a/libc/string/generic/rawmemchr.c
+++ b/libc/string/generic/rawmemchr.c
@@ -21,10 +21,12 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define _GNU_SOURCE
#include <string.h>
#include <stdlib.h>
#include <limits.h>
+libc_hidden_proto(rawmemchr)
libc_hidden_proto(abort)
#include "memcopy.h"
@@ -158,5 +160,4 @@ void *rawmemchr (const void * s, int c_in)
}
}
}
-libc_hidden_proto(rawmemchr)
libc_hidden_def(rawmemchr)
diff --git a/libc/string/generic/strcat.c b/libc/string/generic/strcat.c
index 5111a9a0f..53c4d0d9e 100644
--- a/libc/string/generic/strcat.c
+++ b/libc/string/generic/strcat.c
@@ -19,6 +19,7 @@
#include <string.h>
#include "memcopy.h"
+libc_hidden_proto(strcat)
/* Append SRC on the end of DEST. */
char *strcat (char *dest, const char *src)
{
@@ -44,5 +45,4 @@ char *strcat (char *dest, const char *src)
return dest;
}
-libc_hidden_proto(strcat)
libc_hidden_def(strcat)
diff --git a/libc/string/generic/strchr.c b/libc/string/generic/strchr.c
index 5675ce4ba..b1ffc7538 100644
--- a/libc/string/generic/strchr.c
+++ b/libc/string/generic/strchr.c
@@ -24,6 +24,7 @@
#include <string.h>
#include <stdlib.h>
+libc_hidden_proto(strchr)
libc_hidden_proto(abort)
#include "memcopy.h"
@@ -180,6 +181,5 @@ char *strchr (const char *s, int c_in)
return NULL;
}
-libc_hidden_proto(strchr)
libc_hidden_def(strchr)
strong_alias(strchr,index)
diff --git a/libc/string/generic/strchrnul.c b/libc/string/generic/strchrnul.c
index eccdba247..3616341a7 100644
--- a/libc/string/generic/strchrnul.c
+++ b/libc/string/generic/strchrnul.c
@@ -21,9 +21,11 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define _GNU_SOURCE
#include <string.h>
#include <stdlib.h>
+libc_hidden_proto(strchrnul)
libc_hidden_proto(abort)
#include "memcopy.h"
@@ -163,5 +165,4 @@ char *strchrnul (const char *s, int c_in)
/* This should never happen. */
return NULL;
}
-libc_hidden_proto(strchrnul)
libc_hidden_def(strchrnul)
diff --git a/libc/string/generic/strcmp.c b/libc/string/generic/strcmp.c
index 1049934a8..6edb503e1 100644
--- a/libc/string/generic/strcmp.c
+++ b/libc/string/generic/strcmp.c
@@ -20,6 +20,7 @@
#include "memcopy.h"
+libc_hidden_proto(strcmp)
/* Compare S1 and S2, returning less than, equal to or
greater than zero if S1 is lexicographically less than,
equal to or greater than S2. */
@@ -40,7 +41,6 @@ int strcmp (const char *p1, const char *p2)
return c1 - c2;
}
-libc_hidden_proto(strcmp)
libc_hidden_def(strcmp)
#ifndef __UCLIBC_HAS_LOCALE__
diff --git a/libc/string/generic/strcpy.c b/libc/string/generic/strcpy.c
index ab2928e55..7e558ead1 100644
--- a/libc/string/generic/strcpy.c
+++ b/libc/string/generic/strcpy.c
@@ -22,6 +22,7 @@
#include "memcopy.h"
#include "bp-checks.h"
+libc_hidden_proto(strcpy)
/* Copy SRC to DEST. */
char *strcpy (char *dest, const char *src)
{
@@ -43,5 +44,4 @@ char *strcpy (char *dest, const char *src)
return dest;
}
-libc_hidden_proto(strcpy)
libc_hidden_def(strcpy)
diff --git a/libc/string/generic/strcspn.c b/libc/string/generic/strcspn.c
index 7fa49a0dc..1b5e465ea 100644
--- a/libc/string/generic/strcspn.c
+++ b/libc/string/generic/strcspn.c
@@ -18,6 +18,7 @@
#include <string.h>
+libc_hidden_proto(strcspn)
libc_hidden_proto(strchr)
/* Return the length of the maximum initial segment of S
@@ -34,5 +35,4 @@ size_t strcspn (const char *s, const char *reject)
return count;
}
-libc_hidden_proto(strcspn)
libc_hidden_def(strcspn)
diff --git a/libc/string/generic/strlen.c b/libc/string/generic/strlen.c
index 08b5fa830..3528829af 100644
--- a/libc/string/generic/strlen.c
+++ b/libc/string/generic/strlen.c
@@ -22,6 +22,7 @@
#include <string.h>
#include <stdlib.h>
+libc_hidden_proto(strlen)
libc_hidden_proto(abort)
/* Return the length of the null-terminated string STR. Scan for
@@ -148,5 +149,4 @@ size_t strlen (const char *str)
}
}
}
-libc_hidden_proto(strlen)
libc_hidden_def(strlen)
diff --git a/libc/string/generic/strncat.c b/libc/string/generic/strncat.c
index 0cdb21a7a..9e0dfcd78 100644
--- a/libc/string/generic/strncat.c
+++ b/libc/string/generic/strncat.c
@@ -20,6 +20,7 @@
#include "memcopy.h"
+libc_hidden_proto(strncat)
char *strncat (char *s1, const char *s2, size_t n)
{
reg_char c;
@@ -73,5 +74,4 @@ char *strncat (char *s1, const char *s2, size_t n)
return s;
}
-libc_hidden_proto(strncat)
libc_hidden_def(strncat)
diff --git a/libc/string/generic/strncmp.c b/libc/string/generic/strncmp.c
index a6285e3a4..4c1978439 100644
--- a/libc/string/generic/strncmp.c
+++ b/libc/string/generic/strncmp.c
@@ -19,6 +19,7 @@
#include <string.h>
#include "memcopy.h"
+libc_hidden_proto(strncmp)
/* Compare no more than N characters of S1 and S2,
returning less than, equal to or greater than zero
if S1 is lexicographically less than, equal to or
@@ -64,5 +65,4 @@ int strncmp (const char *s1, const char *s2, size_t n)
return c1 - c2;
}
-libc_hidden_proto(strncmp)
libc_hidden_def(strncmp)
diff --git a/libc/string/generic/strncpy.c b/libc/string/generic/strncpy.c
index 3c9ccb9ce..4b0b0894e 100644
--- a/libc/string/generic/strncpy.c
+++ b/libc/string/generic/strncpy.c
@@ -19,6 +19,7 @@
#include <string.h>
#include "memcopy.h"
+libc_hidden_proto(strncpy)
char *strncpy (char *s1, const char *s2, size_t n)
{
reg_char c;
@@ -78,5 +79,4 @@ char *strncpy (char *s1, const char *s2, size_t n)
return s;
}
-libc_hidden_proto(strncpy)
libc_hidden_def(strncpy)
diff --git a/libc/string/generic/strnlen.c b/libc/string/generic/strnlen.c
index 95e8a77be..c5da906ef 100644
--- a/libc/string/generic/strnlen.c
+++ b/libc/string/generic/strnlen.c
@@ -21,9 +21,11 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#define _GNU_SOURCE
#include <string.h>
#include <stdlib.h>
+libc_hidden_proto(strnlen)
libc_hidden_proto(abort)
/* Find the length of S, but scan at most MAXLEN characters. If no
@@ -158,5 +160,4 @@ size_t strnlen (const char *str, size_t maxlen)
char_ptr = end_ptr;
return char_ptr - str;
}
-libc_hidden_proto(strnlen)
libc_hidden_def(strnlen)
diff --git a/libc/string/generic/strrchr.c b/libc/string/generic/strrchr.c
index cf4c6dd3b..b67e369fd 100644
--- a/libc/string/generic/strrchr.c
+++ b/libc/string/generic/strrchr.c
@@ -18,6 +18,7 @@
#include <string.h>
+libc_hidden_proto(strrchr)
libc_hidden_proto(strchr)
/* Find the last occurrence of C in S. */
@@ -41,6 +42,5 @@ char *strrchr (const char *s, int c)
return (char *) found;
}
-libc_hidden_proto(strrchr)
libc_hidden_def(strrchr)
strong_alias(strrchr,rindex)
diff --git a/libc/string/generic/strsep.c b/libc/string/generic/strsep.c
index 5d9c8c307..7b34e2c16 100644
--- a/libc/string/generic/strsep.c
+++ b/libc/string/generic/strsep.c
@@ -18,6 +18,7 @@
#include <string.h>
+libc_hidden_proto(strsep)
libc_hidden_proto(strchr)
libc_hidden_proto(strpbrk)
@@ -64,5 +65,4 @@ char *strsep (char **stringp, const char *delim)
return begin;
}
-libc_hidden_proto(strsep)
libc_hidden_def(strsep)
diff --git a/libc/string/generic/strspn.c b/libc/string/generic/strspn.c
index cd2882456..a194fdc7d 100644
--- a/libc/string/generic/strspn.c
+++ b/libc/string/generic/strspn.c
@@ -18,6 +18,7 @@
#include <string.h>
+libc_hidden_proto(strspn)
/* Return the length of the maximum initial segment
of S which contains only characters in ACCEPT. */
size_t strspn (const char *s, const char *accept)
@@ -39,5 +40,4 @@ size_t strspn (const char *s, const char *accept)
return count;
}
-libc_hidden_proto(strspn)
libc_hidden_def(strspn)
diff --git a/libc/string/generic/strstr.c b/libc/string/generic/strstr.c
index a7442d614..f151a820a 100644
--- a/libc/string/generic/strstr.c
+++ b/libc/string/generic/strstr.c
@@ -28,6 +28,8 @@
#include <string.h>
+libc_hidden_proto(strstr)
+
typedef unsigned chartype;
char *strstr (const char *phaystack, const char *pneedle)
@@ -109,5 +111,4 @@ foundneedle:
ret0:
return 0;
}
-libc_hidden_proto(strstr)
libc_hidden_def(strstr)
diff --git a/libc/string/generic/strtok_r.c b/libc/string/generic/strtok_r.c
index 3f7ed2c9f..566538fd5 100644
--- a/libc/string/generic/strtok_r.c
+++ b/libc/string/generic/strtok_r.c
@@ -20,6 +20,7 @@
#define _GNU_SOURCE
#include <string.h>
+libc_hidden_proto(strtok_r)
libc_hidden_proto(strspn)
libc_hidden_proto(strpbrk)
libc_hidden_proto(rawmemchr)
@@ -63,5 +64,4 @@ char *strtok_r (char *s, const char *delim, char **save_ptr)
}
return token;
}
-libc_hidden_proto(strtok_r)
libc_hidden_def(strtok_r)
diff --git a/libc/string/i386/memchr.c b/libc/string/i386/memchr.c
index b2fde07ad..229d42919 100644
--- a/libc/string/i386/memchr.c
+++ b/libc/string/i386/memchr.c
@@ -32,6 +32,7 @@
#include <string.h>
+libc_hidden_proto(memchr)
void *memchr(const void *cs, int c, size_t count)
{
int d0;
@@ -47,5 +48,4 @@ void *memchr(const void *cs, int c, size_t count)
:"=D" (__res), "=&c" (d0) : "a" (c),"0" (cs),"1" (count));
return __res;
}
-libc_hidden_proto(memchr)
libc_hidden_def(memchr)
diff --git a/libc/string/i386/memcpy.c b/libc/string/i386/memcpy.c
index 837d7d65b..a2b8d3d8c 100644
--- a/libc/string/i386/memcpy.c
+++ b/libc/string/i386/memcpy.c
@@ -32,6 +32,7 @@
#include <string.h>
+libc_hidden_proto(memcpy)
void *memcpy(void * to, const void * from, size_t n)
{
int d0, d1, d2;
@@ -49,5 +50,4 @@ void *memcpy(void * to, const void * from, size_t n)
: "memory");
return (to);
}
-libc_hidden_proto(memcpy)
libc_hidden_def(memcpy)
diff --git a/libc/string/i386/memmove.c b/libc/string/i386/memmove.c
index 8122803ef..a26fe2be1 100644
--- a/libc/string/i386/memmove.c
+++ b/libc/string/i386/memmove.c
@@ -32,6 +32,7 @@
#include <string.h>
+libc_hidden_proto(memmove)
void *memmove(void *dest, const void *src, size_t n)
{
int d0, d1, d2;
@@ -55,5 +56,4 @@ void *memmove(void *dest, const void *src, size_t n)
:"memory");
return dest;
}
-libc_hidden_proto(memmove)
libc_hidden_def(memmove)
diff --git a/libc/string/i386/memset.c b/libc/string/i386/memset.c
index bf527619a..eea48040a 100644
--- a/libc/string/i386/memset.c
+++ b/libc/string/i386/memset.c
@@ -32,6 +32,7 @@
#include <string.h>
+libc_hidden_proto(memset)
void *memset(void *s, int c, size_t count)
{
int d0, d1;
@@ -43,5 +44,4 @@ void *memset(void *s, int c, size_t count)
:"memory");
return s;
}
-libc_hidden_proto(memset)
libc_hidden_def(memset)
diff --git a/libc/string/i386/strcat.c b/libc/string/i386/strcat.c
index 5364c9029..e0b1f3b51 100644
--- a/libc/string/i386/strcat.c
+++ b/libc/string/i386/strcat.c
@@ -32,6 +32,7 @@
#include <string.h>
+libc_hidden_proto(strcat)
char *strcat(char * dest, const char * src)
{
int d0, d1, d2, d3;
@@ -47,5 +48,4 @@ char *strcat(char * dest, const char * src)
: "0" (src), "1" (dest), "2" (0), "3" (0xffffffff):"memory");
return dest;
}
-libc_hidden_proto(strcat)
libc_hidden_def(strcat)
diff --git a/libc/string/i386/strchr.c b/libc/string/i386/strchr.c
index 3f1aa7635..5ed87e816 100644
--- a/libc/string/i386/strchr.c
+++ b/libc/string/i386/strchr.c
@@ -32,6 +32,7 @@
#include <string.h>
+libc_hidden_proto(strchr)
char *strchr(const char *s, int c)
{
int d0;
@@ -49,6 +50,5 @@ char *strchr(const char *s, int c)
:"=a" (__res), "=&S" (d0) : "1" (s),"0" (c));
return __res;
}
-libc_hidden_proto(strchr)
libc_hidden_def(strchr)
strong_alias(strchr,index)
diff --git a/libc/string/i386/strcmp.c b/libc/string/i386/strcmp.c
index 81cc16c7f..e3cf88715 100644
--- a/libc/string/i386/strcmp.c
+++ b/libc/string/i386/strcmp.c
@@ -32,6 +32,7 @@
#include <string.h>
+libc_hidden_proto(strcmp)
int strcmp(const char *cs, const char *ct)
{
int d0, d1;
@@ -51,7 +52,6 @@ int strcmp(const char *cs, const char *ct)
:"1" (cs),"2" (ct));
return __res;
}
-libc_hidden_proto(strcmp)
libc_hidden_def(strcmp)
#ifndef __UCLIBC_HAS_LOCALE__
diff --git a/libc/string/i386/strcpy.c b/libc/string/i386/strcpy.c
index 361dcdbb9..9e2b81009 100644
--- a/libc/string/i386/strcpy.c
+++ b/libc/string/i386/strcpy.c
@@ -32,6 +32,7 @@
#include <string.h>
+libc_hidden_proto(strcpy)
char *strcpy(char * dest, const char * src)
{
int d0, d1, d2;
@@ -44,5 +45,4 @@ char *strcpy(char * dest, const char * src)
:"0" (src),"1" (dest) : "memory");
return dest;
}
-libc_hidden_proto(strcpy)
libc_hidden_def(strcpy)
diff --git a/libc/string/i386/strlen.c b/libc/string/i386/strlen.c
index 2ef57e3f8..f0767b600 100644
--- a/libc/string/i386/strlen.c
+++ b/libc/string/i386/strlen.c
@@ -32,6 +32,7 @@
#include <string.h>
+libc_hidden_proto(strlen)
size_t strlen(const char *s)
{
int d0;
@@ -44,5 +45,4 @@ size_t strlen(const char *s)
:"=c" (__res), "=&D" (d0) :"1" (s),"a" (0), "0" (0xffffffff));
return __res;
}
-libc_hidden_proto(strlen)
libc_hidden_def(strlen)
diff --git a/libc/string/i386/strncat.c b/libc/string/i386/strncat.c
index 4a6dac31e..c1061421e 100644
--- a/libc/string/i386/strncat.c
+++ b/libc/string/i386/strncat.c
@@ -32,6 +32,7 @@
#include <string.h>
+libc_hidden_proto(strncat)
char *strncat(char * dest,
const char * src, size_t count)
{
@@ -57,5 +58,4 @@ char *strncat(char * dest,
: "memory");
return dest;
}
-libc_hidden_proto(strncat)
libc_hidden_def(strncat)
diff --git a/libc/string/i386/strncmp.c b/libc/string/i386/strncmp.c
index 96b966e30..0c42134e1 100644
--- a/libc/string/i386/strncmp.c
+++ b/libc/string/i386/strncmp.c
@@ -32,6 +32,7 @@
#include <string.h>
+libc_hidden_proto(strncmp)
int strncmp(const char *cs, const char *ct, size_t count)
{
register int __res;
@@ -54,5 +55,4 @@ int strncmp(const char *cs, const char *ct, size_t count)
:"1" (cs),"2" (ct),"3" (count));
return __res;
}
-libc_hidden_proto(strncmp)
libc_hidden_def(strncmp)
diff --git a/libc/string/i386/strncpy.c b/libc/string/i386/strncpy.c
index dde4d3ee1..c061fe37e 100644
--- a/libc/string/i386/strncpy.c
+++ b/libc/string/i386/strncpy.c
@@ -32,6 +32,7 @@
#include <string.h>
+libc_hidden_proto(strncpy)
char *strncpy(char * dest, const char * src, size_t count)
{
int d0, d1, d2, d3;
@@ -52,5 +53,4 @@ char *strncpy(char * dest, const char * src, size_t count)
:"0" (src),"1" (dest),"2" (count) : "memory");
return dest;
}
-libc_hidden_proto(strncpy)
libc_hidden_def(strncpy)
diff --git a/libc/string/i386/strnlen.c b/libc/string/i386/strnlen.c
index 7d9042fa4..6b565dbd8 100644
--- a/libc/string/i386/strnlen.c
+++ b/libc/string/i386/strnlen.c
@@ -33,6 +33,7 @@
#define _GNU_SOURCE
#include <string.h>
+libc_hidden_proto(strnlen)
size_t strnlen(const char *s, size_t count)
{
int d0;
@@ -51,5 +52,4 @@ size_t strnlen(const char *s, size_t count)
:"c" (s),"1" (count));
return __res;
}
-libc_hidden_proto(strnlen)
libc_hidden_def(strnlen)
diff --git a/libc/string/i386/strrchr.c b/libc/string/i386/strrchr.c
index 094f4418e..7af990bd7 100644
--- a/libc/string/i386/strrchr.c
+++ b/libc/string/i386/strrchr.c
@@ -32,6 +32,7 @@
#include <string.h>
+libc_hidden_proto(strrchr)
char *strrchr(const char *s, int c)
{
int d0, d1;
@@ -47,6 +48,5 @@ char *strrchr(const char *s, int c)
:"=g" (__res), "=&S" (d0), "=&a" (d1) :"0" (0),"1" (s),"2" (c));
return __res;
}
-libc_hidden_proto(strrchr)
libc_hidden_def(strrchr)
strong_alias(strrchr,rindex)
diff --git a/libc/string/powerpc/memcpy.c b/libc/string/powerpc/memcpy.c
index 8ed03e526..ed8022313 100644
--- a/libc/string/powerpc/memcpy.c
+++ b/libc/string/powerpc/memcpy.c
@@ -21,6 +21,7 @@
#include <string.h>
+libc_hidden_proto(memcpy)
void *memcpy(void *to, const void *from, size_t n)
/* PPC can do pre increment and load/store, but not post increment and load/store.
Therefore use *++ptr instead of *ptr++. */
@@ -76,5 +77,4 @@ void *memcpy(void *to, const void *from, size_t n)
goto copy_chunks;
goto lessthan8;
}
-libc_hidden_proto(memcpy)
libc_hidden_def(memcpy)
diff --git a/libc/string/powerpc/memmove.c b/libc/string/powerpc/memmove.c
index 10e46867c..5f21f5f2f 100644
--- a/libc/string/powerpc/memmove.c
+++ b/libc/string/powerpc/memmove.c
@@ -21,6 +21,7 @@
#include <string.h>
+libc_hidden_proto(memmove)
void *memmove(void *to, const void *from, size_t n)
{
unsigned long rem, chunks, tmp1, tmp2;
@@ -72,5 +73,4 @@ void *memmove(void *to, const void *from, size_t n)
goto copy_chunks;
goto lessthan8;
}
-libc_hidden_proto(memmove)
libc_hidden_def(memmove)
diff --git a/libc/string/powerpc/memset.c b/libc/string/powerpc/memset.c
index 47df2b607..891e0b8aa 100644
--- a/libc/string/powerpc/memset.c
+++ b/libc/string/powerpc/memset.c
@@ -21,6 +21,8 @@
#include <string.h>
+libc_hidden_proto(memset)
+
static inline int expand_byte_word(int c){
/* this does:
c = c << 8 | c;
@@ -78,5 +80,4 @@ void *memset(void *to, int c, size_t n)
goto copy_chunks;
goto lessthan8;
}
-libc_hidden_proto(memset)
libc_hidden_def(memset)
diff --git a/libc/string/strcasecmp.c b/libc/string/strcasecmp.c
index 42d7230ae..333d3159c 100644
--- a/libc/string/strcasecmp.c
+++ b/libc/string/strcasecmp.c
@@ -33,15 +33,16 @@ libc_hidden_proto(tolower)
libc_hidden_proto(strcasecmp_l)
+libc_hidden_proto(strcasecmp)
int strcasecmp(register const Wchar *s1, register const Wchar *s2)
{
return strcasecmp_l(s1, s2, __UCLIBC_CURLOCALE);
}
-libc_hidden_proto(strcasecmp)
libc_hidden_def(strcasecmp)
#else /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */
+libc_hidden_proto(__XL_NPP(strcasecmp))
int __XL_NPP(strcasecmp)(register const Wchar *s1, register const Wchar *s2
__LOCALE_PARAM )
{
@@ -66,7 +67,6 @@ int __XL_NPP(strcasecmp)(register const Wchar *s1, register const Wchar *s2
return r;
#endif
}
-libc_hidden_proto(__XL_NPP(strcasecmp))
libc_hidden_def(__XL_NPP(strcasecmp))
#endif /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */
diff --git a/libc/string/strlcpy.c b/libc/string/strlcpy.c
index 2f3d29fff..a622d0c00 100644
--- a/libc/string/strlcpy.c
+++ b/libc/string/strlcpy.c
@@ -11,6 +11,7 @@
# define Wstrlcpy __wcslcpy
# define Wstrxfrm wcsxfrm
#else
+libc_hidden_proto(strlcpy)
# define Wstrlcpy strlcpy
# define Wstrxfrm strxfrm
#endif
@@ -47,7 +48,6 @@ size_t Wstrlcpy(register Wchar *__restrict dst,
return src - src0;
}
#ifndef WANT_WIDE
-libc_hidden_proto(strlcpy)
libc_hidden_def(strlcpy)
#ifndef __UCLIBC_HAS_LOCALE__
strong_alias(strlcpy,strxfrm)
diff --git a/libc/string/strncasecmp.c b/libc/string/strncasecmp.c
index 1de214c73..2133b4ebd 100644
--- a/libc/string/strncasecmp.c
+++ b/libc/string/strncasecmp.c
@@ -33,15 +33,16 @@ libc_hidden_proto(tolower)
libc_hidden_proto(strncasecmp_l)
+libc_hidden_proto(strncasecmp)
int strncasecmp(register const Wchar *s1, register const Wchar *s2, size_t n)
{
return strncasecmp_l(s1, s2, n, __UCLIBC_CURLOCALE);
}
-libc_hidden_proto(strncasecmp)
libc_hidden_def(strncasecmp)
#else /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */
+libc_hidden_proto(__XL_NPP(strncasecmp))
int __XL_NPP(strncasecmp)(register const Wchar *s1, register const Wchar *s2,
size_t n __LOCALE_PARAM )
{
@@ -69,7 +70,6 @@ int __XL_NPP(strncasecmp)(register const Wchar *s1, register const Wchar *s2,
return r;
#endif
}
-libc_hidden_proto(__XL_NPP(strncasecmp))
libc_hidden_def(__XL_NPP(strncasecmp))
#endif /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */