Tcl Source Code

Check-in [fbae294921]
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:merge 8.4
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-3567063
Files: files | file ages | folders
SHA1: fbae294921689bbacbc7b507c54acc4c4bf5deaf
User & Date: dgp 2012-11-13 21:03:28
Context
2012-11-13
21:16
360894 Threads inherit floating point config from their creator thread check-in: 2a5f53e797 user: dgp tags: core-8-4-branch
21:03
merge 8.4 Closed-Leaf check-in: fbae294921 user: dgp tags: bug-3567063
2012-11-07
17:24
3574493 Avoid hanging on exit due to use of synchronization calls in routines called by DllMain(). check-in: 42933eb98a user: dgp tags: core-8-4-branch
2012-10-03
15:23
merge 8.4 check-in: 6c5323d5b6 user: dgp tags: bug-3567063
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.






1
2
3
4
5
6
7




2012-10-03  Don Porter  <[email protected]>

	* generic/tclIO.c:	When checking for std channels being closed,
	compare the channel state, not the channel itself so that stacked
	channels do not cause trouble.

2012-08-17  Jan Nijtmans  <[email protected]>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
2012-11-07  Don Porter  <[email protected]>

	* win/tclWinSock.c:	[Bug 3574493] Avoid hanging on exit due to
	use of synchronization calls in routines called by DllMain().

2012-10-03  Don Porter  <[email protected]>

	* generic/tclIO.c:	When checking for std channels being closed,
	compare the channel state, not the channel itself so that stacked
	channels do not cause trouble.

2012-08-17  Jan Nijtmans  <[email protected]>

Changes to generic/tclIOUtil.c.

2770
2771
2772
2773
2774
2775
2776



2777
2778
2779
2780
2781
2782
2783
....
2793
2794
2795
2796
2797
2798
2799

2800
2801
2802
2803
2804
2805
2806
2807
 * Side effects:
 *	New code suddenly appears in memory.  This may later be
 *	unloaded by passing the clientData to the unloadProc.
 *
 *----------------------------------------------------------------------
 */




