httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <>
Subject Re: Change to Error logging routines. (fwd)
Date Tue, 19 Oct 1999 11:47:34 GMT

Ever had one of those days?

The REAL reason we don't want to use errno has escaped me since I wrote
the original message last night, but I kept feeling that I was missing
something in all of my responses.  Well, I figured it out.

Some platforms don't use ERRNO!  A lot of what APR gives us is the ability
to use native API's on some platforms.  On Windows, for example, we use
CreateFile instead of open.  CreateFile doesn't set errno as far as I
know.  CreateFile uses the (get|set)LastError function.  We have to go
through a bit of pain to get that value into an errno equivalent, but the
REAL reason for not relying on errno outside of APR, is that it may not be

The way APR is currently written, we keep all of the current errno values,
and we are allowed to add more ourselves.  But, we still need to pass the
error value into the logging functions, because otherwise our error code
isn't really portable.

I need to sleep more I think, this should have been obvious to me.  :)


> What is important to me is that no error information be lost.
> Since there is no way to come up with a table of APR error codes that
> includes all possible system-dependent error conditions, this implies
> that we need to keep around both the errno and any simplified APR code.
> I'm not sure how that maps to the current implementation.
> ....Roy

Ryan Bloom
4205 S Miami Blvd	
RTP, NC 27709		It's a beautiful sight to see good dancers 
			doing simple steps.  It's a painful sight to
			see beginners doing complicated patterns.	

View raw message