aboutsummaryrefslogtreecommitdiff
path: root/string
diff options
context:
space:
mode:
authorOndřej Bílka <neleai@seznam.cz>2014-02-28 22:45:33 +0100
committerOndřej Bílka <neleai@seznam.cz>2014-02-28 22:45:33 +0100
commit7b3551e3a8f7278e123757987570c72f1216acc2 (patch)
treeede731662ee3de3bfa4f9da72edea4e3d1cbc76f /string
parentf08e9a26299db1972cb29a7e84b40b0cc9866bf2 (diff)
downloadglibc-7b3551e3a8f7278e123757987570c72f1216acc2.tar
glibc-7b3551e3a8f7278e123757987570c72f1216acc2.tar.gz
glibc-7b3551e3a8f7278e123757987570c72f1216acc2.tar.bz2
glibc-7b3551e3a8f7278e123757987570c72f1216acc2.zip
Make strtok benchmark competive.
We include a generic version of strtok to result which could be faster when underlying primitives are better optimized than current version.
Diffstat (limited to 'string')
-rw-r--r--string/strtok.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/string/strtok.c b/string/strtok.c
index f7f709908f..225344003e 100644
--- a/string/strtok.c
+++ b/string/strtok.c
@@ -22,6 +22,10 @@ static char *olds;
#undef strtok
+#ifndef STRTOK
+# define STRTOK strtok
+#endif
+
/* Parse S into tokens separated by characters in DELIM.
If S is NULL, the last string strtok() was called with is
used. For example:
@@ -32,7 +36,7 @@ static char *olds;
// s = "abc\0=-def\0"
*/
char *
-strtok (s, delim)
+STRTOK (s, delim)
char *s;
const char *delim;
{