int
Tcl_FSLoadFile(interp, pathPtr, sym1, sym2, proc1Ptr, proc2Ptr, 
	       handlePtr, unloadProcPtr)
    Tcl_Interp *interp;		/* Used for error reporting. */
    Tcl_Obj *pathPtr;		/* Name of the file containing the desired
				 * code. */
    CONST char *sym1, *sym2;	/* Names of two procedures to look up in
................................................................................
                                 * function which should be used for
                                 * this file. */
{
    Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr);
    if (fsPtr != NULL) {
	Tcl_FSLoadFileProc *proc = fsPtr->loadFileProc;
	if (proc != NULL) {

	    int retVal = (*proc)(interp, pathPtr, handlePtr, unloadProcPtr);
	    if (retVal != TCL_OK) {
		return retVal;
	    }
	    if (*handlePtr == NULL) {
		return TCL_ERROR;
	    }
	    if (sym1 != NULL) {






>
>
>







 







>
|







2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
....
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
 * Side effects:
 *	New code suddenly appears in memory.  This may later be
 *	unloaded by passing the clientData to the unloadProc.
 *
 *----------------------------------------------------------------------
 */

typedef int (Tcl_FSLoadFileProc2) (Tcl_Interp *interp, Tcl_Obj *pathPtr,
	Tcl_LoadHandle *handlePtr, Tcl_FSUnloadFileProc **unloadProcPtr, int flags);

int
Tcl_FSLoadFile(interp, pathPtr, sym1, sym2, proc1Ptr, proc2Ptr, 
	       handlePtr, unloadProcPtr)
    Tcl_Interp *interp;		/* Used for error reporting. */
    Tcl_Obj *pathPtr;		/* Name of the file containing the desired
				 * code. */
    CONST char *sym1, *sym2;	/* Names of two procedures to look up in
................................................................................
                                 * function which should be used for
                                 * this file. */
{
    Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr);
    if (fsPtr != NULL) {
	Tcl_FSLoadFileProc *proc = fsPtr->loadFileProc;
	if (proc != NULL) {
	    int retVal = ((Tcl_FSLoadFileProc2 *)proc)
		    (interp, pathPtr, handlePtr, unloadProcPtr, 0);
	    if (retVal != TCL_OK) {
		return retVal;
	    }
	    if (*handlePtr == NULL) {
		return TCL_ERROR;
	    }
	    if (sym1 != NULL) {

Changes to generic/tclTest.c.

464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
    &TestReportCreateDirectory,
    &TestReportRemoveDirectory, 
    &TestReportDeleteFile,
    &TestReportCopyFile,
    &TestReportRenameFile,
    &TestReportCopyDirectory, 
    &TestReportLstat,
    &TestReportLoadFile,
    NULL /* cwd */,
    &TestReportChdir
};

static Tcl_Filesystem simpleFilesystem = {
    "simple",
    sizeof(Tcl_Filesystem),






|







464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
    &TestReportCreateDirectory,
    &TestReportRemoveDirectory, 
    &TestReportDeleteFile,
    &TestReportCopyFile,
    &TestReportRenameFile,
    &TestReportCopyDirectory, 
    &TestReportLstat,
    (Tcl_FSLoadFileProc *) &TestReportLoadFile,
    NULL /* cwd */,
    &TestReportChdir
};

static Tcl_Filesystem simpleFilesystem = {
    "simple",
    sizeof(Tcl_Filesystem),

Changes to win/configure.in.

115
116
117
118
119
120
121

122
123
124
125
126
127
128
# Check to see if the winsock2.h include file provided contains
# typedefs like LPFN_ACCEPT and friends.
#
AC_CACHE_CHECK(for LPFN_ACCEPT support in winsock2.h,
    tcl_cv_lpfn_decls,
AC_TRY_COMPILE([
#define WIN32_LEAN_AND_MEAN

#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#include <winsock2.h>
],
[
  LPFN_ACCEPT accept;
],






>







115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# Check to see if the winsock2.h include file provided contains
# typedefs like LPFN_ACCEPT and friends.
#
AC_CACHE_CHECK(for LPFN_ACCEPT support in winsock2.h,
    tcl_cv_lpfn_decls,
AC_TRY_COMPILE([
#define WIN32_LEAN_AND_MEAN
#define INCL_WINSOCK_API_TYPEDEFS 1
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#include <winsock2.h>
],
[
  LPFN_ACCEPT accept;
],

Changes to win/tclWinSock.c.

655
656
657
658
659
660
661
662
663
664
665
666
667

668
669
670
671
672
673
674
{
    ThreadSpecificData *tsdPtr;

    tsdPtr = (ThreadSpecificData *)TclThreadDataKeyGet(&dataKey);
    if (tsdPtr != NULL) {
	if (tsdPtr->socketThread != NULL) {
	    if (tsdPtr->hwnd != NULL) {
		PostMessage(tsdPtr->hwnd, SOCKET_TERMINATE, 0, 0);
		/*
		 * Wait for the thread to exit. This ensures that we are
		 * completely cleaned up before we leave this function.
		 */
		WaitForSingleObject(tsdPtr->readyEvent, INFINITE);

		tsdPtr->hwnd = NULL;
	    }
	    CloseHandle(tsdPtr->socketThread);
	    tsdPtr->socketThread = NULL;
	}
	if (tsdPtr->readyEvent != NULL) {
	    CloseHandle(tsdPtr->readyEvent);






|
|
|
|
|
|
>







655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
{
    ThreadSpecificData *tsdPtr;

    tsdPtr = (ThreadSpecificData *)TclThreadDataKeyGet(&dataKey);
    if (tsdPtr != NULL) {
	if (tsdPtr->socketThread != NULL) {
	    if (tsdPtr->hwnd != NULL) {
		if (PostMessage(tsdPtr->hwnd, SOCKET_TERMINATE, 0, 0)) {
		    /*
		     * Wait for the thread to exit. This ensures that we are
		     * completely cleaned up before we leave this function.
		     */
		    WaitForSingleObject(tsdPtr->readyEvent, INFINITE);
		}
		tsdPtr->hwnd = NULL;
	    }
	    CloseHandle(tsdPtr->socketThread);
	    tsdPtr->socketThread = NULL;
	}
	if (tsdPtr->readyEvent != NULL) {
	    CloseHandle(tsdPtr->readyEvent);