From: Joe Orton Date: Tue, 16 Apr 2024 09:27:40 +0000 (+0000) Subject: docs: Use AP_DECLARE_MODULE in Developing modules and mod_so guides X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ab0b1146b193cdb3f4290c776395f1b957ef8d2;p=thirdparty%2Fapache%2Fhttpd.git docs: Use AP_DECLARE_MODULE in Developing modules and mod_so guides Submitted by: Vladimír Chlup Github: closes #432 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1917015 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/developer/modguide.xml b/docs/manual/developer/modguide.xml index 1b517411cad..c2c8eeaa2ec 100644 --- a/docs/manual/developer/modguide.xml +++ b/docs/manual/developer/modguide.xml @@ -94,7 +94,7 @@ that defines a module as a separate entity within Apache:

-module AP_MODULE_DECLARE_DATA example_module = +AP_DECLARE_MODULE(example) = { STANDARD20_MODULE_STUFF, create_dir_conf, /* Per-directory configuration handler */ @@ -110,11 +110,12 @@ module AP_MODULE_DECLARE_DATA example_module =

This bit of code lets the server know that we have now registered a new module in the system, and that its name is example_module. The name -of the module is used primarily for two things:
+of the module is used primarily for three things:

  • Letting the server know how to load the module using the LoadModule
  • Setting up a namespace for the module to use in configurations
  • +
  • Allowing the user to distinguish an origin of log messages

For now, we're only concerned with the first purpose of the module name, @@ -188,7 +189,7 @@ definition will look like this:

-module AP_MODULE_DECLARE_DATA example_module = +AP_DECLARE_MODULE(example) = { STANDARD20_MODULE_STUFF, NULL, @@ -795,7 +796,7 @@ static void register_hooks(apr_pool_t *pool) /* Define our module as an entity and assign a function for registering hooks */ -module AP_MODULE_DECLARE_DATA example_module = +AP_DECLARE_MODULE(example) = { STANDARD20_MODULE_STUFF, NULL, /* Per-directory configuration handler */ @@ -834,7 +835,7 @@ reference to the configuration directives we want to register with the server: -module AP_MODULE_DECLARE_DATA example_module = +AP_DECLARE_MODULE(example) = { STANDARD20_MODULE_STUFF, NULL, /* Per-directory configuration handler */ @@ -1045,7 +1046,7 @@ static void register_hooks(apr_pool_t *pool) Our module name tag: ============================================================================== */ -module AP_MODULE_DECLARE_DATA example_module = +AP_DECLARE_MODULE(example) = { STANDARD20_MODULE_STUFF, NULL, /* Per-directory configuration handler */ @@ -1210,7 +1211,7 @@ per-directory creator and merger function reference in our tag:

-module AP_MODULE_DECLARE_DATA example_module = +AP_DECLARE_MODULE(example) = { STANDARD20_MODULE_STUFF, create_dir_conf, /* Per-directory configuration handler */ @@ -1408,7 +1409,7 @@ static const command_rec directives[] = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -module AP_MODULE_DECLARE_DATA example_module = +AP_DECLARE_MODULE(example) = { STANDARD20_MODULE_STUFF, create_dir_conf, /* Per-directory configuration handler */ diff --git a/docs/manual/mod/mod_so.xml b/docs/manual/mod/mod_so.xml index bfcfdf6f3f8..b88aedeab54 100644 --- a/docs/manual/mod/mod_so.xml +++ b/docs/manual/mod/mod_so.xml @@ -90,7 +90,7 @@ Windows

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 AP_MODULE_DECLARE_DATA (defined in the + add the AP_DECLARE_MODULE (defined in the Apache httpd header files) to your module's module record definition. For example, if your module has:

@@ -100,7 +100,7 @@ Windows

Replace the above with:

- module AP_MODULE_DECLARE_DATA foo_module; + AP_DECLARE_MODULE(foo);

Note that this will only be activated on Windows, so the diff --git a/docs/manual/mod/mod_so.xml.fr b/docs/manual/mod/mod_so.xml.fr index bccda635461..d4cf8cdf8b0 100644 --- a/docs/manual/mod/mod_so.xml.fr +++ b/docs/manual/mod/mod_so.xml.fr @@ -100,7 +100,7 @@ Windows modification à son fichier source : l'enregistrement du module doit être exporté depuis la DLL (qui sera elle-même créée plus tard ; voir plus loin). Pour ce faire, ajoutez la macro - AP_MODULE_DECLARE_DATA (définie dans les fichiers + AP_DECLARE_MODULE (définie dans les fichiers d'en-têtes d'Apache httpd) à la définition de l'enregistrement de votre module. Par exemple, si votre module est déclaré comme suit :

@@ -110,7 +110,7 @@ Windows

Remplacez cette ligne par :

- module AP_MODULE_DECLARE_DATA foo_module; + AP_DECLARE_MODULE(foo);

Notez que cette macro ne sera prise en compte que sous Windows, diff --git a/docs/manual/mod/mod_so.xml.ja b/docs/manual/mod/mod_so.xml.ja index b3854b93ca2..8fde679be69 100644 --- a/docs/manual/mod/mod_so.xml.ja +++ b/docs/manual/mod/mod_so.xml.ja @@ -90,7 +90,7 @@ モジュールの作成に小さな変更を行なう必要があります。 つまり、モジュールのレコード (これは後で作成されます。 以下を参照してください) が DLL からエクスポートされなければなりません。 - これを行なうには、AP_MODULE_DECLARE_DATA (Apache httpd + これを行なうには、AP_DECLARE_MODULE (Apache httpd のヘッダファイルで定義されています) をモジュールのモジュールレコード 定義の部分に追加してください。たとえば、モジュールに

@@ -99,7 +99,7 @@

があるとすると、それを次のもので置き換えてください。

- module AP_MODULE_DECLARE_DATA foo_module; + AP_DECLARE_MODULE(foo);

Unix 上でもこのモジュールを diff --git a/docs/manual/mod/mod_so.xml.ko b/docs/manual/mod/mod_so.xml.ko index e19ca8ff1d9..38235b424f2 100644 --- a/docs/manual/mod/mod_so.xml.ko +++ b/docs/manual/mod/mod_so.xml.ko @@ -77,7 +77,7 @@

¸ðµâ DLLÀ» ¸¸µé±âÀ§Çؼ­´Â ¸ðµâÀÇ ¼Ò½ºÆÄÀÏÀ» Á¶±Ý ¼öÁ¤ÇØ¾ß ÇÑ´Ù. DLLÀº module record¸¦ exportÇØ¾ß ÇÑ´Ù. (¾Æ·¡ Âü°í) À̸¦ À§ÇØ ¸ðµâÀÇ module record Á¤ÀÇ¿¡ (¾ÆÆÄÄ¡ Çì´õÆÄÀÏ¿¡ - Á¤ÀǵÈ) AP_MODULE_DECLARE_DATA¸¦ Ãß°¡ÇÑ´Ù. + Á¤ÀǵÈ) AP_DECLARE_MODULE¸¦ Ãß°¡ÇÑ´Ù. ¿¹¸¦ µé¾î, ´ÙÀ½°ú °°Àº ¸ðµâÀÌ ÀÖ´Ù¸é:

@@ -86,7 +86,7 @@

´ÙÀ½°ú °°ÀÌ ¼öÁ¤ÇÑ´Ù:

- module AP_MODULE_DECLARE_DATA foo_module; + AP_DECLARE_MODULE(foo);

ÀÌ ºÎºÐÀº À©µµ¿ìÁî¿¡¼­¸¸ »ç¿ëÇϱ⶧¹®¿¡ º¯°æÇÏ¿©µµ À¯´Ð½º¿¡¼­ diff --git a/docs/manual/mod/mod_so.xml.tr b/docs/manual/mod/mod_so.xml.tr index 4a5e751f487..73396d8c813 100644 --- a/docs/manual/mod/mod_so.xml.tr +++ b/docs/manual/mod/mod_so.xml.tr @@ -91,7 +91,7 @@ yeniden başlatılması sırasında yüklenmesini sağlar. değişiklik yapmak gerekir: Modül kaydının daha sonra oluşturulacak olan DLL’den ihraç edilebilmesi gerekir (aşağıya bakınız). Bunu yapmak için modülün modül kaydı tanımına (Apache httpd başlık dosyalarında - tanımlanmış olan) AP_MODULE_DECLARE_DATA eklenmelidir. + tanımlanmış olan) AP_DECLARE_MODULE eklenmelidir. Örneğin, modülünüz

@@ -101,7 +101,7 @@ yeniden başlatılması sırasında yüklenmesini sağlar.

diye bir satır içeriyorsa bunu,

- module AP_MODULE_DECLARE_DATA foo_module; + AP_DECLARE_MODULE(foo);

olarak değiştirmelisiniz. Bunun yalnız Windows üzerinde etkili olduğunu