You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Jeff Trawick <tr...@bellsouth.net> on 2001/05/22 13:28:30 UTC

apr_strtok() anyone?

Apache has a couple of modules* which call strtok(), breaking thread
safety on most platforms.  I'd prefer to suck in FreeBSD's strtok.c,
rename strtok_r() to apr_strtok(), and remove the cruft.

APR already has the cool apr_tokenize_to_argv(), but that has much
more expensive semantics.  If strtok[_r] will do the job, then it is
preferable.

Any concerns?

*mod_mime_magic and mod_proxy
-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...


Re: apr_strtok() anyone?

Posted by Graham Leggett <mi...@sharp.fm>.
Greg Stein wrote:

> On Tue, May 22, 2001 at 07:28:30AM -0400, Jeff Trawick wrote:
> > Apache has a couple of modules* which call strtok(), breaking thread
> > safety on most platforms.  I'd prefer to suck in FreeBSD's strtok.c,
> > rename strtok_r() to apr_strtok(), and remove the cruft.
> >
> > APR already has the cool apr_tokenize_to_argv(), but that has much
> > more expensive semantics.  If strtok[_r] will do the job, then it is
> > preferable.
> >
> > Any concerns?
> >
> > *mod_mime_magic and mod_proxy

If it will help with stability in mod_proxy I say go for it.

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."

Re: apr_strtok() anyone?

Posted by Greg Stein <gs...@lyra.org>.
No concerns here!

Cheers,
-g

On Tue, May 22, 2001 at 07:28:30AM -0400, Jeff Trawick wrote:
> Apache has a couple of modules* which call strtok(), breaking thread
> safety on most platforms.  I'd prefer to suck in FreeBSD's strtok.c,
> rename strtok_r() to apr_strtok(), and remove the cruft.
> 
> APR already has the cool apr_tokenize_to_argv(), but that has much
> more expensive semantics.  If strtok[_r] will do the job, then it is
> preferable.
> 
> Any concerns?
> 
> *mod_mime_magic and mod_proxy
> -- 
> Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
>        http://www.geocities.com/SiliconValley/Park/9289/
>              Born in Roswell... married an alien...

-- 
Greg Stein, http://www.lyra.org/