Change #11828 wasn't complete, this updates to intest path
[p5sagit/p5-mst-13.2.git] / utils / h2xs.PL
index cbdce5d..0a065ec 100644 (file)
@@ -808,8 +808,9 @@ if( ! $opt_X ){  # use XS, unless it was disabled
        $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') };
@@ -1586,6 +1587,8 @@ sub assign_typemap_entry {
     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;
@@ -1651,11 +1654,11 @@ my $prereq_pm;
 
 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;
@@ -1665,7 +1668,7 @@ use ExtUtils::MakeMaker;
 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>') : ()),
@@ -1780,7 +1783,7 @@ _END_
 
 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';
 
@@ -1825,7 +1828,7 @@ else
 {
   print EX <<_END_;
 use Test::More tests => $tests;
-BEGIN { use_ok('$module'); }
+BEGIN { use_ok('$module') };
 
 _END_
 
@@ -1848,11 +1851,12 @@ _END_
     print "# fail: \$\@";
     \$fail = 1;
   }
+
 }
 
 ok( \$fail == 0 , 'Constants' );
-
-_END__
+_END_
+  }
 }
 
 print EX <<_END_;