httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Havard" <bri...@kheldar.apana.org.au>
Subject Re: cvs commit: apache-2.0/src/lib/apr/include apr_errno.h
Date Thu, 06 Apr 2000 00:02:00 GMT
On Wed, 5 Apr 2000 19:43:05 -0400 (EDT), rbb@apache.org wrote:

>> >> >It is a feature, but it doesn't work.  This is where APR started
>> >> >originally with its error codes, and it was deemed not flexible enough.
>> >> >Originally, all systems used the same values for reporting errors, and
it
>> >> >was flawed.  It couldn't work with Windows, and it looks like we are
>> >> >heading back to that same condition now.
>> >> 
>> >> I've yet to see any reason WHY it doesn't work.
>> >
>> >Currently, we set APR_OS_START_ERROR to be 4000.  I know Windows has error
>> >codes that are in the 4000's.  This is why it doesn't work.
>> 
>> Yes it does. OS codes are stored in ap_status_t offset by some constant
>> that makes room for errno & APR error/status codes. Please take a closer
>> look at what I posted in "Re: ap_status_t for non-unix platforms" ID
>> <200004020510.PAA16054@silk.apana.org.au>
>
>Ah.  Now I see what you are saying, but this doesn't make any sense, IMHO.
>On Windows, for example, we never use errno (well the few times we do, we
>have comments saying it needs to be fixed).  Why should I make space for
>errno on a system that never uses it?  Plus, this doesn't take into
>account overflow in the ap_status_t type.  I don't know how big the
>biggest error code is for Windows, but I would bet that it's big neough
>that if we add an offset to it, we end up with an overflow problem.

I did in fact mention the possibility of overflow in my first message on
the subject but also noted that it would only happen if there were OS error
codes greater than 2^32-APR_OS_START_SYSERR which I think is extremely
unlikely. This is also why I was keeping the offset amount conservative,
just in case.

-- 
 ______________________________________________________________________________
 |  Brian Havard                 |  "He is not the messiah!                   |
 |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
 ------------------------------------------------------------------------------


Mime
View raw message