summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--win/tkWinSend.c11
-rw-r--r--win/tkWinSendCom.c8
-rw-r--r--win/tkWinSendCom.h12
4 files changed, 20 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 0b118d3..e2ec590 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-10-14 Pat Thoyts <patthoyts@users.sourceforge.net>
+
+ * win/tkWinSend.c: Avoid using tcl internal headers and fix to
+ * win/tkWinSendCom.h: correctly link on all types of build (was
+ * win/tkWinSendCom.c: broken in static,msvcrt builds).
+
2005-10-12 Donal K. Fellows <donal.k.fellows@man.ac.uk>
* tests/canvPs.test, tests/canvPsBmap.tcl, tests/canvPsImg.tcl:
diff --git a/win/tkWinSend.c b/win/tkWinSend.c
index cb6523c..51d947e 100644
--- a/win/tkWinSend.c
+++ b/win/tkWinSend.c
@@ -11,12 +11,9 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinSend.c,v 1.9 2005/09/30 16:07:21 dgp Exp $
+ * RCS: @(#) $Id: tkWinSend.c,v 1.10 2005/10/14 11:59:19 patthoyts Exp $
*/
-#include "tkPort.h"
-#include "tkInt.h"
-#include "tclInt.h" /* TCL_TSD_INIT */
#include "tkWinSendCom.h"
/* Should be defined in WTypes.h but mingw 1.0 is missing them */
@@ -113,13 +110,12 @@ Tk_SetAppName(tkwin, name)
* "send" commands. Must be globally
* unique. */
{
- ThreadSpecificData *tsdPtr;
+ ThreadSpecificData *tsdPtr = NULL;
TkWindow *winPtr = (TkWindow *)tkwin;
RegisteredInterp *riPtr = NULL;
Tcl_Interp *interp;
HRESULT hr = S_OK;
- tsdPtr = TCL_TSD_INIT(&dataKey);
interp = winPtr->mainPtr->interp;
/*
@@ -127,6 +123,9 @@ Tk_SetAppName(tkwin, name)
*/
return name;
+ tsdPtr = (ThreadSpecificData *)
+ Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
+
/*
* Initialise the COM library for this interpreter just once.
*/
diff --git a/win/tkWinSendCom.c b/win/tkWinSendCom.c
index 9ad1f15..28dc960 100644
--- a/win/tkWinSendCom.c
+++ b/win/tkWinSendCom.c
@@ -17,17 +17,11 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinSendCom.c,v 1.4 2004/01/15 21:46:22 davygrvy Exp $
+ * RCS: @(#) $Id: tkWinSendCom.c,v 1.5 2005/10/14 11:59:19 patthoyts Exp $
*/
#include "tkWinSendCom.h"
-#ifdef _MSC_VER
-# pragma comment (lib, "ole32.lib")
-# pragma comment (lib, "oleaut32.lib")
-# pragma comment (lib, "uuid.lib")
-#endif
-
/*
* ----------------------------------------------------------------------
* Non-public prototypes.
diff --git a/win/tkWinSendCom.h b/win/tkWinSendCom.h
index fd98ca2..2344431 100644
--- a/win/tkWinSendCom.h
+++ b/win/tkWinSendCom.h
@@ -10,17 +10,21 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinSendCom.h,v 1.1 2003/09/26 23:59:26 patthoyts Exp $
+ * RCS: @(#) $Id: tkWinSendCom.h,v 1.2 2005/10/14 11:59:19 patthoyts Exp $
*/
#ifndef _tkWinSendCom_h_INCLUDE
#define _tkWinSendCom_h_INCLUDE
-#include "tkPort.h"
-#include "tkInt.h"
-
+#include "tkWinInt.h"
#include <ole2.h>
+#ifdef _MSC_VER
+# pragma comment (lib, "ole32.lib")
+# pragma comment (lib, "oleaut32.lib")
+# pragma comment (lib, "uuid.lib")
+#endif
+
/*
* TkWinSendCom CoClass structure
*/