httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject Re: APR errno handling finished.
Date Thu, 06 Apr 2000 14:56:37 GMT

> They way I proposed, errno is the 'primary' code on all platforms, which
> makes the whole concept unnecessary. OS/2 & Win32 are almost identical in
> their error codes. How can it make sense for them to be handled
> differetnly? Why should the use of errno on Windows be banned?

The concept is not unecessary.  Take a platform that has multiple error
values which overlap.  Your proposal only allows for two classes of error
values, system and errno.  This doesn't work everywhere.  

Why should OS/2 and Windows be different, because they are different.
OS/2 is using some of APR's unix code.  Windows is not.  If Windows wants
to use some of APR's unix code, then they too would have to use errno as
their primary error value.

> >primary values are reported as is.  Any platform which uses Unix code
> >would have to have a primary error value that uses errno values.
> >
> >supplemental values get the offset added.  By definition if the OS/2 error
> >values aren't primary error values, they are supplemental.
> 
> 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.

> I still think my scheme is much simpler, cleaner, and allows everything we
> want. With the only problem of possible code overflow, it should be easy to
> prove it a non-issue by checking the code range of all platforms. Win32
> looks clear, OS/2 never goes over 2^16. What about BeOS?

See above, this doesn't provide everything we want.  I'll give another
example where this doesn't provide everything we want now:

Not all platforms provide a complete errno set.  We need a place to
redefine all the errno values that a given system doesn't provide for us.
This is whay APR_OS_START_SYSERR is currently being used for.

If we demand that all platforms use errno as the canonical error value,
then we also need to make sure that all platforms also define all of the
errno values that are needed.  We therefore also need a place that we can
do this cleanly.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------



Mime
View raw message