Greg Stein <[EMAIL PROTECTED]> writes:

> On Fri, Dec 21, 2001 at 05:15:46PM -0500, Cliff Woolley wrote:
> > On Fri, 21 Dec 2001, Brad Nicholes wrote:
> > 
> > > realizing that this is just a hack.  If we are going to use the AWK
> > > script to produce the export list, then it needs to be much smarter.  It
> > > has to obey the same preprocessor rules as the compiler does.  AP_DEBUG
> > 
> > Forgive me for stating the obvious, but if this is the case, why not just
> > run the awk script through cpp?
> 
> How about if we link the library and then use "nm" to list all the symbols
> and then find all symbols that start with "apr_" and export those.
> 
> That will give us a *precise* set of symbols, without worry for whatever set
> of conditions were present at preprocessor or compilation time.

One minor (?) problem with a solution based on an nm-like tool is that
it would expose some private functions (e.g., apr_unix_file_cleanup).
Personally I wouldn't find it appropriate for APR apps to be using
something like that (better example: apr_inet_pton()).  If it takes a
system dependent on export files to break them, then so be it.  We had
this with apache 1.3 where mod_perl (?) was calling some non-API
routine.  When somebody tried to put the symbol in httpd.exp so that
the module would work on AIX, it became obvious what was going on and
the problem was detected.

The biggest problem I have with the current mechanism is that the
perpetrators of an awk solution don't seem to be the ones that get to
keep it working :)

-- 
Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Reply via email to