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
This commit is contained in:
William A. Rowe Jr
2000-05-27 05:28:02 +00:00
parent c361eb1a65
commit 86e2a18f2a
62 changed files with 207 additions and 176 deletions

View File

@ -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;