Overview
| Artifact ID: | 0f3899dadf94d86860bad54148e8d2b813dc412c |
|---|---|
| Ticket: | 1064247fffffffffffffffffffffffffffffffff
filesystem-7.8 fails on darwin without NO_REALPATH |
| User & Date: | das on 2006-03-28 16:32:07 |
Changes
- icomment:
Logged In: YES user_id=90580 apropos the issue with the native FS record being different from nativeFilesystemRecord: it turns out that this is due to the copying of the filesystem list into a thread specific cache in FsRecacheFilesystemList, which means that the pointers in the list returned by FsGetFirstFilesystem() cannot be compared against &nativeFilesystemRecord to check for native FS, as they may point to a copy of the nativeFilesystemRecord data... the fix is indeed to always compare fsRecPtr->fsPtr against &tclNativeFilesystem instead, as is already done in a number of other places in tclIOUtil.c. patch implementing this on HEAD is below if you agree, I will commit this for 8.5a4 as well Index: generic/tclIOUtil.c =============================================== ==================== RCS file: /cvsroot/tcl/tcl/generic/tclIOUtil.c,v retrieving revision 1.129 diff -u -p -r1.129 tclIOUtil.c --- generic/tclIOUtil.c16 Mar 2006 18:22:57 -00001.129 +++ generic/tclIOUtil.c28 Mar 2006 09:26:33 -0000 @@ -608,7 +608,7 @@ FsRecacheFilesystemList(void) /* * Code below operates on shared data. We are already called under mutex - * lock so we can safely proceede. + * lock so we can safely proceed. * * Locate tail of the global filesystem list. */ @@ -977,7 +977,7 @@ Tcl_FSUnregister( */ fsRecPtr = filesystemList; - while ((retVal == TCL_ERROR) && (fsRecPtr != &nativeFilesystemRecord)) { + while ((retVal == TCL_ERROR) && (fsRecPtr->fsPtr != &tclNativeFilesystem)) { if (fsRecPtr->fsPtr == fsPtr) { if (fsRecPtr->prevPtr) { fsRecPtr->prevPtr->nextPtr = fsRecPtr->nextPtr; @@ -1426,7 +1426,7 @@ TclFSNormalizeToUniquePath( fsRecPtr = firstFsRecPtr; while (fsRecPtr != NULL) { -if (fsRecPtr == &nativeFilesystemRecord) { +if (fsRecPtr->fsPtr == &tclNativeFilesystem) { Tcl_FSNormalizePathProc *proc = fsRecPtr->fsPtr- >normalizePathProc; if (proc != NULL) { startAt = (*proc)(interp, pathPtr, startAt); @@ -1442,7 +1442,7 @@ TclFSNormalizeToUniquePath( * Skip the native system next time through. */ -if (fsRecPtr != &nativeFilesystemRecord) { +if (fsRecPtr->fsPtr != &tclNativeFilesystem) { Tcl_FSNormalizePathProc *proc = fsRecPtr->fsPtr- >normalizePathProc; if (proc != NULL) { startAt = (*proc)(interp, pathPtr, startAt); @@ -3669,7 +3669,7 @@ FsListMounts( fsRecPtr = FsGetFirstFilesystem(); while (fsRecPtr != NULL) { -if (fsRecPtr != &nativeFilesystemRecord) { +if (fsRecPtr->fsPtr != &tclNativeFilesystem) { Tcl_FSMatchInDirectoryProc *proc = fsRecPtr->fsPtr->matchInDirectoryProc; if (proc != NULL) { - login: "das"
- mimetype: "text/plain"
- username: "das"