$filter = $';
}
warn "Scanning $filename for functions...\n";
+ my @styles = $Config{gccversion} ? qw(C++ C9X GNU) : qw(C++ C9X);
$c = new C::Scan 'filename' => $filename, 'filename_filter' => $filter,
- 'add_cppflags' => $addflags, 'c_styles' => [qw(C++ C9X)];
+ 'add_cppflags' => $addflags, 'c_styles' => \@styles;
$c->set('includeDirs' => ["$Config::Config{archlib}/CORE"]);
push @$fdecls_parsed, @{ $c->get('parsed_fdecls') };
print "Type mutation via typedefs: $otype ==> $type\n" if $opt_d;
$entry = assign_typemap_entry($type);
}
+ # XXX good do better if our UV happens to be long long
+ return "T_NV" if $type =~ /^(unsigned\s+)?long\s+(long|double)\z/;
$entry ||= $typemap{$otype}
|| (td_is_struct($type) ? "T_OPAQUE_STRUCT" : "T_PTROBJ");
$typemap{$otype} = $entry;
if ( $compat_version < 5.00702 and $new_test )
{
- $prereq_pm = q%'Test::More => 0'%;
+ $prereq_pm = q%'Test::More' => 0%;
}
else
{
- $prereq_pm ='';
+ $prereq_pm = '';
}
print PL <<END;
WriteMakefile(
'NAME' => '$module',
'VERSION_FROM' => '$modfname.pm', # finds \$VERSION
- 'PREREQ_PM' => {$preq_pm}, # e.g., Module::Name => 1.1
+ 'PREREQ_PM' => {$prereq_pm}, # e.g., Module::Name => 1.1
(\$] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => '$modfname.pm', # retrieve abstract from module
AUTHOR => '$author <$email>') : ()),
my $test_mod = 'Test::More';
-if ( $old_test or ($compat_version < 5.00702 and not $new_test ))
+if ( $old_test or ($compat_version < 5.007 and not $new_test ))
{
my $test_mod = 'Test';
{
print EX <<_END_;
use Test::More tests => $tests;
-BEGIN { use_ok('$module'); }
+BEGIN { use_ok('$module') };
_END_
print "# fail: \$\@";
\$fail = 1;
}
+
}
ok( \$fail == 0 , 'Constants' );
-
-_END__
+_END_
+ }
}
print EX <<_END_;