Skip to content

Commit 798f89f

Browse files
committed
Document the Win32 .so change. Time to rest the brain. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87484 13f79535-47bb-0310-9956-ffa450edef68
1 parent 474a2d0 commit 798f89f

3 files changed

Lines changed: 34 additions & 30 deletions

File tree

docs/manual/mod/index-bytype.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ <H2>Miscellaneous</H2>
165165
<DT><A HREF="mod_proxy.html">mod_proxy</A>
166166
<DD>Caching proxy abilities
167167
<DT><A HREF="mod_so.html">mod_so</A>
168-
<DD>Experimental support for loading modules (DLLs on Windows) at runtime
168+
<DD>Support for loading modules at runtime
169169
<DT><A HREF="mod_file_cache.html">mod_file_cache</A>
170170
<DD>Caching files in memory for faster serving.
171171
<DT><A HREF="mod_dav.html">mod_dav</A>

docs/manual/mod/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ <h2>Other Modules</h2>
6666
<DT><A HREF="mod_auth_dbm.html">mod_auth_dbm</A>
6767
<DD>User authentication using DBM files.
6868
<DT><A HREF="mod_auth_digest.html">mod_auth_digest</A>
69-
<DD>MD5 authentication (experimental)
69+
<DD>MD5 authentication
7070
<DT><A HREF="mod_autoindex.html">mod_autoindex</A>
7171
<DD>Automatic directory listings.
7272
<DT><A HREF="mod_cern_meta.html">mod_cern_meta</A>
@@ -114,7 +114,7 @@ <h2>Other Modules</h2>
114114
<DT><A HREF="mod_setenvif.html">mod_setenvif</A>
115115
<DD>Set environment variables based on client information
116116
<DT><A HREF="mod_so.html">mod_so</A>
117-
<DD>Experimental support for loading modules (DLLs on Windows) at runtime
117+
<DD>Support for loading modules at runtime
118118
<DT><A HREF="mod_speling.html">mod_speling</A>
119119
<DD>Automatically correct minor typos in URLs
120120
<DT><A HREF="mod_status.html">mod_status</A>

docs/manual/mod/mod_so.html

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <H1 ALIGN="CENTER">Module mod_so</H1>
2121
<P><A
2222
HREF="module-dict.html#Status"
2323
REL="Help"
24-
><STRONG>Status:</STRONG></A> Base (Windows); Experimental (Unix)
24+
><STRONG>Status:</STRONG></A> Base (Windows); Optional (Unix)
2525
<BR>
2626
<A
2727
HREF="module-dict.html#SourceFile"
@@ -42,30 +42,38 @@ <H1 ALIGN="CENTER">Module mod_so</H1>
4242

4343
<H2>Summary</H2>
4444

45-
<p>This is an experimental module. On selected operating systems it
46-
can be used to load modules into Apache at runtime via the <A
47-
HREF="../dso.html">Dynamic Shared Object</A> (DSO) mechanism, rather
48-
than requiring a recompilation.
45+
<P>On selected operating systems this module can be used to load modules
46+
into Apache at runtime via the <A HREF="../dso.html">Dynamic Shared
47+
Object</A> (DSO) mechanism, rather than requiring a recompilation.
4948

5049
<P>
5150
On Unix, the loaded code typically comes from shared object files
52-
(usually with <SAMP>.so</SAMP> extension), whilst on Windows this
53-
module loads <SAMP>DLL</SAMP> files. This module is only available in
54-
Apache 1.3 and up.
55-
51+
(usually with <SAMP>.so</SAMP> extension), on Windows this may either
52+
the <SAMP>.so</SAMP> or <SAMP>.dll</SAMP> extension. This module is
53+
only available in Apache 1.3 and up.
5654

5755
<p>In previous releases, the functionality of this module was provided
5856
for Unix by mod_dld, and for Windows by mod_dll. On Windows, mod_dll
5957
was used in beta release 1.3b1 through 1.3b5. mod_so combines these
6058
two modules into a single module for all operating systems.
6159

