You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Amit Athavale <am...@lycos.com> on 2001/08/20 14:28:24 UTC

non apr functions in 2.0.16

Hi,

Sorry i m referring little old code ,but  rite now i am looking into it. I have some doubts in using utility functions.

As far as my knowledge in 2.X apr lib is used to keep apache as portable as possible. But at some places i found some C lib function are directly used instead of apr functions.

e.g In mod_dav :

strcmp(child->name, "remove") why strcmp here ??
when u have "apr_strnatcmp" available which is portable. 

I hope this time i have posted to rite mailing list.

Thanks
Amit





Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/

Re: non apr functions in 2.0.16

Posted by Jeff Trawick <tr...@attglobal.net>.
"Amit Athavale" <am...@lycos.com> writes:

> Sorry i m referring little old code ,but  rite now i am looking into it. I have some doubts in using utility functions.
> 
> As far as my knowledge in 2.X apr lib is used to keep apache as portable as possible. But at some places i found some C lib function are directly used instead of apr functions.
> 
> e.g In mod_dav :
> 
> strcmp(child->name, "remove") why strcmp here ??
> when u have "apr_strnatcmp" available which is portable. 

strcmp() is much faster than apr_strnatcmp() (they perform different
functions; look at the sources to apr_strnatcmp())

strcmp() is more portable than APR (every ANSI/ISO C system has
strcmp()); not every ANSI C system can run APR

Use APR where appropriate, but don't forget strxxx(), memxxx(), etc.

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...