From b9195712b5377477ca1a16eade50cfe1f8ccda42 Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Thu, 21 Dec 2000 02:26:56 +0000 Subject: [PATCH] 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 --- docs/manual/mod/index-bytype.html | 2 +- docs/manual/mod/index.html | 4 +-- docs/manual/mod/mod_so.html | 58 +++++++++++++++++-------------- 3 files changed, 34 insertions(+), 30 deletions(-) diff --git a/docs/manual/mod/index-bytype.html b/docs/manual/mod/index-bytype.html index 1f4123262e..a571333b1b 100644 --- a/docs/manual/mod/index-bytype.html +++ b/docs/manual/mod/index-bytype.html @@ -165,7 +165,7 @@ virtual hosts under different userids.
mod_proxy
Caching proxy abilities
mod_so -
Experimental support for loading modules (DLLs on Windows) at runtime +
Support for loading modules at runtime
mod_file_cache
Caching files in memory for faster serving.
mod_dav diff --git a/docs/manual/mod/index.html b/docs/manual/mod/index.html index 589564c4cb..c33feac746 100644 --- a/docs/manual/mod/index.html +++ b/docs/manual/mod/index.html @@ -66,7 +66,7 @@ virtual hosts under different userids.
mod_auth_dbm
User authentication using DBM files.
mod_auth_digest -
MD5 authentication (experimental) +
MD5 authentication
mod_autoindex
Automatic directory listings.
mod_cern_meta @@ -114,7 +114,7 @@ virtual hosts under different userids.
mod_setenvif
Set environment variables based on client information
mod_so -
Experimental support for loading modules (DLLs on Windows) at runtime +
Support for loading modules at runtime
mod_speling
Automatically correct minor typos in URLs
mod_status diff --git a/docs/manual/mod/mod_so.html b/docs/manual/mod/mod_so.html index 8c837a4209..9649d150c5 100644 --- a/docs/manual/mod/mod_so.html +++ b/docs/manual/mod/mod_so.html @@ -21,7 +21,7 @@ server at start-up or restart time.

Status: Base (Windows); Experimental (Unix) +>Status: Base (Windows); Optional (Unix)
Summary -

This is an experimental module. On selected operating systems it -can be used to load modules into Apache at runtime via the Dynamic Shared Object (DSO) mechanism, rather -than requiring a recompilation. +

On selected operating systems this module can be used to load modules +into Apache at runtime via the Dynamic Shared +Object (DSO) mechanism, rather than requiring a recompilation.

On Unix, the loaded code typically comes from shared object files -(usually with .so extension), whilst on Windows this -module loads DLL files. This module is only available in -Apache 1.3 and up. - +(usually with .so extension), on Windows this may either +the .so or .dll extension. This module is +only available in Apache 1.3 and up.

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

Warning: Apache 1.3 modules cannot be directly used with + Apache 2.0 - the module must be modified to dynamically load or + compile into Apache 2.0.

+

Directives

-

Creating DLL Modules for Windows

+

Creating Loadable Modules for Windows

+ +

Note: the module name format changed for Windows with Apache + 1.3.15 and 2.0 - the modules are now named as mod_foo.so. + While mod_so still loads modules with ApacheModuleFoo.dll names, the + new naming convention is preferred; if you are converting your loadable + module for 2.0, please fix the name to this 2.0 convention.

The Apache module API is unchanged between the Unix and Windows versions. Many modules will run on Windows with no or little change @@ -87,16 +95,16 @@ two modules into a single module for all operating systems.

To create a module DLL, a small change is necessary to the module's source file: The module record must be exported from the DLL (which - will be created later; see below). To do this, add the - MODULE_VAR_EXPORT (defined in the Apache header files) to - your module's module record definition. For example, if your module + will be created later; see below). To do this, add the AP_MODULE_DECLARE_DATA (defined in the Apache header files) + to your module's module record definition. For example, if your module has:

     module foo_module;
 

Replace the above with:

-    module MODULE_VAR_EXPORT foo_module;
+    module AP_MODULE_DECLARE_DATA foo_module;
 

Note that this will only be activated on Windows, so the module can continue to be used, unchanged, with Unix if needed. Also, if you are @@ -104,10 +112,13 @@ two modules into a single module for all operating systems. record with that method instead.

Now, create a DLL containing your module. You will need to link this - against the ApacheCore.lib export library that is created when the - ApacheCore.dll shared library is compiled. You may also have to change + against the libhttpd.lib export library that is created when the + libhttpd.dll shared library is compiled. You may also have to change the compiler settings to ensure that the Apache header files are - correctly located.

+ correctly located. You can find this library in your server root's + libexec directory. It is best to grab an existing module .dsp file + from the tree to assure the build environment is configured correctly, + or alternately compare the compiler and link options to your .dsp.

This should create a DLL version of your module. Now simply place it in the modules directory of your server root, and use @@ -166,20 +177,13 @@ The LoadModule directive links in the object file or library to the list of active modules. Module is the name of the external variable of type module in the file, and is listed as the Module -Identifier in the module documentation. Example (Unix): +Identifier in the module documentation. Example:

LoadModule status_module modules/mod_status.so
-

- -Example (Windows): -

-LoadModule status_module modules/ApacheModuleStatus.dll
-
- -loads the named module from the modules subdirectory of the -ServerRoot.

+

loads the named module from the modules subdirectory of the + ServerRoot.

-- 2.50.1