summaryrefslogtreecommitdiffstats
path: root/libc/string/generic/strtok_r.c
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-08-23 03:38:46 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-08-23 03:38:46 +0000
commitec91d8b59d5c8b314bc50cc6feedeeaf6fe3493c (patch)
tree4451a3cce162112c845dea0b838217b5fc98eb0c /libc/string/generic/strtok_r.c
parent3036a4319e8f59db769609c6190169b38d997093 (diff)
downloaduClibc-alpine-ec91d8b59d5c8b314bc50cc6feedeeaf6fe3493c.tar.bz2
uClibc-alpine-ec91d8b59d5c8b314bc50cc6feedeeaf6fe3493c.tar.xz
Merge from trunk.
Diffstat (limited to 'libc/string/generic/strtok_r.c')
-rw-r--r--libc/string/generic/strtok_r.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libc/string/generic/strtok_r.c b/libc/string/generic/strtok_r.c
index 0ab18b35e..bae394a80 100644
--- a/libc/string/generic/strtok_r.c
+++ b/libc/string/generic/strtok_r.c
@@ -22,7 +22,13 @@
libc_hidden_proto(strtok_r)
libc_hidden_proto(strspn)
libc_hidden_proto(strpbrk)
+#ifdef __USE_GNU
+# define __rawmemchr rawmemchr
libc_hidden_proto(rawmemchr)
+#else
+# define __rawmemchr strchr
+libc_hidden_proto(strchr)
+#endif
/* Parse S into tokens separated by characters in DELIM.
If S is NULL, the saved pointer in SAVE_PTR is used as
@@ -54,7 +60,7 @@ char *strtok_r (char *s, const char *delim, char **save_ptr)
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. */