Allow for GNU-isms in h2xs
authorIlya Zakharevich <ilya@math.berkeley.edu>
Tue, 31 Jul 2001 05:34:38 +0000 (01:34 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 31 Jul 2001 14:16:08 +0000 (14:16 +0000)
Message-ID: <20010731053438.A1754@math.ohio-state.edu>

p4raw-id: //depot/perl@11518

utils/h2xs.PL

index c27d24b..5c3fcff 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') };