From 46fb4deb02b07e1c713cb89cb01a817e5b35ee89 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 29 Nov 2010 11:01:53 +0000 Subject: Make assembler code compile in Win64 with gcc. --- ChangeLog | 1 + win/tkWin32Dll.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index df19fb1..8e0f178 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ * win/tkWinPixmap.c * win/tkWinScrlbr.c * win/ttkWinMonitor.c + * win/tkWin32Dll.c: Make assembler code compile in Win64 with gcc. 2010-11-24 Jan Nijtmans 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, -- cgit v0.12