summaryrefslogtreecommitdiffstats
path: root/win/tkWin32Dll.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-11-29 11:01:53 (GMT)
committernijtmans <nijtmans>2010-11-29 11:01:53 (GMT)
commit46fb4deb02b07e1c713cb89cb01a817e5b35ee89 (patch)
treea29867cafd13ee7c7ce77ef6fca039a04fbb1c1d /win/tkWin32Dll.c
parent8ccebbf9fc50bab1c1a3fa148f9632f059296bd2 (diff)
downloadtk-46fb4deb02b07e1c713cb89cb01a817e5b35ee89.zip
tk-46fb4deb02b07e1c713cb89cb01a817e5b35ee89.tar.gz
tk-46fb4deb02b07e1c713cb89cb01a817e5b35ee89.tar.bz2
Make assembler code compile in Win64 with gcc.
Diffstat (limited to 'win/tkWin32Dll.c')
-rw-r--r--win/tkWin32Dll.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/win/tkWin32Dll.c b/win/tkWin32Dll.c
index 3978f1c..338aaaf 100644
--- a/win/tkWin32Dll.c
+++ b/win/tkWin32Dll.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWin32Dll.c,v 1.12 2005/12/02 00:19:04 dkf Exp $
+ * RCS: @(#) $Id: tkWin32Dll.c,v 1.13 2010/11/29 11:01:53 nijtmans Exp $
*/
#include "tkWinInt.h"
@@ -90,13 +90,22 @@ DllEntryPoint(
* Always TRUE.
*
* Side effects:
- * This might call some sycronization functions, but MSDN documentation
+ * This might call some synchronization functions, but MSDN documentation
* states: "Waiting on synchronization objects in DllMain can cause a
* deadlock."
*
*----------------------------------------------------------------------
*/
+#if defined(HAVE_NO_SEH) && defined(_WIN64)
+/* A little trick to make the assembler code below
+ * compile on Win64 with gcc: It appears that Win64
+ * does not decorate compiled functions with "_"
+ */
+static void _TkFinalize(ClientData clientData) __attribute__((used));
+static void _TkFinalize(ClientData clientData) {TkFinalize(clientData);}
+#endif
+
BOOL APIENTRY
DllMain(
HINSTANCE hInstance,