summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixFile.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-06-29 14:52:29 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-06-29 14:52:29 (GMT)
commitf0048561b7c9f59ae0be8140bbbdc277ed1fb95e (patch)
tree08945f2604742f7be84f9a2c8ef9ce4fa707db43 /unix/tclUnixFile.c
parent75738205252e3a1805dea171f451ee60691a8b65 (diff)
downloadtcl-f0048561b7c9f59ae0be8140bbbdc277ed1fb95e.zip
tcl-f0048561b7c9f59ae0be8140bbbdc277ed1fb95e.tar.gz
tcl-f0048561b7c9f59ae0be8140bbbdc277ed1fb95e.tar.bz2
Use fstat64() in stead of fstat() on platforms which support it.
Diffstat (limited to 'unix/tclUnixFile.c')
-rw-r--r--unix/tclUnixFile.c23
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)