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...@ntrnet.net> on 2000/04/05 19:10:56 UTC
APR_EEXIST returns
This is a heads up message. When I originally ported APR to Windows, it
was a proof of concept port, and I purposefully didn't give a great deal
of thought to error returns. Because of this, I took a single APR error
code (APR_EEXIST) and used it whenever I wanted to indicate an error on
Windows inside of APR. This was supposed to be a temporary thing, but
like so much else in, we got busy and forgot this was done.
As a part of my cleanup for APR's error codes, I have just re-discovered
this bug. I will not be cleaning this up immediately, but I will be
cleaning it up soon-ish. What I plan to do is re-implement error codes in
APR, and post a patch today.
When the error codes are done, I will be going back and converting all of
the return APR_EEXIST to return GetLastError(). If somebody else gets
bored and wants an easy job before I get to it, this is an important
change. Along with this, there are two other places where APR_EEXIST is
returned (network_io/beos/poll.c and network_io/unix/poll.c) these will
also need to be changed to return errno (or the equivalent on BeOS).
Ryan
_______________________________________________________________________________
Ryan Bloom rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------
Re: APR_EEXIST returns
Posted by rb...@apache.org.
> Why bother changing "return APR_EEXIST" to "return GetLastError()?"
> If the caller isn't supposed to be able to tell the difference, why
> change it? Why not make ap_status_t boolean while you're at it?
Huh????? Of course the error returned from the function makes a
difference. Just because it isn't the same error on all platforms doesn't
mean you can just return any old error at all. The error has to make
sense or the function that outputs a text string won't know what to do
with it.
> If you mean change "return APR_EEXIST" to "return
> SOME_SILLY_MACRO(GetLastError())" so that today or at some future point
> the caller (or some human looking at a traced return code) can tell
> whether it is some Microsoft error code or something else without
> looking at source code and/or consulting a crystal ball, then I'll be
> happy to make those changes. Just commit a macro and I'm off to the
> races.
I mean everytime we are returning the non-sensical APR_EEXIST in the
windows code needs to be changed to return an error code that actually
makes sense for what happened.
Ryan
_______________________________________________________________________________
Ryan Bloom rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------
Re: APR_EEXIST returns
Posted by Jeff Trawick <tr...@bellsouth.net>.
Why bother changing "return APR_EEXIST" to "return GetLastError()?"
If the caller isn't supposed to be able to tell the difference, why
change it? Why not make ap_status_t boolean while you're at it?
If you mean change "return APR_EEXIST" to "return
SOME_SILLY_MACRO(GetLastError())" so that today or at some future point
the caller (or some human looking at a traced return code) can tell
whether it is some Microsoft error code or something else without
looking at source code and/or consulting a crystal ball, then I'll be
happy to make those changes. Just commit a macro and I'm off to the
races.
--
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
http://www.geocities.com/SiliconValley/Park/9289/
Born in Roswell... married an alien...