You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ryan Bloom <rb...@raleigh.ibm.com> on 1999/10/19 13:47:34 UTC

Re: Change to Error logging routines. (fwd)

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
there.

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.  :)

Ryan

> 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		rbb@raleigh.ibm.com
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.