diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2006-03-22 15:49:22 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2006-03-22 15:49:22 +0000 |
commit | 55b24e4e95a715b451507f2790d292fa8b1c2c1c (patch) | |
tree | ae6464b93a9b660617b9f7a569276945294dcce7 /libc/string/generic/strtok_r.c | |
parent | 86ea254301f7e2fcd860c4072c0a938b4e048d42 (diff) |
Mark some functions as GNU, provide missing hidden memmem, remove _ISOC99/XOPEN_SOURCE
Diffstat (limited to 'libc/string/generic/strtok_r.c')
-rw-r--r-- | libc/string/generic/strtok_r.c | 8 |
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. */ |