[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #64933] Stat sometimes produces wrong timestam
|
From: |
John W. Eaton |
|
Subject: |
[Octave-bug-tracker] [bug #64933] Stat sometimes produces wrong timestamp |
|
Date: |
Tue, 28 Nov 2023 12:57:52 -0500 (EST) |
Follow-up Comment #17, bug #64933 (project octave):
Another possibility is the following change
diff --git a/liboctave/wrappers/stat-wrappers.c
b/liboctave/wrappers/stat-wrapp>
--- a/liboctave/wrappers/stat-wrappers.c
+++ b/liboctave/wrappers/stat-wrappers.c
@@ -164,7 +164,12 @@ octave_fstat_wrapper (int fid, mode_t *m
{
struct stat buf;
+#if defined (OCTAVE_USE_WINDOWS_API)
+ // For consistency with stat and lstat behavior. See bug #64933.
+ int status = _fstati64 (fid, &buf);
+#else
int status = fstat (fid, &buf);
+#endif
assign_stat_fields (&buf, mode, ino, dev, nlink, uid, gid, size,
atime, mtime, ctime, rdev, blksize, blocks);
I expect this change would at least make the behavior of
stat ("filename")
stat (fopen ("filename"))
consistent.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64933>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #64933] Stat sometimes produces wrong timestamp, (continued)
- [Octave-bug-tracker] [bug #64933] Stat sometimes produces wrong timestamp, Markus Mützel, 2023/11/27
- [Octave-bug-tracker] [bug #64933] Stat sometimes produces wrong timestamp, Nicholas Jankowski, 2023/11/27
- [Octave-bug-tracker] [bug #64933] Stat sometimes produces wrong timestamp, Nicholas Jankowski, 2023/11/27
- [Octave-bug-tracker] [bug #64933] Stat sometimes produces wrong timestamp, INVALID.NOREPLY, 2023/11/28
- [Octave-bug-tracker] [bug #64933] Stat sometimes produces wrong timestamp, Nicholas Jankowski, 2023/11/28
- [Octave-bug-tracker] [bug #64933] Stat sometimes produces wrong timestamp, INVALID.NOREPLY, 2023/11/28
- [Octave-bug-tracker] [bug #64933] Stat sometimes produces wrong timestamp, anonymous, 2023/11/28
- Message not available
- [Octave-bug-tracker] [bug #64933] Stat sometimes produces wrong timestamp, INVALID.NOREPLY, 2023/11/28
- [Octave-bug-tracker] [bug #64933] Stat sometimes produces wrong timestamp, John W. Eaton, 2023/11/28
- [Octave-bug-tracker] [bug #64933] Stat sometimes produces wrong timestamp, Markus Mützel, 2023/11/28
- [Octave-bug-tracker] [bug #64933] Stat sometimes produces wrong timestamp,
John W. Eaton <=