httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Life is hard, and then you die" <ron...@innovation.ch>
Subject Re: cvs commit: apache-2.0/src/modules/standard mod_auth_digest.c
Date Thu, 01 Jun 2000 18:08:32 GMT

On Thu, Jun 01, 2000 at 07:25:11AM -0700, rbb@covalent.net wrote:
> 
> We talked about this a long time ago, but I'll bring it up again because
> of this commit.  When APR was first implemented, all platforms ALWAYS
> implemented all functions.  If a function wasn't actually implemented, it
> returned APR_ENOTIMPL.  People yelled and screamed and said the linker
> should die because it will be easier for the programmer.  Now, we are
> adding back in those dummy functions in a module, yuck!

Yes, yuck - I'd prefer it apr too. But less yuck than putting #if all
over the code. Since I want to be able to handle the failure of getting
shared-mem or locks gracefully (i.e. a basic set of functionality still
works without them) I need the run-time checks anyway.

In general I prefer compile time breakage to run-time breakage, but it
really messes up the code when you have #if all over (and you have to
keep compiling twice, with and without the feature defined, to make sure
it compiles everywhere). We have APR_HAS_SHMEM for those who want a
compile time breakage, so I'd go for providing dummies. But yes, it
doesn't protect folks from forgetting about APR_HAS_SHMEM and leading
to inadvertant run-time breakage. I suppose that could be solved with
something ugly like allowing folks to define a APR_PROVIDE_SHMEM_DUMMIES
before they include apr_shmem.h - if defined and if not APR_HAS_SHMEM
then and only then provide dummies.


  Cheers,

  Ronald


Mime
View raw message