Philip M. Gollucci wrote:
Philippe M. Chiasson wrote:
Ah, I did miss it... read right over it. D'oh!

Here is its again with the return 0 left in as most of the code in Build.pm is 
return 0 though not all.
Also, using Philippe's cmp_tuples function.


Index: Build.pm
===================================================================
--- Build.pm    (revision 234145)
+++ Build.pm    (working copy)
@@ -523,6 +523,11 @@
             $ccopts .= " $Wall -DAP_DEBUG";
             $ccopts .= " -DAP_HAVE_DESIGNATED_INITIALIZER";
         }
+
+        if ($self->has_gcc_version('3.3.2') &&
+            $ccopts !~ /declaration-after-statement/) {
+            $ccopts .= " -Wdeclaration-after-statement";
+        }
     }

     if ($self->{MP_COMPAT_1X}) {
@@ -555,6 +560,33 @@
     $ccopts;
 }

+sub has_gcc_version {
+
+    my $self = shift;
+    my $requested_version = shift;
+
+    my $has_version = $self->perl_config('gccversion');
+
+    return 0 unless $has_version;
+
+    my ($has_major, $has_minor, $has_patch) = split /\./, $has_version, 3;
+    my ($r_major, $r_minor, $r_patch) = split /\./, $requested_version, 3;
+
+    return &cmp_tuples([EMAIL PROTECTED], [EMAIL PROTECTED]) == 1;
+}
+
+sub cmp_tuples {
+
+    my ($a, $b) = @_;
+
+    while(@$a && @$b) {
+        my $cmp = shift @$a <=> shift @$b;
+        return $cmp if $cmp;
+    }
+
+    return @$a <=> @$b;
+}
+

--
END
------------------------------------------------------------
    What doesn't kill us can only make us stronger.
                Nothing is impossible.
                                
Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
  http://www.liquidityservicesinc.com
       http://www.liquidation.com
       http://www.uksurplus.com
       http://www.govliquidation.com
       http://www.gowholesale.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to