summaryrefslogtreecommitdiff
path: root/libc/string/generic/strtok_r.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-01-03 14:46:56 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-01-03 14:46:56 +0000
commitfe68563b9a070fedf117c8738652587945427bb3 (patch)
tree300a37bb5f0cd28a984900d8e48925de2478fd1e /libc/string/generic/strtok_r.c
parent8356ff4a52a5df7e5e84ac13f7dad7c29e0bda9c (diff)
Use strong_alias everywhere instead of .global/.set. Correct some cases where the non-hidden version was used.
Diffstat (limited to 'libc/string/generic/strtok_r.c')
-rw-r--r--libc/string/generic/strtok_r.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/libc/string/generic/strtok_r.c b/libc/string/generic/strtok_r.c
index 56eb64bb9..1a11166dd 100644
--- a/libc/string/generic/strtok_r.c
+++ b/libc/string/generic/strtok_r.c
@@ -17,15 +17,9 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define rawmemchr __rawmemchr
-#define strspn __strspn
-#define strpbrk __strpbrk
-
#define _GNU_SOURCE
#include <string.h>
-#undef strtok_r
-
/* Parse S into tokens separated by characters in DELIM.
If S is NULL, the saved pointer in SAVE_PTR is used as
the next starting point. For example:
@@ -44,7 +38,7 @@ char attribute_hidden *__strtok_r (char *s, const char *delim, char **save_ptr)
s = *save_ptr;
/* Scan leading delimiters. */
- s += strspn (s, delim);
+ s += __strspn (s, delim);
if (*s == '\0')
{
*save_ptr = s;
@@ -53,10 +47,10 @@ char attribute_hidden *__strtok_r (char *s, const char *delim, char **save_ptr)
/* Find the end of the token. */
token = s;
- s = strpbrk (token, delim);
+ s = __strpbrk (token, delim);
if (s == NULL)
/* This token finishes the string. */
- *save_ptr = rawmemchr (token, '\0');
+ *save_ptr = __rawmemchr (token, '\0');
else
{
/* Terminate the token and make *SAVE_PTR point past it. */
@@ -66,4 +60,4 @@ char attribute_hidden *__strtok_r (char *s, const char *delim, char **save_ptr)
return token;
}
-strong_alias(__strtok_r, strtok_r)
+strong_alias(__strtok_r,strtok_r)