httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: eek. exports.c (was: Re: cvs commit: ...)
Date Fri, 17 Nov 2000 13:29:38 GMT
Greg Stein <gstein@lyra.org> writes:

> Urk.
> 
> This isn't right. Now a user of APR will be able to link when a function
> isn't supposed to be available. Before, we could die with a compile-time
> error (missing prototype) or a link-time error (missing function). But
> now... the user won't know a problem exists until runtime.

If they died before with a compile-time error, they still will.

If they died before with a link-time error, they ignored compile-time
warnings (missing prototype), right?  (yes, we went backwards, but not
terribly far)

> Why don't we just have exports.c define the functions (in the appropriate
> #if stuff) if they don't exist? No reason to put them into APR.

Manual or automatically generated?  How do get the right #if stuff in
there with something which is automatically generated?

We could replace the manually-maintained support/httpd.exp with a
table that has an optional column for feature test macros which must
be true, then automatically generate an appropriate httpd.exp and
exports.c. 

e.g.,

apr_create_socket
apr_send
apr_sendfile            APR_HAS_SENDFILE
apr_create_thread       APR_HAS_THREADS
blah

Heck, we could generate Win32's aprlib.def from this too.

-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Mime
View raw message