Date: Fri, 26 Mar 1999 18:23:15 +0100 (CET) From: Anton Berezin <tobez@plab.ku.dk> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/10805: h2ph incorrectly deals with #error and #warning (FIX included) Message-ID: <199903261723.SAA00536@lion.plab.ku.dk>
index | next in thread | raw e-mail
>Number: 10805
>Category: bin
>Synopsis: h2ph incorrectly deals with #error and #warning (FIX included)
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Mar 26 09:30:00 PST 1999
>Closed-Date:
>Last-Modified:
>Originator: Anton Berezin
>Release: FreeBSD 4.0-CURRENT i386
>Organization:
The Protein Laboratory, University of Copenhagen
>Environment:
Any system with perl5.005_02 shipped by default
>Description:
perl5.005_02 has a bug in h2ph utility, which leads to
incorrectly generated perl code if the original header file
contains any #error or #warning preprocessor statements.
This problem was fixed in more recent perls, but FreeBSD
default perl installation is still affected.
>How-To-Repeat:
Try this on a system where ioctl.ph was not manually patched
(yes, I patched this file many times before finally deciding
to submit this report!)
perl -e 'require "sys/ioctl.ph";'
>Fix:
Apply this patch (relatively to /usr/src):
--- contrib/perl5/utils/h2ph.PL.orig Fri Mar 26 18:04:00 1999
+++ contrib/perl5/utils/h2ph.PL Fri Mar 26 18:05:21 1999
@@ -231,9 +231,9 @@
} elsif(/^undef\s+(\w+)/) {
print OUT $t, "undef(&$1) if defined(&$1);\n";
} elsif(/^error\s+(.*)/) {
- print OUT $t, "die(\"$1\");\n";
+ print OUT $t, "die(\"", quotemeta($1), "\");\n";
} elsif(/^warning\s+(.*)/) {
- print OUT $t, "warn(\"$1\");\n";
+ print OUT $t, "warn(\"", quotemeta($1), "\");\n";
} elsif(/^ident\s+(.*)/) {
print OUT $t, "# $1\n";
}
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903261723.SAA00536>
