summaryrefslogtreecommitdiff
path: root/vms
diff options
context:
space:
mode:
authorJohn E. Malmberg <wb8tyw@qsl.net>2005-10-23 13:46:46 -0400
committerCraig A. Berry <craigberry@mac.com>2005-10-23 22:17:44 +0000
commitf667e6d8cdd5ebef72830d909962648cb352de51 (patch)
tree7d57882e26144c076e1a46ff19c33c2d0c5a4c20 /vms
parent6e186fbe5e810b53fd043e653387f61258900a38 (diff)
downloadperl-f667e6d8cdd5ebef72830d909962648cb352de51.tar.gz
[patch@25825] Fix st_ino compare to use real data.
From: "John E. Malmberg" <wb8tyw@qsl.net> Message-id: <435C04C6.2090405@qsl.net> p4raw-id: //depot/perl@25827
Diffstat (limited to 'vms')
-rw-r--r--vms/vms.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/vms/vms.c b/vms/vms.c
index ecdfea6064..6110a971bd 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -3123,9 +3123,9 @@ vmspipe_tempfile(pTHX)
fstat(fileno(fp), (struct stat *)&s1);
#if defined(_USE_STD_STAT)
- cmp_result = s0.st_ino != s1.st_ino;
+ cmp_result = s0.crtl_stat.st_ino != s1.crtl_stat.st_ino;
#else
- cmp_result = memcmp(&s0.st_ino, &s1.st_ino, 6);
+ cmp_result = memcmp(s0.crtl_stat.st_ino, s1.crtl_stat.st_ino, 6);
#endif
if ((cmp_result != 0) && (s0.st_ctime != s1.st_ctime)) {
fclose(fp);
@@ -9080,7 +9080,11 @@ Perl_flex_fstat(pTHX_ int fd, Stat_t *statbufp)
if (cptr == NULL)
namecache[0] = '\0';
}
+#ifdef _USE_STD_STAT
+ memcpy(&statbufp->st_ino, &statbufp->crtl_stat.st_ino, 8);
+#else
memcpy(&statbufp->st_ino, statbufp->crtl_stat.st_ino, 8);
+#endif
#ifndef _USE_STD_STAT
strncpy(statbufp->st_devnam, statbufp->crtl_stat.st_dev, 63);
statbufp->st_devnam[63] = 0;
@@ -9196,7 +9200,11 @@ Perl_flex_stat_int(pTHX_ const char *fspec, Stat_t *statbufp, int lstat_flag)
}
#endif
if (!retval) {
+#ifdef _USE_STD_STAT
+ memcpy(&statbufp->st_ino, &statbufp->crtl_stat.st_ino, 8);
+#else
memcpy(&statbufp->st_ino, statbufp->crtl_stat.st_ino, 8);
+#endif
#ifndef _USE_STD_STAT
strncpy(statbufp->st_devnam, statbufp->crtl_stat.st_dev, 63);
statbufp->st_devnam[63] = 0;