httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: cvs commit: apache-2.0/src/lib/apr/misc/unix errorcodes.c
Date Thu, 20 Apr 2000 18:44:47 GMT

> Sorry, but I disagree. The primary error code on windows is getlasterror/wsagetlasterror,
> not errno.  I was following the design document and it basically outlines what I think
is

There is no way you were following the design doc, because I just checked
and it says:

"All platform return errno values unchanged.  Each platform can also have
one system error type, which can be returned after an offset is added.
There are five types of error values in APR, each with it's own offset."

> the correct way to proceed (and what I thought we were doing all along).  Since we are
> canonicalizing all the error messages before making decisions on them, I don't see the
> need to impose the "The primary error code on ALL platforms is errno"  rule on the other
> platforms.  We also gain a couple of things by using the native return codes in the <
> APR_OS_START_ERROR range:  Native error numbers can be written to the logs & the
APR code
> looks cleaner because we don't have to litter it with  return (GetLastError() +
> APR_OS_START_SYSERROR);

Please read my last note.  Although the native error code can be written
to the logs, a sensible error string cannot be written to the logs.  The
conversion routines to go from native error codes to canonical error codes
are lossy and we therefore cannot do the conversion and still be able to
generate a valid string.

If you want to output the native error code, then all you have to do is
subtract APR_OS_START_SYSERR in log_error_core.

This approach provides the most flexability to APR app programmers, and
this is flexability that is required, IMHO.

Ryan

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




Mime
View raw message