httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Kasichainula <>
Subject Re: cvs commit: apache-2.0/src/modules/standard mod_auth_digest.c
Date Fri, 02 Jun 2000 01:22:43 GMT
On Thu, Jun 01, 2000 at 06:11:03PM -0700, Greg Stein wrote:
> On Thu, 1 Jun 2000, Manoj Kasichainula wrote:
> > OK, how about an apr_notimpl.h that provides these macros? Then the
> > developer can choose.
> Which macros?

macros that provide stubs for unimplemented functions. These macros

> There are three scenarios:
> 1) APR provides the functionality. Cool all around.
> 2) APR does not, I want to know at compile time. Use APR_SHARED_MEMORY.

This is where we disagree. While having the feature macro is nice, I
see no reason to require the programmer to use it.

> 3) APR does not, I want to know at run-time.

I can't think of any point where this is the case. I'd restructure
your three scenarios as:

a) APR provides the function
b) APR doesn't, and I want my code to compile successfully (because my
   code know how to deal with this case)
c) APR doesn't, and I don't want my code to compile successfully

For case (c), I'm suggesting that the functions just not existing is
the best solution. For case (b), I'd suggest having the programmer
either use the feature macro or apr_notimpl.h.

> Arguably, the third scenario can always be rebuilt as (2).

OK, we agree then. :)

> I could see a case where I compile my app, upgrade the APR installed
> library, and want to run without a recompile. Is that a real case? Dunno.

Ugh! I'm iffy on the whole idea of a shared APR library, but I dislike
this for other reasons.

> If you take (2) to its logical extreme, then APR_ENOTIMPL would never
> exist.

It can be useful for cases where the APR function can do something,
but it's not as flexible on some platforms as others. This kind of
problem can only be dealt with at runtime, unfortunately.

> Personally, I favor the case where I don't have to sprinkle my app with


View raw message