Joe Orton wrote:
On Sat, Aug 20, 2005 at 12:29:56PM +0100, Nick Kew wrote:

When writing APR applications, we sometimes need to make heavy
use of APR #ifdefs.

A case in point is mod_dbd, which uses either apr_reslist or a
single persistent connection according to whether APR_HAS_THREADS.
As an APR application, this would be greatly simplified if
apr_reslist fell back to a trivial implementation of a single
resource in the non-threaded case, sparing the application
the burden of dealing with it.


I think it would be far far better to make APR ABI-compatible not just API-compatible across APR_HAS_THREADS/!APR_HAS_THREADS

Hmmm, fair point.

and define ENOTIMPL stubs for everything in the !THREADS case.

I think that needs to be APR_SUCCESS stubs for a null operation.
That's what apps test against, and there's no error condition!

Anyway, having *public API* functions *conditionally* defined in the
APR headers is a booby trap for apps, and should be killed off.

--
Nick Kew

Reply via email to