httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@locus.apache.org
Subject cvs commit: apache-2.0/src/modules/mpm/winnt winnt.c
Date Sat, 27 May 2000 06:22:56 GMT
wrowe       00/05/26 23:22:56

  Modified:    src/main http_main.c
               src/include http_config.h
               src/modules/mpm/dexter dexter.c
               src/modules/mpm/mpmt_beos mpmt_beos.c
               src/modules/mpm/mpmt_pthread mpmt_pthread.c
               src/modules/mpm/prefork prefork.c
               src/modules/mpm/spmt_os2 spmt_os2.c
               src/modules/mpm/winnt winnt.c
  Log:
  
    Pass the process_rec to the MPM to allow rewriting of the args list.
    Especially necessary under Win32, or other non-unix front ends where
    oddball arguments might be required, but without causing a mess in
    http_main.c.
  
  
  Revision  Changes    Path
  1.47      +8 -15     apache-2.0/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_main.c,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- http_main.c	2000/05/18 19:56:16	1.46
  +++ http_main.c	2000/05/27 06:22:51	1.47
  @@ -67,14 +67,6 @@
   #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)
   {
  @@ -280,8 +272,6 @@
       destroy_and_exit_process(process, 1);
   }
   
  -ap_pool_t *g_pHookPool;
  -
   #ifdef WIN32
   API_EXPORT(int) apache_main(int argc, char *argv[])
   #else
  @@ -317,8 +307,6 @@
   
       ap_util_uri_init();
   
  -    g_pHookPool=pconf;
  -
       ap_setup_prelinked_modules(process);
   
       ap_create_pool(&pcommands, pglobal);
  @@ -326,7 +314,9 @@
       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':
  @@ -340,6 +330,10 @@
   	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;
  @@ -359,9 +353,8 @@
   	case 't':
   	    configtestonly = 1;
   	    break;
  -	case 'h':
  -	    usage(process);
   	case '?':
  +	case 'h':
   	    usage(process);
   	}
       }
  
  
  
  1.23      +3 -0      apache-2.0/src/include/http_config.h
  
  Index: http_config.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/include/http_config.h,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- http_config.h	2000/05/27 05:27:32	1.22
  +++ http_config.h	2000/05/27 06:22:52	1.23
  @@ -224,6 +224,7 @@
                                    * 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);
  @@ -269,6 +270,7 @@
   				NULL, \
   				NULL, \
   				MODULE_MAGIC_COOKIE, \
  +                                NULL, \
                                   NULL
   
   #define MPM20_MODULE_STUFF	MODULE_MAGIC_NUMBER_MAJOR, \
  @@ -382,6 +384,7 @@
   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);
  
  
  
  1.87      +1 -0      apache-2.0/src/modules/mpm/dexter/dexter.c
  
  Index: dexter.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/dexter.c,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- dexter.c	2000/05/27 05:27:40	1.86
  +++ dexter.c	2000/05/27 06:22:52	1.87
  @@ -1458,6 +1458,7 @@
   
   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 */
  
  
  
  1.26      +1 -0      apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c
  
  Index: mpmt_beos.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- mpmt_beos.c	2000/05/27 05:27:40	1.25
  +++ mpmt_beos.c	2000/05/27 06:22:53	1.26
  @@ -1261,6 +1261,7 @@
   
   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 */
  
  
  
  1.79      +1 -0      apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c
  
  Index: mpmt_pthread.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c,v
  retrieving revision 1.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- mpmt_pthread.c	2000/05/27 05:27:42	1.78
  +++ mpmt_pthread.c	2000/05/27 06:22:54	1.79
  @@ -1477,6 +1477,7 @@
   
   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 */
  
  
  
  1.93      +1 -0      apache-2.0/src/modules/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -r1.92 -r1.93
  --- prefork.c	2000/05/27 05:27:45	1.92
  +++ prefork.c	2000/05/27 06:22:54	1.93
  @@ -2436,6 +2436,7 @@
   
   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 */
  
  
  
  1.38      +1 -0      apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c
  
  Index: spmt_os2.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- spmt_os2.c	2000/05/27 05:27:50	1.37
  +++ spmt_os2.c	2000/05/27 06:22:55	1.38
  @@ -1671,6 +1671,7 @@
   
   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 */
  
  
  
  1.70      +1 -0      apache-2.0/src/modules/mpm/winnt/winnt.c
  
  Index: winnt.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/winnt/winnt.c,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- winnt.c	2000/05/27 05:27:52	1.69
  +++ winnt.c	2000/05/27 06:22:55	1.70
  @@ -1969,6 +1969,7 @@
   
   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 */
  
  
  

Mime
View raw message