svn commit: r239724 - /perl/modperl/trunk/lib/Apache2/Build.pm
Author: pgollucci Date: Wed Aug 24 11:18:19 2005 New Revision: 239724 URL: http://svn.apache.org/viewcvs?rev=239724&view=rev Log: check $ccopts for -Wdeclaration-after-statement if not already present and the gcc version supports its (3.3.2+) add it Modified: perl/modperl/trunk/lib/Apache2/Build.pm Modified: perl/modperl/trunk/lib/Apache2/Build.pm URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/lib/Apache2/Build.pm?rev=239724&r1=239723&r2=239724&view=diff == --- perl/modperl/trunk/lib/Apache2/Build.pm (original) +++ perl/modperl/trunk/lib/Apache2/Build.pm Wed Aug 24 11:18:19 2005 @@ -523,6 +523,12 @@ $ccopts .= " $Wall -DAP_DEBUG"; $ccopts .= " -DAP_HAVE_DESIGNATED_INITIALIZER"; } + +if ($self->has_gcc_version('3.3.2') && +$ccopts !~ /declaration-after-statement/) { +debug "Adding -Wdeclaration-after-statement to ccopts"; +$ccopts .= " -Wdeclaration-after-statement"; +} } if ($self->{MP_COMPAT_1X}) { @@ -555,6 +561,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 @tuples = split /\./, $has_version, 3; +my @r_tuples = 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; +} + sub perl_ccopts { my $self = shift;
svn commit: r239725 - /perl/modperl/trunk/todo/bugs_build
Author: pgollucci Date: Wed Aug 24 11:18:50 2005 New Revision: 239725 URL: http://svn.apache.org/viewcvs?rev=239725&view=rev Log: its done Modified: perl/modperl/trunk/todo/bugs_build Modified: perl/modperl/trunk/todo/bugs_build URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/todo/bugs_build?rev=239725&r1=239724&r2=239725&view=diff == --- perl/modperl/trunk/todo/bugs_build (original) +++ perl/modperl/trunk/todo/bugs_build Wed Aug 24 11:18:50 2005 @@ -65,15 +65,6 @@ xs/modperl_xs*.h, when the latter change 'make' won't rebuild the dependant files -* gcc 3.3 (from cvs 2003-07-28) supports a new option: - -Wdeclaration-after-statement, which we need to enable in the - maintainer mode, to catch any declarations after statements, since - by default gcc doesn't complain about them. Probably need to wait - till gcc-3.3.2 and enable it then. - http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?r1=2.639&r2=2.640&f=h -[pgollucci volunteers] - - * Testing: Need to put Philippe's smoking test into the core -- shouldn't forget to test with perlio enabled and disabled
svn commit: r239728 - /perl/modperl/trunk/Changes
Author: pgollucci Date: Wed Aug 24 11:27:42 2005 New Revision: 239728 URL: http://svn.apache.org/viewcvs?rev=239728&view=rev Log: note the new -Wdeclaration-after-statement Modified: perl/modperl/trunk/Changes Modified: perl/modperl/trunk/Changes URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/Changes?rev=239728&r1=239727&r2=239728&view=diff == --- perl/modperl/trunk/Changes (original) +++ perl/modperl/trunk/Changes Wed Aug 24 11:27:42 2005 @@ -12,11 +12,16 @@ =item 2.0.2-dev +When running Makefile.PL with the MP_MAINTAINER=1 option +add -Wdeclaration-after-statement if we are using gcc +version 3.3.2 or higher and its not already part of the ccopts. +[Philip M. Gollucci, Gozer] + Several fixes to Apache2::Status -[pgollucci] +[Philip M. Gollucci] When using Apache2::Reload and ReloadDebug is set to 'On', -sort the output alphabetically [pgollucci] +sort the output alphabetically [Philip M. Gollucci] croak in case a filter returns DECLINED after calling $f->read (as it is not supposed to happen) [Stas]
svn commit: r239729 - in /perl/modperl/trunk: Changes Makefile.PL
Author: pgollucci Date: Wed Aug 24 11:33:22 2005 New Revision: 239729 URL: http://svn.apache.org/viewcvs?rev=239729&view=rev Log: Fix undefined variable warning in DSO builds when using MP_APXS. Submitted: Nikolay Ananiev <[EMAIL PROTECTED]> Message-ID: <[EMAIL PROTECTED]> Modified: perl/modperl/trunk/Changes perl/modperl/trunk/Makefile.PL Modified: perl/modperl/trunk/Changes URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/Changes?rev=239729&r1=239728&r2=239729&view=diff == --- perl/modperl/trunk/Changes (original) +++ perl/modperl/trunk/Changes Wed Aug 24 11:33:22 2005 @@ -12,6 +12,9 @@ =item 2.0.2-dev +Fix an undefined warning in DSO builds when not using MP_APXS. +[Nikolay Ananiev <[EMAIL PROTECTED]>] + When running Makefile.PL with the MP_MAINTAINER=1 option add -Wdeclaration-after-statement if we are using gcc version 3.3.2 or higher and its not already part of the ccopts. Modified: perl/modperl/trunk/Makefile.PL URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/Makefile.PL?rev=239729&r1=239728&r2=239729&view=diff == --- perl/modperl/trunk/Makefile.PL (original) +++ perl/modperl/trunk/Makefile.PL Wed Aug 24 11:33:22 2005 @@ -393,9 +393,13 @@ "You'll need to add the following to httpd.conf:","", " LoadModule perl_module modules/$build->{MODPERL_LIB_DSO}", "", "depending on your build, mod_perl might not live in", -"the modules/ directory - check the results of", "", -" \$ $build->{MP_APXS} -q LIBEXECDIR", "", -"and adjust the LoadModule directive accordingly.\n"; +"the modules/ directory.\n"; +if ($build->{MP_APXS}) { +warning +"Check the results of", "", +" \$ $build->{MP_APXS} -q LIBEXECDIR", "", +"and adjust the LoadModule directive accordingly.\n"; +} } $build->save;
svn commit: r239915 - /perl/modperl/trunk/lib/Apache2/Build.pm
Author: pgollucci Date: Wed Aug 24 13:20:13 2005 New Revision: 239915 URL: http://svn.apache.org/viewcvs?rev=239915&view=rev Log: style fixes Modified: perl/modperl/trunk/lib/Apache2/Build.pm Modified: perl/modperl/trunk/lib/Apache2/Build.pm URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/lib/Apache2/Build.pm?rev=239915&r1=239914&r2=239915&view=diff == --- perl/modperl/trunk/lib/Apache2/Build.pm (original) +++ perl/modperl/trunk/lib/Apache2/Build.pm Wed Aug 24 13:20:13 2005 @@ -562,7 +562,6 @@ } sub has_gcc_version { - my $self = shift; my $requested_version = shift; @@ -577,7 +576,6 @@ } sub cmp_tuples { - my($a, $b) = @_; while (@$a && @$b) {
svn commit: r239919 - /perl/modperl/trunk/lib/Apache2/Build.pm
Author: pgollucci Date: Wed Aug 24 13:42:53 2005 New Revision: 239919 URL: http://svn.apache.org/viewcvs?rev=239919&view=rev Log: s/$a/$num_a/g s/$b/$num_b/g to avoid conflicting with the special lexicals $a, $b Modified: perl/modperl/trunk/lib/Apache2/Build.pm Modified: perl/modperl/trunk/lib/Apache2/Build.pm URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/lib/Apache2/Build.pm?rev=239919&r1=239918&r2=239919&view=diff == --- perl/modperl/trunk/lib/Apache2/Build.pm (original) +++ perl/modperl/trunk/lib/Apache2/Build.pm Wed Aug 24 13:42:53 2005 @@ -576,14 +576,14 @@ } sub cmp_tuples { -my($a, $b) = @_; +my($num_a, $num_b) = @_; -while (@$a && @$b) { -my $cmp = shift @$a <=> shift @$b; +while (@$num_a && @$num_b) { +my $cmp = shift @$num_a <=> shift @$num_b; return $cmp if $cmp; } -return @$a <=> @$b; +return @$num_a <=> @$num_b; } sub perl_ccopts {