summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclFileSystem.h5
-rw-r--r--generic/tclIOUtil.c16
-rw-r--r--generic/tclPathObj.c18
3 files changed, 19 insertions, 20 deletions
diff --git a/generic/tclFileSystem.h b/generic/tclFileSystem.h
index 4514391..e7e9421 100644
--- a/generic/tclFileSystem.h
+++ b/generic/tclFileSystem.h
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclFileSystem.h,v 1.4 2003/09/29 22:38:20 dkf Exp $
+ * RCS: @(#) $Id: tclFileSystem.h,v 1.5 2003/10/10 15:50:35 dkf Exp $
*/
/*
@@ -82,8 +82,7 @@ Tcl_Obj* TclFSNormalizeAbsolutePath _ANSI_ARGS_((Tcl_Interp* interp,
* Private shared variables for use by tclIOUtil.c and tclPathObj.c
*/
extern Tcl_Filesystem tclNativeFilesystem;
-extern int theFilesystemEpoch;
-extern Tcl_ThreadDataKey fsDataKey;
+extern Tcl_ThreadDataKey tclFsDataKey;
/*
* Private shared functions for use by tclIOUtil.c and tclPathObj.c
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index e5b3766..43f68e0 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -17,7 +17,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIOUtil.c,v 1.84 2003/09/29 22:38:20 dkf Exp $
+ * RCS: @(#) $Id: tclIOUtil.c,v 1.85 2003/10/10 15:50:35 dkf Exp $
*/
#include "tclInt.h"
@@ -396,7 +396,7 @@ static FilesystemRecord nativeFilesystemRecord = {
* For multithreading builds, change of the filesystem epoch
* will trigger cache cleanup in all threads.
*/
-int theFilesystemEpoch = 0;
+static int theFilesystemEpoch = 0;
/*
* Stores the linked list of filesystems. A 1:1 copy of this
@@ -413,7 +413,7 @@ static Tcl_Obj* cwdPathPtr = NULL;
static int cwdPathEpoch = 0;
TCL_DECLARE_MUTEX(cwdMutex)
-Tcl_ThreadDataKey fsDataKey;
+Tcl_ThreadDataKey tclFsDataKey;
/*
* Declare fallback support function and
@@ -465,7 +465,7 @@ int
TclFSCwdPointerEquals(objPtr)
Tcl_Obj* objPtr;
{
- ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&fsDataKey);
+ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey);
Tcl_MutexLock(&cwdMutex);
if (tsdPtr->cwdPathPtr == NULL
@@ -495,7 +495,7 @@ TclFSCwdPointerEquals(objPtr)
static void
FsRecacheFilesystemList(void)
{
- ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&fsDataKey);
+ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey);
FilesystemRecord *fsRecPtr, *tmpFsRecPtr;
/* Trash the current cache */
@@ -546,7 +546,7 @@ FsRecacheFilesystemList(void)
static FilesystemRecord *
FsGetFirstFilesystem(void) {
- ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&fsDataKey);
+ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey);
FilesystemRecord *fsRecPtr;
#ifndef TCL_THREADS
tsdPtr->filesystemEpoch = theFilesystemEpoch;
@@ -570,7 +570,7 @@ FsUpdateCwd(cwdObj)
{
int len;
char *str = NULL;
- ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&fsDataKey);
+ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey);
if (cwdObj != NULL) {
str = Tcl_GetStringFromObj(cwdObj, &len);
@@ -2175,7 +2175,7 @@ Tcl_Obj*
Tcl_FSGetCwd(interp)
Tcl_Interp *interp;
{
- ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&fsDataKey);
+ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey);
if (TclFSCwdPointerEquals(NULL)) {
FilesystemRecord *fsRecPtr;
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index a86eed8..18d3dd4 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclPathObj.c,v 1.10 2003/09/30 14:05:44 vincentdarley Exp $
+ * RCS: @(#) $Id: tclPathObj.c,v 1.11 2003/10/10 15:50:35 dkf Exp $
*/
#include "tclInt.h"
@@ -522,7 +522,7 @@ Tcl_FSConvertToPathType(interp, objPtr)
Tcl_Obj *objPtr; /* Object to convert to a valid, current
* path type. */
{
- ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&fsDataKey);
+ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey);
/*
* While it is bad practice to examine an object's type directly,
@@ -629,7 +629,7 @@ TclNewFSPathObj(Tcl_Obj *dirPtr, CONST char *addStrRep, int len)
{
FsPath *fsPathPtr;
Tcl_Obj *objPtr;
- ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&fsDataKey);
+ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey);
objPtr = Tcl_NewObj();
fsPathPtr = (FsPath*)ckalloc((unsigned)sizeof(FsPath));
@@ -690,7 +690,7 @@ TclFSMakePathRelative(interp, objPtr, cwdPtr)
{
int cwdLen, len;
CONST char *tempStr;
- ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&fsDataKey);
+ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey);
if (objPtr->typePtr == &tclFsPathType) {
FsPath* fsPathPtr = (FsPath*) PATHOBJ(objPtr);
@@ -800,7 +800,7 @@ TclFSMakePathFromNormalized(interp, objPtr, nativeRep)
* else NULL. */
{
FsPath *fsPathPtr;
- ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&fsDataKey);
+ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey);
if (objPtr->typePtr == &tclFsPathType) {
return TCL_OK;
@@ -875,7 +875,7 @@ Tcl_FSNewNativePath(fromFilesystem, clientData)
FsPath *fsPathPtr;
FilesystemRecord *fsFromPtr;
- ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&fsDataKey);
+ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey);
objPtr = TclFSInternalToNormalized(fromFilesystem, clientData,
&fsFromPtr);
@@ -1423,7 +1423,7 @@ TclFSEnsureEpochOk(pathObjPtr, fsPtrPtr)
Tcl_Filesystem **fsPtrPtr;
{
FsPath* srcFsPathPtr;
- ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&fsDataKey);
+ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey);
/*
* SHOULD BE ABLE TO IMPROVE EFFICIENCY HERE.
@@ -1468,7 +1468,7 @@ TclFSSetPathDetails(pathObjPtr, fsRecPtr, clientData)
FilesystemRecord *fsRecPtr;
ClientData clientData;
{
- ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&fsDataKey);
+ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey);
/* We assume pathObjPtr is already of the correct type */
FsPath* srcFsPathPtr;
@@ -1568,7 +1568,7 @@ SetFsPathFromAny(interp, objPtr)
FsPath *fsPathPtr;
Tcl_Obj *transPtr;
char *name;
- ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&fsDataKey);
+ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey);
if (objPtr->typePtr == &tclFsPathType) {
return TCL_OK;