httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Buffered I/O in APR
Date Mon, 10 Apr 2000 13:49:26 GMT

> I'm not entirely clear on how the canonical error codes will look. My
> original idea was that errno codes would be the canonical value, making
> ap_canonical_error() a no-op on unix & much like my os2errno() function
> currently in file_io/os2/maperrorcode.c. What's your idea?
> (Hmmm, probably should take this back to new-httpd).

Since the canonical error stuff is unclear to many people, I am going to
post here explaining what I envision this stuff to be, and I will be
putting this in the APRDesign doc later today.

The problem with converting to a canonical error message, is that ALL
paltforms need to have definitions for ALL of the canonical error
codes.  There is not set of error values which all platforms
share.  However, there is a set of values that most platforms share, the
errno values.

The only problem with errno values is that some platforms just don't
implement the whole set of errno.  For platforms that implement all of
errno, the canonical error values are errno.  For those platforms that
only implement a subset of errno values (Windows and possibly OS/2), we
use errno when possible and we fill out the rest of the errno values.

This is waht APR_OS_START_CANONERR is used for.  For example, Windows does
not support the errno value ETXTBSY (text file busy).  APR will define

This is the purpose of APR_OS_START_CANONERR.  If it is unnecessary, it
can easily be removed later.  If it is necessary we can keep it
around.  The reason for having it was that when we originally started APR,
I was told Windows didn't have a complete errno implementation.  Having
actually looked at the errno header file for Windows, it looks like it
implements most if not all errno values.  There are some values that
aren't there, for example Windows has no errno defined for the number
35.  On Linux this is EDEADLK, which is defined as 36 on Windows.  There
is some errno value which isn't defined on Windows, but without an
exaustive search, I can't really find out what value that is.

I hope that clears things up for everybody.


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message