]> granicus.if.org Git - apache/commitdiff
This patch corrects the issues from the AP_EXPORT and linkage
authorWilliam A. Rowe Jr <wrowe@apache.org>
Sat, 27 May 2000 05:28:02 +0000 (05:28 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Sat, 27 May 2000 05:28:02 +0000 (05:28 +0000)
  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

62 files changed:
ApacheCore.dsp
httpd.dsp
include/ap_config.h
include/ap_mpm.h
include/http_config.h
include/http_connection.h
include/http_core.h
include/http_main.h
include/http_protocol.h
include/http_request.h
include/httpd.h
modules/aaa/mod_access.c
modules/aaa/mod_auth.c
modules/aaa/mod_auth_anon.c
modules/aaa/mod_auth_digest.c
modules/cache/mod_file_cache.c
modules/echo/mod_echo.c
modules/filters/mod_include.c
modules/generators/mod_asis.c
modules/generators/mod_autoindex.c
modules/generators/mod_cgi.c
modules/generators/mod_cgid.c
modules/generators/mod_info.c
modules/generators/mod_status.c
modules/http/http_core.c
modules/http/http_protocol.c
modules/http/http_request.c
modules/http/mod_mime.c
modules/loggers/mod_log_config.c
modules/mappers/mod_alias.c
modules/mappers/mod_dir.c
modules/mappers/mod_imap.c
modules/mappers/mod_negotiation.c
modules/mappers/mod_rewrite.c
modules/mappers/mod_so.c
modules/mappers/mod_speling.c
modules/mappers/mod_vhost_alias.c
modules/metadata/mod_cern_meta.c
modules/metadata/mod_env.c
modules/metadata/mod_expires.c
modules/metadata/mod_headers.c
modules/metadata/mod_setenvif.c
modules/metadata/mod_unique_id.c
modules/metadata/mod_usertrack.c
modules/proxy/mod_proxy.c
modules/proxy/mod_proxy.h
os/win32/os.h
server/config.c
server/connection.c
server/mpm/dexter/dexter.c
server/mpm/mpmt_beos/mpmt_beos.c
server/mpm/mpmt_pthread/mpmt_pthread.c
server/mpm/mpmt_pthread/scoreboard.c
server/mpm/mpmt_pthread/scoreboard.h
server/mpm/prefork/prefork.c
server/mpm/prefork/scoreboard.h
server/mpm/spmt_os2/scoreboard.h
server/mpm/spmt_os2/spmt_os2.c
server/mpm/winnt/mpm_winnt.c
server/mpm/winnt/mpm_winnt.h
server/mpm/winnt/registry.c
server/mpm/winnt/service.c

index 5954845552f59598ff30c4ba9a58c60b785d4420..4ec81c45d82672cc38a8c8fbafe37b6db4ca14a2 100644 (file)
@@ -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
index 5954845552f59598ff30c4ba9a58c60b785d4420..4ec81c45d82672cc38a8c8fbafe37b6db4ca14a2 100644 (file)
--- 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
index dd779b2d01667530d7fb9565dd48cfe036231554..b6e7f00b3e290ee23779e524c05aca12a74e767d 100644 (file)
 #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>
index d4a4d341ded3217260cb0c8727b93489aee11f2f..2828f212241dfc4cb65b6711985ef69cc7c47282 100644 (file)
@@ -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.
index 741252de86e841293dec03c97ff2e7f4d0b25d77..810913a466d0d6b06c3fa6ee235fce760c8be393 100644 (file)
@@ -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
 }
index cb504534ef15ceaae1a2b9c65c4aadd20a205e6e..dafc5c493472f55676b3b70ad3cefb8ea6e4dc20 100644 (file)
@@ -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
 }
index 71ad9536f08d7e94ab4b2a30b6d03505e429f725..b479edf2b2bc65ede013d868c9b981b2811ef163 100644 (file)
@@ -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 */
 
index fecd5be56c71dba45cb9a43b27ecd0e1d2c7931d..09b3f07240ca6ef44353112a99b944620d6aa446 100644 (file)
 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
 }
index ea1b59ab4bcd3f27428053088119cfff8ea61bed..5c995cebaa185796449c23d1cfcf56d2abc2c2bc 100644 (file)
@@ -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
 }
index 57630c15d194813d599c8b49104259d6db55c9f5..30051f56fe0d8c6cfd2b104fe48a3ae1be5a7c6b 100644 (file)
@@ -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
 }
