summaryrefslogtreecommitdiffstats
path: root/win/tclWinFCmd.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-03-11 23:08:51 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-03-11 23:08:51 (GMT)
commit302d9a5dcd0c64b50f4294ae4ed5330011e178df (patch)
treeb4ec742e82ee571d2e3269fc09b76578ebb7e6f6 /win/tclWinFCmd.c
parent426e4bab66ab93c2702775548dc36d5cda326a17 (diff)
downloadtcl-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/tclWinFCmd.c')
-rw-r--r--win/tclWinFCmd.c36
1 files changed, 22 insertions, 14 deletions
diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c
index b6b5f9d..32e1656 100644
--- a/win/tclWinFCmd.c
+++ b/win/tclWinFCmd.c
@@ -202,13 +202,7 @@ DoRenameFile(
* if one of the 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.
@@ -289,6 +283,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)
@@ -571,13 +575,7 @@ DoCopyFile(
* of the 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.
@@ -660,6 +658,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)