0.6.1.20060928-1 release
[manu/suphp.git] / debian / patches / 04_apache2.2.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 04_apache2.2.dpatch by  <elacour@home-dn.net>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Apr1.x compatibility
6
7 @DPATCH@
8 --- ./src/apache2/mod_suphp.c   2006-10-10 11:38:48.000000000 +0200
9 +++ ./src/apache2/mod_suphp.c   2006-10-10 11:48:43.000000000 +0200
10 @@ -488,7 +488,8 @@
11    const char *buf;
12    apr_size_t len;
13    apr_status_t rv;
14 -  APR_BRIGADE_FOREACH(b, bb) {
15 +  b = APR_BRIGADE_FIRST(bb);
16 +  while (b != APR_BRIGADE_SENTINEL(bb)) {
17        if (APR_BUCKET_IS_EOS(b)) {
18            break;
19        }
20 @@ -496,6 +497,7 @@
21        if (rv != APR_SUCCESS) {
22            break;
23        }
24 +      b = APR_BUCKET_NEXT(b);
25    }
26  }
27  
28 @@ -763,8 +765,8 @@
29              return rv;
30          }
31          
32 -        APR_BRIGADE_FOREACH(bucket, bb)
33 -        {
34 +        bucket = APR_BRIGADE_FIRST(bb);
35 +            while (bucket != APR_BRIGADE_SENTINEL(bb)) {
36              const char *data;
37              apr_size_t len;
38              int child_stopped_reading = 0;
39 @@ -787,6 +789,7 @@
40              {
41                  child_stopped_reading = 1;
42              }
43 +            bucket = APR_BUCKET_NEXT(bucket);
44          }
45          apr_brigade_cleanup(bb);
46      }
47 --- ./configure.ac      2006-10-10 13:18:41.000000000 +0200
48 +++ ./configure.ac      2006-10-10 13:21:22.000000000 +0200
49 @@ -69,6 +69,9 @@
50      if test "$major_version" = "2.0"; then
51        APACHE_VERSION_2=true
52        APACHE_VERSION_1_3=false
53 +    elif test "$major_version" = "2.2"; then
54 +      APACHE_VERSION_2=true
55 +      APACHE_VERSION_1_3=false
56      else
57        APACHE_VERSION_2=false
58        APACHE_VERSION_1_3=true
59 --- ./configure 2006-10-10 13:18:51.000000000 +0200
60 +++ ./configure 2006-10-10 13:21:06.000000000 +0200
61 @@ -20428,6 +20428,9 @@
62      if test "$major_version" = "2.0"; then
63        APACHE_VERSION_2=true
64        APACHE_VERSION_1_3=false
65 +    elif test "$major_version" = "2.2"; then
66 +      APACHE_VERSION_2=true
67 +      APACHE_VERSION_1_3=false
68      else
69        APACHE_VERSION_2=false
70        APACHE_VERSION_1_3=true