perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@hyperreal.org
Subject cvs commit: modperl/src/modules/perl mod_perl.c mod_perl.h mod_perl_opmask.c
Date Fri, 26 Mar 1999 22:20:39 GMT
dougm       99/03/26 14:20:38

  Modified:    .        Changes
               src/modules/perl mod_perl.c mod_perl.h mod_perl_opmask.c
  Log:
  fix so version info is not inserted too early (i.e. before Apache/x.x.x)
  
  Revision  Changes    Path
  1.273     +2 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.272
  retrieving revision 1.273
  diff -u -r1.272 -r1.273
  --- Changes	1999/03/26 20:41:56	1.272
  +++ Changes	1999/03/26 22:20:33	1.273
  @@ -8,6 +8,8 @@
   
   =item 1.18_01-dev
   
  +fix so version info is not inserted too early (i.e. before Apache/x.x.x)
  +
   new Apache::PerlRun::namespace_from() method, returns
   $r->uri - $r->path_info, can be overridden as Apache::RegistryNG does to
   return $r->filename instead
  
  
  
  1.83      +16 -15    modperl/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.c,v
  retrieving revision 1.82
  retrieving revision 1.83
  diff -u -r1.82 -r1.83
  --- mod_perl.c	1999/03/26 19:59:46	1.82
  +++ mod_perl.c	1999/03/26 22:20:35	1.83
  @@ -188,7 +188,7 @@
   
   module MODULE_VAR_EXPORT perl_module = {
       STANDARD_MODULE_STUFF,
  -    perl_startup,                 /* initializer */
  +    perl_module_init,                 /* initializer */
       perl_create_dir_config,    /* create per-directory config structure */
       perl_merge_dir_config,     /* merge per-directory config structures */
       perl_create_server_config, /* create per-server config structure */
  @@ -484,7 +484,7 @@
       exit(1);
   }
   
  -#if !HAS_MMN(MMN_136)
  +#if !HAS_MMN_136
   static void set_sigpipe(void)
   {
       char *dargs[] = { NULL };
  @@ -493,6 +493,19 @@
   }
   #endif
   
  +void perl_module_init(server_rec *s, pool *p)
  +{
  +#if HAS_MMN_130
  +    ap_add_version_component(MOD_PERL_STRING_VERSION);
  +    if(PERL_RUNNING()) {
  +	if(perl_get_sv("Apache::Server::AddPerlVersion", FALSE)) {
  +	    ap_add_version_component(form("Perl/%s", patchlevel));
  +	}
  +    }
  +#endif
  +    perl_startup(s, p);
  +}
  +
   void perl_startup (server_rec *s, pool *p)
   {
       char *argv[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
  @@ -501,18 +514,6 @@
       dPSRV(s);
       SV *pool_rv, *server_rv;
       GV *gv, *shgv;
  -    const char *ap_v = ap_get_server_version();
  -
  -#if MODULE_MAGIC_NUMBER >= 19980507
  -    if (!strstr(ap_v, MOD_PERL_STRING_VERSION) && strnEQ(ap_v,"Apache/",7)) {
  -	ap_add_version_component(MOD_PERL_STRING_VERSION);
  -	if(PERL_RUNNING()) {
  -	    if(perl_get_sv("Apache::Server::AddPerlVersion", FALSE)) {
  -		ap_add_version_component(form("Perl/%s", patchlevel));
  -	    }
  -	}
  -    }
  -#endif
   
   #ifndef WIN32
       argv[0] = server_argv0;
  @@ -542,7 +543,7 @@
       if(PERL_RUNNING() && PERL_STARTUP_IS_DONE) {
   	saveINC;
   	mp_check_version();
  -#if !HAS_MMN(MMN_136)
  +#if !HAS_MMN_136
   	set_sigpipe();
   #endif
       }
  
  
  
  1.75      +6 -3      modperl/src/modules/perl/mod_perl.h
  
  Index: mod_perl.h
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.h,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- mod_perl.h	1999/03/26 19:59:46	1.74
  +++ mod_perl.h	1999/03/26 22:20:35	1.75
  @@ -455,9 +455,11 @@
   #define MMN_131 19980713
   #define MMN_132 19980806
   #define MMN_136 19990320
  -#if MODULE_MAGIC_NUMBER >= MMN_130
  -#define HAVE_APACHE_V_130
  -#endif
  +#define HAS_MMN_130 HAS_MMN(MMN_130)
  +#define HAS_MMN_131 HAS_MMN(MMN_131)
  +#define HAS_MMN_132 HAS_MMN(MMN_132)
  +#define HAS_MMN_136 HAS_MMN(MMN_136)
  +
   #define APACHE_SSL_12X (defined(APACHE_SSL) && (MODULE_MAGIC_NUMBER < MMN_130))
   
   #if MODULE_MAGIC_NUMBER < MMN_130
  @@ -1043,6 +1045,7 @@
   int perl_run_stacked_handlers(char *hook, request_rec *r, AV *handlers);
   
   /* plugin slots */
  +void perl_module_init(server_rec *s, pool *p);
   void perl_startup(server_rec *s, pool *p);
   int perl_handler(request_rec *r);
   void perl_child_init(server_rec *, pool *);
  
  
  
  1.5       +2 -2      modperl/src/modules/perl/mod_perl_opmask.c
  
  Index: mod_perl_opmask.c
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/mod_perl_opmask.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_perl_opmask.c	1998/08/03 15:35:32	1.4
  +++ mod_perl_opmask.c	1999/03/26 22:20:36	1.5
  @@ -82,7 +82,7 @@
   
   static char *read_opmask(server_rec *s, pool *p, char *file)
   {
  -#ifdef HAVE_APACHE_V_130
  +#if HAS_MMN_130
       char opname[MAX_STRING_LEN];
       char *mask = (char *)ap_pcalloc(p, maxo);
       configfile_t *cfg = ap_pcfg_openfile(p, file);
  @@ -106,7 +106,7 @@
   
   #else
       croak("Need Apache 1.3.0+ to use PerlOpmask directive");
  -#endif /*HAVE_APACHE_V_130*/
  +#endif /*HAS_MMN_130*/
   }
   
   static char *av2opmask(pool *p, AV *av)
  
  
  

Mime
View raw message