* It's mainly important for the DSO facility
* (see also mod_so).
*/
+ void (*rewrite_args) (process_rec *process);
void (*pre_config) (ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp);
void *(*create_dir_config) (ap_pool_t *p, char *dir);
void *(*merge_dir_config) (ap_pool_t *p, void *base_conf, void *new_conf);
NULL, \
NULL, \
MODULE_MAGIC_COOKIE, \
+ NULL, \
NULL
#define MPM20_MODULE_STUFF MODULE_MAGIC_NUMBER_MAJOR, \
server_rec *ap_read_config(process_rec *process, ap_pool_t *temp_pool, const char *config_name);
void ap_post_config_hook(ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *s);
void ap_child_init_hook(ap_pool_t *pchild, server_rec *s);
+void ap_run_rewrite_args(process_rec *process);
void ap_run_pre_config(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp);
void ap_register_hooks(module *m);
#include "apr_getopt.h"
#include "ap_mpm.h"
-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;
-
/* XXX - We should be able to grab the per-MPM settings here too */
static void show_compile_settings(void)
{
destroy_and_exit_process(process, 1);
}
-ap_pool_t *g_pHookPool;
-
#ifdef WIN32
API_EXPORT(int) apache_main(int argc, char *argv[])
#else
ap_util_uri_init();
- g_pHookPool=pconf;
-
ap_setup_prelinked_modules(process);
ap_create_pool(&pcommands, pglobal);
ap_server_post_read_config = ap_make_array(pcommands, 1, sizeof(char *));
ap_server_config_defines = ap_make_array(pcommands, 1, sizeof(char *));
- while (ap_getopt(argc, argv, "C:c:d:f:k:vVlLth", &c, pcommands) == APR_SUCCESS) {
+ ap_run_rewrite_args(process);
+
+ while (ap_getopt(argc, argv, "C:c:D:d:f:vVlLth?", &c, pcommands) == APR_SUCCESS) {
char **new;
switch (c) {
case 'c':
case 'd':
def_server_root = ap_optarg;
break;
+ case 'D':
+ new = (char **)ap_push_array(ap_server_config_defines);
+ *new = ap_pstrdup(pcommands, ap_optarg);
+ break;
case 'f':
confname = ap_optarg;
break;
case 't':
configtestonly = 1;
break;
- case 'h':
- usage(process);
case '?':
+ case 'h':
usage(process);
}
}
module MODULE_EXPORT_VAR mpm_dexter_module = {
MPM20_MODULE_STUFF,
+ NULL, /* hook to run before apache parses args */
dexter_pre_config, /* run hook before the configuration is read */
NULL, /* create per-directory config structure */
NULL, /* merge per-directory config structures */
module MODULE_EXPORT_VAR mpm_mpmt_beos_module = {
MPM20_MODULE_STUFF,
+ NULL, /* hook to run before apache parses args */
mpmt_beos_pre_config, /* hook run before the configuration is read */
NULL, /* create per-directory config structure */
NULL, /* merge per-directory config structures */
module MODULE_EXPORT_VAR mpm_mpmt_pthread_module = {
MPM20_MODULE_STUFF,
+ NULL, /* hook to run before apache parses args */
mpmt_pthread_pre_config, /* run hook before the configuration is read */
NULL, /* create per-directory config structure */
NULL, /* merge per-directory config structures */
module MODULE_EXPORT_VAR mpm_prefork_module = {
MPM20_MODULE_STUFF,
+ NULL, /* hook to run before apache parses args */
prefork_pre_config, /* run hook before the configuration is read */
NULL, /* create per-directory config structure */
NULL, /* merge per-directory config structures */
module MODULE_EXPORT_VAR mpm_spmt_os2_module = {
MPM20_MODULE_STUFF,
+ NULL, /* hook to run before apache parses args */
spmt_os2_pre_config, /* hook run before the configuration is read */
NULL, /* create per-directory config structure */
NULL, /* merge per-directory config structures */
module MODULE_EXPORT_VAR mpm_winnt_module = {
MPM20_MODULE_STUFF,
+ NULL, /* hook run before arguments are parsed */
winnt_pre_config, /* hook run before configuration is read */
NULL, /* create per-directory config structure */
NULL, /* merge per-directory config structures */