index cf3f83e7f15279df616109a63837f662ca61e147..be6216bb2d16bb52781bca7f0453e9ed8d13c5fb 100644 (file)
@@ -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
index 78c669f66f52618f8fbb6eae9818260564e4d4a6..f73c45f62e839f1cb7e990dd8b4a08d9ce095357 100644 (file)
@@ -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 */
index 4a6de2f02d49f510c3bf0774f819f8e8c097b092..657eeb56be4d1d2303cca89b4a635641a1352800 100644 (file)
@@ -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 */
index 3a786d007f506ece3835514df946ba67e91a9538..89b00ab0082a710d2e3b557ea776ed4958682060 100644 (file)
@@ -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 */
index 4ad04a3f20312fdaddb1a7a7bc870ccbd6fa8ec5..39a44fa3dac6dbc1e71dc5183973bb89059f14d6 100644 (file)
@@ -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 */
index 1326e56c678ab2f99fd423b9196bf3f82857c2e8..af2edfb2e2dd0be50e5e1e7184856aead637b63b 100644 (file)
 #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 */
index 752a0dd1e50d08f321ff0abbad0c87a79e436647..f635ff5688ec3d70bd1a523ed5049fb05522ab4e 100644 (file)
@@ -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 */
index dbfa41ad8f85810ebd490f082f2547b5392ad680..cfc6b7fcaea147292e351f27ea094835416edb79 100644 (file)
 #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 */
index 4466e9c00c6ec278af0b1e429b90203dea190a72..603f67362d4d9996ec613c133359c8da61b1c762 100644 (file)
@@ -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 */
index 83ed3023211d9faa1d65f11f660a8055614ed874..0631b14d4cc4bc96110b54ee7ae0ef6d4f6570d1 100644 (file)
@@ -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 */
index 4ab25957c329f7f0b488afd75cf9184d97d0c4c4..2899fa3598a5dd4b63be43a38adff6b6941c6c46 100644 (file)
@@ -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 */
index e8f932745be09a43c988a0497963ffbc1af59793..6755ad170ec1d0aa013042374105ebf286369801 100644 (file)
@@ -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 */ 
index c5dda74bbc4b466e60ca37cbe8b72fff16b3eeb3..a1517df3dc85930ad046397042405b5d7c85a072 100644 (file)
@@ -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 */
index 75009a5f20446e79b175a4196f61e85b2cf4ac51..19e44d996ecdb0adac0ddecbbf6e70b659039778 100644 (file)
@@ -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 */
index afefe2a0e40f1e08b1df17ffec3a4dedd8d07f40..cd0903891646205d27d8b5b5390707c942dc3c75 100644 (file)
@@ -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 */
index 22eb2fcbdb49731a06b111899df5aabe9b802353..d7a4ef681b72a21907fd495d6bfa5c1041a3b78a 100644 (file)
@@ -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)
index f24baae1bdc9a2f5310e8ed0adcfdd8655e9ce0c..9566c2d326482cbc22db37039c9db942776d4741 100644 (file)
@@ -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)
 
 /*****************************************************************
  *
index 795de4dff0c2f69207baf6cc17268baf351978bd..f786f60796cea7a8732a0bbe1cecf087eadc4bdb 100644 (file)
@@ -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 */
index 07271899414ef67c5180504f3e60090911118003..a2dee51aa9710753a899583af8e6a91fa1cdb66f 100644 (file)
 #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 */
index ce2f2a338c9171b6a20283e52b5afbc28d0bda58..96e99ef82602d6e402b2c47833d99aa6aa4e99c7 100644 (file)
@@ -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 */
index 0b00fc39102e526b571392feb73aba1a4c9e0dd4..0ec192104247cb58a9e5eab4200defbecc2c1aee 100644 (file)
@@ -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 */
index 673e495a88db4733c022e5419d7a93eb89afb0e5..c7bf5bf918beb69819df3e514576607ed31051e0 100644 (file)
 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 */
index e3aa38277b82c351e3ce9b886ee5284839a65cb6..dd236cf90019adc437bc750e64c3bd885ff59931 100644 (file)
@@ -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 */
index 697d3f5b268de2c84741ea90b11083c5899084bd..5fb4396f53bab34ae46a2b0d679e42bc4bcb088f 100644 (file)
@@ -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 */
index ec55c43dec880d9d8bdcc848970a42c89df98ef0..6264c41861b56bd844919ab287c3cd0f1f26f2d5 100644 (file)
 
 
 #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 */
index 29faa63529e6fbd277146280977a24f0cc32067b..c71b7aeb446f369c4baa6c454f52244fd0895eb3 100644 (file)
@@ -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 */
index c5d37832145c095f65a338938e23c0d84531c082..11205e88ccdc61325adeb7c46ca18f38a9ce5678 100644 (file)
@@ -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 */
index cface066a0f659378a59324fe389951ad41c3535..4abd05508fc5c326a3242b548913dfb4e737175b 100644 (file)
 #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 */
