perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fred Moyer <f...@redhotpenguin.com>
Subject Re: Apache::SizeLimit + solaris Update 10
Date Thu, 19 Mar 2009 08:14:37 GMT
On Wed, Mar 18, 2009 at 7:14 PM, Adam Prime <adam.prime@utoronto.ca> wrote:
> Fred suggested in resend these patches relative to the root of the
> distributions, so here they are.  SizeLimit.patch is against the version
> of Apache2::SizeLimit in mod_perl 2.0.4 and generated via git diff.
> svn.SizeLimit.patch is against the version of SizeLimit in svn, and was
> generated with svn diff.

This git diff doesn't match what I have in svn trunk for
Apache2/SizeLimit.pm, there is no SOLARIS constant anywhere that I can
find, I think that you may be a few versions behind.  Here's svn diff
applied to your second part of the patch.  I'd like to see the
$major/$minor logic use a couple of more parentheses to spell out
exactly what it is doing without having to worry about whether the
conditional parser in my head is interpreting this conditional
correctly.

Index: lib/Apache/SizeLimit/Core.pm
===================================================================
--- lib/Apache/SizeLimit/Core.pm        (revision 755867)
+++ lib/Apache/SizeLimit/Core.pm        (working copy)
@@ -131,7 +131,11 @@
 }

 BEGIN {
-    if ($Config{'osname'} eq 'solaris' && $Config{'osvers'} >= 2.6 ) {
+     my ($major,$minor) = split('.',$Config{'osvers'});
+
+     if ($Config{'osname'} eq 'solaris' &&
+         ($major > 2 || $major == 2 && $minor >= 6)) {
+
         *_platform_check_size   = \&_solaris_2_6_size_check;
         *_platform_getppid = \&_perl_getppid;



>
> If there is anything else i can do, let me know.  If there is another
> way i should be submitting this stuff, let me know.
>
> Adam
>
> diff --git a/lib/Apache2/SizeLimit.pm b/lib/Apache2/SizeLimit.pm
> index 031640e..702ff2a 100644
> --- a/lib/Apache2/SizeLimit.pm
> +++ b/lib/Apache2/SizeLimit.pm
> @@ -52,7 +52,8 @@ BEGIN {
>         if Apache2::MPM->is_threaded();
>
>     # decide at compile time how to check for a process' memory size.
> -    if (SOLARIS && $Config{'osvers'} >= 2.6) {
> +    my ($major,$minor) = split('.',$Config{'osvers'});
> +    if (SOLARIS && ($major > 2 || $major == 2 && $minor >= 6))
{
>
>         $HOW_BIG_IS_IT = \&solaris_2_6_size_check;
>
>
> Index: lib/Apache/SizeLimit/Core.pm
> ===================================================================
> --- lib/Apache/SizeLimit/Core.pm        (revision 750777)
> +++ lib/Apache/SizeLimit/Core.pm        (working copy)
> @@ -131,7 +131,8 @@
>  }
>
>  BEGIN {
> -    if ($Config{'osname'} eq 'solaris' && $Config{'osvers'} >= 2.6 ) {
> +    my ($major,$minor) = split('.',$Config{'osvers'});
> +    if ($Config{'osname'} eq 'solaris' && ($major > 2 || $major == 2 &&
$minor >= 6)) {
>         *_platform_check_size   = \&_solaris_2_6_size_check;
>         *_platform_getppid = \&_perl_getppid;
>     }
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
> For additional commands, e-mail: dev-help@perl.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message