develooper Front page | perl.perl5.porters | Postings from December 2001

[PATCH @13746] h2xs broken

Thread Next
From:
Ilya Zakharevich
Date:
December 31, 2001 14:48
Subject:
[PATCH @13746] h2xs broken
Message ID:
20011231174855.A29128@math.ohio-state.edu
a) -x was taking an argument;

b) there was a warning about uninit variable;

c) the REx allowed #define's of the form

     #define FOO

   however, ExtUtils::Constant would not work for such defines.

   [It is possible to change ExtUtils::Constant by rewriting the
   assignment as iv_value = MACRO + 0 instead of just iv_value =
   MACRO, but I see no point in such functionality: I know no way to
   distinguish an empty macro.]

Enjoy,
Ilya

--- ./utils/h2xs.PL-pre	Sat Dec 15 21:44:48 2001
+++ ./utils/h2xs.PL	Sun Dec 30 22:23:50 2001
@@ -546,7 +546,7 @@ my %options = (
                 'const-subs|s=s'     => \$opt_s,
                 'default-type|t=s'   => \$opt_t,
                 'version|v=s'        => \$opt_v,
-                'autogen-xsubs|x=s'  => \$opt_x,
+                'autogen-xsubs|x'    => \$opt_x,
                 'use-new-tests'      => \$new_test,
                 'use-old-tests'      => \$old_test
               );
@@ -698,6 +698,7 @@ if( @path_h ){
       }
       if ($found) {
 	$rel_path_h = $path_h;
+	$fullpath{$path_h} = $fullpath;
       } else {
 	(my $epath = $module) =~ s,::,/,g;
 	$epath = File::Spec->catdir('ext', $epath) if -d 'ext';
@@ -729,7 +730,7 @@ if( @path_h ){
 	    s/\?\?</{/g;                         # | ??<|  {|
 	    s/\?\?>/}/g;                         # | ??>|  }|
 	}
-	if (/^[ \t]*#[ \t]*define\s+([\$\w]+)\b(?!\()\s*(?=[^" \t])(.*)/) {
+	if (/^[ \t]*#[ \t]*define\s+([\$\w]+)\b(?!\()\s*(?=[^"\s])(.*)/) {
 	    my $def = $1;
 	    my $rest = $2;
 	    $rest =~ s!/\*.*?(\*/|\n)|//.*!!g; # Remove comments

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About