summaryrefslogtreecommitdiffstats
path: root/win/tclWinNotify.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2003-03-21 03:24:08 (GMT)
committerdgp <dgp@users.sourceforge.net>2003-03-21 03:24:08 (GMT)
commit7397eb21b5546e2f2db642b3a7fda20d24bfd70b (patch)
treef4ee1218e335a50e9e0bf7a9228ad49a9ba38649 /win/tclWinNotify.c
parent3e6b1cd7c58db82bcfccf38659be021a9fc2e816 (diff)
downloadtcl-7397eb21b5546e2f2db642b3a7fda20d24bfd70b.zip
tcl-7397eb21b5546e2f2db642b3a7fda20d24bfd70b.tar.gz
tcl-7397eb21b5546e2f2db642b3a7fda20d24bfd70b.tar.bz2
* generic/tclInt.h (tclOriginalNotifier):
* generic/tclStubInit.c (tclOriginalNotifier): * mac/tclMacNotify.c (Tcl_SetTimer,Tcl_WaitForEvent): * unix/tclUnixNotfy.c (Tcl_SetTimer,Tcl_WaitForEvent, Tcl_CreateFileHandler,Tcl_DeleteFileHandler): * win/tclWinNotify.c (Tcl_SetTimer,Tcl_WaitForEvent): Some linkers apparently use a different representation for a pointer to a function within the same compilation unit and a pointer to a function in a different compilation unit. This causes checks like those in the original notifier procedures to fall into infinite loops. The fix is to store pointers to the original notifier procedures in a struct defined in the same compilation unit as the stubs tables, and compare against those values. [Bug 707174]
Diffstat (limited to 'win/tclWinNotify.c')
-rw-r--r--win/tclWinNotify.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c
index b7bb17d..e6fca31 100644
--- a/win/tclWinNotify.c
+++ b/win/tclWinNotify.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: tclWinNotify.c,v 1.11 2003/01/16 19:02:00 mdejong Exp $
+ * RCS: @(#) $Id: tclWinNotify.c,v 1.11.2.1 2003/03/21 03:24:09 dgp Exp $
*/
#include "tclWinInt.h"
@@ -45,6 +45,8 @@ typedef struct ThreadSpecificData {
static Tcl_ThreadDataKey dataKey;
extern TclStubs tclStubs;
+extern Tcl_NotifierProcs tclOriginalNotifier;
+
/*
* The following static indicates the number of threads that have
* initialized notifiers. It controls the lifetime of the TclNotifier
@@ -267,7 +269,7 @@ Tcl_SetTimer(
* on Windows, but mirrors the UNIX hook.
*/
- if (tclStubs.tcl_SetTimer != Tcl_SetTimer) {
+ if (tclStubs.tcl_SetTimer != tclOriginalNotifier.setTimerProc) {
tclStubs.tcl_SetTimer(timePtr);
return;
}
@@ -433,7 +435,7 @@ Tcl_WaitForEvent(
* sense on windows, but mirrors the UNIX hook.
*/
- if (tclStubs.tcl_WaitForEvent != Tcl_WaitForEvent) {
+ if (tclStubs.tcl_WaitForEvent != tclOriginalNotifier.waitForEventProc) {
return tclStubs.tcl_WaitForEvent(timePtr);
}