From: Marcus Holland-Moritz Date: Tue, 14 Aug 2007 19:22:20 +0000 (+0000) Subject: Upgrade to Devel::PPPort 3.11_03 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=af36fda705dfd5f8d8d5a60ea777cd672a80ccf3;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Devel::PPPort 3.11_03 p4raw-id: //depot/perl@31713 --- diff --git a/ext/Devel/PPPort/Changes b/ext/Devel/PPPort/Changes index 222774c..7a48136 100755 --- a/ext/Devel/PPPort/Changes +++ b/ext/Devel/PPPort/Changes @@ -1,3 +1,12 @@ +3.11_03 - 2007-08-14 + + * fix an infinite recursion in ppport.h that could be + triggered by circular dependencies + * fix PERL_BCDREVISION, which wasn't BCD but simply + shifted decimal (just in time for 5.10) + * fix detection of macros that are not listed in the + implementation/dontwarn sections + 3.11_02 - 2007-08-13 * fix cpan #25372: special case sv_magic(sv, obj, how, name, 0) diff --git a/ext/Devel/PPPort/HACKERS b/ext/Devel/PPPort/HACKERS index 4590809..dfdc78c 100644 --- a/ext/Devel/PPPort/HACKERS +++ b/ext/Devel/PPPort/HACKERS @@ -11,15 +11,15 @@ lying around in this distribution. =head1 DESCRIPTION -=head2 How to build 105 versions of Perl +=head2 How to build 111 versions of Perl C supports Perl versions between 5.003 and bleadperl. To guarantee this support, I need some of these versions on my -machine. I currently have 105 different Perl version/configuration +machine. I currently have 111 different Perl version/configuration combinations installed on my laptop. As many of the old Perl distributions need patching to compile -cleanly on newer systems (and because building 105 Perls by hand +cleanly on newer systems (and because building 111 Perls by hand just isn't fun), I wrote a tool to build all the different versions and configurations. You can find it in F. It can currently build the following Perl releases: diff --git a/ext/Devel/PPPort/PPPort_pm.PL b/ext/Devel/PPPort/PPPort_pm.PL index 0712ab1..d5dcbe6 100644 --- a/ext/Devel/PPPort/PPPort_pm.PL +++ b/ext/Devel/PPPort/PPPort_pm.PL @@ -507,7 +507,7 @@ package Devel::PPPort; use strict; use vars qw($VERSION $data); -$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.11_02 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; +$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.11_03 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; sub _init_data { diff --git a/ext/Devel/PPPort/parts/inc/SvPV b/ext/Devel/PPPort/parts/inc/SvPV index 19d82fc..88b83ef 100644 --- a/ext/Devel/PPPort/parts/inc/SvPV +++ b/ext/Devel/PPPort/parts/inc/SvPV @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 15 $ +## $Revision: 17 $ ## $Author: mhx $ -## $Date: 2007/08/12 23:57:47 +0200 $ +## $Date: 2007/08/13 22:59:33 +0200 $ ## ################################################################################ ## @@ -26,6 +26,7 @@ sv_pvn_force_flags =dontwarn NEED_sv_2pv_flags +NEED_sv_2pv_flags_GLOBAL =implementation @@ -87,12 +88,10 @@ __UNDEFINED__ sv_2pvbyte_nolen(sv) sv_2pv_nolen(sv) /* Hint: sv_pvn * Always use the SvPV() macro instead of sv_pvn(). */ -__UNDEFINED__ sv_pvn(sv, len) SvPV(sv, len) /* Hint: sv_pvn_force * Always use the SvPV_force() macro instead of sv_pvn_force(). */ -__UNDEFINED__ sv_pvn_force(sv, len) SvPV_force(sv, len) /* If these are undefined, they're not handled by the core anyway */ __UNDEFINED__ SV_IMMEDIATE_UNREF 0 diff --git a/ext/Devel/PPPort/parts/inc/ppphbin b/ext/Devel/PPPort/parts/inc/ppphbin index d1b4dc5..08b7436 100644 --- a/ext/Devel/PPPort/parts/inc/ppphbin +++ b/ext/Devel/PPPort/parts/inc/ppphbin @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 40 $ +## $Revision: 41 $ ## $Author: mhx $ -## $Date: 2007/08/12 23:58:21 +0200 $ +## $Date: 2007/08/13 21:08:26 +0200 $ ## ################################################################################ ## @@ -106,6 +106,18 @@ my(%replace, %need, %hints, %warnings, %depends); my $replace = 0; my($hint, $define, $function); +sub find_api +{ + my $code = shift; + $code =~ s{ + ([^"'/]+) + | / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*) + | (?:"[^"\\]*(?:\\.[^"\\]*)*" [^"'/]*)+ + | (?:'[^'\\]*(?:\\.[^'\\]*)*' [^"'/]*)+ + }{ defined $1 ? $1 : '' }egsx; + grep { exists $API{$_} } $code =~ /(\w+)/mg; +} + while () { if ($hint) { my $h = $hint->[0] eq 'Hint' ? \%hints : \%warnings; @@ -128,7 +140,7 @@ while () { } else { if (exists $API{$define->[0]} && $define->[1] !~ /^DPPP_\(/) { - my @n = grep { exists $API{$_} } $define->[1] =~ /(\w+)/mg; + my @n = find_api($define->[1]); push @{$depends{$define->[0]}}, @n if @n } undef $define; @@ -140,7 +152,7 @@ while () { if ($function) { if (/^}/) { if (exists $API{$function->[0]}) { - my @n = grep { exists $API{$_} } $function->[1] =~ /(\w+)/mg; + my @n = find_api($function->[1]); push @{$depends{$function->[0]}}, @n if @n } undef $define; @@ -291,23 +303,13 @@ for $filename (@files) { # temporarily remove C comments from the code my @ccom; $c =~ s{ - ( - [^"'/]+ - | - (?:"[^"\\]*(?:\\.[^"\\]*)*" [^"'/]*)+ - | - (?:'[^'\\]*(?:\\.[^'\\]*)*' [^"'/]*)+ - ) - | - (/ (?: - \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / - | - /[^\r\n]* - )) - }{ - defined $2 and push @ccom, $2; - defined $1 ? $1 : "$ccs$#ccom$cce"; - }egsx; + ( [^"'/]+ + | (?:"[^"\\]*(?:\\.[^"\\]*)*" [^"'/]*)+ + | (?:'[^'\\]*(?:\\.[^'\\]*)*' [^"'/]*)+ ) + | (/ (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / + | /[^\r\n]* ) ) + }{ defined $2 and push @ccom, $2; + defined $1 ? $1 : "$ccs$#ccom$cce" }egsx; $file{ccom} = \@ccom; $file{code} = $c; @@ -665,10 +667,12 @@ sub can_use sub rec_depend { - my $func = shift; - my %seen; + my($func, $seen) = @_; return () unless exists $depends{$func}; - grep !$seen{$_}++, map { ($_, rec_depend($_)) } @{$depends{$func}}; + $seen = {%{$seen||{}}}; + return () if $seen->{$func}++; + my %s; + grep !$s{$_}++, map { ($_, rec_depend($_, $seen)) } @{$depends{$func}}; } sub parse_version diff --git a/ext/Devel/PPPort/parts/inc/version b/ext/Devel/PPPort/parts/inc/version index 577283f..60bd24e 100644 --- a/ext/Devel/PPPort/parts/inc/version +++ b/ext/Devel/PPPort/parts/inc/version @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 7 $ +## $Revision: 8 $ ## $Author: mhx $ -## $Date: 2007/01/02 12:32:33 +0100 $ +## $Date: 2007/08/13 23:00:34 +0200 $ ## ################################################################################ ## @@ -25,6 +25,7 @@ PERL_BCDVERSION =dontwarn PERL_PATCHLEVEL_H_IMPLICIT +_dpppDEC2BCD =implementation @@ -46,7 +47,8 @@ PERL_PATCHLEVEL_H_IMPLICIT # endif #endif -#define PERL_BCDVERSION ((PERL_REVISION * 0x1000000L) + (PERL_VERSION * 0x1000L) + PERL_SUBVERSION) +#define _dpppDEC2BCD(dec) ((((dec)/100)<<8)|((((dec)%100)/10)<<4)|((dec)%10)) +#define PERL_BCDVERSION ((_dpppDEC2BCD(PERL_REVISION)<<24)|(_dpppDEC2BCD(PERL_VERSION)<<12)|_dpppDEC2BCD(PERL_SUBVERSION)) /* It is very unlikely that anyone will try to use this with Perl 6 (or greater), but who knows. diff --git a/ext/Devel/PPPort/parts/ppptools.pl b/ext/Devel/PPPort/parts/ppptools.pl index 6bd9a07..06a2c2e 100644 --- a/ext/Devel/PPPort/parts/ppptools.pl +++ b/ext/Devel/PPPort/parts/ppptools.pl @@ -4,9 +4,9 @@ # ################################################################################ # -# $Revision: 18 $ +# $Revision: 19 $ # $Author: mhx $ -# $Date: 2007/01/02 12:32:28 +0100 $ +# $Date: 2007/08/13 22:59:58 +0200 $ # ################################################################################ # @@ -189,7 +189,7 @@ sub parse_partspec (defined $nop && exists $dontwarn{$nop}) || $h{$_}++; } - $data{implementation} =~ /^\s*#\s*define\s+(\w+)/g }; + $data{implementation} =~ /^\s*#\s*define\s+(\w+)/gm }; if (@maybeprov) { warn "$file seems to provide these macros, but doesn't list them:\n " diff --git a/ext/Devel/PPPort/soak b/ext/Devel/PPPort/soak index 937e486..a8cc4b3 100644 --- a/ext/Devel/PPPort/soak +++ b/ext/Devel/PPPort/soak @@ -33,7 +33,7 @@ use File::Find; use List::Util qw(max); use Config; -my $VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.11_02 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; +my $VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.11_03 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; $| = 1; my %OPT = (