diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2005-12-01 20:43:44 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2005-12-01 20:43:44 +0000 |
commit | 8a0b43005ad9ea011b80d66e32b46fb430ddaffb (patch) | |
tree | 418818740042c5dbba244bc1efc760c8d29e47a9 /libc/string | |
parent | 42b161bb716f35948fabd36472fb59cd0a20fa92 (diff) |
Hide mostly used functions
Diffstat (limited to 'libc/string')
-rw-r--r-- | libc/string/generic/memmem.c | 2 | ||||
-rw-r--r-- | libc/string/generic/memmove.c | 4 | ||||
-rw-r--r-- | libc/string/generic/mempcpy.c | 7 | ||||
-rw-r--r-- | libc/string/generic/strcspn.c | 2 | ||||
-rw-r--r-- | libc/string/generic/strrchr.c | 4 | ||||
-rw-r--r-- | libc/string/generic/strsep.c | 2 | ||||
-rw-r--r-- | libc/string/mempcpy.c | 3 | ||||
-rw-r--r-- | libc/string/strdup.c | 4 | ||||
-rw-r--r-- | libc/string/wstring.c | 11 |
9 files changed, 15 insertions, 24 deletions
diff --git a/libc/string/generic/memmem.c b/libc/string/generic/memmem.c index 5f2c1e244..05d7de639 100644 --- a/libc/string/generic/memmem.c +++ b/libc/string/generic/memmem.c @@ -41,7 +41,7 @@ void attribute_hidden *__memmem (const void *haystack, size_t haystack_len, for (begin = (const char *) haystack; begin <= last_possible; ++begin) if (begin[0] == ((const char *) needle)[0] && - !memcmp ((const void *) &begin[1], + !__memcmp ((const void *) &begin[1], (const void *) ((const char *) needle + 1), needle_len - 1)) return (void *) begin; diff --git a/libc/string/generic/memmove.c b/libc/string/generic/memmove.c index a2c38a9b5..0e649a1a9 100644 --- a/libc/string/generic/memmove.c +++ b/libc/string/generic/memmove.c @@ -19,8 +19,6 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define memcpy __memcpy - #include <string.h> #include "memcopy.h" @@ -221,7 +219,7 @@ void attribute_hidden *__memmove (void *dest, const void *src, size_t len) { #if 1 #warning REMINDER: generic-opt memmove assumes memcpy does forward copying! - memcpy(dest, src, len); + __memcpy(dest, src, len); #else /* Copy from the beginning to the end. */ diff --git a/libc/string/generic/mempcpy.c b/libc/string/generic/mempcpy.c index 4eb6db099..f2c860107 100644 --- a/libc/string/generic/mempcpy.c +++ b/libc/string/generic/mempcpy.c @@ -9,11 +9,10 @@ #undef mempcpy -void attribute_hidden *__libc_mempcpy (void *dstpp, const void *srcpp, size_t len) +void attribute_hidden *__mempcpy (void *dstpp, const void *srcpp, size_t len) { - memcpy(dstpp, srcpp, len); + __memcpy(dstpp, srcpp, len); return (void *)(((char *)dstpp) + len); } -strong_alias(__libc_mempcpy, __mempcpy) -strong_alias(__mempcpy, mempcpy) +strong_alias(__mempcpy,mempcpy) diff --git a/libc/string/generic/strcspn.c b/libc/string/generic/strcspn.c index c41132cf6..a10912e25 100644 --- a/libc/string/generic/strcspn.c +++ b/libc/string/generic/strcspn.c @@ -27,7 +27,7 @@ size_t attribute_hidden __strcspn (const char *s, const char *reject) size_t count = 0; while (*s != '\0') - if (strchr (reject, *s++) == NULL) + if (__strchr (reject, *s++) == NULL) ++count; else return count; diff --git a/libc/string/generic/strrchr.c b/libc/string/generic/strrchr.c index bde4d4da0..325be7d48 100644 --- a/libc/string/generic/strrchr.c +++ b/libc/string/generic/strrchr.c @@ -30,10 +30,10 @@ char attribute_hidden *__strrchr (const char *s, int c) /* Since strchr is fast, we use it rather than the obvious loop. */ if (c == '\0') - return strchr (s, '\0'); + return __strchr (s, '\0'); found = NULL; - while ((p = strchr (s, c)) != NULL) + while ((p = __strchr (s, c)) != NULL) { found = p; s = p + 1; diff --git a/libc/string/generic/strsep.c b/libc/string/generic/strsep.c index b46610849..9515fa193 100644 --- a/libc/string/generic/strsep.c +++ b/libc/string/generic/strsep.c @@ -46,7 +46,7 @@ char attribute_hidden *__strsep (char **stringp, const char *delim) else if (*begin == '\0') end = NULL; else - end = strchr (begin + 1, ch); + end = __strchr (begin + 1, ch); } } else diff --git a/libc/string/mempcpy.c b/libc/string/mempcpy.c index 18a1c513c..9f7fab351 100644 --- a/libc/string/mempcpy.c +++ b/libc/string/mempcpy.c @@ -5,11 +5,10 @@ */ #define L_mempcpy -#define Wmempcpy __libc_mempcpy +#define Wmempcpy __mempcpy #include "wstring.c" -strong_alias(__libc_mempcpy, __mempcpy) strong_alias(__mempcpy,mempcpy) #undef L_mempcpy diff --git a/libc/string/strdup.c b/libc/string/strdup.c index 19c2d6ad1..2bf2462fb 100644 --- a/libc/string/strdup.c +++ b/libc/string/strdup.c @@ -9,8 +9,8 @@ #undef Wstrlen #undef Wstrcpy -#define Wstrlen strlen -#define Wstrcpy strcpy +#define Wstrlen __strlen +#define Wstrcpy __strcpy #include "wstring.c" diff --git a/libc/string/wstring.c b/libc/string/wstring.c index 028ffdd42..826c4b8ce 100644 --- a/libc/string/wstring.c +++ b/libc/string/wstring.c @@ -63,11 +63,6 @@ typedef unsigned char __string_uchar_t; #endif -extern void *__memcpy (void *__restrict __dest, - __const void *__restrict __src, size_t __n) attribute_hidden; -extern void *__memmove (void *__dest, __const void *__src, size_t __n) attribute_hidden; -extern void *__memset (void *__s, int __c, size_t __n) attribute_hidden; -extern int __memcmp (__const void *__s1, __const void *__s2, size_t __n) attribute_hidden; extern size_t __strnlen (__const char *__string, size_t __maxlen) attribute_hidden; extern char *__strpbrk (__const char *__s, __const char *__accept) attribute_hidden; extern size_t __strspn (__const char *__s, __const char *__accept) attribute_hidden; @@ -1678,7 +1673,7 @@ int __xpg_strerror_r(int errnum, char *strerrbuf, size_t buflen) if (!strerrbuf) { /* SUSv3 */ buflen = 0; } - i = strlen(s) + 1; + i = __strlen(s) + 1; if (i > buflen) { i = buflen; retval = ERANGE; @@ -2008,7 +2003,7 @@ void attribute_hidden __bcopy(const void *s2, void *s1, size_t n) #endif } -strong_alias(__bcopy, bcopy) +//strong_alias(__bcopy, bcopy) #endif /**********************************************************************/ @@ -3063,7 +3058,7 @@ int __XL(wcscoll) (const Wchar *s0, const Wchar *s1 __LOCALE_PARAM ) #ifdef WANT_WIDE return wcscmp(s0, s1); #else /* WANT_WIDE */ - return strcmp(s0, s1); + return __strcmp(s0, s1); #endif /* WANT_WIDE */ } |