summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2000-05-27 05:28:02 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2000-05-27 05:28:02 +0000
commit86e2a18f2a9143d5d1c3de39dc6fd1398057bdde (patch)
treebd244d5ab1a211cfb57b07ba0dd323abaf53a3c1
parentc361eb1a65dbdd692b27b45e384c0d32ddfeee2c (diff)
downloadhttpd-86e2a18f2a9143d5d1c3de39dc6fd1398057bdde.tar.gz
This patch corrects the issues from the AP_EXPORT and linkage specification arguments to the ap_hooks.h declarations. As with the APR_ and AP_ patches, API_VAR_EXPORT becomes API_EXPORT_VAR, and MODULE_VAR_EXPORT becomes MODULE_EXPORT_VAR. I will be happy to revert the inclusion of ap_config.h from httpd.h if this bothers anyone. More individual modules need to be patched if we do so. The API_EXPORTs all moved into central storage in the ap_config.h header. Without WIN32 or API_STATIC compile time declarations, these macros remain no-ops. This patch also moves the following data from http_main to http_config: const char *ap_server_argv0; const char *ap_server_root; ap_array_header_t *ap_server_pre_read_config; ap_array_header_t *ap_server_post_read_config; ap_array_header_t *ap_server_config_defines; And the following variables had already moved into ap_hooks.c: ap_pool_t *g_pHookPool; (initialized now in http_config) int g_bDebugHooks; (out of http_config) const char *g_szCurrentHookName; (out of http_config) The changes to http_main.c are in preparation for that module to move out to a seperate .exe for win32. Other platforms will be unaffected, outside of these changes. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85309 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--ApacheCore.dsp6
-rw-r--r--httpd.dsp6
-rw-r--r--include/ap_config.h33
-rw-r--r--include/ap_mpm.h4
-rw-r--r--include/http_config.h12
-rw-r--r--include/http_connection.h4
-rw-r--r--include/http_core.h2
-rw-r--r--include/http_main.h14
-rw-r--r--include/http_protocol.h8
-rw-r--r--include/http_request.h12
-rw-r--r--include/httpd.h9
-rw-r--r--modules/aaa/mod_access.c4
-rw-r--r--modules/aaa/mod_auth.c4
-rw-r--r--modules/aaa/mod_auth_anon.c4
-rw-r--r--modules/aaa/mod_auth_digest.c4
-rw-r--r--modules/cache/mod_file_cache.c6
-rw-r--r--modules/echo/mod_echo.c4
-rw-r--r--modules/filters/mod_include.c4
-rw-r--r--modules/generators/mod_asis.c2
-rw-r--r--modules/generators/mod_autoindex.c4
-rw-r--r--modules/generators/mod_cgi.c4
-rw-r--r--modules/generators/mod_cgid.c4
-rw-r--r--modules/generators/mod_info.c4
-rw-r--r--modules/generators/mod_status.c4
-rw-r--r--modules/http/http_core.c2
-rw-r--r--modules/http/http_protocol.c14
-rw-r--r--modules/http/http_request.c18
-rw-r--r--modules/http/mod_mime.c4
-rw-r--r--modules/loggers/mod_log_config.c4
-rw-r--r--modules/mappers/mod_alias.c4
-rw-r--r--modules/mappers/mod_dir.c4
-rw-r--r--modules/mappers/mod_imap.c4
-rw-r--r--modules/mappers/mod_negotiation.c4
-rw-r--r--modules/mappers/mod_rewrite.c2
-rw-r--r--modules/mappers/mod_so.c5
-rw-r--r--modules/mappers/mod_speling.c4
-rw-r--r--modules/mappers/mod_vhost_alias.c4
-rw-r--r--modules/metadata/mod_cern_meta.c4
-rw-r--r--modules/metadata/mod_env.c4
-rw-r--r--modules/metadata/mod_expires.c4
-rw-r--r--modules/metadata/mod_headers.c4
-rw-r--r--modules/metadata/mod_setenvif.c4
-rw-r--r--modules/metadata/mod_unique_id.c2
-rw-r--r--modules/metadata/mod_usertrack.c4
-rw-r--r--modules/proxy/mod_proxy.c2
-rw-r--r--modules/proxy/mod_proxy.h2
-rw-r--r--os/win32/os.h22
-rw-r--r--server/config.c44
-rw-r--r--server/connection.c6
-rw-r--r--server/mpm/dexter/dexter.c2
-rw-r--r--server/mpm/mpmt_beos/mpmt_beos.c4
-rw-r--r--server/mpm/mpmt_pthread/mpmt_pthread.c6
-rw-r--r--server/mpm/mpmt_pthread/scoreboard.c2
-rw-r--r--server/mpm/mpmt_pthread/scoreboard.h4
-rw-r--r--server/mpm/prefork/prefork.c4
-rw-r--r--server/mpm/prefork/scoreboard.h4
-rw-r--r--server/mpm/spmt_os2/scoreboard.h2
-rw-r--r--server/mpm/spmt_os2/spmt_os2.c2
-rw-r--r--server/mpm/winnt/mpm_winnt.c7
-rw-r--r--server/mpm/winnt/mpm_winnt.h2
-rw-r--r--server/mpm/winnt/registry.c2
-rw-r--r--server/mpm/winnt/service.c5
62 files changed, 207 insertions, 176 deletions
diff --git a/ApacheCore.dsp b/ApacheCore.dsp
index 5954845552..4ec81c45d8 100644
--- a/ApacheCore.dsp
+++ b/ApacheCore.dsp
@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "API_EXPORT_SYMBOLS" /D "AP_EXPORT_SYMBOLS" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@@ -69,8 +69,8 @@ LINK32=link.exe
# PROP Intermediate_Dir ".\CoreD"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /FD /c
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "_DEBUG" /D "API_EXPORT_SYMBOLS" /D "AP_EXPORT_SYMBOLS" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
diff --git a/httpd.dsp b/httpd.dsp
index 5954845552..4ec81c45d8 100644
--- a/httpd.dsp
+++ b/httpd.dsp
@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "API_EXPORT_SYMBOLS" /D "AP_EXPORT_SYMBOLS" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@@ -69,8 +69,8 @@ LINK32=link.exe
# PROP Intermediate_Dir ".\CoreD"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /FD /c
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "_DEBUG" /D "API_EXPORT_SYMBOLS" /D "AP_EXPORT_SYMBOLS" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
diff --git a/include/ap_config.h b/include/ap_config.h
index dd779b2d01..b6e7f00b3e 100644
--- a/include/ap_config.h
+++ b/include/ap_config.h
@@ -55,19 +55,44 @@
#ifndef AP_AC_CONFIG_H
#define AP_AC_CONFIG_H
+#include "ap_mmn.h" /* MODULE_MAGIC_NUMBER_ */
+
+/* Implemented flags for dynamic library bindings.
+ *
+ * API_EXPORT(type) for functions bound in the apache core, except:
+ * API_EXPORT_NONSTD(type) for functions with var args (only as ...)
+ * API_EXPORT_VAR for data residing in the core
+ * MODULE_EXPORT_VAR is a hack that will need to go away
+ */
+
+#if !defined(WIN32) || defined(API_STATIC)
+#define API_EXPORT(type) type __stdcall
+#define API_EXPORT_NONSTD(type) type
+#define API_EXPORT_VAR
+#define MODULE_EXPORT_VAR
+#elif defined(API_EXPORT_SYMBOLS)
+#define API_EXPORT(type) __declspec(dllexport) type __stdcall
+#define API_EXPORT_NONSTD(type) __declspec(dllexport) type
+#define API_EXPORT_VAR __declspec(dllexport)
+#define MODULE_EXPORT_VAR __declspec(dllexport)
+#else
+#define API_EXPORT(type) __declspec(dllimport) type __stdcall
+#define API_EXPORT_NONSTD(type) __declspec(dllimport) type
+#define API_EXPORT_VAR __declspec(dllimport)
+#define MODULE_EXPORT_VAR __declspec(dllexport)
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
-#include "ap_mmn.h" /* MODULE_MAGIC_NUMBER_ */
-
#ifdef WIN32
-#include "../os/win32/os.h"
+#include "os.h"
#else
#include "ap_config_auto.h"
#include "ap_config_path.h"
#include "os.h"
-#endif /* WIN32 */
+#endif /* !WIN32 */
#include "apr.h"
#ifdef STDC_HEADERS
#include <stdlib.h>
diff --git a/include/ap_mpm.h b/include/ap_mpm.h
index d4a4d341de..2828f21224 100644
--- a/include/ap_mpm.h
+++ b/include/ap_mpm.h
@@ -122,8 +122,8 @@ API_EXPORT(int) ap_graceful_stop_signalled(void);
* child to force an exit) and so do an exit anyway.
*/
-void ap_start_shutdown(void);
-void ap_start_restart(int graceful);
+API_EXPORT(void) ap_start_shutdown(void);
+API_EXPORT(void) ap_start_restart(int graceful);
/*
* ap_signal_parent() - used to send a signal to the parent process.
diff --git a/include/http_config.h b/include/http_config.h
index 741252de86..810913a466 100644
--- a/include/http_config.h
+++ b/include/http_config.h
@@ -364,11 +364,11 @@ API_EXPORT(const char *) ap_check_cmd_context(cmd_parms *cmd, unsigned forbidden
#ifdef CORE_PRIVATE
-extern API_VAR_EXPORT module *top_module;
+extern API_EXPORT_VAR module *top_module;
extern module *ap_prelinked_modules[];
extern module *ap_preloaded_modules[];
-extern API_VAR_EXPORT module **ap_loaded_modules;
+extern API_EXPORT_VAR module **ap_loaded_modules;
/* For mod_so.c... */
@@ -421,12 +421,12 @@ CORE_EXPORT(const char *) ap_handle_command(cmd_parms *parms, void *config, cons
#endif
/* Hooks */
-AP_DECLARE_HOOK(int,header_parser,(request_rec *))
-AP_DECLARE_HOOK(void,post_config,
+AP_DECLARE_HOOK(API_EXPORT,int,header_parser,(request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,void,post_config,
(ap_pool_t *pconf,ap_pool_t *plog,ap_pool_t *ptemp,server_rec *s))
-AP_DECLARE_HOOK(void,open_logs,
+AP_DECLARE_HOOK(API_EXPORT,void,open_logs,
(ap_pool_t *pconf,ap_pool_t *plog,ap_pool_t *ptemp,server_rec *s))
-AP_DECLARE_HOOK(void,child_init,(ap_pool_t *pchild, server_rec *s))
+AP_DECLARE_HOOK(API_EXPORT,void,child_init,(ap_pool_t *pchild, server_rec *s))
#ifdef __cplusplus
}
diff --git a/include/http_connection.h b/include/http_connection.h
index cb504534ef..dafc5c4934 100644
--- a/include/http_connection.h
+++ b/include/http_connection.h
@@ -74,8 +74,8 @@ void ap_lingering_close(conn_rec *);
#endif
/* Hooks */
-AP_DECLARE_HOOK(int,pre_connection,(conn_rec *))
-AP_DECLARE_HOOK(int,process_connection,(conn_rec *))
+AP_DECLARE_HOOK(API_EXPORT,int,pre_connection,(conn_rec *))
+AP_DECLARE_HOOK(API_EXPORT,int,process_connection,(conn_rec *))
#ifdef __cplusplus
}
diff --git a/include/http_core.h b/include/http_core.h
index 71ad9536f0..b479edf2b2 100644
--- a/include/http_core.h
+++ b/include/http_core.h
@@ -176,7 +176,7 @@ API_EXPORT(file_type_e) ap_get_win32_interpreter(const request_rec *, char **);
char *ap_response_code_string (request_rec *r, int error_index);
-extern API_VAR_EXPORT module core_module;
+extern API_EXPORT_VAR module core_module;
/* Per-directory configuration */
diff --git a/include/http_main.h b/include/http_main.h
index fecd5be56c..09b3f07240 100644
--- a/include/http_main.h
+++ b/include/http_main.h
@@ -63,17 +63,13 @@
extern "C" {
#endif
-extern MODULE_VAR_EXPORT const char *ap_server_argv0;
-extern API_VAR_EXPORT const char *ap_server_root;
+extern API_EXPORT_VAR const char *ap_server_argv0;
+extern API_EXPORT_VAR const char *ap_server_root;
/* for -C, -c and -D switches */
-extern ap_array_header_t *ap_server_pre_read_config;
-extern ap_array_header_t *ap_server_post_read_config;
-extern ap_array_header_t *ap_server_config_defines;
-
-#ifdef WIN32
-API_EXPORT(int) apache_main(int argc, char *argv[]);
-#endif
+extern API_EXPORT_VAR ap_array_header_t *ap_server_pre_read_config;
+extern API_EXPORT_VAR ap_array_header_t *ap_server_post_read_config;
+extern API_EXPORT_VAR ap_array_header_t *ap_server_config_defines;
#ifdef __cplusplus
}
diff --git a/include/http_protocol.h b/include/http_protocol.h
index ea1b59ab4b..5c995cebaa 100644
--- a/include/http_protocol.h
+++ b/include/http_protocol.h
@@ -227,10 +227,10 @@ API_EXPORT(int) ap_method_number_of(const char *method);
* post_read_request --- run right after read_request or internal_redirect,
* and not run during any subrequests.
*/
-AP_DECLARE_HOOK(int,post_read_request,(request_rec *))
-AP_DECLARE_HOOK(int,log_transaction,(request_rec *))
-AP_DECLARE_HOOK(const char *,http_method,(const request_rec *))
-AP_DECLARE_HOOK(unsigned short,default_port,(const request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,int,post_read_request,(request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,int,log_transaction,(request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,const char *,http_method,(const request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,unsigned short,default_port,(const request_rec *))
#ifdef __cplusplus
}
diff --git a/include/http_request.h b/include/http_request.h
index 57630c15d1..30051f56fe 100644
--- a/include/http_request.h
+++ b/include/http_request.h
@@ -114,12 +114,12 @@ API_EXPORT(void) ap_die(int type, request_rec *r);
#endif
/* Hooks */
-AP_DECLARE_HOOK(int,translate_name,(request_rec *))
-AP_DECLARE_HOOK(int,check_user_id,(request_rec *))
-AP_DECLARE_HOOK(int,fixups,(request_rec *))
-AP_DECLARE_HOOK(int,type_checker,(request_rec *))
-AP_DECLARE_HOOK(int,access_checker,(request_rec *))
-AP_DECLARE_HOOK(int,auth_checker,(request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,int,translate_name,(request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,int,check_user_id,(request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,int,fixups,(request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,int,type_checker,(request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,int,access_checker,(request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,int,auth_checker,(request_rec *))
#ifdef __cplusplus
}
diff --git a/include/httpd.h b/include/httpd.h
index cf3f83e7f1..be6216bb2d 100644
--- a/include/httpd.h
+++ b/include/httpd.h
@@ -73,6 +73,7 @@ extern "C" {
/* Headers in which EVERYONE has an interest... */
+#include "ap_config.h"
#include "os.h"
#include "apr_general.h"
#include "apr_lib.h"
@@ -889,11 +890,11 @@ struct server_rec {
#define API_EXPORT_NONSTD(type) type
#endif
-#ifndef MODULE_VAR_EXPORT
-#define MODULE_VAR_EXPORT
+#ifndef MODULE_EXPORT_VAR
+#define MODULE_EXPORT_VAR
#endif
-#ifndef API_VAR_EXPORT
-#define API_VAR_EXPORT
+#ifndef API_EXPORT_VAR
+#define API_EXPORT_VAR
#endif
/* modules should not used functions marked CORE_EXPORT
diff --git a/modules/aaa/mod_access.c b/modules/aaa/mod_access.c
index 78c669f66f..f73c45f62e 100644
--- a/modules/aaa/mod_access.c
+++ b/modules/aaa/mod_access.c
@@ -105,7 +105,7 @@ typedef struct {
ap_array_header_t *denys;
} access_dir_conf;
-module MODULE_VAR_EXPORT access_module;
+module MODULE_EXPORT_VAR access_module;
static void *create_access_dir_config(ap_pool_t *p, char *dummy)
{
@@ -395,7 +395,7 @@ static void register_hooks(void)
ap_hook_access_checker(check_dir_access,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT access_module =
+module MODULE_EXPORT_VAR access_module =
{
STANDARD20_MODULE_STUFF,
create_access_dir_config, /* dir config creater */
diff --git a/modules/aaa/mod_auth.c b/modules/aaa/mod_auth.c
index 4a6de2f02d..657eeb56be 100644
--- a/modules/aaa/mod_auth.c
+++ b/modules/aaa/mod_auth.c
@@ -118,7 +118,7 @@ static const command_rec auth_cmds[] =
{NULL}
};
-module MODULE_VAR_EXPORT auth_module;
+module MODULE_EXPORT_VAR auth_module;
static char *get_pw(request_rec *r, char *user, char *auth_pwfile)
{
@@ -321,7 +321,7 @@ static void register_hooks(void)
ap_hook_auth_checker(check_user_access,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT auth_module =
+module MODULE_EXPORT_VAR auth_module =
{
STANDARD20_MODULE_STUFF,
create_auth_dir_config, /* dir config creater */
diff --git a/modules/aaa/mod_auth_anon.c b/modules/aaa/mod_auth_anon.c
index 3a786d007f..89b00ab008 100644
--- a/modules/aaa/mod_auth_anon.c
+++ b/modules/aaa/mod_auth_anon.c
@@ -210,7 +210,7 @@ static const command_rec anon_auth_cmds[] =
{NULL}
};
-module MODULE_VAR_EXPORT auth_anon_module;
+module MODULE_EXPORT_VAR auth_anon_module;
static int anon_authenticate_basic_user(request_rec *r)
{
@@ -295,7 +295,7 @@ static void register_hooks(void)
ap_hook_auth_checker(check_anon_access,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT auth_anon_module =
+module MODULE_EXPORT_VAR auth_anon_module =
{
STANDARD20_MODULE_STUFF,
create_anon_auth_dir_config,/* dir config creater */
diff --git a/modules/aaa/mod_auth_digest.c b/modules/aaa/mod_auth_digest.c
index 4ad04a3f20..39a44fa3da 100644
--- a/modules/aaa/mod_auth_digest.c
+++ b/modules/aaa/mod_auth_digest.c
@@ -214,7 +214,7 @@ static ap_time_t *otn_counter; /* one-time-nonce counter */
static void *client_mm = NULL;
#endif /* HAVE_SHMEM_MM */
-module MODULE_VAR_EXPORT auth_digest_module;
+module MODULE_EXPORT_VAR auth_digest_module;
/*
* initialization code
@@ -1876,7 +1876,7 @@ static void register_hooks(void)
ap_hook_fixups(add_auth_info, NULL, NULL, AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT auth_digest_module =
+module MODULE_EXPORT_VAR auth_digest_module =
{
STANDARD20_MODULE_STUFF,
create_digest_dir_config, /* dir config creater */
diff --git a/modules/cache/mod_file_cache.c b/modules/cache/mod_file_cache.c
index 1326e56c67..af2edfb2e2 100644
--- a/modules/cache/mod_file_cache.c
+++ b/modules/cache/mod_file_cache.c
@@ -126,7 +126,7 @@
#include "http_core.h"
#include "apr_mmap.h"
-module MODULE_VAR_EXPORT file_cache_module;
+module MODULE_EXPORT_VAR file_cache_module;
static ap_pool_t *context;
static int once_through = 0;
@@ -359,7 +359,7 @@ static int file_cache_xlat(request_rec *r)
* This is really broken on Windows. The call to get the core_module config
* in core_translate_copy seg faults because 'core_module' is not exported
* properly and needs a thunk.
- * Will be fixed when we get API_VAR_EXPORTS working correctly again
+ * Will be fixed when we get API_EXPORT_VARS working correctly again
*/
return DECLINED;
#endif
@@ -523,7 +523,7 @@ static const handler_rec file_cache_handlers[] =
{ NULL }
};
-module MODULE_VAR_EXPORT file_cache_module =
+module MODULE_EXPORT_VAR file_cache_module =
{
STANDARD20_MODULE_STUFF,
NULL, /* create per-directory config structure */
diff --git a/modules/echo/mod_echo.c b/modules/echo/mod_echo.c
index 752a0dd1e5..f635ff5688 100644
--- a/modules/echo/mod_echo.c
+++ b/modules/echo/mod_echo.c
@@ -62,7 +62,7 @@
#include "http_config.h"
#include "http_connection.h"
-API_VAR_EXPORT module echo_module;
+API_EXPORT_VAR module echo_module;
typedef struct
{
@@ -121,7 +121,7 @@ static void register_hooks(void)
ap_hook_process_connection(process_echo_connection,NULL,NULL,AP_HOOK_MIDDLE);
}
-API_VAR_EXPORT module echo_module = {
+API_EXPORT_VAR module echo_module = {
STANDARD20_MODULE_STUFF,
NULL, /* create per-directory config structure */
NULL, /* merge per-directory config structures */
diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c
index dbfa41ad8f..cfc6b7fcae 100644
--- a/modules/filters/mod_include.c
+++ b/modules/filters/mod_include.c
@@ -113,7 +113,7 @@
#define RAW_ASCII_CHAR(ch) (ch)
#endif /*CHARSET_EBCDIC*/
-module MODULE_VAR_EXPORT includes_module;
+module MODULE_EXPORT_VAR includes_module;
/* just need some arbitrary non-NULL pointer which can't also be a request_rec */
#define NESTED_INCLUDE_MAGIC (&includes_module)
@@ -2502,7 +2502,7 @@ static const handler_rec includes_handlers[] =
{NULL}
};
-module MODULE_VAR_EXPORT includes_module =
+module MODULE_EXPORT_VAR includes_module =
{
STANDARD20_MODULE_STUFF,
create_includes_dir_config, /* dir config creater */
diff --git a/modules/generators/mod_asis.c b/modules/generators/mod_asis.c
index 4466e9c00c..603f67362d 100644
--- a/modules/generators/mod_asis.c
+++ b/modules/generators/mod_asis.c
@@ -126,7 +126,7 @@ static const handler_rec asis_handlers[] =
{NULL}
};
-module MODULE_VAR_EXPORT asis_module =
+module MODULE_EXPORT_VAR asis_module =
{
STANDARD20_MODULE_STUFF,
NULL, /* create per-directory config structure */
diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c
index 83ed302321..0631b14d4c 100644
--- a/modules/generators/mod_autoindex.c
+++ b/modules/generators/mod_autoindex.c
@@ -81,7 +81,7 @@
#include <string.h>
#endif
-module MODULE_VAR_EXPORT autoindex_module;
+module MODULE_EXPORT_VAR autoindex_module;
/****************************************************************
*
@@ -1680,7 +1680,7 @@ static const handler_rec autoindex_handlers[] =
{NULL}
};
-module MODULE_VAR_EXPORT autoindex_module =
+module MODULE_EXPORT_VAR autoindex_module =
{
STANDARD20_MODULE_STUFF,
create_autoindex_config, /* dir config creater */
diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c
index 4ab25957c3..2899fa3598 100644
--- a/modules/generators/mod_cgi.c
+++ b/modules/generators/mod_cgi.c
@@ -86,7 +86,7 @@
#include <string.h>
#endif
-module MODULE_VAR_EXPORT cgi_module;
+module MODULE_EXPORT_VAR cgi_module;
/* KLUDGE --- for back-combatibility, we don't have to check ExecCGI
* in ScriptAliased directories, which means we need to know if this
@@ -657,7 +657,7 @@ static const handler_rec cgi_handlers[] =
{NULL}
};
-module MODULE_VAR_EXPORT cgi_module =
+module MODULE_EXPORT_VAR cgi_module =
{
STANDARD20_MODULE_STUFF,
NULL, /* dir config creater */
diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c
index e8f932745b..6755ad170e 100644
--- a/modules/generators/mod_cgid.c
+++ b/modules/generators/mod_cgid.c
@@ -102,7 +102,7 @@ struct sockaddr_un {
#endif
-module MODULE_VAR_EXPORT cgid_module;
+module MODULE_EXPORT_VAR cgid_module;
static void cgid_init(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *main_server);
static int once_through = 0;
@@ -999,7 +999,7 @@ static void register_hook(void)
ap_hook_post_config(cgid_init, NULL, NULL, AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT cgid_module = {
+module MODULE_EXPORT_VAR cgid_module = {
STANDARD20_MODULE_STUFF,
NULL, /* dir config creater */
NULL, /* dir merger --- default is to override */
diff --git a/modules/generators/mod_info.c b/modules/generators/mod_info.c
index c5dda74bbc..a1517df3dc 100644
--- a/modules/generators/mod_info.c
+++ b/modules/generators/mod_info.c
@@ -103,7 +103,7 @@ typedef struct info_cfg_lines {
struct info_cfg_lines *next;
} info_cfg_lines;
-module MODULE_VAR_EXPORT info_module;
+module MODULE_EXPORT_VAR info_module;
extern module *top_module;
static void *create_info_config(ap_pool_t *p, server_rec *s)
@@ -661,7 +661,7 @@ static const handler_rec info_handlers[] =
{NULL}
};
-module MODULE_VAR_EXPORT info_module =
+module MODULE_EXPORT_VAR info_module =
{
STANDARD_MODULE_STUFF,
NULL, /* initializer */
diff --git a/modules/generators/mod_status.c b/modules/generators/mod_status.c
index 75009a5f20..19e44d996e 100644
--- a/modules/generators/mod_status.c
+++ b/modules/generators/mod_status.c
@@ -68,7 +68,7 @@
#define STATUS_MAGIC_TYPE "application/x-httpd-status"
-module MODULE_VAR_EXPORT status_module;
+module MODULE_EXPORT_VAR status_module;
static int print_status_value(void *data, const char *key, const char *val)
{
@@ -127,7 +127,7 @@ static const handler_rec status_handlers[] =
{NULL}
};
-module MODULE_VAR_EXPORT status_module =
+module MODULE_EXPORT_VAR status_module =
{
STANDARD20_MODULE_STUFF,
NULL, /* create per-dir config */
diff --git a/modules/http/http_core.c b/modules/http/http_core.c
index afefe2a0e4..cd09038916 100644
--- a/modules/http/http_core.c
+++ b/modules/http/http_core.c
@@ -2550,7 +2550,7 @@ static void register_hooks(void)
ap_hook_access_checker(do_nothing,NULL,NULL,AP_HOOK_REALLY_LAST);
}
-API_VAR_EXPORT module core_module = {
+API_EXPORT_VAR module core_module = {
STANDARD20_MODULE_STUFF,
create_core_dir_config, /* create per-directory config structure */
merge_core_dir_configs, /* merge per-directory config structures */
diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c
index 22eb2fcbdb..d7a4ef681b 100644
--- a/modules/http/http_protocol.c
+++ b/modules/http/http_protocol.c
@@ -2898,9 +2898,11 @@ API_EXPORT(void) ap_send_error_response(request_rec *r, int recursive_error)
ap_rflush(r);
}
-AP_IMPLEMENT_HOOK_RUN_ALL(int,post_read_request,(request_rec *r),(r),OK,DECLINED)
-AP_IMPLEMENT_HOOK_RUN_ALL(int,log_transaction,(request_rec *r),(r),OK,DECLINED)
-AP_IMPLEMENT_HOOK_RUN_FIRST(const char *,http_method,(const request_rec *r),(r),
- NULL)
-AP_IMPLEMENT_HOOK_RUN_FIRST(unsigned short,default_port,(const request_rec *r),
- (r),0)
+AP_IMPLEMENT_HOOK_RUN_ALL(API_EXPORT,int,post_read_request,
+ (request_rec *r),(r),OK,DECLINED)
+AP_IMPLEMENT_HOOK_RUN_ALL(API_EXPORT,int,log_transaction,
+ (request_rec *r),(r),OK,DECLINED)
+AP_IMPLEMENT_HOOK_RUN_FIRST(API_EXPORT,const char *,http_method,
+ (const request_rec *r),(r),NULL)
+AP_IMPLEMENT_HOOK_RUN_FIRST(API_EXPORT,unsigned short,default_port,
+ (const request_rec *r),(r),0)
diff --git a/modules/http/http_request.c b/modules/http/http_request.c
index f24baae1bd..9566c2d326 100644
--- a/modules/http/http_request.c
+++ b/modules/http/http_request.c
@@ -87,12 +87,18 @@ AP_HOOK_STRUCT(
AP_HOOK_LINK(auth_checker)
)
-AP_IMPLEMENT_HOOK_RUN_FIRST(int,translate_name,(request_rec *r),(r),DECLINED)
-AP_IMPLEMENT_HOOK_RUN_FIRST(int,check_user_id,(request_rec *r),(r),DECLINED)
-AP_IMPLEMENT_HOOK_RUN_ALL(int,fixups,(request_rec *r),(r),OK,DECLINED)
-AP_IMPLEMENT_HOOK_RUN_FIRST(int,type_checker,(request_rec *r),(r),DECLINED)
-AP_IMPLEMENT_HOOK_RUN_ALL(int,access_checker,(request_rec *r),(r),OK,DECLINED)
-AP_IMPLEMENT_HOOK_RUN_FIRST(int,auth_checker,(request_rec *r),(r),DECLINED)
+AP_IMPLEMENT_HOOK_RUN_FIRST(API_EXPORT,int,translate_name,
+ (request_rec *r),(r),DECLINED)
+AP_IMPLEMENT_HOOK_RUN_FIRST(API_EXPORT,int,check_user_id,
+ (request_rec *r),(r),DECLINED)
+AP_IMPLEMENT_HOOK_RUN_ALL(API_EXPORT,int,fixups,
+ (request_rec *r),(r),OK,DECLINED)
+AP_IMPLEMENT_HOOK_RUN_FIRST(API_EXPORT,int,type_checker,
+ (request_rec *r),(r),DECLINED)
+AP_IMPLEMENT_HOOK_RUN_ALL(API_EXPORT,int,access_checker,
+ (request_rec *r),(r),OK,DECLINED)
+AP_IMPLEMENT_HOOK_RUN_FIRST(API_EXPORT,int,auth_checker,
+ (request_rec *r),(r),DECLINED)
/*****************************************************************
*
diff --git a/modules/http/mod_mime.c b/modules/http/mod_mime.c
index 795de4dff0..f786f60796 100644
--- a/modules/http/mod_mime.c
+++ b/modules/http/mod_mime.c
@@ -126,7 +126,7 @@ static char tspecial[] = {
'\0'
};
-module MODULE_VAR_EXPORT mime_module;
+module MODULE_EXPORT_VAR mime_module;
static void *create_mime_dir_config(ap_pool_t *p, char *dummy)
{
@@ -741,7 +741,7 @@ static void register_hooks(void)
ap_hook_post_config(mime_post_config,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT mime_module = {
+module MODULE_EXPORT_VAR mime_module = {
STANDARD20_MODULE_STUFF,
create_mime_dir_config, /* create per-directory config structure */
merge_mime_dir_configs, /* merge per-directory config structures */
diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c
index 0727189941..a2dee51aa9 100644
--- a/modules/loggers/mod_log_config.c
+++ b/modules/loggers/mod_log_config.c
@@ -180,7 +180,7 @@
#include <limits.h>
#endif
-module MODULE_VAR_EXPORT config_log_module;
+module MODULE_EXPORT_VAR config_log_module;
static int xfer_flags = (APR_WRITE | APR_APPEND | APR_CREATE);
static ap_fileperms_t xfer_perms = APR_OS_DEFAULT;
@@ -1143,7 +1143,7 @@ static void register_hooks(void)
ap_hook_log_transaction(multi_log_transaction,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT config_log_module =
+module MODULE_EXPORT_VAR config_log_module =
{
STANDARD20_MODULE_STUFF,
NULL, /* create per-dir config */
diff --git a/modules/mappers/mod_alias.c b/modules/mappers/mod_alias.c
index ce2f2a338c..96e99ef826 100644
--- a/modules/mappers/mod_alias.c
+++ b/modules/mappers/mod_alias.c
@@ -86,7 +86,7 @@ typedef struct {
ap_array_header_t *redirects;
} alias_dir_conf;
-module MODULE_VAR_EXPORT alias_module;
+module MODULE_EXPORT_VAR alias_module;
static void *create_alias_config(ap_pool_t *p, server_rec *s)
{
@@ -405,7 +405,7 @@ static void register_hooks(void)
ap_hook_fixups(fixup_redir,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT alias_module =
+module MODULE_EXPORT_VAR alias_module =
{
STANDARD20_MODULE_STUFF,
create_alias_dir_config, /* dir config creater */
diff --git a/modules/mappers/mod_dir.c b/modules/mappers/mod_dir.c
index 0b00fc3910..0ec1921042 100644
--- a/modules/mappers/mod_dir.c
+++ b/modules/mappers/mod_dir.c
@@ -70,7 +70,7 @@
#include "http_main.h"
#include "util_script.h"
-module MODULE_VAR_EXPORT dir_module;
+module MODULE_EXPORT_VAR dir_module;
typedef struct dir_config_struct {
ap_array_header_t *index_names;
@@ -224,7 +224,7 @@ static const handler_rec dir_handlers[] =
{NULL}
};
-module MODULE_VAR_EXPORT dir_module = {
+module MODULE_EXPORT_VAR dir_module = {
STANDARD20_MODULE_STUFF,
create_dir_config, /* create per-directory config structure */
merge_dir_configs, /* merge per-directory config structures */
diff --git a/modules/mappers/mod_imap.c b/modules/mappers/mod_imap.c
index 673e495a88..c7bf5bf918 100644
--- a/modules/mappers/mod_imap.c
+++ b/modules/mappers/mod_imap.c
@@ -118,7 +118,7 @@
double strtod(); /* SunOS needed this */
#endif
-module MODULE_VAR_EXPORT imap_module;
+module MODULE_EXPORT_VAR imap_module;
typedef struct {
char *imap_menu;
@@ -900,7 +900,7 @@ static const handler_rec imap_handlers[] =
{NULL}
};
-module MODULE_VAR_EXPORT imap_module =
+module MODULE_EXPORT_VAR imap_module =
{
STANDARD20_MODULE_STUFF,
create_imap_dir_config, /* dir config creater */
diff --git a/modules/mappers/mod_negotiation.c b/modules/mappers/mod_negotiation.c
index e3aa38277b..dd236cf900 100644
--- a/modules/mappers/mod_negotiation.c
+++ b/modules/mappers/mod_negotiation.c
@@ -86,7 +86,7 @@ typedef struct {
ap_array_header_t *language_priority;
} neg_dir_config;
-module MODULE_VAR_EXPORT negotiation_module;
+module MODULE_EXPORT_VAR negotiation_module;
static void *create_neg_dir_config(ap_pool_t *p, char *dummy)
{
@@ -2743,7 +2743,7 @@ static void register_hooks(void)
ap_hook_type_checker(handle_multi,NULL,NULL,AP_HOOK_FIRST);
}
-module MODULE_VAR_EXPORT negotiation_module =
+module MODULE_EXPORT_VAR negotiation_module =
{
STANDARD20_MODULE_STUFF,
create_neg_dir_config, /* dir config creator */
diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c
index 697d3f5b26..5fb4396f53 100644
--- a/modules/mappers/mod_rewrite.c
+++ b/modules/mappers/mod_rewrite.c
@@ -211,7 +211,7 @@ static void register_hooks(void)
}
/* the main config structure */
-module MODULE_VAR_EXPORT rewrite_module = {
+module MODULE_EXPORT_VAR rewrite_module = {
STANDARD20_MODULE_STUFF,
config_perdir_create, /* create per-dir config structures */
config_perdir_merge, /* merge per-dir config structures */
diff --git a/modules/mappers/mod_so.c b/modules/mappers/mod_so.c
index ec55c43dec..6264c41861 100644
--- a/modules/mappers/mod_so.c
+++ b/modules/mappers/mod_so.c
@@ -127,13 +127,14 @@
#define CORE_PRIVATE
+#include "ap_config.h"
#include "httpd.h"
#include "http_config.h"
#include "http_log.h"
#include "ap_config.h"
#include "apr_dso.h"
-module MODULE_VAR_EXPORT so_module;
+module MODULE_EXPORT_VAR so_module;
/*
@@ -369,7 +370,7 @@ static const command_rec so_cmds[] = {
{ NULL }
};
-module MODULE_VAR_EXPORT so_module = {
+module MODULE_EXPORT_VAR so_module = {
STANDARD20_MODULE_STUFF,
NULL, /* create per-dir config */
NULL, /* merge per-dir config */
diff --git a/modules/mappers/mod_speling.c b/modules/mappers/mod_speling.c
index 29faa63529..c71b7aeb44 100644
--- a/modules/mappers/mod_speling.c
+++ b/modules/mappers/mod_speling.c
@@ -87,7 +87,7 @@
* Activate it with "CheckSpelling On"
*/
-MODULE_VAR_EXPORT module speling_module;
+MODULE_EXPORT_VAR module speling_module;
typedef struct {
int enabled;
@@ -554,7 +554,7 @@ static void register_hooks(void)
ap_hook_fixups(check_speling,NULL,NULL,AP_HOOK_LAST);
}
-module MODULE_VAR_EXPORT speling_module =
+module MODULE_EXPORT_VAR speling_module =
{
STANDARD20_MODULE_STUFF,
create_mconfig_for_directory, /* create per-dir config */
diff --git a/modules/mappers/mod_vhost_alias.c b/modules/mappers/mod_vhost_alias.c
index c5d3783214..11205e88cc 100644
--- a/modules/mappers/mod_vhost_alias.c
+++ b/modules/mappers/mod_vhost_alias.c
@@ -80,7 +80,7 @@
#include "http_core.h"
-module MODULE_VAR_EXPORT vhost_alias_module;
+module MODULE_EXPORT_VAR vhost_alias_module;
/*
@@ -463,7 +463,7 @@ static void register_hooks(void)
ap_hook_translate_name(mva_translate, NULL, NULL, AP_HOOK_MIDDLE);
};
-module MODULE_VAR_EXPORT vhost_alias_module =
+module MODULE_EXPORT_VAR vhost_alias_module =
{
STANDARD20_MODULE_STUFF,
NULL, /* dir config creater */
diff --git a/modules/metadata/mod_cern_meta.c b/modules/metadata/mod_cern_meta.c
index cface066a0..4abd05508f 100644
--- a/modules/metadata/mod_cern_meta.c
+++ b/modules/metadata/mod_cern_meta.c
@@ -168,7 +168,7 @@
#define DEFAULT_METASUFFIX ".meta"
#define DEFAULT_METAFILES 0
-module MODULE_VAR_EXPORT cern_meta_module;
+module MODULE_EXPORT_VAR cern_meta_module;
typedef struct {
char *metadir;
@@ -381,7 +381,7 @@ static void register_hooks(void)
{
ap_hook_fixups(add_cern_meta_data,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT cern_meta_module =
+module MODULE_EXPORT_VAR cern_meta_module =
{
STANDARD20_MODULE_STUFF,
create_cern_meta_dir_config,/* dir config creater */
diff --git a/modules/metadata/mod_env.c b/modules/metadata/mod_env.c
index da52b08635..6ed23cb743 100644
--- a/modules/metadata/mod_env.c
+++ b/modules/metadata/mod_env.c
@@ -113,7 +113,7 @@ typedef struct {
int vars_present;
} env_dir_config_rec;
-module MODULE_VAR_EXPORT env_module;
+module MODULE_EXPORT_VAR env_module;
static void *create_env_dir_config(ap_pool_t *p, char *dummy)
{
@@ -258,7 +258,7 @@ static void register_hooks(void)
}
-module MODULE_VAR_EXPORT env_module =
+module MODULE_EXPORT_VAR env_module =
{
STANDARD20_MODULE_STUFF,
create_env_dir_config, /* dir config creater */
diff --git a/modules/metadata/mod_expires.c b/modules/metadata/mod_expires.c
index 1a87060148..c705a7a3a1 100644
--- a/modules/metadata/mod_expires.c
+++ b/modules/metadata/mod_expires.c
@@ -216,7 +216,7 @@ typedef struct {
#define ACTIVE_OFF 0
#define ACTIVE_DONTCARE 2
-module MODULE_VAR_EXPORT expires_module;
+module MODULE_EXPORT_VAR expires_module;
static void *create_dir_expires_config(ap_pool_t *p, char *dummy)
{
@@ -497,7 +497,7 @@ static void register_hooks(void)
ap_hook_fixups(add_expires,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT expires_module =
+module MODULE_EXPORT_VAR expires_module =
{
STANDARD20_MODULE_STUFF,
create_dir_expires_config, /* dir config creater */
diff --git a/modules/metadata/mod_headers.c b/modules/metadata/mod_headers.c
index a311345ba6..c426606f02 100644
--- a/modules/metadata/mod_headers.c
+++ b/modules/metadata/mod_headers.c
@@ -127,7 +127,7 @@ typedef struct {
ap_array_header_t *headers;
} headers_conf;
-module MODULE_VAR_EXPORT headers_module;
+module MODULE_EXPORT_VAR headers_module;
static void *create_headers_config(ap_pool_t *p, server_rec *s)
{
@@ -246,7 +246,7 @@ static void register_hooks(void)
{
ap_hook_fixups(fixup_headers,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT headers_module =
+module MODULE_EXPORT_VAR headers_module =
{
STANDARD20_MODULE_STUFF,
create_headers_dir_config, /* dir config creater */
diff --git a/modules/metadata/mod_setenvif.c b/modules/metadata/mod_setenvif.c
index 13a63170cf..b939fad52b 100644
--- a/modules/metadata/mod_setenvif.c
+++ b/modules/metadata/mod_setenvif.c
@@ -146,7 +146,7 @@ typedef struct {
ap_array_header_t *conditionals;
} sei_cfg_rec;
-module MODULE_VAR_EXPORT setenvif_module;
+module MODULE_EXPORT_VAR setenvif_module;
static void *create_setenvif_config(ap_pool_t *p, server_rec *dummy)
{
@@ -407,7 +407,7 @@ static void register_hooks(void)
ap_hook_post_read_request(match_headers,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT setenvif_module =
+module MODULE_EXPORT_VAR setenvif_module =
{
STANDARD20_MODULE_STUFF,
NULL, /* dir config creater */
diff --git a/modules/metadata/mod_unique_id.c b/modules/metadata/mod_unique_id.c
index 677e3b2bf1..6e53f40f49 100644
--- a/modules/metadata/mod_unique_id.c
+++ b/modules/metadata/mod_unique_id.c
@@ -400,7 +400,7 @@ static void register_hooks(void)
ap_hook_post_read_request(gen_unique_id, NULL, NULL, AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT unique_id_module = {
+module MODULE_EXPORT_VAR unique_id_module = {
STANDARD20_MODULE_STUFF,
NULL, /* dir config creater */
NULL, /* dir merger --- default is to override */
diff --git a/modules/metadata/mod_usertrack.c b/modules/metadata/mod_usertrack.c
index 7698f24c86..aa849c2853 100644
--- a/modules/metadata/mod_usertrack.c
+++ b/modules/metadata/mod_usertrack.c
@@ -105,7 +105,7 @@
#include "http_core.h"
#include "http_request.h"
-module MODULE_VAR_EXPORT usertrack_module;
+module MODULE_EXPORT_VAR usertrack_module;
typedef struct {
int always;
@@ -307,7 +307,7 @@ static void register_hooks(void)
{
ap_hook_fixups(spot_cookie,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT usertrack_module = {
+module MODULE_EXPORT_VAR usertrack_module = {
STANDARD20_MODULE_STUFF,
make_cookie_dir, /* dir config creater */
NULL, /* dir merger --- default is to override */
diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c
index 1d086f3000..8cfae556a0 100644
--- a/modules/proxy/mod_proxy.c
+++ b/modules/proxy/mod_proxy.c
@@ -880,7 +880,7 @@ static const command_rec proxy_cmds[] =
{NULL}
};
-module MODULE_VAR_EXPORT proxy_module =
+module MODULE_EXPORT_VAR proxy_module =
{
STANDARD_MODULE_STUFF,
proxy_init, /* initializer */
diff --git a/modules/proxy/mod_proxy.h b/modules/proxy/mod_proxy.h
index 7d0a5753ea..2aa35c4b1f 100644
--- a/modules/proxy/mod_proxy.h
+++ b/modules/proxy/mod_proxy.h
@@ -112,7 +112,7 @@
#include "explain.h"
-extern module MODULE_VAR_EXPORT proxy_module;
+extern module MODULE_EXPORT_VAR proxy_module;
/* for proxy_canonenc() */
diff --git a/os/win32/os.h b/os/win32/os.h
index ad5b38d6a4..33c934b25e 100644
--- a/os/win32/os.h
+++ b/os/win32/os.h
@@ -117,27 +117,6 @@ typedef int pid_t;
typedef int mode_t;
typedef char * caddr_t;
-/*
-Define export types. API_EXPORT_NONSTD is a nasty hack to avoid having to declare
-every configuration function as __stdcall.
-*/
-
-#if defined(API_EXPORT_SYMBOLS)
-#define API_VAR_EXPORT __declspec(dllexport)
-#define API_EXPORT(type) __declspec(dllexport) type __stdcall
-#define API_EXPORT_NONSTD(type) __declspec(dllexport) type
-#elif defined(API_STATIC)
-#define API_VAR_EXPORT
-#define API_EXPORT(type) type __stdcall
-#define API_EXPORT_NONSTD(type) type
-#else
-#define API_VAR_EXPORT __declspec(dllimport)
-#define API_EXPORT(type) __declspec(dllimport) type __stdcall
-#define API_EXPORT_NONSTD(type) __declspec(dllimport) type
-#endif
-
-#define MODULE_VAR_EXPORT __declspec(dllexport)
-
#define HAVE_MEMMOVE
#define HAVE_STRCASECMP
#define HAVE_STRNCASECMP
@@ -156,7 +135,6 @@ every configuration function as __stdcall.
#define S_ISDIR(m) (((m) & S_IFDIR) == S_IFDIR)
#endif
-
#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
diff --git a/server/config.c b/server/config.c
index d9a433848b..be13fca5d4 100644
--- a/server/config.c
+++ b/server/config.c
@@ -85,6 +85,14 @@
#include "http_vhost.h"
#include "util_cfgtree.h"
+API_EXPORT_VAR const char *ap_server_argv0;
+
+API_EXPORT_VAR const char *ap_server_root;
+
+API_EXPORT_VAR ap_array_header_t *ap_server_pre_read_config;
+API_EXPORT_VAR ap_array_header_t *ap_server_post_read_config;
+API_EXPORT_VAR ap_array_header_t *ap_server_config_defines;
+
AP_HOOK_STRUCT(
AP_HOOK_LINK(header_parser)
AP_HOOK_LINK(post_config)
@@ -92,14 +100,16 @@ AP_HOOK_STRUCT(
AP_HOOK_LINK(child_init)
)
-AP_IMPLEMENT_HOOK_RUN_ALL(int,header_parser,(request_rec *r),(r),OK,DECLINED)
-AP_IMPLEMENT_HOOK_VOID(post_config,
- (ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *s),
- (pconf,plog,ptemp,s))
-AP_IMPLEMENT_HOOK_VOID(open_logs,
- (ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *s),
- (pconf,plog,ptemp,s))
-AP_IMPLEMENT_HOOK_VOID(child_init,(ap_pool_t *pchild, server_rec *s),(pchild,s))
+AP_IMPLEMENT_HOOK_RUN_ALL(API_EXPORT,int,header_parser,
+ (request_rec *r),(r),OK,DECLINED)
+AP_IMPLEMENT_HOOK_VOID(API_EXPORT,post_config,
+ (ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp,
+ server_rec *s),(pconf,plog,ptemp,s))
+AP_IMPLEMENT_HOOK_VOID(API_EXPORT,open_logs,
+ (ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp,
+ server_rec *s),(pconf,plog,ptemp,s))
+AP_IMPLEMENT_HOOK_VOID(API_EXPORT,child_init,
+ (ap_pool_t *pchild, server_rec *s),(pchild,s))
/****************************************************************
*
@@ -116,8 +126,8 @@ static int total_modules = 0;
* than DYNAMIC_MODULE_LIMIT.
*/
static int dynamic_modules = 0;
-API_VAR_EXPORT module *top_module = NULL;
-API_VAR_EXPORT module **ap_loaded_modules=NULL;
+API_EXPORT_VAR module *top_module = NULL;
+API_EXPORT_VAR module **ap_loaded_modules=NULL;
typedef int (*handler_func) (request_rec *);
typedef void *(*dir_maker_func) (ap_pool_t *, char *);
@@ -356,9 +366,6 @@ int ap_invoke_handler(request_rec *r)
return HTTP_INTERNAL_SERVER_ERROR;
}
-int g_bDebugHooks;
-const char *g_szCurrentHookName;
-
void ap_register_hooks(module *m)
{
if(m->register_hooks)
@@ -532,6 +539,8 @@ void ap_setup_prelinked_modules(process_rec *process)
module **m;
module **m2;
+ g_pHookPool=process->pconf;
+
/*
* Initialise total_modules variable and module indices
*/
@@ -1552,6 +1561,15 @@ void ap_single_module_configure(ap_pool_t *p, server_rec *s, module *m)
(*m->create_dir_config)(p, NULL));
}
+void ap_run_rewrite_args(process_rec *process)
+{
+ module *m;
+
+ for (m = top_module; m; m = m->next)
+ if (m->rewrite_args)
+ (*m->rewrite_args) (process);
+}
+
void ap_run_pre_config(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp)
{
module *m;
diff --git a/server/connection.c b/server/connection.c
index 1967107c5a..1802ec93ef 100644
--- a/server/connection.c
+++ b/server/connection.c
@@ -72,8 +72,10 @@ AP_HOOK_STRUCT(
AP_HOOK_LINK(process_connection)
)
-AP_IMPLEMENT_HOOK_RUN_ALL(int,pre_connection,(conn_rec *c),(c),OK,DECLINED)
-AP_IMPLEMENT_HOOK_RUN_FIRST(int,process_connection,(conn_rec *c),(c),DECLINED)
+AP_IMPLEMENT_HOOK_RUN_ALL(API_EXPORT,int,pre_connection,
+ (conn_rec *c),(c),OK,DECLINED)
+AP_IMPLEMENT_HOOK_RUN_FIRST(API_EXPORT,int,process_connection,
+ (conn_rec *c),(c),DECLINED)
/*
* More machine-dependent networking gooo... on some systems,
diff --git a/server/mpm/dexter/dexter.c b/server/mpm/dexter/dexter.c
index 0805cfddfa..4eee463883 100644
--- a/server/mpm/dexter/dexter.c
+++ b/server/mpm/dexter/dexter.c
@@ -1456,7 +1456,7 @@ LISTEN_COMMANDS
{ NULL }
};
-module MODULE_VAR_EXPORT mpm_dexter_module = {
+module MODULE_EXPORT_VAR mpm_dexter_module = {
MPM20_MODULE_STUFF,
dexter_pre_config, /* run hook before the configuration is read */
NULL, /* create per-directory config structure */
diff --git a/server/mpm/mpmt_beos/mpmt_beos.c b/server/mpm/mpmt_beos/mpmt_beos.c
index d912648053..879f38e32e 100644
--- a/server/mpm/mpmt_beos/mpmt_beos.c
+++ b/server/mpm/mpmt_beos/mpmt_beos.c
@@ -90,7 +90,7 @@ static int min_spare_threads=0;
static int max_spare_threads=0;
static int ap_daemons_limit=0;
static time_t ap_restart_time=0;
-API_VAR_EXPORT int ap_extended_status = 0;
+API_EXPORT_VAR int ap_extended_status = 0;
static int workers_may_exit = 0;
static int requests_this_child;
static int num_listenfds = 0;
@@ -1259,7 +1259,7 @@ LISTEN_COMMANDS
{ NULL }
};
-module MODULE_VAR_EXPORT mpm_mpmt_beos_module = {
+module MODULE_EXPORT_VAR mpm_mpmt_beos_module = {
MPM20_MODULE_STUFF,
mpmt_beos_pre_config, /* hook run before the configuration is read */
NULL, /* create per-directory config structure */
diff --git a/server/mpm/mpmt_pthread/mpmt_pthread.c b/server/mpm/mpmt_pthread/mpmt_pthread.c
index 2c4355fa09..4207e96974 100644
--- a/server/mpm/mpmt_pthread/mpmt_pthread.c
+++ b/server/mpm/mpmt_pthread/mpmt_pthread.c
@@ -88,13 +88,13 @@
int ap_threads_per_child=0; /* Worker threads per child */
int ap_max_requests_per_child=0;
static char *ap_pid_fname=NULL;
-API_VAR_EXPORT char *ap_scoreboard_fname=NULL;
+API_EXPORT_VAR char *ap_scoreboard_fname=NULL;
static int ap_daemons_to_start=0;
static int min_spare_threads=0;
static int max_spare_threads=0;
static int ap_daemons_limit=0;
static time_t ap_restart_time=0;
-API_VAR_EXPORT int ap_extended_status = 0;
+API_EXPORT_VAR int ap_extended_status = 0;
static int workers_may_exit = 0;
static int requests_this_child;
static int num_listensocks = 0;
@@ -1475,7 +1475,7 @@ LISTEN_COMMANDS
{ NULL }
};
-module MODULE_VAR_EXPORT mpm_mpmt_pthread_module = {
+module MODULE_EXPORT_VAR mpm_mpmt_pthread_module = {
MPM20_MODULE_STUFF,
mpmt_pthread_pre_config, /* run hook before the configuration is read */
NULL, /* create per-directory config structure */
diff --git a/server/mpm/mpmt_pthread/scoreboard.c b/server/mpm/mpmt_pthread/scoreboard.c
index ffda41a9c7..74d57502b2 100644
--- a/server/mpm/mpmt_pthread/scoreboard.c
+++ b/server/mpm/mpmt_pthread/scoreboard.c
@@ -73,7 +73,7 @@
scoreboard *ap_scoreboard_image = NULL;
new_scoreboard *ap_new_scoreboard_image = NULL;
static int maintain_connection_status = 1;
-API_VAR_EXPORT char *ap_scoreboard_fname;
+API_EXPORT_VAR char *ap_scoreboard_fname;
/*****************************************************************
*
* Dealing with the scoreboard... a lot of these variables are global
diff --git a/server/mpm/mpmt_pthread/scoreboard.h b/server/mpm/mpmt_pthread/scoreboard.h
index 9d64c9a191..43ec6c7c21 100644
--- a/server/mpm/mpmt_pthread/scoreboard.h
+++ b/server/mpm/mpmt_pthread/scoreboard.h
@@ -240,9 +240,9 @@ void ap_time_process_request(int child_num, int thread_num, int status);
-API_VAR_EXPORT extern scoreboard *ap_scoreboard_image;
+API_EXPORT_VAR extern scoreboard *ap_scoreboard_image;
-API_VAR_EXPORT extern ap_generation_t volatile ap_my_generation;
+API_EXPORT_VAR extern ap_generation_t volatile ap_my_generation;
/* for time_process_request() in http_main.c */
#define START_PREQUEST 1
diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c
index 2d5a249864..755b10571f 100644
--- a/server/mpm/prefork/prefork.c
+++ b/server/mpm/prefork/prefork.c
@@ -172,7 +172,7 @@ int tpf_child = 0;
char tpf_server_name[INETD_SERVNAME_LENGTH+1];
#endif /* TPF */
-API_VAR_EXPORT scoreboard *ap_scoreboard_image = NULL;
+API_EXPORT_VAR scoreboard *ap_scoreboard_image = NULL;
static new_scoreboard *ap_new_scoreboard_image = NULL;
#ifdef GPROF
@@ -2434,7 +2434,7 @@ LISTEN_COMMANDS
{ NULL }
};
-module MODULE_VAR_EXPORT mpm_prefork_module = {
+module MODULE_EXPORT_VAR mpm_prefork_module = {
MPM20_MODULE_STUFF,
prefork_pre_config, /* run hook before the configuration is read */
NULL, /* create per-directory config structure */
diff --git a/server/mpm/prefork/scoreboard.h b/server/mpm/prefork/scoreboard.h
index fe4c2589f1..c370f01823 100644
--- a/server/mpm/prefork/scoreboard.h
+++ b/server/mpm/prefork/scoreboard.h
@@ -214,9 +214,9 @@ typedef struct {
API_EXPORT(void) ap_sync_scoreboard_image(void);
API_EXPORT(int) ap_exists_scoreboard_image(void);
-API_VAR_EXPORT extern scoreboard *ap_scoreboard_image;
+API_EXPORT_VAR extern scoreboard *ap_scoreboard_image;
-API_VAR_EXPORT extern ap_generation_t volatile ap_my_generation;
+API_EXPORT_VAR extern ap_generation_t volatile ap_my_generation;
/* for time_process_request() in http_main.c */
#define START_PREQUEST 1
diff --git a/server/mpm/spmt_os2/scoreboard.h b/server/mpm/spmt_os2/scoreboard.h
index 27baf2bc39..3d7335fb47 100644
--- a/server/mpm/spmt_os2/scoreboard.h
+++ b/server/mpm/spmt_os2/scoreboard.h
@@ -195,7 +195,7 @@ typedef struct {
API_EXPORT(int) ap_exists_scoreboard_image(void);
-API_VAR_EXPORT extern scoreboard *ap_scoreboard_image;
+API_EXPORT_VAR extern scoreboard *ap_scoreboard_image;
/* for time_process_request() in http_main.c */
diff --git a/server/mpm/spmt_os2/spmt_os2.c b/server/mpm/spmt_os2/spmt_os2.c
index 2d4218e120..ea9061480c 100644
--- a/server/mpm/spmt_os2/spmt_os2.c
+++ b/server/mpm/spmt_os2/spmt_os2.c
@@ -1669,7 +1669,7 @@ LISTEN_COMMANDS
{ NULL }
};
-module MODULE_VAR_EXPORT mpm_spmt_os2_module = {
+module MODULE_EXPORT_VAR mpm_spmt_os2_module = {
MPM20_MODULE_STUFF,
spmt_os2_pre_config, /* hook run before the configuration is read */
NULL, /* create per-directory config structure */
diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c
index 78c000340b..698a2db7f5 100644
--- a/server/mpm/winnt/mpm_winnt.c
+++ b/server/mpm/winnt/mpm_winnt.c
@@ -57,8 +57,9 @@
*/
#define CORE_PRIVATE
-#include "apr_portable.h"
+#include "ap_config.h"
#include "httpd.h"
+#include "apr_portable.h"
#include "http_main.h"
#include "http_log.h"
#include "http_config.h" /* for read_config */
@@ -105,7 +106,7 @@ HANDLE maintenance_event;
ap_lock_t *start_mutex;
DWORD my_pid;
DWORD parent_pid;
-API_VAR_EXPORT ap_completion_t ap_mpm_init_complete = NULL;
+API_EXPORT_VAR ap_completion_t ap_mpm_init_complete = NULL;
static ap_status_t socket_cleanup(void *sock)
{
@@ -1966,7 +1967,7 @@ LISTEN_COMMANDS
{ NULL }
};
-module MODULE_VAR_EXPORT mpm_winnt_module = {
+module MODULE_EXPORT_VAR mpm_winnt_module = {
MPM20_MODULE_STUFF,
winnt_pre_config, /* hook run before configuration is read */
NULL, /* create per-directory config structure */
diff --git a/server/mpm/winnt/mpm_winnt.h b/server/mpm/winnt/mpm_winnt.h
index e0f7b50620..d53686039d 100644
--- a/server/mpm/winnt/mpm_winnt.h
+++ b/server/mpm/winnt/mpm_winnt.h
@@ -67,7 +67,7 @@ extern int ap_extended_status;
extern void clean_child_exit(int);
typedef void (CALLBACK *ap_completion_t)();
-API_VAR_EXPORT ap_completion_t ap_mpm_init_complete;
+API_EXPORT_VAR ap_completion_t ap_mpm_init_complete;
API_EXPORT(void) ap_start_shutdown(void);
diff --git a/server/mpm/winnt/registry.c b/server/mpm/winnt/registry.c
index ed41d48564..f3e842c44e 100644
--- a/server/mpm/winnt/registry.c
+++ b/server/mpm/winnt/registry.c
@@ -83,7 +83,7 @@
* HKLM\Software\[Vendor]\[Software]\[Version]\ServerRoot
*/
-#include "os.h"
+#include "ap_config.h"
#include "httpd.h"
#include "http_log.h"
diff --git a/server/mpm/winnt/service.c b/server/mpm/winnt/service.c
index 412f25d046..9f5c5b1908 100644
--- a/server/mpm/winnt/service.c
+++ b/server/mpm/winnt/service.c
@@ -61,6 +61,7 @@
#define CORE_PRIVATE
#include "main_win32.h"
+#include "ap_config.h"
#include "httpd.h"
#include "http_conf_globals.h"
#include "http_log.h"
@@ -70,8 +71,8 @@
#include "..\..\modules\mpm\winnt\winnt.h"
typedef void (CALLBACK *ap_completion_t)();
-API_VAR_IMPORT ap_completion_t ap_mpm_init_complete;
-API_VAR_IMPORT char *ap_server_argv0;
+API_EXPORT_VAR ap_completion_t ap_mpm_init_complete;
+API_EXPORT_VAR char *ap_server_argv0;
static struct
{