diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-06-29 15:02:53 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-06-29 15:02:53 (GMT) |
commit | 0865a0b6b03cef7f1545ee66e5d53907f9538a4b (patch) | |
tree | 69a15f8f07b31493926fd04e3e20b31474453389 /unix/tclUnixFile.c | |
parent | 79260bd6950b610ebc53b4fb8ee8317ef0c6a2a1 (diff) | |
parent | f0048561b7c9f59ae0be8140bbbdc277ed1fb95e (diff) | |
download | tcl-0865a0b6b03cef7f1545ee66e5d53907f9538a4b.zip tcl-0865a0b6b03cef7f1545ee66e5d53907f9538a4b.tar.gz tcl-0865a0b6b03cef7f1545ee66e5d53907f9538a4b.tar.bz2 |
Merge 8.7. Fix fstat() call in tclUnixChan.c, in case Tcl_StatBuf == struct stat64.
Diffstat (limited to 'unix/tclUnixFile.c')
-rw-r--r-- | unix/tclUnixFile.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index 1ab5d14..6cbdec9 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -1198,6 +1198,29 @@ TclpUtime( #ifdef __CYGWIN__ int +TclOSfstat( + int fd, + void *cygstat) +{ + struct stat buf; + Tcl_StatBuf *statBuf = (Tcl_StatBuf *)cygstat; + int result = fstat(fd, &buf); + + statBuf->st_mode = buf.st_mode; + statBuf->st_ino = buf.st_ino; + statBuf->st_dev = buf.st_dev; + statBuf->st_rdev = buf.st_rdev; + statBuf->st_nlink = buf.st_nlink; + statBuf->st_uid = buf.st_uid; + statBuf->st_gid = buf.st_gid; + statBuf->st_size = buf.st_size; + statBuf->st_atime = buf.st_atime; + statBuf->st_mtime = buf.st_mtime; + statBuf->st_ctime = buf.st_ctime; + return result; +} + +int TclOSstat( const char *name, void *cygstat) |