httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <>
Subject Re: non apr functions in 2.0.16
Date Mon, 20 Aug 2001 12:39:46 GMT
"Amit Athavale" <> 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 | | PGP public key at web site:
             Born in Roswell... married an alien...

View raw message