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
Date Mon, 28 Sep 1998 18:04:22 GMT
dougm       98/09/28 11:04:21

  Modified:    .        Changes ToDo
               Apache   Apache.pm
               src/modules/perl mod_perl.c
  Log:
  perl_startup() will now check the Apache.pm $VERSION
  
  Revision  Changes    Path
  1.163     +2 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /export/home/cvs/modperl/Changes,v
  retrieving revision 1.162
  retrieving revision 1.163
  diff -u -r1.162 -r1.163
  --- Changes	1998/09/26 16:11:05	1.162
  +++ Changes	1998/09/28 18:04:19	1.163
  @@ -8,6 +8,8 @@
   
   =item 1.15_02-dev
   
  +perl_startup() will now check the Apache.pm $VERSION
  +
   fixups for building Stronghold 2.4
   
   new Apache::File module
  
  
  
  1.93      +0 -2      modperl/ToDo
  
  Index: ToDo
  ===================================================================
  RCS file: /export/home/cvs/modperl/ToDo,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -r1.92 -r1.93
  --- ToDo	1998/09/25 13:36:32	1.92
  +++ ToDo	1998/09/28 18:04:19	1.93
  @@ -3,8 +3,6 @@
                    (well, close to it anyhow)
   ---------------------------------------------------------------------------
   
  -- have mod_perl 'use Apache 1.24'
  -
   - turn of strip of httpd during 'make install'
   
   - $ENV{PATH}
  
  
  
  1.19      +1 -1      modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===================================================================
  RCS file: /export/home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Apache.pm	1998/09/10 04:27:04	1.18
  +++ Apache.pm	1998/09/28 18:04:20	1.19
  @@ -5,7 +5,7 @@
   use Apache::SIG ();
   
   @Apache::EXPORT_OK = qw(exit warn);
  -$Apache::VERSION = "1.24";
  +$Apache::VERSION = "1.25";
   
   *import = \&Exporter::import;
   
  
  
  
  1.51      +37 -1     modperl/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/mod_perl.c,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- mod_perl.c	1998/09/19 22:50:11	1.50
  +++ mod_perl.c	1998/09/28 18:04:21	1.51
  @@ -433,6 +433,42 @@
   } 
   #endif
   
  +#define MP_APACHE_VERSION 1.25
  +
  +void mp_check_version(void)
  +{
  +    I32 i;
  +    SV *namesv;
  +    SV *version = perl_get_sv("Apache::VERSION", FALSE);
  +    if(!version)
  +	croak("Apache.pm failed to load!"); /*should never happen*/
  +    if(SvNV(version) >= MP_APACHE_VERSION) /*no worries*/
  +	return;
  +
  +    fprintf(stderr, "Apache.pm version %.02f or higher required!\n", 
  +	    MP_APACHE_VERSION);
  +    fprintf(stderr, "%s", form("%_ is only version %_\n", 
  +			       *hv_fetch(GvHV(incgv), "Apache.pm", 9, FALSE),
  +			       version));
  +    fprintf(stderr, 
  +	    "Perhaps you forgot to 'make install' or need to uninstall an old version?\n");
  +
  +    namesv = NEWSV(806, 0);
  +    for(i=0; i<=AvFILL(GvAV(incgv)); i++) {
  +	char *tryname;
  +	PerlIO *tryrsfp = 0;
  +	SV *dir = *av_fetch(GvAV(incgv), i, TRUE);
  +	sv_setpvf(namesv, "%_/Apache.pm", dir);
  +	tryname = SvPVX(namesv);
  +	if((tryrsfp = PerlIO_open(tryname, "r"))) {
  +	    fprintf(stderr, "Found: %s\n", tryname);
  +	    PerlIO_close(tryrsfp);
  +	}
  +    }
  +    SvREFCNT_dec(namesv);
  +    exit(1);
  +}
  +
   void perl_startup (server_rec *s, pool *p)
   {
       char *argv[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
  @@ -639,7 +675,7 @@
   	    exit(1);
   	}
       }
  -
  +    mp_check_version();
       LEAVE_SAFE;
   
       MP_TRACE_g(fprintf(stderr, 
  
  
  

Mime
View raw message