Tcl Source Code

Check-in [1867fdf95b]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix [79614fb8b6]: "glob", "encoding system" and encoding-free filesystems
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1867fdf95b5153c2bbc1df8558fe7d45398da437
User & Date: jan.nijtmans 2016-11-11 10:58:54
Context
2016-11-11
14:53
Fix harmless gcc warning message: using "unsigned" doesn't serve any purpose, actually. check-in: 01243c07ff user: jan.nijtmans tags: trunk
10:58
Fix [79614fb8b6]: "glob", "encoding system" and encoding-fr... check-in: 1867fdf95b user: jan.nijtmans tags: trunk
10:55
Fix [79614fb8b6]: "glob", "encoding system" and encoding-fr... check-in: 56afef9ae8 user: jan.nijtmans tags: core-8-6-branch
2016-11-10
14:21
On OSX, there is a conflict with the "define panic" and definitions in "mach.h". check-in: e1804c00ba user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclEncoding.c.

973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
....
1004
1005
1006
1007
1008
1009
1010

1011
1012
1013
1014
1015
1016
1017
 *	to the encoding specified by name, TCL_ERROR otherwise. If TCL_ERROR
 *	is returned, an error message is left in interp's result object,
 *	unless interp was NULL.
 *
 * Side effects:
 *	The reference count of the new system encoding is incremented. The
 *	reference count of the old system encoding is decremented and it may
 *	be freed.
 *
 *------------------------------------------------------------------------
 */

int
Tcl_SetSystemEncoding(
    Tcl_Interp *interp,		/* Interp for error reporting, if not NULL. */
................................................................................
	}
    }

    Tcl_MutexLock(&encodingMutex);
    FreeEncoding(systemEncoding);
    systemEncoding = encoding;
    Tcl_MutexUnlock(&encodingMutex);


    return TCL_OK;
}
 
/*
 *---------------------------------------------------------------------------
 *






|







 







>







973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
....
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
 *	to the encoding specified by name, TCL_ERROR otherwise. If TCL_ERROR
 *	is returned, an error message is left in interp's result object,
 *	unless interp was NULL.
 *
 * Side effects:
 *	The reference count of the new system encoding is incremented. The
 *	reference count of the old system encoding is decremented and it may
 *	be freed. All VFS cached information is invalidated.
 *
 *------------------------------------------------------------------------
 */

int
Tcl_SetSystemEncoding(
    Tcl_Interp *interp,		/* Interp for error reporting, if not NULL. */
................................................................................
	}
    }

    Tcl_MutexLock(&encodingMutex);
    FreeEncoding(systemEncoding);
    systemEncoding = encoding;
    Tcl_MutexUnlock(&encodingMutex);
    Tcl_FSMountsChanged(NULL);

    return TCL_OK;
}
 
/*
 *---------------------------------------------------------------------------
 *

Changes to generic/tclIOUtil.c.

634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
	    && (tsdPtr->filesystemEpoch != theFilesystemEpoch))) {
	FsRecacheFilesystemList();
    }
    return tsdPtr->filesystemList;
}
 
/*
 * The epoch can be changed both by filesystems being added or removed and by
 * env(HOME) changing.
 */

int
TclFSEpochOk(
    size_t filesystemEpoch)
{
    return (filesystemEpoch == 0 || filesystemEpoch == theFilesystemEpoch);






|
|







634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
	    && (tsdPtr->filesystemEpoch != theFilesystemEpoch))) {
	FsRecacheFilesystemList();
    }
    return tsdPtr->filesystemList;
}
 
/*
 * The epoch can be changed by filesystems being added or removed, by changing
 * the "system encoding" and by env(HOME) changing.
 */

int
TclFSEpochOk(
    size_t filesystemEpoch)
{
    return (filesystemEpoch == 0 || filesystemEpoch == theFilesystemEpoch);