+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)
=head1 DESCRIPTION
-=head2 How to build 105 versions of Perl
+=head2 How to build 111 versions of Perl
C<Devel::PPPort> 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<devel/buildperl.pl>.
It can currently build the following Perl releases:
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
{
################################################################################
##
-## $Revision: 15 $
+## $Revision: 17 $
## $Author: mhx $
-## $Date: 2007/08/12 23:57:47 +0200 $
+## $Date: 2007/08/13 22:59:33 +0200 $
##
################################################################################
##
=dontwarn
NEED_sv_2pv_flags
+NEED_sv_2pv_flags_GLOBAL
=implementation
/* 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
################################################################################
##
-## $Revision: 40 $
+## $Revision: 41 $
## $Author: mhx $
-## $Date: 2007/08/12 23:58:21 +0200 $
+## $Date: 2007/08/13 21:08:26 +0200 $
##
################################################################################
##
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 (<DATA>) {
if ($hint) {
my $h = $hint->[0] eq 'Hint' ? \%hints : \%warnings;
}
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;
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;
# 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;
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
################################################################################
##
-## $Revision: 7 $
+## $Revision: 8 $
## $Author: mhx $
-## $Date: 2007/01/02 12:32:33 +0100 $
+## $Date: 2007/08/13 23:00:34 +0200 $
##
################################################################################
##
=dontwarn
PERL_PATCHLEVEL_H_IMPLICIT
+_dpppDEC2BCD
=implementation
# 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.
#
################################################################################
#
-# $Revision: 18 $
+# $Revision: 19 $
# $Author: mhx $
-# $Date: 2007/01/02 12:32:28 +0100 $
+# $Date: 2007/08/13 22:59:58 +0200 $
#
################################################################################
#
(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 "
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 = (