summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixFCmd.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/tclUnixFCmd.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/tclUnixFCmd.c')
-rw-r--r--unix/tclUnixFCmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index 9e9a493..9f7a2ba 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -2239,17 +2239,17 @@ static const char *
DefaultTempDir(void)
{
const char *dir;
- struct stat buf;
+ Tcl_StatBuf buf;
dir = getenv("TMPDIR");
- if (dir && dir[0] && stat(dir, &buf) == 0 && S_ISDIR(buf.st_mode)
+ if (dir && dir[0] && TclOSstat(dir, &buf) == 0 && S_ISDIR(buf.st_mode)
&& access(dir, W_OK) == 0) {
return dir;
}
#ifdef P_tmpdir
dir = P_tmpdir;
- if (stat(dir, &buf)==0 && S_ISDIR(buf.st_mode) && access(dir, W_OK)==0) {
+ if (TclOSstat(dir, &buf)==0 && S_ISDIR(buf.st_mode) && access(dir, W_OK)==0) {
return dir;
}
#endif