summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixFCmd.c
diff options
context:
space:
mode:
authorsergey.brester <sergey.brester>2019-02-12 18:41:24 (GMT)
committersergey.brester <sergey.brester>2019-02-12 18:41:24 (GMT)
commit9a62e42dd654c613c75092b53a0d18e06a319692 (patch)
tree76d8881fe627b15359a646751531f9a780133ea7 /unix/tclUnixFCmd.c
parentccbd8395f4a51f5b769998058006ed3d36823ace (diff)
parent1dec12d61848ab939bde91eb6e3a095222cf4236 (diff)
downloadtcl-9a62e42dd654c613c75092b53a0d18e06a319692.zip
tcl-9a62e42dd654c613c75092b53a0d18e06a319692.tar.gz
tcl-9a62e42dd654c613c75092b53a0d18e06a319692.tar.bz2
merge 8.5 (note: to avoid too many conflicts, merged using `fossil merge --baseline 0055a16a8b core-8-5-branch`)
Diffstat (limited to 'unix/tclUnixFCmd.c')
-rw-r--r--unix/tclUnixFCmd.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index b5450b1..7360c32 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -327,13 +327,13 @@ DoRenameFile(
if (errno == EINVAL && haveRealpath) {
char srcPath[MAXPATHLEN], dstPath[MAXPATHLEN];
- DIR *dirPtr;
+ TclDIR *dirPtr;
Tcl_DirEntry *dirEntPtr;
if ((Realpath((char *) src, srcPath) != NULL) /* INTL: Native. */
&& (Realpath((char *) dst, dstPath) != NULL) /* INTL: Native */
&& (strncmp(srcPath, dstPath, strlen(srcPath)) != 0)) {
- dirPtr = opendir(dst); /* INTL: Native. */
+ dirPtr = TclOSopendir(dst); /* INTL: Native. */
if (dirPtr != NULL) {
while (1) {
dirEntPtr = TclOSreaddir(dirPtr); /* INTL: Native. */
@@ -343,11 +343,11 @@ DoRenameFile(
if ((strcmp(dirEntPtr->d_name, ".") != 0) &&
(strcmp(dirEntPtr->d_name, "..") != 0)) {
errno = EEXIST;
- closedir(dirPtr);
+ TclOSclosedir(dirPtr);
return TCL_ERROR;
}
}
- closedir(dirPtr);
+ TclOSclosedir(dirPtr);
}
}
errno = EINVAL;
@@ -920,7 +920,7 @@ TraverseUnixTree(
#ifndef HAVE_FTS
int numProcessed = 0;
Tcl_DirEntry *dirEntPtr;
- DIR *dirPtr;
+ TclDIR *dirPtr;
#else
CONST char *paths[2] = {NULL, NULL};
FTS *fts = NULL;
@@ -945,7 +945,7 @@ TraverseUnixTree(
errorPtr);
}
#ifndef HAVE_FTS
- dirPtr = opendir(source); /* INTL: Native. */
+ dirPtr = TclOSopendir(source); /* INTL: Native. */
if (dirPtr == NULL) {
/*
* Can't read directory
@@ -957,7 +957,7 @@ TraverseUnixTree(
result = (*traverseProc)(sourcePtr, targetPtr, &statBuf, DOTREE_PRED,
errorPtr);
if (result != TCL_OK) {
- closedir(dirPtr);
+ TclOSclosedir(dirPtr);
return result;
}
@@ -1007,11 +1007,11 @@ TraverseUnixTree(
* NULL-return that may a symptom of a buggy readdir.
*/
- rewinddir(dirPtr);
+ TclOSrewinddir(dirPtr);
numProcessed = 0;
}
}
- closedir(dirPtr);
+ TclOSclosedir(dirPtr);
/*
* Strip off the trailing slash we added