summaryrefslogtreecommitdiff
path: root/vms
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2002-03-24 10:17:52 -0600
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-24 21:19:45 +0000
commit9543c6b6ce261f69605b716f50b00bf1f32241c0 (patch)
treeec04771bb81681f910cd0d9414c0ac139fb39506 /vms
parent9922f24b582c59dcbe9803c876edf57a69f2c9c4 (diff)
downloadperl-9543c6b6ce261f69605b716f50b00bf1f32241c0.tar.gz
errno help for VMS
From: "Craig A. Berry" <craigberry@mac.com> Message-Id: <a05101509b8c3fd17e26c@[172.16.52.1]> p4raw-id: //depot/perl@15477
Diffstat (limited to 'vms')
-rw-r--r--vms/vms.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/vms/vms.c b/vms/vms.c
index 4ae554157c..c56147cb07 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -6706,8 +6706,10 @@ Perl_flex_stat(pTHX_ const char *fspec, Stat_t *statbufp)
char fileified[NAM$C_MAXRSS+1];
char temp_fspec[NAM$C_MAXRSS+300];
int retval = -1;
+ int saved_errno, saved_vaxc_errno;
if (!fspec) return retval;
+ saved_errno = errno; saved_vaxc_errno = vaxc$errno;
strcpy(temp_fspec, fspec);
if (statbufp == (Stat_t *) &PL_statcache)
do_tovmsspec(temp_fspec,namecache,0);
@@ -6758,6 +6760,8 @@ Perl_flex_stat(pTHX_ const char *fspec, Stat_t *statbufp)
}
# endif
}
+ /* If we were successful, leave errno where we found it */
+ if (retval == 0) { errno = saved_errno; vaxc$errno = saved_vaxc_errno; }
return retval;
} /* end of flex_stat() */