summaryrefslogtreecommitdiffstats
path: root/win/tclWinChan.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2010-09-08 15:42:12 (GMT)
committerdgp <dgp@users.sourceforge.net>2010-09-08 15:42:12 (GMT)
commit90c411c1089f1dcb4107a4a73ef1c8eabc3a0069 (patch)
treec53c8f835a3f9568d4e81597d05d80d2299da593 /win/tclWinChan.c
parentaec4b2254493a049360d06d00e797237abab3f92 (diff)
downloadtcl-90c411c1089f1dcb4107a4a73ef1c8eabc3a0069.zip
tcl-90c411c1089f1dcb4107a4a73ef1c8eabc3a0069.tar.gz
tcl-90c411c1089f1dcb4107a4a73ef1c8eabc3a0069.tar.bz2
* win/tclWin32Dll.c: #ifdef protections to permit builds with
* win/tclWinChan.c: mingw on amd64 systems. Thanks to "mescalinum" * win/tclWinFCmd.c: for reporting and testing.
Diffstat (limited to 'win/tclWinChan.c')
-rw-r--r--win/tclWinChan.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/win/tclWinChan.c b/win/tclWinChan.c
index 38882d2..a47202a 100644
--- a/win/tclWinChan.c
+++ b/win/tclWinChan.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinChan.c,v 1.49.4.2 2010/05/21 12:18:17 nijtmans Exp $
+ * RCS: @(#) $Id: tclWinChan.c,v 1.49.4.3 2010/09/08 15:42:13 dgp Exp $
*/
#include "tclWinInt.h"
@@ -1094,12 +1094,7 @@ Tcl_MakeFileChannel(
*/
result = 0;
-#ifndef HAVE_NO_SEH
- __try {
- CloseHandle(dupedHandle);
- result = 1;
- } __except (EXCEPTION_EXECUTE_HANDLER) {}
-#else
+#if defined(HAVE_NO_SEH) && !defined(_WIN64)
/*
* Don't have SEH available, do things the hard way. Note that this
* needs to be one block of asm, to avoid stack imbalance; also, it is
@@ -1179,7 +1174,15 @@ Tcl_MakeFileChannel(
"%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi", "memory"
);
result = registration.status;
-
+#else
+#ifndef HAVE_NO_SEH
+ __try {
+#endif
+ CloseHandle(dupedHandle);
+ result = 1;
+#ifndef HAVE_NO_SEH
+ } __except (EXCEPTION_EXECUTE_HANDLER) {}
+#endif
#endif
if (result == FALSE) {
return NULL;