The VMS specific Perl_cando() on open file handles was returning the
results for a previous file that a stat()/lstat() that was done instead
of for the open file.
This was causing failures in the Compress-Zlib tests on my system.
-John
[EMAIL PROTECTED]
Personal Opinion Only
--- vms/vms.c_25388 Mon Sep 12 23:24:29 2005
+++ vms/vms.c Mon Sep 12 21:45:06 2005
@@ -7692,7 +7692,16 @@
Perl_flex_fstat(pTHX_ int fd, Stat_t *statbufp)
{
if (!fstat(fd,(stat_t *) statbufp)) {
- if (statbufp == (Stat_t *) &PL_statcache) *namecache == '\0';
+ if (statbufp == (Stat_t *) &PL_statcache) {
+ char *cptr;
+
+ /* Save name for cando by name in VMS format */
+ cptr = getname(fd, namecache, 1);
+
+ /* This should not happen, but just in case */
+ if (cptr == NULL)
+ namecache[0] = '\0';
+ }
statbufp->st_dev = encode_dev(aTHX_ statbufp->st_devnam);
# ifdef RTL_USES_UTC
# ifdef VMSISH_TIME