apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: Purpose of defined APU_HAVE_XXX-DBD in apu.h for dso build
Date Thu, 13 Nov 2008 05:17:31 GMT
Bojan Smojver wrote:
> On Thu, 2008-11-13 at 05:58 +0100, Mladen Turk wrote:
> 
>> Well, any #define in apu.h should state
>> with what option it _HAS/_HAVE compiled in.
> 
> But it does. Even if, DSO, SQLite3 driver will only be compiled if
> relevant _HAVE is defined.
> 
>> In case the sqlite3 was compiled statically the
>> define makes perfect sense, cause apu depends
>> on libsqlite3. In case of module it means nothing
>> cause particular dbd driver support is
>> determined at run-time by successful loading
>> of module driver.
> 
> If you want to see at runtime if you have a particular driver available,
> you should not rely on _HAVE anyway. You should rely on return value of
> apr_dbd_get_driver() function.
> 
> All DBD drivers still need to be compiled together with APU, as we have
> private structures in place that are not available as an API for driver
> writers. So, if it was compiled with APU, it will have a _HAVE.

Exactly... remember, HAVE_ macros predated loadable modules.

Mime
View raw message