Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 58492 invoked by uid 500); 19 Apr 2000 21:35:25 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk X-No-Archive: yes Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 58481 invoked from network); 19 Apr 2000 21:35:25 -0000 Date: Wed, 19 Apr 2000 17:35:22 -0400 Message-Id: <200004192135.RAA27877@k5.localdomain> X-Authentication-Warning: k5.localdomain: trawick set sender to trawickj@bellsouth.net using -f From: Jeff Trawick To: new-httpd@apache.org In-reply-to: (rbb@covalent.net) Subject: Re: ap_strerror implementation.. Reply-to: trawickj@bellsouth.net References: X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N > 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...