Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 69510 invoked from network); 24 Aug 2005 01:19:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Aug 2005 01:19:55 -0000 Received: (qmail 20716 invoked by uid 500); 24 Aug 2005 01:19:54 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 20708 invoked by uid 500); 24 Aug 2005 01:19:54 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 20692 invoked by uid 99); 24 Aug 2005 01:19:54 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Aug 2005 18:19:54 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [65.196.108.169] (HELO mail.liquidation.com) (65.196.108.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Aug 2005 18:20:12 -0700 Received: from [10.0.0.142] (everything.liquidation.com [65.196.108.171]) (authenticated bits=0) by mail.liquidation.com (8.12.9/8.12.9) with ESMTP id j7O1RJNh022086 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Tue, 23 Aug 2005 21:27:20 -0400 Message-ID: <430BCB2D.5000300@p6m7g8.com> Date: Tue, 23 Aug 2005 21:19:41 -0400 From: "Philip M. Gollucci" User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@perl.apache.org CC: "Philippe M. Chiasson" Subject: Re: -Wdeclaration-after-statement Final version References: <42FC31F2.5060300@p6m7g8.com> <42FCF20C.1030301@ectoplasm.org> <430029F5.40206@p6m7g8.com> <4300DA99.2020007@ectoplasm.org> <43080BE6.70403@p6m7g8.com> <430A0E8C.5020303@ectoplasm.org> <430A9902.5010004@p6m7g8.com> <430B997B.3040400@ectoplasm.org> <430B9A0A.7070705@p6m7g8.com> In-Reply-To: <430B9A0A.7070705@p6m7g8.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Found to be clean X-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (score=-4.856, required 5, AWL 0.04, BAYES_00 -4.90) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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(\@tuples, \@r_tuples) == 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 (pgollucci@p6m7g8.com) 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: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org