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_status_t for Win32
Date Sat, 01 Apr 2000 17:44:18 GMT
> 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...

Mime
View raw message