summaryrefslogtreecommitdiff
path: root/vms
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2002-03-25 11:24:33 -0600
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-25 22:38:12 +0000
commit2ac72d6ee10eac553987a271a333c11a24d55989 (patch)
tree9cfd8cc0c7bbee8cd57fbb367ad625b11f320432 /vms
parent95fecce171ac398d897e67e75aa7a30b6351629b (diff)
downloadperl-2ac72d6ee10eac553987a271a333c11a24d55989.tar.gz
yfix fix for VMS (was YYDEBUG etc.)
From: "Craig A. Berry" <craig.berry@SignalTreeSolutions.com> Message-Id: <5.1.0.14.2.20020325135745.01aeabc0@exchi01> p4raw-id: //depot/perl@15506
Diffstat (limited to 'vms')
-rw-r--r--vms/perly_c.vms12
-rw-r--r--vms/vms_yfix.pl5
2 files changed, 14 insertions, 3 deletions
diff --git a/vms/perly_c.vms b/vms/perly_c.vms
index 634dba91d4..90726fec20 100644
--- a/vms/perly_c.vms
+++ b/vms/perly_c.vms
@@ -7,7 +7,7 @@
#include "EXTERN.h"
#define PERL_IN_PERLY_C
#include "perl.h"
-#if defined(EBCDIC) || defined(VMS)
+#ifdef EBCDIC
#undef YYDEBUG
#endif
#define dep() deprecate_old("\"do\" to call subroutines")
@@ -1438,13 +1438,21 @@ yyparse()
ysave->oldyylval = yylval;
#if YYDEBUG
+ {
+ register int saved_errno = errno;
+#ifdef VMS
+ register int saved_vaxc_errno = vaxc$errno;
+#else
+ register int saved_vaxc_errno = 0;
+#endif
if ((yys = getenv("YYDEBUG")))
{
yyn = *yys;
if (yyn >= '0' && yyn <= '9')
yydebug = yyn - '0';
}
- else SETERRNO(0,SS$_NORMAL);
+ else SETERRNO(saved_errno,saved_vaxc_errno);
+ }
#endif
yynerrs = 0;
diff --git a/vms/vms_yfix.pl b/vms/vms_yfix.pl
index fbeb0390c3..37fefad3cc 100644
--- a/vms/vms_yfix.pl
+++ b/vms/vms_yfix.pl
@@ -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