You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jean-Jacques Clar <JJ...@novell.com> on 2004/07/14 19:24:37 UTC
strsep() not portable? (was: cvs commit: httpd-2.0/server
config.c core.c request.c)
> Index: core.c
> + char *w = strsep(&p, ",");
strsep() seems to be platform dependant. That function does not
exist on NetWare, and I don't think it exists on Windows.
It should at least be made an APR function.
Here is the notes from the man page:
The strsep() function was introduced as a replacement for
strtok(), since the latter cannot handle empty fields.
(However, strtok() conforms to ANSI-C and hence is more
portable.)
Thanks,
JJ
Re: strsep() not portable? (was: cvs commit: httpd-2.0/server
config.c core.c request.c)
Posted by André Malo <nd...@perlig.de>.
* "Jean-Jacques Clar" <JJ...@novell.com> wrote:
> > Index: core.c
> > + char *w = strsep(&p, ",");
>
> strsep() seems to be platform dependant. That function does not
> exist on NetWare, and I don't think it exists on Windows.
> It should at least be made an APR function.
Uh, oh, right. There's apr_strtok for such tasks, which is also thread safe.
nd
--
"Das Verhalten von Gates hatte mir bewiesen, dass ich auf ihn und seine
beiden Gefährten nicht zu zählen brauchte" -- Karl May, "Winnetou III"
Im Westen was neues: <http://pub.perlig.de/books.html#apache2>