[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/perl/FC-4 perl-5.8.6-172256.patch,NONE,1.1



Author: jvdias

Update of /cvs/dist/rpms/perl/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv23015

Added Files:
	perl-5.8.6-172256.patch 
Log Message:
fix bug 172256

perl-5.8.6-172256.patch:
 t/lib/h2ph.pht |    8 ++++----
 utils/h2ph.PL  |   22 ++++++++++++++--------
 2 files changed, 18 insertions(+), 12 deletions(-)

--- NEW FILE perl-5.8.6-172256.patch ---
--- perl-5.8.6/t/lib/h2ph.pht.172256	2003-09-10 12:21:44.000000000 -0400
+++ perl-5.8.6/t/lib/h2ph.pht	2005-11-10 22:00:56.000000000 -0500
@@ -4,13 +4,13 @@
 
 unless(defined(&SQUARE)) {
     sub SQUARE {
-	local($x) = @_;
+	my($x) = @_;
 	eval q((($x)*($x)));
     }
 }
 unless(defined(&ERROR)) {
     eval 'sub ERROR {
-        local($x) = @_;
+        my($x) = @_;
 	    eval q( &fprintf( &stderr, \\"%s\\\\n\\", $x->[2][3][0]));
     }' unless defined(&ERROR);
 }
@@ -19,12 +19,12 @@
     # "$Revision h2ph.h,v 1.0 98/05/04 20:42:14 billy $"
     undef(&MAX) if defined(&MAX);
     eval 'sub MAX {
-        local($a,$b) = @_;
+        my($a,$b) = @_;
 	    eval q((($a) > ($b) ? ($a) : ($b)));
     }' unless defined(&MAX);
     if(defined(&__SOME_UNIMPORTANT_PROPERTY)) {
 	eval 'sub MIN {
-	    local($a,$b) = @_;
+	    my($a,$b) = @_;
     	    eval q((($a) < ($b) ? ($a) : ($b)));
 	}' unless defined(&MIN);
     }
--- perl-5.8.6/utils/h2ph.PL.172256	2005-11-10 21:59:27.000000000 -0500
+++ perl-5.8.6/utils/h2ph.PL	2005-11-10 22:01:28.000000000 -0500
@@ -142,7 +142,7 @@
 			    $curargs{$arg} = 1;
 			}
 			$args =~ s/\b(\w)/\$$1/g;
-			$args = "local($args) = \ _;\n$t    ";
+			$args = "my($args) = \ _;\n$t    ";
 		    }
 		    s/^\s+//;
 		    expr();
@@ -276,6 +276,8 @@
 		chomp $next;
 		# drop "#define FOO FOO" in enums
 		$next =~ s/^\s*#\s*define\s+(\w+)\s+\1\s*$//;
+		# #defines in enums (aliases)
+		$next =~ s/^\s*#\s*define\s+(\w+)\s+(\w+)\s*$/$1 = $2,/;
 		$_ .= $next;
 		print OUT "# $next\n" if $opt_D;
 	    }
@@ -288,6 +290,7 @@
 	    my $enum_val = -1;
 	    foreach my $enum (@enum_subs) {
 		my ($enum_name, $enum_value) = $enum =~ /^([a-zA-Z_]\w*)(=.+)?$/;
+		$enum_name or next;
 		$enum_value =~ s/^=//;
 		$enum_val = (length($enum_value) ? $enum_value : $enum_val + 1);
 		if ($opt_h) {
@@ -338,7 +341,7 @@
 	    }
 	    $args = (
 		@args
-		? "local(" . (join ',', map "\$$_", @args) . ") = \ _;\n$t    "
+		? "my(" . (join ',', map "\$$_", @args) . ") = \ _;\n$t    "
 		: ""
 	    );
 	    my $proto = @args ? '' : '() ';
@@ -391,6 +394,7 @@
 exit $Exit;
 
 sub expr {
+    $new = '"(assembly code)"' and return if /\b__asm__\b/; # freak out.
     my $joined_args;
     if(keys(%curargs)) {
 	$joined_args = join('|', keys(%curargs));
@@ -399,7 +403,7 @@
 	s/^\&\&// && do { $new .= " &&"; next;}; # handle && operator
 	s/^\&([\(a-z\)]+)/$1/i;	# hack for things that take the address of
 	s/^(\s+)//		&& do {$new .= ' '; next;};
-	s/^0X([0-9A-F]+)[UL]*//i 
+	s/^0X([0-9A-F]+)[UL]*//i
 	    && do {my $hex = $1;
 		   $hex =~ s/^0+//;
 		   if (length $hex > 8 && !$Config{use64bitint}) {
@@ -535,7 +539,7 @@
 
         while (length $in) {
             if ($pre_sub_tri_graphs) {
-                # Preprocess all tri-graphs 
+                # Preprocess all tri-graphs
                 # including things stuck in quoted string constants.
                 $in =~ s/\?\?=/#/g;                         # | ??=|  #|
                 $in =~ s/\?\?\!/|/g;                        # | ??!|  ||
@@ -548,17 +552,19 @@
                 $in =~ s/\?\?>/}/g;                         # | ??>|  }|
             }
 	    if ($in =~ /^\#ifdef __LANGUAGE_PASCAL__/) {
-                # Tru64 disassembler.h evilness: mixed C and Pascal.
+		# Tru64 disassembler.h evilness: mixed C and Pascal.
 		while (<IN>) {
-		    last if /^\#endif/; 
+		    last if /^\#endif/;
 		}
+		$in = "";
 		next READ;
 	    }
 	    if ($in =~ /^extern inline / && # Inlined assembler.
 		$^O eq 'linux' && $file =~ m!(?:^|/)asm/[^/]+\.h$!) {
- 		while (<IN>) {
-		    last if /^}/; 
+		while (<IN>) {
+		    last if /^}/;
 		}
+		$in = "";
 		next READ;
 	    }
             if ($in =~ s/\\$//) {                           # \-newline


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]