Change 12033 by jhi@alpha on 2001/09/15 23:07:19

        Subject: [PATCH] h2xs.PL with C::Scan
        From: Tim Jenness <[EMAIL PROTECTED]>
        Date: Sat, 15 Sep 2001 13:41:28 -1000 (HST)
        Message-ID: <Pine.LNX.4.33.0109151338560.3075-100000@lapaki>

Affected files ...

... //depot/perl/utils/h2xs.PL#64 edit

Differences ...

==== //depot/perl/utils/h2xs.PL#64 (text) ====
Index: perl/utils/h2xs.PL
--- perl/utils/h2xs.PL.~1~      Sat Sep 15 17:15:05 2001
+++ perl/utils/h2xs.PL  Sat Sep 15 17:15:05 2001
@@ -740,8 +740,9 @@
     }
 }
 
+# Save current directory so that C::Scan can use it
+my $cwd = File::Spec->rel2abs( File::Spec->curdir );
 
-
 my ($ext, $nested, @modparts, $modfname, $modpname);
 
 $ext = chdir 'ext' ? 'ext/' : '';
@@ -811,7 +812,7 @@
       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' => \@styles;
-      $c->set('includeDirs' => ["$Config::Config{archlib}/CORE"]);
+      $c->set('includeDirs' => ["$Config::Config{archlib}/CORE", $cwd]);
 
       push @$fdecls_parsed, @{ $c->get('parsed_fdecls') };
       push(@$fdecls, @{$c->get('fdecls')});
@@ -870,7 +871,8 @@
     }
     @fnames_no_prefix = @fnames;
     @fnames_no_prefix
-      = sort map { ++$prefix{$_} if s/^$opt_p(?!\d)//; $_ } @fnames_no_prefix;
+      = sort map { ++$prefix{$_} if s/^$opt_p(?!\d)//; $_ } @fnames_no_prefix
+         if defined $opt_p;
     # Remove macros which expand to typedefs
     print "Typedefs are @td.\n" if $opt_d;
     my %td = map {($_, $_)} @td;
End of Patch.

Reply via email to