summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--win/tclWin32Dll.c7
-rw-r--r--win/tclWinChan.c16
-rw-r--r--win/tclWinFCmd.c36
4 files changed, 46 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index ff6b66c..6818ab1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-03-11 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * 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.
+ Merged --cherrypick from Tcl8.5 (2010-09-08,48191d3979)
+
2011-03-11 Jan Nijtmans <nijtmans@users.sf.net>
* win/tcl.m4: handle --enable-64bit=ia64 for gcc.
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c
index 0290bfb..4bfd046 100644
--- a/win/tclWin32Dll.c
+++ b/win/tclWin32Dll.c
@@ -542,6 +542,12 @@ TclpCheckStackSpace()
*/
#ifdef HAVE_NO_SEH
+# ifdef __WIN64__
+
+ /* TODO: How to call allocal on Win64? */
+ retval = 1;
+
+# else
__asm__ __volatile__ (
/*
@@ -611,6 +617,7 @@ TclpCheckStackSpace()
);
retval = (registration.status == TCL_OK);
+# endif
#else /* !HAVE_NO_SEH */
__try {
#ifdef HAVE_ALLOCA_GCC_INLINE
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;
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)