httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edward Rudd <ed...@omegaware.com>
Subject Re: [Patch] IfSymbol directive (bug 29003)
Date Fri, 21 May 2004 18:28:54 GMT
On Fri, 21 May 2004 09:35:45 -0500, William A. Rowe, Jr. wrote:

> This has always been a thorn in my side :)  I actually proposed about 2 yrs
> ago that we change from <IfModule source.c> to <IfModule structname>
> since it's easier to identify the structname.  At that time, it appeared to be
> challenging, and I had proposed a patch that would capture the structname
> in the process of declaring it with STANDARD20_MODULE_STUFF.
> 
My first patch adds support for IfModule structname and IfSymbol
structname. but only for dynamically loaded modules.. 

> But this turns out to be a much more trivial problem to solve.  I'd
> propose we collect *both* the source.c from the module structure, as
> well as the structname *at the time we loadmodule*!  (This is slightly
> more complicated for compiled-in modules.)

And after I though about it, in apache 2.0 and on, most modules are
dynamically loaded, except the core, the http protocol, mod_so, and the
MPM. So this really would only be an issue for OS's that can't support
dynamically loaded modules.
 
> I'm -0.5 against another named container <IfSymbol > - we recently
> kicked around the issue of proliferating namespaces.  Because most
> sources for module names end in .c (or .pl etc) there should be little
> overlap with the structure names for modules.
> 

My first patch (solution 2) does this. it give ifmodule support for both
the source filename AND the structname as they will never collide.

> The theory is trivial, it's much easier to say;
> 
> LoadModule foo_module modules/mod_foo.so ... AddModule foo_module
> 
> then to figure out that mod_foo.c, foo.c, or foo_setup.c is the module
> which declared that STANDARD20_MODULE_STUFF.  So each module will have
> two entries in the lookup table, but that doesn't appear to be a huge
> problem.

I don't like having to use two directives for loading a module.. This was
a major annoyance in apache 1.3, and I'm so glad I don't have to do that
in apache 2.0 and on.

> The items you detail below are all interesting solutions to forcing the
> top sourcefile name to be mod_php.c for example, but they don't get at
> the real crux of the problem, which is that users shouldn't have to know
> source names, and *already* know the structure name, by virtue of seeing
> the LoadModule directive for the module documented, somewhere.
> 
I ideally we should have something in the module source that registers the
symbolname so once the LoadModule call is done, OR the module is
statically compiled in, the internal "list o' symbols" contains
EVERYTHING. Either by altering STANDARD20_MODULE_STUFF(mysymbol_module),
or a call in register_hooks.

Edward Rudd



Mime
View raw message