geoff       2003/08/22 12:15:09

  Modified:    t/apr-ext perlio.t
               t/filter both_str_req_mix.t in_bbs_consume.t
               t/filter/TestFilter in_str_consume.pm
               t/response/TestAPI rutil.pm
               t/response/TestAPR perlio.pm socket.pm table.pm
               lib/Apache Build.pm
               src/modules/perl mod_perl.c modperl_apache_compat.c
                        modperl_apache_compat.h modperl_apache_includes.h
  Log:
  remove support for httpd 2.0.45/apr 0.9.3 and lower.
  httpd 2.0.46 is now the minimum supported version.
  Submitted by: geoff
  Reviewed by:  stas
  
  Revision  Changes    Path
  1.2       +4 -5      modperl-2.0/t/apr-ext/perlio.t
  
  Index: perlio.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/apr-ext/perlio.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- perlio.t  21 Aug 2003 02:11:30 -0000      1.1
  +++ perlio.t  22 Aug 2003 19:15:08 -0000      1.2
  @@ -30,7 +30,7 @@
   my $has_apr_config = $build->{apr_config_path} && 
       !$build->httpd_is_source_tree;
   
  -my $tests = 11;
  +my $tests = 12;
   my $lfs_tests = 3;
   
   $tests += $lfs_tests unless LARGE_FILES_CONFLICT;
  @@ -142,10 +142,9 @@
       # slurp mode
       seek $fh, 0, Fcntl::SEEK_SET(); # rewind to the start
       local $/;
  -    #XXX: does not work with current release of httpd (2.0.39)
  -    #        ok t_cmp($expected_all,
  -    #                 scalar(<$fh>),
  -    #                 "slurp file");
  +    ok t_cmp($expected_all,
  +             scalar(<$fh>),
  +             "slurp file");
   
       # test ungetc (a long sep requires read ahead)
       seek $fh, 0, Fcntl::SEEK_SET(); # rewind to the start
  
  
  
  1.4       +1 -2      modperl-2.0/t/filter/both_str_req_mix.t
  
  Index: both_str_req_mix.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/filter/both_str_req_mix.t,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- both_str_req_mix.t        20 Aug 2003 22:14:37 -0000      1.3
  +++ both_str_req_mix.t        22 Aug 2003 19:15:08 -0000      1.4
  @@ -6,8 +6,7 @@
   use Apache::TestUtil;
   
   plan tests => 1, have 'deflate', 'include',
  -    have_min_module_version("Compress::Zlib", "1.09"),
  -    have_min_apache_version("2.0.43");
  +    have_min_module_version("Compress::Zlib", "1.09");
   
   require Compress::Zlib;
   my $location = '/TestFilter__both_str_req_mix';
  
  
  
  1.3       +1 -2      modperl-2.0/t/filter/in_bbs_consume.t
  
  Index: in_bbs_consume.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/filter/in_bbs_consume.t,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- in_bbs_consume.t  6 Aug 2003 07:28:22 -0000       1.2
  +++ in_bbs_consume.t  22 Aug 2003 19:15:08 -0000      1.3
  @@ -5,8 +5,7 @@
   use Apache::TestUtil;
   use Apache::TestRequest;
   
  -plan tests => 1,
  -    have { "hangs in 2.0.40 " => sub { !have_apache_version("2.0.40"); } };
  +plan tests => 1;
   
   my $location = '/TestFilter__in_bbs_consume';
   
  
  
  
  1.7       +1 -0      modperl-2.0/t/filter/TestFilter/in_str_consume.pm
  
  Index: in_str_consume.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/in_str_consume.pm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- in_str_consume.pm 7 Aug 2003 19:12:29 -0000       1.6
  +++ in_str_consume.pm 22 Aug 2003 19:15:08 -0000      1.7
  @@ -57,6 +57,7 @@
           # for EOS which will never come from this filter so, after
           # several invocations mark the seen_eos flag, to break the
           # vicious cirle
  +        # BACK_COMPAT_MARKER: make back compat issues easy to find
           if ($count > 10) {
               $filter->seen_eos(1);
           }
  
  
  
  1.9       +2 -6      modperl-2.0/t/response/TestAPI/rutil.pm
  
  Index: rutil.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/rutil.pm,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- rutil.pm  24 Apr 2003 04:27:22 -0000      1.8
  +++ rutil.pm  22 Aug 2003 19:15:08 -0000      1.9
  @@ -28,8 +28,6 @@
      500 => '500 Internal Server Error',
   );
   
  -use constant HAVE_APACHE_2_0_40 => have_apache_version("2.0.40");
  -
   sub handler {
       my $r = shift;
   
  @@ -57,10 +55,8 @@
   
       ok $r->is_initial_req;
   
  -    # XXX: Apache 2.0.40 seems to miss status and content-type
  -    my $pattern = HAVE_APACHE_2_0_40
  -        ? qr!(?s)GET /TestAPI__rutil.*Host:.*!
  -        : qr!(?s)GET /TestAPI__rutil.*Host:.*200 OK.*Content-Type:!;
  +    my $pattern = qr!(?s)GET /TestAPI__rutil.*Host:.*200 OK.*Content-Type:!;
  +
       ok t_cmp(
           $pattern,
           $r->as_string,
  
  
  
  1.22      +5 -5      modperl-2.0/t/response/TestAPR/perlio.pm
  
  Index: perlio.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/perlio.pm,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- perlio.pm 20 Aug 2003 23:53:16 -0000      1.21
  +++ perlio.pm 22 Aug 2003 19:15:08 -0000      1.22
  @@ -18,7 +18,7 @@
   sub handler {
       my $r = shift;
   
  -    my $tests = 11;
  +    my $tests = 12;
       my $lfs_tests = 3;
   
       $tests += $lfs_tests unless LARGE_FILES_CONFLICT;
  @@ -130,10 +130,10 @@
           # slurp mode
           seek $fh, 0, Fcntl::SEEK_SET(); # rewind to the start
           local $/;
  -#XXX: does not work with current release of httpd (2.0.39)
  -#        ok t_cmp($expected_all,
  -#                 scalar(<$fh>),
  -#                 "slurp file");
  +
  +        ok t_cmp($expected_all,
  +                 scalar(<$fh>),
  +                 "slurp file");
   
           # test ungetc (a long sep requires read ahead)
           seek $fh, 0, Fcntl::SEEK_SET(); # rewind to the start
  
  
  
  1.3       +13 -18    modperl-2.0/t/response/TestAPR/socket.pm
  
  Index: socket.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/socket.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- socket.pm 24 Apr 2003 04:28:12 -0000      1.2
  +++ socket.pm 22 Aug 2003 19:15:08 -0000      1.3
  @@ -13,13 +13,10 @@
   use Apache::Const -compile => 'OK';
   use APR::Const -compile => 'EMISMATCH';
   
  -use constant HAVE_APACHE_2_0_40 => have_min_apache_version("2.0.40");
  -
   sub handler {
       my $r = shift;
   
  -    my $tests = 1;
  -    $tests += 3 if HAVE_APACHE_2_0_40;
  +    my $tests = 4;
   
       plan $r, tests => $tests;
   
  @@ -29,20 +26,18 @@
       ok $socket;
   
   
  -    if (HAVE_APACHE_2_0_40) {
  -        # in microseconds
  -        my $orig_val = $socket->timeout_get();
  -        t_debug "orig timeout was: $orig_val";
  -        ok $orig_val;
  -
  -        my $new_val = 30_000_000; # 30 secs
  -        $socket->timeout_set($new_val);
  -        ok t_cmp($new_val, $socket->timeout_get(), "timeout_get()");
  -
  -        # reset the timeout
  -        $socket->timeout_set($orig_val);
  -        ok t_cmp($orig_val, $socket->timeout_get(), "timeout_get()");
  -    }
  +    # in microseconds
  +    my $orig_val = $socket->timeout_get();
  +    t_debug "orig timeout was: $orig_val";
  +    ok $orig_val;
  +
  +    my $new_val = 30_000_000; # 30 secs
  +    $socket->timeout_set($new_val);
  +    ok t_cmp($new_val, $socket->timeout_get(), "timeout_get()");
  +
  +    # reset the timeout
  +    $socket->timeout_set($orig_val);
  +    ok t_cmp($orig_val, $socket->timeout_get(), "timeout_get()");
   
       Apache::OK;
   }
  
  
  
  1.8       +1 -0      modperl-2.0/t/response/TestAPR/table.pm
  
  Index: table.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/table.pm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- table.pm  20 Aug 2003 13:59:45 -0000      1.7
  +++ table.pm  22 Aug 2003 19:15:08 -0000      1.8
  @@ -122,6 +122,7 @@
       ok @foo == 3;
       ok $bar[0] eq 'beer';
   
  +    # BACK_COMPAT_MARKER: make back compat issues easy to find :)
       if (HAVE_APACHE_2_0_47) {
           $overlay->compress(APR::OVERLAP_TABLES_MERGE);
   
  
  
  
  1.142     +1 -15     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.141
  retrieving revision 1.142
  diff -u -r1.141 -r1.142
  --- Build.pm  13 Aug 2003 23:13:11 -0000      1.141
  +++ Build.pm  22 Aug 2003 19:15:09 -0000      1.142
  @@ -788,22 +788,8 @@
       my $apr_config_path = $self->apr_config_path;
   
       if ($apr_config_path) {
  -        # --includedir is available since apr-0.9.3 (Apache 2.0.45),
  -        # for older versions we attempt to parse 'apr-config --includes'
           my $httpd_version = $self->httpd_version;
  -        if ($httpd_version lt '2.0.45') {
  -            chomp(my $paths = `$apr_config_path --includes`);
  -            for (split /\s+/, $paths || '') {
  -                s/-I//;
  -                if (-e catfile $_, "apr.h") {
  -                    $incdir = $_;
  -                    last;
  -                }
  -            }
  -        }
  -        else {
  -            chomp($incdir = `$apr_config_path --includedir`);
  -        }
  +        chomp($incdir = `$apr_config_path --includedir`);
       }
   
       unless ($incdir and -d $incdir) {
  
  
  
  1.180     +1 -6      modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.179
  retrieving revision 1.180
  diff -u -r1.179 -r1.180
  --- mod_perl.c        20 Aug 2003 23:20:14 -0000      1.179
  +++ mod_perl.c        22 Aug 2003 19:15:09 -0000      1.180
  @@ -689,12 +689,7 @@
                                 apr_pool_cleanup_null);
   }
   
  -/* api change in 2.0.40-ish */
  -#if (MODULE_MAGIC_NUMBER_MAJOR >= 20020628)
  -#   define MP_FILTER_HANDLER(f) f, NULL
  -#else
  -#   define MP_FILTER_HANDLER(f) f
  -#endif
  +#define MP_FILTER_HANDLER(f) f, NULL
   
   void modperl_register_hooks(apr_pool_t *p)
   {
  
  
  
  1.3       +3 -20     modperl-2.0/src/modules/perl/modperl_apache_compat.c
  
  Index: modperl_apache_compat.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_apache_compat.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- modperl_apache_compat.c   19 Aug 2003 19:30:33 -0000      1.2
  +++ modperl_apache_compat.c   22 Aug 2003 19:15:09 -0000      1.3
  @@ -1,25 +1,8 @@
   #include "mod_perl.h"
   
  -/* back compat adjustements for older Apache versions */
  -
  -/* pre-APR_0_9_0 (APACHE_2_0_40) */
  -#if APR_MAJOR_VERSION == 0 && APR_MINOR_VERSION == 9 && \
  -    APR_PATCH_VERSION == 0 && defined(APR_IS_DEV_VERSION)
  -
  -/* added in APACHE_2_0_40/APR_0_9_0 */
  -apr_status_t apr_socket_timeout_get(apr_socket_t *sock, apr_interval_time_t *t)
  -{
  -    modperl_apr_func_not_implemented(apr_sockettimeout_get, 2.0.40, 0.9.0);
  -    return APR_ENOTIMPL;
  -}
  -
  -apr_status_t apr_socket_timeout_set(apr_socket_t *sock, apr_interval_time_t t)
  -{
  -    modperl_apr_func_not_implemented(apr_socket_timeout_set, 2.0.40, 0.9.0);
  -    return APR_ENOTIMPL;
  -}
  -
  -#endif /* pre-APR_0_9_0 (APACHE_2_0_40) */
  +/* back compat adjustements for older Apache versions
  + * BACK_COMPAT_MARKER: make back compat issues easy to find :)
  + */
   
   /* pre-APR_0_9_5 (APACHE_2_0_47)
    * both 2.0.46 and 2.0.47 shipped with 0.9.4 -
  
  
  
  1.3       +2 -24     modperl-2.0/src/modules/perl/modperl_apache_compat.h
  
  Index: modperl_apache_compat.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_apache_compat.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- modperl_apache_compat.h   19 Aug 2003 19:30:33 -0000      1.2
  +++ modperl_apache_compat.h   22 Aug 2003 19:15:09 -0000      1.3
  @@ -9,31 +9,9 @@
   #endif
   
   /* XXX: these backcompat macros can be deleted when we bump up the
  - * minimal supported httpd version to 2.0.40 or higher
  + * minimal supported httpd version to 2.0.47 or higher
  + * BACK_COMPAT_MARKER: make back compat issues easy to find :)
    */
  -#ifndef apr_time_sec
  -#define apr_time_sec(time) ((apr_int64_t)((time) / APR_USEC_PER_SEC))
  -#endif
  -#ifndef apr_time_usec
  -#define apr_time_usec(time) ((apr_int32_t)((time) % APR_USEC_PER_SEC))
  -#endif
  -#ifndef apr_time_from_sec
  -#define apr_time_from_sec(sec) ((apr_time_t)(sec) * APR_USEC_PER_SEC)
  -#endif
  -
  -/* pre-APR_0_9_0 (APACHE_2_0_40) */
  -#if APR_MAJOR_VERSION == 0 && APR_MINOR_VERSION == 9 && \
  -    APR_PATCH_VERSION == 0 && defined(APR_IS_DEV_VERSION)
  -
  -/* deprecated since APR_0_9_0 */
  -#define apr_socket_opt_get apr_getsocketopt
  -#define apr_socket_opt_set apr_setsocketopt
  -
  -/* added in APACHE_2_0_40/APR_0_9_0 */
  -apr_status_t apr_socket_timeout_get(apr_socket_t *sock, apr_interval_time_t *t);
  -apr_status_t apr_socket_timeout_set(apr_socket_t *sock, apr_interval_time_t t);
  -
  -#endif /* pre-APR_0_9_0 (APACHE_2_0_40) */
   
   /* pre-APR_0_9_5 (APACHE_2_0_47)
    * both 2.0.46 and 2.0.47 shipped with 0.9.4 -
  
  
  
  1.26      +0 -22     modperl-2.0/src/modules/perl/modperl_apache_includes.h
  
  Index: modperl_apache_includes.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_apache_includes.h,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- modperl_apache_includes.h 6 Aug 2003 06:46:35 -0000       1.25
  +++ modperl_apache_includes.h 22 Aug 2003 19:15:09 -0000      1.26
  @@ -20,24 +20,7 @@
   #include "ap_mpm.h"
   
   #include "apr_version.h"
  -
  -/* 2.0.36 is APR_0_9_0-dev */
  -
  -#if APR_MAJOR_VERSION == 0 && APR_MINOR_VERSION == 9 && APR_PATCH_VERSION < 3
  -/* apr < 0.9.3 */
  -#define APR_VERSION_0_9_3_MINUS
  -#else
  -/* apr >= 0.9.3 */
  -#define APR_VERSION_0_9_3_PLUS
  -#endif
  -
  -#ifndef APR_POLLIN
  -/*
  - * apr_poll.h introduced around 2.0.40
  - * APR_POLL* constants moved here around 2.0.44
  - */
   #include "apr_poll.h"
  -#endif
   #include "apr_lib.h"
   #include "apr_strings.h"
   #include "apr_uri.h"
  @@ -51,10 +34,5 @@
   #include "util_filter.h"
   
   #include "util_script.h"
  -
  -
  -#ifdef APR_VERSION_0_9_3_PLUS
  -#include "apr_env.h"
  -#endif
   
   #endif /* MODPERL_APACHE_INCLUDES_H */
  
  
  

Reply via email to