develooper Front page | perl.perl5.porters | Postings from March 2003

[perl #20755] [PATCH] 5.8.0 h2ph barfs on checksum.h on RH6.2/7.2

Thread Next
From:
Kurt Starsinic
Date:
March 10, 2003 19:27
Subject:
[perl #20755] [PATCH] 5.8.0 h2ph barfs on checksum.h on RH6.2/7.2
Message ID:
m3d6kyvazx.wl_rspier@pobox.com

On Feb 06, Hans Lambermont wrote:
> The new h2ph in 5.8.0 barfs on checksum.h from RedHat6.2 or 7.2

    The following patch should take care of things.

    - Kurt

--- utils/h2ph.PL	2003-03-10 00:27:39.000000000 -0500
+++ utils/h2ph.PL.new	2003-03-09 23:54:48.000000000 -0500
@@ -489,10 +489,18 @@
                 $out    .= $1;
             } elsif ($in =~ s/^(\\.)//) {                   # \...
                 $out    .= $1;
-            } elsif ($in =~ s/^('(\\.|[^'\\])*')//) {       # '...
-                $out    .= $1;
-            } elsif ($in =~ s/^("(\\.|[^"\\])*")//) {       # "...
-                $out    .= $1;
+            } elsif ($in =~ /^'/) {                         # '...
+                if ($in =~ s/^('(\\.|[^'\\])*')//) {
+                    $out    .= $1;
+                } else {
+                    next READ;
+                }
+            } elsif ($in =~ /^"/) {                         # "...
+                if ($in =~ s/^("(\\.|[^"\\])*")//) {
+                    $out    .= $1;
+                } else {
+                    next READ;
+                }
             } elsif ($in =~ s/^\/\/.*//) {                  # //...
                 # fall through
             } elsif ($in =~ m/^\/\*/) {                     # /*...
--- t/lib/h2ph.h	2003-03-10 00:27:35.000000000 -0500
+++ t/lib/h2ph.h.new	2003-03-10 00:19:51.000000000 -0500
@@ -121,4 +121,15 @@
   flam
  } flamflim;

+/* Handle multi-line quoted strings: */
+__asm__ __volatile__("
+    this
+    produces
+    no
+    output
+");
+
+#define multiline "multiline
+string"
+
 #endif /* _H2PH_H_ */
--- t/lib/h2ph.pht	2003-03-10 00:27:35.000000000 -0500
+++ t/lib/h2ph.pht.new	2003-03-10 00:25:28.000000000 -0500
@@ -84,5 +84,6 @@
     }
     eval("sub flim () { 0; }") unless defined(&flim);
     eval("sub flam () { 1; }") unless defined(&flam);
+    eval 'sub multiline () {"multilinestring";}' unless defined(&multiline);
 }
 1;


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