From new-httpd-return-1829-apmail-new-httpd-archive=apache.org@apache.org Sat Apr 01 17:44:27 2000 Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 4549 invoked by uid 500); 1 Apr 2000 17:44: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 4535 invoked from network); 1 Apr 2000 17:44:25 -0000 Date: Sat, 1 Apr 2000 12:44:18 -0500 Message-Id: <200004011744.MAA07863@k5.localdomain> X-Authentication-Warning: k5.localdomain: trawick set sender to trawickj@bellsouth.net using -f From: Jeff Trawick To: rbb@apache.org CC: new-httpd@apache.org In-reply-to: (rbb@apache.org) Subject: Re: ap_status_t for Win32 Reply-to: trawickj@bellsouth.net References: X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N > This is the general approach which the error code started with. The > general idea being that all errno errors should be valid across > platforms. yessir > This only works one of two ways: > > 1) Everybody returns the errno value (bad idea) > > 2) Everybody returns system error codes, and we have a function that > converts to errno values for a small subset. This function should not be > called often. > > I just re-read Brian's last post where he outlines the advantages of his > scheme. I think the problem is Brian didn't understand what I thought I > said. :-) > > I am all for Brian's scheme, where an offset is defined for OSCODE's. I > just think that most if not all of the primitives are there to support it. > > We have four definitions in apr_errno.h. Those are currently hard-coded > the same for all platforms. These should be different for each platform. > Then, if we want to add a fifth definition for those platforms that need > it, we can. yessir > > I don't think we need bit masks, just integer values. I still haven't see > an argument that bitmasks are important. On Win32, Microsoft says that the OS can return any error value except when bit 29 is on. Some sample code posted previously has played with bit 29 via masks; other sample code (like what I posted this morning) has played with bit 29 via offsets to be added. Regardless of the mechanism, it is clear that bit 29 is important if we need to be able to represent certain OS error codes in ap_status_t. The ones that need to be represented are the ones that can't be mapped to the appropriate APR errno-style return code. I think we were typing at the same time a few minutes ago... In that post, I mentioned that we can use W. Rowe's idea of inverting the meaning of bit 29 on Win32 so that "return errno" works. As you say, this all works basically like what had been outlined in apr_errno.h all along, but with some details fleshed out. I'm quite interested in your take on the concept of a function on non-UNIX which maps OS errors to the appropriate APR errno-style return code... -- Jeff Trawick | trawick@ibm.net | PGP public key at web site: http://www.geocities.com/SiliconValley/Park/9289/ Born in Roswell... married an alien...