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: APR errno handling finished.
Date Thu, 06 Apr 2000 16:10:35 GMT
On Thu, 6 Apr 2000 11:38:06 -0400 (EDT), rbb@apache.org wrote:

>> >> That would be confusing. The vast majority of OS/2 APR code returns OS/2
>> >> error codes.
>> >
>> >What would be confusing?  The words I am using?  Change them.  The concept
>> >is the same as what you suggested.
>> 
>> Calling the errno code 'primary' and the OS/2 codes 'supplemental', that's
>> what I think would be confusing.
>
>Brian,  can we both take a step back and agree that we are basically
>talking about the same concepts here?

Sure. I'd also like to see input from others. So far it's been pretty much
you, me & Jeff.



>Here are the differences I see.
>
>1)  I want systems to be allowed to define their own values for where
>error codes go.  (eg each platform can have it's own defs for the macros
>in apr_errno.h)

All the #define's are wrapped in #ifndef's so they could be overridden in
apr.h if necessary. I think it would be nice if all platforms used the same
values for cleanliness but if a real need can be demonstrated I won't
complain.



>2)  I am using a naming scheme you dislike (primary/supplemental).

A minor point but yes.


>3)  I am providing a separate space for errno values that are not defined
>on a given system.  You would like those put in with APR error codes.

I'm not particularly bothered about that one, it seems like a good idea at
the time. I just pointed out that I'd put them somewhere safe in my patch.



>I think that's everyplace we disagree., here are the compromises I see so
>that we can get a patch committed.  :-)
>
>1)  Default everybody uses the same values for the macros in apr_errno.h.
>If later on, somebody has a valid reason for using different values, they
>can.

+1



>2)  Let's change the terminology.  instead of primary/supplemental, let's
>call them errno/system (on unix, system will be h_errno).

+1


>I think three is the only sticking point left.
>
>> If you take a look at the patch I posted you'll see that I'd put missing
>> errno values into the APR error code space, EG
>> 
>> #ifdef ENOTSUP
>> #define APR_ENOTSUP ENOTSUP
>> #else
>> #define APR_ENOTSUP (APR_OS_START_ERROR + 151)
>> #endif
>
>I dislike this.  It messes up the APR_error codes, because some platforms
>will have gaps in their APR_ERROR section while others won't.  However I
>am willing to live with it for now.  I reserve the right to complain about
>it in the future though.  :-)

I don't actually care where they go as long as they don't conflict with
anything else. Putting another section in would have made my nice diagram
too wide though :)



>If I repost with those changes and the appropriate doc changes, will you
>remove your -1?

The main reason for the -1 was that your original proposal prevented
sharing the default unix code on non-unix platforms. As long as errno
values occupy 0->n the -1 is removed. The rest is far less consequential.

-- 
 ______________________________________________________________________________
 |  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