Am 08.11.2013 05:58, schrieb Alexey Pavlov:
> This is known issue. You can grab my patch from here:
> 
> https://github.com/Alexpux/mingw-builds/blob/master/patches/tcl/tcl-8.6.1-mingwexcept.patch

Thanks for the patch. Building the win64 version Tcl 8.5.15 I have got the same 
exception error but after applying your patch manually all went well.

Did you already inform the Tcl development team that a patch has to be made?

Below you can find the contents of my tcl-8.5.15-mingwexcept.patch 

--- tclWin32Dll.c.orig  2013-08-30 17:58:40.000000000 +0200
+++ tclWin32Dll.c       2013-11-08 08:55:00.742333794 +0100
@@ -53,14 +53,14 @@ static int platformId;              /* Running under
  * them by creating an EXCEPTION_REGISTRATION within the activation record.
  */
 
-typedef struct EXCEPTION_REGISTRATION {
-    struct EXCEPTION_REGISTRATION *link;
+typedef struct TCL_EXCEPTION_REGISTRATION {
+    struct TCL_EXCEPTION_REGISTRATION *link;
     EXCEPTION_DISPOSITION (*handler)(
            struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*);
     void *ebp;
     void *esp;
     int status;
-} EXCEPTION_REGISTRATION;
+} TCL_EXCEPTION_REGISTRATION;
 #endif
 
 /*
@@ -1086,7 +1086,7 @@ TclWinCPUID(
 
 #   else
 
-    EXCEPTION_REGISTRATION registration;
+    TCL_EXCEPTION_REGISTRATION registration;
 
     /*
      * Execute the CPUID instruction with the given index, and store results
--- tclWinChan.c.orig   2013-08-30 17:58:40.000000000 +0200
+++ tclWinChan.c        2013-11-08 09:05:57.237807102 +0100
@@ -127,14 +127,14 @@ static Tcl_ChannelType fileChannelType =
  * them by creating an EXCEPTION_REGISTRATION within the activation record.
  */
 
-typedef struct EXCEPTION_REGISTRATION {
-    struct EXCEPTION_REGISTRATION* link;
+typedef struct TCL_EXCEPTION_REGISTRATION {
+    struct TCL_EXCEPTION_REGISTRATION *link;
     EXCEPTION_DISPOSITION (*handler)(
            struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*);
     void* ebp;
     void* esp;
     int status;
-} EXCEPTION_REGISTRATION;
+} TCL_EXCEPTION_REGISTRATION;
 #endif
 

 /*
@@ -1027,7 +1027,7 @@ Tcl_MakeFileChannel(
                                 * TCL_WRITABLE to indicate file mode. */
 {
 #if defined(HAVE_NO_SEH) && !defined(_WIN64)
-    EXCEPTION_REGISTRATION registration;
+    TCL_EXCEPTION_REGISTRATION registration;
 #endif
     char channelName[16 + TCL_INTEGER_SPACE];
     Tcl_Channel channel = NULL;
--- tclWinFCmd.c.orig   2013-08-30 17:58:40.000000000 +0200
+++ tclWinFCmd.c        2013-11-08 09:09:19.541771741 +0100
@@ -72,17 +72,17 @@ CONST TclFileAttrProcs tclpFileAttrProcs
 /*
  * Unlike Borland and Microsoft, we don't register exception handlers by
  * pushing registration records onto the runtime stack. Instead, we register
- * them by creating an EXCEPTION_REGISTRATION within the activation record.
+ * them by creating an TCL_EXCEPTION_REGISTRATION within the activation record.
  */
 
-typedef struct EXCEPTION_REGISTRATION {
-    struct EXCEPTION_REGISTRATION *link;
+typedef struct TCL_EXCEPTION_REGISTRATION {
+    struct TCL_EXCEPTION_REGISTRATION *link;
     EXCEPTION_DISPOSITION (*handler)(
            struct _EXCEPTION_RECORD *, void *, struct _CONTEXT *, void *);
     void *ebp;
     void *esp;
     int status;
-} EXCEPTION_REGISTRATION;
+} TCL_EXCEPTION_REGISTRATION;
 
 #endif
 
@@ -176,7 +176,7 @@ DoRenameFile(
                                 * (native). */
 {
 #if defined(HAVE_NO_SEH) && !defined(_WIN64)
-    EXCEPTION_REGISTRATION registration;
+    TCL_EXCEPTION_REGISTRATION registration;
 #endif
     DWORD srcAttr, dstAttr;
     int retval = -1;
@@ -568,7 +568,7 @@ DoCopyFile(
     CONST TCHAR *nativeDst)    /* Pathname of file to copy to (native). */
 {
 #if defined(HAVE_NO_SEH) && !defined(_WIN64)
-    EXCEPTION_REGISTRATION registration;
+    TCL_EXCEPTION_REGISTRATION registration;
 #endif
     int retval = -1;

-- 
Zbigniew Diaczyszyn
 Web: http://zdia.de
 PGP Key ID: 0x52052C79

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to