index da52b08635c3fc7fa6c21d35d16cbdffe3b90cf7..6ed23cb74368486ce762359fb5b2c004679359f8 100644 (file)
@@ -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 */
index 1a870601485885ab3a4a1d8be2ae3c49549c2066..c705a7a3a17a72af9da94133f12133499584c3a6 100644 (file)
@@ -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 */
index a311345ba6af3d580d18e76538037761eee72dbf..c426606f023a95c3b14bcc8d299375458e9126b4 100644 (file)
@@ -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 */
index 13a63170cf3d086cec96d5423e7ffe8ccafb8cff..b939fad52b04ce4d1b650ab3bfd08473aa6d38a3 100644 (file)
@@ -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 */
index 677e3b2bf18a3a296d6323614eae37acaf880430..6e53f40f49f6a34255382f95b6f3514925c59778 100644 (file)
@@ -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 */
index 7698f24c861acab0f1bbe02ef5fe2477eae0b8a7..aa849c28530d7d80e8fe8247f62d686654ab8e48 100644 (file)
 #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 */
index 1d086f30006d598caa39161892cdbe9897b17e37..8cfae556a07ac3a6377840f83a417bfe06624b24 100644 (file)
@@ -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 */
index 7d0a5753ea2855048f08395ac559f08aa1de2bd2..2aa35c4b1f4964497482904d1353dfdd592aca11 100644 (file)
 
 #include "explain.h"
 
-extern module MODULE_VAR_EXPORT proxy_module;
+extern module MODULE_EXPORT_VAR proxy_module;
 
 
 /* for proxy_canonenc() */
index ad5b38d6a442e631722a45c2e099b24bf3ecd3a6..33c934b25ebe94288e74066e253e0c3eb3c62bc3 100644 (file)
@@ -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
index d9a433848ba47e7ed057018373a01ff1f9c0b154..be13fca5d44a5ae887efdf75ab07387e07c01978 100644 (file)
 #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;
index 1967107c5a9af9a61e2027a115214aec789c1d50..1802ec93ef1b0ea0c9fdef81f21aa2e8bbd43d9f 100644 (file)
@@ -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,
index 0805cfddfabc00e87338663ec356083dffb4d93d..4eee4638837669c35dd2afa0c263f063b6d66d45 100644 (file)
@@ -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 */
index d9126480530a324b667c91098bc2bb2b5129a4fe..879f38e32e975c766acc78ad131bfa78973b1773 100644 (file)
@@ -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 */
index 2c4355fa093eb98eb3dfed5297cb189620509dfc..4207e96974e4a9640700c824cf91f985d2711730 100644 (file)
 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 */
index ffda41a9c7924a4ea7d4379e9d3e2a15462a12f6..74d57502b28c182efd62a177cca522aed57f5d60 100644 (file)
@@ -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
index 9d64c9a1914294924875bb36e6daf76d47e96df6..43ec6c7c2160b8560fe4c6122bf118f3a2415dc9 100644 (file)
@@ -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
index 2d5a249864a0e38e8e167d578bc7db0f52f5caa1..755b10571f5ec4856a2cf510e32a0d09ac14a4b5 100644 (file)
@@ -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 */
index fe4c2589f1757fdaba5e25d2c0f9309ccdb3623f..c370f018236b3982b5f8ba1d3f3bafc2099796a1 100644 (file)
@@ -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
index 27baf2bc394e3d60fdfe5b9f033b57584ab64ae4..3d7335fb47ab168581de61ac928d5c1dcd804ea7 100644 (file)
@@ -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 */
index 2d4218e1209394749ff9c93f878bb1942330eccf..ea9061480c940cfb47e35b057a99e9b2f86049e8 100644 (file)
@@ -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 */
index 78c000340b272a1218793dae77544742ef4124e3..698a2db7f5505a4aebe5972c82ab6e14be40fc55 100644 (file)
@@ -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 */
index e0f7b506205c19242e19522468007d8aa8c6d5dc..d53686039db142e5e10b9c7312102121b794e661 100644 (file)
@@ -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);
 
index ed41d485643a7e009ebb6d05885fde9bcf6e1f35..f3e842c44e0c760a0bb4e31c387e3c60ee8e78ea 100644 (file)
@@ -83,7 +83,7 @@
  * HKLM\Software\[Vendor]\[Software]\[Version]\ServerRoot
  */
 
-#include "os.h"
+#include "ap_config.h"
 #include "httpd.h"
 #include "http_log.h"
 
index 412f25d04600c5f61b935d4a8979d6537cffc450..9f5c5b1908b15709d75d55fe928ec11db704ab50 100644 (file)
@@ -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
 {