httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: ap_strerror implementation..
Date Wed, 19 Apr 2000 21:35:22 GMT
> char *ap_strerror(ap_status_t statcode, ap_pool_t *p)
> {
>     if (statcode < APR_OS_START_ERROR) {
>         return strerror(statcode);
>     }
>     else if (statcode < APR_OS_START_USEERR) {
>         return apr_error_string(statcode);
>     }
>     else if (statcode < APR_OS_START_SYSERR) {
>         char *errstr = ap_pstrdup(p, 
>                                    "APR does not understand this error code");
>         return errstr;
>     }
>     else {
>         char *errstr;
>         SYS_ERR_STRING(statcode - APR_OS_START_SYSERR, p);
>         return errstr;
>     }
> }

Why not const char * instead of char *?

Why make a copy of "APR does not understand this error code"? (I guess
because your return value is char *)  Are you going to want to make
copies of strings for APR messages too?

Why include a Win32 implementation in the same file as the Unix
implementation?  "Everybody" agrees with the proper segregation of
implementation.  The mailing list archives are full of people speaking
up in favor of that.

Why not include a Win32 implementation that is closer to working (or
was GetErrorString() added after VC++ 5.0)?  I posted one a while back.  

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

Mime
View raw message