diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2011-03-11 23:08:51 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2011-03-11 23:08:51 (GMT) |
commit | 302d9a5dcd0c64b50f4294ae4ed5330011e178df (patch) | |
tree | b4ec742e82ee571d2e3269fc09b76578ebb7e6f6 /win/tclWinChan.c | |
parent | 426e4bab66ab93c2702775548dc36d5cda326a17 (diff) | |
download | tcl-302d9a5dcd0c64b50f4294ae4ed5330011e178df.zip tcl-302d9a5dcd0c64b50f4294ae4ed5330011e178df.tar.gz tcl-302d9a5dcd0c64b50f4294ae4ed5330011e178df.tar.bz2 |
ifdef protections to permit builds with mingw on amd64 systems.
Thanks to "mescalinum" for reporting and testing.
Merged --cherrypick from Tcl8.5 (2010-09-08,48191d3979)
Diffstat (limited to 'win/tclWinChan.c')
-rw-r--r-- | win/tclWinChan.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/win/tclWinChan.c b/win/tclWinChan.c index 51c7632..767fa94 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -1033,12 +1033,7 @@ Tcl_MakeFileChannel(rawHandle, mode) */ 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 @@ -1115,6 +1110,15 @@ Tcl_MakeFileChannel(rawHandle, mode) ); 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; |