Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 39560 invoked from network); 9 Aug 2005 18:39:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Aug 2005 18:39:54 -0000 Received: (qmail 83541 invoked by uid 500); 9 Aug 2005 18:39:53 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 83355 invoked by uid 500); 9 Aug 2005 18:39:53 -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 83342 invoked by uid 99); 9 Aug 2005 18:39:53 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2005 11:39:53 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of gozer@ectoplasm.org designates 66.34.202.202 as permitted sender) Received: from [66.34.202.202] (HELO minerva.ectoplasm.org) (66.34.202.202) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2005 11:40:14 -0700 Received: from minerva.ectoplasm.org (localhost.localdomain [127.0.0.1]) by pmx.secure.ectoplasm.org (Postfix) with SMTP id EDA625EB20; Tue, 9 Aug 2005 11:39:50 -0700 (PDT) Received: from [192.168.10.200] (unknown [192.168.10.200]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by minerva.ectoplasm.org (Postfix) with ESMTP id ACF015EB1E; Tue, 9 Aug 2005 11:39:50 -0700 (PDT) Message-ID: <42F8F875.6000601@ectoplasm.org> Date: Tue, 09 Aug 2005 11:39:49 -0700 From: "Philippe M. Chiasson" User-Agent: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Philip M. Gollucci" CC: dev@perl.apache.org Subject: Re: bugs_build TODO completed -Wdeclaration-after-statement References: <42F81FD3.2020706@p6m7g8.com> In-Reply-To: <42F81FD3.2020706@p6m7g8.com> X-Enigmail-Version: 0.91.0.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enigC2830EFBF4114AF923E5C21C" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --------------enigC2830EFBF4114AF923E5C21C Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Philip M. Gollucci wrote: > All, > > Can I have some +/- 1s please ? :) > > Patch attached. > > I'll confirm this "works" on at least the following: > FreeBSD 5.4-RELEASE > FreeBSD 6.0-BETA2 > FreeBSD 7.0-CURRENT > > and > > Linux 2.4.21-15.EL #1 i686 i686 i386 GNU/Linux > > with perl 5.8.7 and latest SVN of mp2. > > > [...] > Index: lib/Apache2/Build.pm > =================================================================== > --- lib/Apache2/Build.pm (revision 230957) > +++ lib/Apache2/Build.pm (working copy) > @@ -518,10 +518,22 @@ > > if ($self->{MP_MAINTAINER}) { > $self->{MP_DEBUG} = 1; > - if ($self->perl_config('gccversion')) { > + > + my $gccversion; Isn't that my ^^^ redundant ? > + if (my $gccversion = $self->perl_config('gccversion')) { > #same as --with-maintainter-mode > $ccopts .= " $Wall -DAP_DEBUG"; > $ccopts .= " -DAP_HAVE_DESIGNATED_INITIALIZER"; > + > + $gccversion =~ /^(.*?)\s/; > + $gccversion = $1; > + $gccversion =~ s/\D//g; > + > + $gccversion = $gccversion . "0" if length $gccversion < 3; > + > + if ($gccversion >= 332) { > + $ccopts .= " -Wdeclaration-after-statement"; > + } > } > } I suspect the version parsing could be simplified to something more explicit like this : my ($maj, $min, $patch) = $gccversion =~ /^(\d+)\.(\d+)\.(\d+)/; or my ($maj, $min, $patch) = split /\./, $gccversion; #Gcc 3.3.2 and higher if ($maj >= 3 && $min >= 3 && $patch >= 2) { $ccopts .= " -Wdeclaration-after-statement"; } -------------------------------------------------------------------------------- Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5 http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5 --------------enigC2830EFBF4114AF923E5C21C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFC+Ph1yzKhB4jDpaURA+6IAKDC2iE7zg1kR9i3+NaqwDPJXNSV+ACeLzry MB3hnHI9fVsJVvUP2HTHpdc= =ZvYq -----END PGP SIGNATURE----- --------------enigC2830EFBF4114AF923E5C21C--