summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/tclWin32Dll.c10
-rw-r--r--win/tclWinChan.c19
-rw-r--r--win/tclWinFCmd.c40
3 files changed, 41 insertions, 28 deletions
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c
index 1913204..75fe3eb 100644
--- a/win/tclWin32Dll.c
+++ b/win/tclWin32Dll.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWin32Dll.c,v 1.54.2.2 2010/08/04 19:17:29 hobbs Exp $
+ * RCS: @(#) $Id: tclWin32Dll.c,v 1.54.2.3 2010/09/08 15:42:13 dgp Exp $
*/
#include "tclWinInt.h"
@@ -319,7 +319,7 @@ DllMain(
* an exception handler and the state of the stack might be unstable.
*/
-#ifdef HAVE_NO_SEH
+#if defined(HAVE_NO_SEH) && !defined(_WIN64)
__asm__ __volatile__ (
/*
@@ -389,13 +389,17 @@ DllMain(
"%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi", "memory"
);
-#else /* HAVE_NO_SEH */
+#else
+#ifndef HAVE_NO_SEH
__try {
+#endif
Tcl_Finalize();
+#ifndef HAVE_NO_SEH
} __except (EXCEPTION_EXECUTE_HANDLER) {
/* empty handler body. */
}
#endif
+#endif
break;
}
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;
diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c
index c940620..aa80297 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.52 2006/08/29 00:36:57 coldstore Exp $
+ * RCS: @(#) $Id: tclWinFCmd.c,v 1.52.8.1 2010/09/08 15:42:13 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) {
@@ -587,14 +590,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
@@ -681,6 +677,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) {