diff options
author | tjr <tjr@FreeBSD.org> | 2002-09-07 02:53:19 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-09-07 02:53:19 +0000 |
commit | 91c2f6f1aa0177537a6cb941ba88b156acab8b76 (patch) | |
tree | b575cb0226b7a76dbf278ba5d57ab3727b5bb384 /lib/libc/string | |
parent | 7ab2008d6a7ee7ec8d7b9e04288c6237f96a27c9 (diff) | |
download | FreeBSD-src-91c2f6f1aa0177537a6cb941ba88b156acab8b76.zip FreeBSD-src-91c2f6f1aa0177537a6cb941ba88b156acab8b76.tar.gz |
Call strtok_r() via a libc private name from within strtok().
Diffstat (limited to 'lib/libc/string')
-rw-r--r-- | lib/libc/string/strtok.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libc/string/strtok.c b/lib/libc/string/strtok.c index e17e904..1a29cc5 100644 --- a/lib/libc/string/strtok.c +++ b/lib/libc/string/strtok.c @@ -48,8 +48,12 @@ __FBSDID("$FreeBSD$"); #endif #include <string.h> +char *__strtok_r(char *, const char *, char **); + +__weak_reference(__strtok_r, strtok_r); + char * -strtok_r(char *s, const char *delim, char **last) +__strtok_r(char *s, const char *delim, char **last) { char *spanp, *tok; int c, sc; @@ -99,7 +103,7 @@ strtok(char *s, const char *delim) { static char *last; - return (strtok_r(s, delim, &last)); + return (__strtok_r(s, delim, &last)); } #ifdef DEBUG_STRTOK |