3 use ExtUtils::MakeMaker;
7 (unpack "B*", pack "N", $Config{ptrsize}) =~ /^0+1(0+)$/
8 or die "Your pointer size of $Config{ptrsize} is very confusing";
9 my $ptr_bits = length $1;
11 my $svh = "$Config{archlibexp}/CORE/perl.h";
12 my $vtable_file = 'vtables.inc';
16 or die "Can't open $svh ($!) - is your perl install missing its headers?";
18 next unless /^\s+(PL_vtbl_[a-z]+),\s*$/ or /^EXT MGVTBL (PL_vtbl_[a-z]+) =/;
21 warn "Didn't find any vtable names in $svh" unless %vtables;
26 PL_vtbl_collxfrm => 'USE_LOCALE_COLLATE',
27 PL_vtbl_mutex => 'USE_5005THREADS',
30 open FH, ">$vtable_file" or die "Can't open $vtable_file: $!";
31 foreach (sort keys %vtables) {
32 print FH "#ifdef $special{$_}\n" if ($special{$_});
33 if ($Config{gccversion}) {
36 print FH " check_new(st, &$_);\n";
38 print FH "#endif\n" if ($special{$_});
41 close FH or die "Error closing $vtable_file: $!";
44 NAME => 'Devel::Size',
45 VERSION_FROM => 'lib/Devel/Size.pm',
46 DEFINE => "-DALIGN_BITS=$ptr_bits",
47 (eval $ExtUtils::MakeMaker::VERSION >= 6.47 ? (MIN_PERL_VERSION => '5.008') : ()),
48 (eval $ExtUtils::MakeMaker::VERSION >= 6.31 ? (LICENSE => 'perl') : ()),
49 realclean => {FILES=> $vtable_file},