httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject Re: where to put function to map h_errno values at runtime?
Date Sun, 02 Apr 2000 00:43:06 GMT

> ap_status_t status_from_h_errno(int herr)
> {
>     ap_status_t status;
>     switch(herr) {
>         case TRY_AGAIN:
>             status = APR_EAGAIN;
>             break;
>         case NO_ADDRESS:
>             status = APR_ENOADDRESS;
>             break;
>         (more junk like this)
>     }
>     return status;
> }
> 
> Where does such a beast go?  We don't want to duplicate it through all
> the lib/apr/network_io/foo directories, do we?  Also, where do
> declarations for internal APR functions go?

Yes, we do want to duplicate them throughout every apr/network/foo
directory.  The reason is simple, not every platform needs them.  Any
platform that is actually using h_errno should probably be using the unix
directory anyway.  If they shouldn't be using unix, then they should
duplicate the code.  We had a lot of discussions aobut this, and this is
the current solution.  Declarations go in the .h file within the apr
directory.

Ryan

> 
> (By the way... I'm don't really think that TRY_AGAIN is analogous to EAGAIN,
> but that is a separate issue.)
> 
> -- 
> Jeff Trawick | trawick@ibm.net | PGP public key at web site:
>      http://www.geocities.com/SiliconValley/Park/9289/
>           Born in Roswell... married an alien...
> 


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


Mime
View raw message