60+
<P><STRONG> Warning: Apache 1.3 modules cannot be directly used with
61+
Apache 2.0 - the module must be modified to dynamically load or
62+
compile into Apache 2.0</STRONG>.</P>
63+
6264
<H2>Directives</H2>
6365
<UL>
6466
<LI><A HREF="#loadfile">LoadFile</A>
6567
<LI><A HREF="#loadmodule">LoadModule</A>
6668
</UL>
6769

68-
<H2><A NAME="creating">Creating DLL Modules for Windows</A></H2>
70+
<H2><A NAME="creating">Creating Loadable Modules for Windows</A></H2>
71+
72+
<P><STRONG>Note: the module name format changed for Windows with Apache
73+
1.3.15 and 2.0 - the modules are now named as mod_foo.so</STRONG>.
74+
While mod_so still loads modules with ApacheModuleFoo.dll names, the
75+
new naming convention is preferred; if you are converting your loadable
76+
module for 2.0, please fix the name to this 2.0 convention.</P>
6977

7078
<P>The Apache module API is unchanged between the Unix and Windows
7179
versions. Many modules will run on Windows with no or little change
@@ -87,27 +95,30 @@ <H2><A NAME="creating">Creating DLL Modules for Windows</A></H2>
8795

8896
<P>To create a module DLL, a small change is necessary to the module's
8997
source file: The module record must be exported from the DLL (which
90-
will be created later; see below). To do this, add the
91-
<CODE>MODULE_VAR_EXPORT</CODE> (defined in the Apache header files) to
92-
your module's module record definition. For example, if your module
98+
will be created later; see below). To do this, add the <CODE
99+
>AP_MODULE_DECLARE_DATA</CODE> (defined in the Apache header files)
100+
to your module's module record definition. For example, if your module
93101
has:</P>
94102
<PRE>
95103
module foo_module;
96104
</PRE>
97105
<P>Replace the above with:</P>
98106
<PRE>
99-
module MODULE_VAR_EXPORT foo_module;
107+
module AP_MODULE_DECLARE_DATA foo_module;
100108
</PRE>
101109
<P>Note that this will only be activated on Windows, so the module can
102110
continue to be used, unchanged, with Unix if needed. Also, if you are
103111
familiar with <CODE>.DEF</CODE> files, you can export the module
104112
record with that method instead.</P>
105113

106114
<P>Now, create a DLL containing your module. You will need to link this
107-
against the ApacheCore.lib export library that is created when the
108-
ApacheCore.dll shared library is compiled. You may also have to change
115+
against the libhttpd.lib export library that is created when the
116+
libhttpd.dll shared library is compiled. You may also have to change
109117
the compiler settings to ensure that the Apache header files are
110-
correctly located.</P>
118+
correctly located. You can find this library in your server root's
119+
libexec directory. It is best to grab an existing module .dsp file
120+
from the tree to assure the build environment is configured correctly,
121+
or alternately compare the compiler and link options to your .dsp.</P>
111122

112123
<P>This should create a DLL version of your module. Now simply place it
113124
in the <SAMP>modules</SAMP> directory of your server root, and use
@@ -166,20 +177,13 @@ <H2><A NAME="loadmodule">LoadModule</A> directive</H2>
166177
to the list of active modules. <EM>Module</EM> is the name of the
167178
external variable of type <CODE>module</CODE> in the file, and is
168179
listed as the <a href="module-dict.html#ModuleIdentifier">Module
169-
Identifier</a> in the module documentation. Example (Unix):
180+
Identifier</a> in the module documentation. Example:
170181
<BLOCKQUOTE><CODE>
171182
LoadModule status_module modules/mod_status.so
172183
</CODE></BLOCKQUOTE>
173184

174-
<P>
175-
176-
Example (Windows):
177-
<BLOCKQUOTE><CODE>
178-
LoadModule status_module modules/ApacheModuleStatus.dll<BR>
179-
</CODE></BLOCKQUOTE>
180-
181-
loads the named module from the modules subdirectory of the
182-
ServerRoot.<P>
185+
<P>loads the named module from the modules subdirectory of the
186+
ServerRoot.<P>
183187

184188

185189
<!--#include virtual="footer.html" -->

0 commit comments

Comments
 (0)