perl/perl-5.8.8-bz191416.patch
jvdias ea0714d727 fix bug 188841: make CGI.pm's url(-relative) handle rewrites; Fix bug
191416: make h2ph generate correct code for cpp statements like: '#if
    defined A || defined B'
2006-05-11 19:43:23 +00:00

41 lines
2.3 KiB
Diff

--- perl-5.8.8/t/lib/h2ph.pht.bz191416 2004-12-27 14:55:34.000000000 -0500
+++ perl-5.8.8/t/lib/h2ph.pht 2006-05-11 15:12:10.000000000 -0400
@@ -28,21 +28,21 @@
eval q((($a) < ($b) ? ($a) : ($b)));
}' unless defined(&MIN);
}
- if(!(defined (defined(&__SOMETHING_MORE_IMPORTANT) ? &__SOMETHING_MORE_IMPORTANT : 0))) {
+ if(!(defined (defined(&__SOMETHING_MORE_IMPORTANT) ? &__SOMETHING_MORE_IMPORTANT : undef))) {
}
- elsif(!(defined (defined(&__SOMETHING_REALLY_REALLY_IMPORTANT) ? &__SOMETHING_REALLY_REALLY_IMPORTANT : 0))) {
+ elsif(!(defined (defined(&__SOMETHING_REALLY_REALLY_IMPORTANT) ? &__SOMETHING_REALLY_REALLY_IMPORTANT : undef))) {
die("Nup, can't go on");
} else {
eval 'sub EVERYTHING_IS_OK () {1;}' unless defined(&EVERYTHING_IS_OK);
}
undef(&WHATEVER) if defined(&WHATEVER);
- if((!((defined (defined(&__SOMETHING_TRIVIAL) ? &__SOMETHING_TRIVIAL : 0) && defined (defined(&__SOMETHING_LESS_SO) ? &__SOMETHING_LESS_SO : 0))) || defined (defined(&__SOMETHING_OVERPOWERING) ? &__SOMETHING_OVERPOWERING : 0))) {
+ if((!((defined (defined(&__SOMETHING_TRIVIAL) ? &__SOMETHING_TRIVIAL : undef) && defined (defined(&__SOMETHING_LESS_SO) ? &__SOMETHING_LESS_SO : undef))) || defined (defined(&__SOMETHING_OVERPOWERING) ? &__SOMETHING_OVERPOWERING : undef))) {
eval 'sub WHATEVER () {6;}' unless defined(&WHATEVER);
}
- elsif(!(defined (defined(&__SOMETHING_TRIVIAL) ? &__SOMETHING_TRIVIAL : 0)) ) {
+ elsif(!(defined (defined(&__SOMETHING_TRIVIAL) ? &__SOMETHING_TRIVIAL : undef)) ) {
eval 'sub WHATEVER () {7;}' unless defined(&WHATEVER);
}
- elsif(!(defined (defined(&__SOMETHING_LESS_SO) ? &__SOMETHING_LESS_SO : 0)) ) {
+ elsif(!(defined (defined(&__SOMETHING_LESS_SO) ? &__SOMETHING_LESS_SO : undef)) ) {
eval 'sub WHATEVER () {8;}' unless defined(&WHATEVER);
} else {
eval 'sub WHATEVER () {1000;}' unless defined(&WHATEVER);
--- perl-5.8.8/utils/h2ph.PL.bz191416 2006-05-11 15:10:52.000000000 -0400
+++ perl-5.8.8/utils/h2ph.PL 2006-05-11 15:11:49.000000000 -0400
@@ -514,7 +514,7 @@
}
} else {
if ($inif && $new !~ /defined\s*\($/) {
- $new .= '(defined(&' . $id . ') ? &' . $id . ' : 0)';
+ $new .= '(defined(&' . $id . ') ? &' . $id . ' : undef)';
} elsif (/^\[/) {
$new .= " \$$id";
} else {