perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0 Changes
Date Mon, 07 Apr 2003 05:01:49 GMT
stas        2003/04/06 22:01:48

  Modified:    lib/Apache Build.pm
               lib/ModPerl BuildOptions.pm
               src/modules/perl mod_perl.h
               t/modules cgi.t cgiupload.t
               t/response/TestModperl taint.pm
               .        Changes
  Log:
  MP_COMPAT_1X=0 now can be passed to Makefile.PL to disable
  mp1-back-compat compile-time features + adjust tests.
  
  Revision  Changes    Path
  1.119     +4 -0      modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.118
  retrieving revision 1.119
  diff -u -r1.118 -r1.119
  --- Build.pm	4 Apr 2003 06:12:58 -0000	1.118
  +++ Build.pm	7 Apr 2003 05:01:48 -0000	1.119
  @@ -228,6 +228,10 @@
           }
       }
   
  +    if ($self->{MP_COMPAT_1X}) {
  +        $ccopts .= " -DMP_COMPAT_1X";
  +    }
  +
       if ($self->{MP_DEBUG}) {
           $self->{MP_TRACE} = 1;
           my $win32_flags = MSVC  ? '-Od -MD -Zi' : '';
  
  
  
  1.19      +7 -1      modperl-2.0/lib/ModPerl/BuildOptions.pm
  
  Index: BuildOptions.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildOptions.pm,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- BuildOptions.pm	24 Feb 2003 03:38:47 -0000	1.18
  +++ BuildOptions.pm	7 Apr 2003 05:01:48 -0000	1.19
  @@ -30,6 +30,11 @@
       }
   
       $build->{MP_GENERATE_XS} = 1 unless exists $build->{MP_GENERATE_XS};
  +
  +    # define MP_COMPAT_1X unless explicitly told to disable it
  +    $build->{MP_COMPAT_1X} = 1
  +        unless exists $build->{MP_COMPAT_1X} && !$build->{MP_COMPAT_1X};
  +
   }
   
   sub parse {
  @@ -64,7 +69,7 @@
                   die "Unknown Option: $key\nUsage:\n$usage";
               }
   
  -            if($key eq 'MP_APXS') {
  +            if ($key eq 'MP_APXS') {
                   $val = File::Spec->canonpath(File::Spec->rel2abs($val));
               }
   
  @@ -176,3 +181,4 @@
   INCLUDE_DIR     Add directories to search for header files
   GENERATE_XS     Generate XS code based on httpd version
   LIBNAME         Name of the modperl dso library (default is mod_perl)
  +COMPAT_1X       Compile-time mod_perl 1.0 backcompat (default is on)
  
  
  
  1.57      +0 -2      modperl-2.0/src/modules/perl/mod_perl.h
  
  Index: mod_perl.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.h,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- mod_perl.h	23 Jan 2003 00:31:28 -0000	1.56
  +++ mod_perl.h	7 Apr 2003 05:01:48 -0000	1.57
  @@ -4,8 +4,6 @@
   #include "modperl_apache_includes.h"
   #include "modperl_perl_includes.h"
   
  -#define MP_COMPAT_1X /* backwards compat */
  -
   #ifdef WIN32
   #define MP_THREADED 1
   #else
  
  
  
  1.6       +4 -1      modperl-2.0/t/modules/cgi.t
  
  Index: cgi.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/modules/cgi.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- cgi.t	19 Nov 2001 22:08:17 -0000	1.5
  +++ cgi.t	7 Apr 2003 05:01:48 -0000	1.6
  @@ -4,8 +4,11 @@
   use Apache::Test;
   use Apache::TestRequest;
   use Apache::TestUtil;
  +use Apache::Build ();
   
  -plan tests => 5, \&have_lwp;
  +my $build = Apache::Build->build_config;
  +plan tests => 5, have 'LWP',
  +    {"MP_COMPAT_1X is disabled" => $build->{MP_COMPAT_1X}};
   
   my $module = 'TestModules::cgi';
   my $location = "/$module";
  
  
  
  1.5       +4 -1      modperl-2.0/t/modules/cgiupload.t
  
  Index: cgiupload.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/modules/cgiupload.t,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- cgiupload.t	1 Jan 2002 10:38:19 -0000	1.4
  +++ cgiupload.t	7 Apr 2003 05:01:48 -0000	1.5
  @@ -4,8 +4,11 @@
   use Apache::Test;
   use Apache::TestUtil;
   use Apache::TestRequest;
  +use Apache::Build ();
   
  -plan tests => 2, \&have_lwp;
  +my $build = Apache::Build->build_config;
  +plan tests => 2, have 'LWP',
  +    {"MP_COMPAT_1X is disabled" => $build->{MP_COMPAT_1X}};
   
   my $location = "/TestModules::cgiupload";
   
  
  
  
  1.2       +11 -4     modperl-2.0/t/response/TestModperl/taint.pm
  
  Index: taint.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestModperl/taint.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- taint.pm	4 Feb 2003 06:52:15 -0000	1.1
  +++ taint.pm	7 Apr 2003 05:01:48 -0000	1.2
  @@ -8,23 +8,30 @@
   
   use Apache::RequestIO ();
   use Apache::RequestUtil ();
  +use Apache::Build ();
   
   use Apache::Const -compile => 'OK';
   
  +my $build = Apache::Build->build_config;
  +
   sub handler {
       my $r = shift;
   
  -    plan $r, tests => 4;
  +    my $tests = $build->{MP_COMPAT_1X} ? 4 : 2;
  +
  +    plan $r, tests => $tests;
   
       ok t_cmp(1, ${^TAINT}, "\${^TAINT}");
   
       eval { ${^TAINT} = 0 };
       ok t_cmp(qr/read-only/, $@, "\${^TAINT} is read-only");
   
  -    ok t_cmp(1, $Apache::__T, "\$Apache::__T");
  +    if ($build->{MP_COMPAT_1X}) {
  +        ok t_cmp(1, $Apache::__T, "\$Apache::__T");
   
  -    eval { $Apache::__T = 0 };
  -    ok t_cmp(qr/read-only/, $@, "\$Apache::__T is read-only");
  +        eval { $Apache::__T = 0 };
  +        ok t_cmp(qr/read-only/, $@, "\$Apache::__T is read-only");
  +    }
   
       Apache::OK;
   }
  
  
  
  1.165     +5 -1      modperl-2.0/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.164
  retrieving revision 1.165
  diff -u -r1.164 -r1.165
  --- Changes	7 Apr 2003 01:56:55 -0000	1.164
  +++ Changes	7 Apr 2003 05:01:48 -0000	1.165
  @@ -10,8 +10,12 @@
   
   =item 1.99_09-dev
   
  +MP_COMPAT_1X=0 now can be passed to Makefile.PL to disable
  +mp1-back-compat compile-time features + adjust tests. [Stas]
  +
   <SERVER_ROOT> and <SERVER_ROOT>/lib/perl are now added to @INC, just
  -like mod_perl 1.0 with MP_COMPAT_1X=1 (currently enabled by default).
  +like mod_perl 1.0 with MP_COMPAT_1X=1 (currently enabled by
  +default). [Stas]
   
   The Perl-5.8.0 crypt() workaround is now used only if 5.8.0 is used,
   since 5.8.1-tobe/5.9.0-tobe(blead-perl) won't compile with
  
  
  

Mime
View raw message