[perl #22753] overload::StrVal() fails for regexp refs
[p5sagit/p5-mst-13.2.git] / vms / vms_yfix.pl
index 08a8dbf..37fefad 100644 (file)
@@ -6,7 +6,7 @@
 # If it finds that the input files are already patches for VMS,
 # it just copies the input to the output.
 #
-# Revised 20-Dec-1996 by Charles Bailey  bailey@genetics.upenn.edu
+# Revised 20-Dec-1996 by Charles Bailey  bailey@newman.upenn.edu
 
 $VERSION = '1.11';
 
@@ -28,9 +28,12 @@ while (<C>) {
     $_ = "#   ifndef getenv\n$_#   endif\n";
   }
   elsif ( /getenv\("YYDEBUG"\)/ ) {
+    $_ = "  {\n    register int saved_errno = errno;\n"
+       . "#ifdef VMS\n    register int saved_vaxc_errno = vaxc\$errno;\n"
+       . "#else\n    register int saved_vaxc_errno = 0;\n#endif\n" . $_;
     # Reset the "error" status if an optional lookup fails
     while (not /^\s+\}/) { print COUT; $_ = <C>; }
-    $_ .= "\telse SETERRNO(0,SS\$_NORMAL);\n";
+    $_ .= "    else SETERRNO(saved_errno,saved_vaxc_errno);\n  }\n";
   }
   else {
     # add the dEXT tag to definitions of global vars, so we'll insert