From ee2ba26d61aed4aed9408688d438b1f3d565de55 Mon Sep 17 00:00:00 2001 From: suresh Date: Wed, 20 May 1998 17:33:52 +0000 Subject: Changed call ref's of 'stat(...)' to 'TclStat(...)' and 'access(...)' to 'TclAccess(...)'. --- unix/tclUnixFile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index eb11006..7f9644b 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -278,8 +278,8 @@ Tcl_FindExecutable(argv0) } } Tcl_DStringAppend(&buffer, argv0, -1); - if ((access(Tcl_DStringValue(&buffer), X_OK) == 0) - && (stat(Tcl_DStringValue(&buffer), &statBuf) == 0) + if ((TclAccess(Tcl_DStringValue(&buffer), X_OK) == 0) + && (TclStat(Tcl_DStringValue(&buffer), &statBuf) == 0) && S_ISREG(statBuf.st_mode)) { name = Tcl_DStringValue(&buffer); goto gotName; @@ -425,7 +425,7 @@ TclMatchFiles(interp, separators, dirPtr, pattern, tail) } else { dirName = dirPtr->string; } - if ((stat(dirName, &statBuf) != 0) || !S_ISDIR(statBuf.st_mode)) { + if ((TclStat(dirName, &statBuf) != 0) || !S_ISDIR(statBuf.st_mode)) { return TCL_OK; } @@ -511,7 +511,7 @@ TclMatchFiles(interp, separators, dirPtr, pattern, tail) Tcl_DStringAppend(dirPtr, entryPtr->d_name, -1); if (tail == NULL) { Tcl_AppendElement(interp, dirPtr->string); - } else if ((stat(dirPtr->string, &statBuf) == 0) + } else if ((TclStat(dirPtr->string, &statBuf) == 0) && S_ISDIR(statBuf.st_mode)) { Tcl_DStringAppend(dirPtr, "/", 1); result = TclDoGlob(interp, separators, dirPtr, tail); -- cgit v0.12