summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt D. Starsinic <kstar@www.chapin.edu>1997-08-20 09:43:32 +1200
committerTim Bunce <Tim.Bunce@ig.co.uk>1997-09-05 00:00:00 +0000
commit4a8e146e38ec2045f1f817a7cb578e1b1f80f39f (patch)
tree93fc948a38064711071028551b15b0741c56a0e8
parent0b166b6635cf199f072db516b2a523ee659394d5 (diff)
downloadperl-4a8e146e38ec2045f1f817a7cb578e1b1f80f39f.tar.gz
h2ph broken in 5.004_02
> The h2ph in perl5.00402 generates perl code that the interpeter > chokes on. For example, running h2ph on /usr/include/sys/errno.h > (under openbsd) transforms this: > > #define EPERM 1 /* Operation not permitted */ > > into this: > > unless(defined(&EPERM) { > sub EPERM () {1;} > } > > which in turn causes this: > > syntax error at - line 2, near "sub EPERM ()" > > I'm not exactly sure why h2ph is worried about avoiding redefinition . . . It's not a redefinition problem; errno.ph is missing a right paren. Here is a patch, tested against 5.004_02: Credited: David Mazieres <dm@reeducation-labor.lcs.mit.edu> p5p-msgid: 199708201700.KAA02621@www.chapin.edu
-rw-r--r--utils/h2ph.PL2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index d48571f00f..7c36f21079 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -132,7 +132,7 @@ foreach $file (@ARGV) {
print OUT $t,"eval 'sub $name () {",$new,";}' unless defined(\&$name);\n";
}
else {
- print OUT $t,"unless(defined(\&$name) {\nsub $name () {",$new,";}\n}\n";
+ print OUT $t,"unless(defined(\&$name)) {\nsub $name () {",$new,";}\n}\n";
}
}
}