httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@engelschall.com (Ralf S. Engelschall)
Subject Re: Shared modules and Rule HIDE
Date Sun, 22 Mar 1998 15:07:05 GMT

In article <199803221501.QAA12181@en1.engelschall.com> you wrote:

> In article <Pine.LNX.3.96.980322141910.15157A-100000@ecstasy.localnet> you wrote:

>> When HIDE is on, LoadModule does not work. This is because the documented
>> syntax is (say)

>>  LoadModule access_module modules/mod_access.so

>> but the internal structure name has been hidden to "AP_access_module". Now
>> it is easy to make mod_so prepend AP_ to the structure name before
>> resolving it, but then it won't work for third-party modules whose module
>> structure names are not mapped in hide.h.

>> Also of course modules compiled with HIDE=no will not load into Apache
>> compiled with HIDE=yes, and vice versa. Um.

> For the first problem, I suggest:

> Index: mod_so.c
> ===================================================================
> RCS file: /e/apache/REPOS/apache-1.3/src/modules/standard/mod_so.c,v
> retrieving revision 1.13
> diff -u -r1.13 mod_so.c
> --- mod_so.c    1998/03/17 19:47:54     1.13
> +++ mod_so.c    1998/03/22 15:00:27
> @@ -256,6 +256,10 @@
>      modname = pstrcat(cmd->pool, "_", modname, NULL);
>  #endif
>  
> +#ifdef HIDE
> +    modname = pstrcat(cmd->pool, "AP_", modname, NULL);
> +#endif
> +
>      /*
>       * Retrieve the pointer to the module structure 
>       * through the module name

Ops, too fast. This one works better:

Index: mod_so.c
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/src/modules/standard/mod_so.c,v
retrieving revision 1.13
diff -u -r1.13 mod_so.c
--- mod_so.c    1998/03/17 19:47:54     1.13
+++ mod_so.c    1998/03/22 15:06:21
@@ -252,6 +252,10 @@
     aplog_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, NULL,
                "loaded module %s", modname);
 
+#ifdef HIDE
+    modname = pstrcat(cmd->pool, "AP_", modname, NULL);
+#endif
+
 #ifdef NEED_UNDERSCORE_SYM
     modname = pstrcat(cmd->pool, "_", modname, NULL);
 #endif

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com

Mime
View raw message