summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2010-09-08 21:02:40 (GMT)
committerdgp <dgp@users.sourceforge.net>2010-09-08 21:02:40 (GMT)
commit88f1f1e8378e9842ed80c24e5d0c5bb29cd75cf6 (patch)
tree9c1cd063a17d47db7fc05894ca233d4eabd20d52 /win
parent56a2a00dec8f74bc43226e591fc0c26b03054214 (diff)
downloadtcl-88f1f1e8378e9842ed80c24e5d0c5bb29cd75cf6.zip
tcl-88f1f1e8378e9842ed80c24e5d0c5bb29cd75cf6.tar.gz
tcl-88f1f1e8378e9842ed80c24e5d0c5bb29cd75cf6.tar.bz2
* win/tclWinChan.c: #ifdef protections to permit builds with
* win/tclWinFCmd.c: mingw on amd64 systems. Thanks to "mescalinum" for reporting and testing. [Bug 3059922]
Diffstat (limited to 'win')
-rw-r--r--win/tclWinChan.c19
-rw-r--r--win/tclWinFCmd.c40
2 files changed, 34 insertions, 25 deletions
diff --git a/win/tclWinChan.c b/win/tclWinChan.c
index 400fb64..cb39579 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.57 2010/04/22 11:40:32 nijtmans Exp $
+ * RCS: @(#) $Id: tclWinChan.c,v 1.58 2010/09/08 21:02:41 dgp Exp $
*/
#include "tclWinInt.h"
@@ -1093,12 +1093,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
@@ -1178,7 +1173,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;
diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c
index 7853227..7698215 100644
--- a/win/tclWinFCmd.c
+++ b/win/tclWinFCmd.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: tclWinFCmd.c,v 1.64 2010/08/30 09:19:38 nijtmans Exp $
+ * RCS: @(#) $Id: tclWinFCmd.c,v 1.65 2010/09/08 21:02:42 dgp Exp $
*/
#include "tclWinInt.h"
@@ -199,14 +199,7 @@ DoRenameFile(
* arguments is a char block device.
*/
-#ifndef HAVE_NO_SEH
- __try {
- if (tclWinProcs->moveFileProc(nativeSrc, nativeDst) != FALSE) {
- retval = TCL_OK;
- }
- } __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 illegal
@@ -291,6 +284,16 @@ DoRenameFile(
if (registration.status != FALSE) {
retval = TCL_OK;
}
+#else
+#ifndef HAVE_NO_SEH
+ __try {
+#endif
+ if ((*tclWinProcs->moveFileProc)(nativeSrc, nativeDst) != FALSE) {
+ retval = TCL_OK;
+ }
+#ifndef HAVE_NO_SEH
+ } __except (EXCEPTION_EXECUTE_HANDLER) {}
+#endif
#endif
if (retval != -1) {
@@ -586,14 +589,7 @@ DoCopyFile(
* arguments is a char block device.
*/
-#ifndef HAVE_NO_SEH
- __try {
- if (tclWinProcs->copyFileProc(nativeSrc, nativeDst, 0) != FALSE) {
- retval = TCL_OK;
- }
- } __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 illegal
@@ -680,6 +676,16 @@ DoCopyFile(
if (registration.status != FALSE) {
retval = TCL_OK;
}
+#else
+#ifndef HAVE_NO_SEH
+ __try {
+#endif
+ if ((*tclWinProcs->copyFileProc)(nativeSrc, nativeDst, 0) != FALSE) {
+ retval = TCL_OK;
+ }
+#ifndef HAVE_NO_SEH
+ } __except (EXCEPTION_EXECUTE_HANDLER) {}
+#endif
#endif
if (retval != -1) {