httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: non apr functions in 2.0.16
Date Mon, 20 Aug 2001 12:39:46 GMT
"Amit Athavale" <amit_athavale@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...

Mime
View raw message