summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-05-16 12:33:05 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-05-16 12:33:05 (GMT)
commita6b3146b87983fc0b4d81f371810c5dabf68bdbd (patch)
tree2ce6286cd13d706c6b0acb2b13ef9ac8fea15311
parenta9dd569f8e5f2c3485e48f6314f03200876e0c2d (diff)
parent303d07068735830dccf5632f8be0b526aa63837b (diff)
downloadtcl-a6b3146b87983fc0b4d81f371810c5dabf68bdbd.zip
tcl-a6b3146b87983fc0b4d81f371810c5dabf68bdbd.tar.gz
tcl-a6b3146b87983fc0b4d81f371810c5dabf68bdbd.tar.bz2
Add support for the latest mingw-4.0-rc1. See: [http://sourceforge.net/p/mingw/mingw-org-wsl/ci/4.0-rc1/tree/NEWS]
-rw-r--r--ChangeLog8
-rw-r--r--generic/tclBasic.c11
-rwxr-xr-xwin/configure5
-rw-r--r--win/tcl.m42
4 files changed, 26 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a167b29..8d1f8ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-05-16 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * win/tcl.m4: Add support for the latest mingw-4.0-rc1.
+ * win/configure: (regenerated)
+ * generic/tclBasic.c: Add panic in order to detect
+ incompatible mingw32 sys/stat.h and sys/time.h headers,
+ (which is fixed by defining _HAVE_32BIT_TIME_T).
+
2013-05-13 Jan Nijtmans <nijtmans@users.sf.net>
* compat/zlib/*: Upgrade to zlib 1.2.8
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index bf0639e..aafbe71 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -486,6 +486,17 @@ Tcl_CreateInterp(void)
Tcl_Panic("Tcl_CallFrame must not be smaller than CallFrame");
}
+#if defined(_WIN32) && !defined(_WIN64)
+ if (sizeof(time_t) != 4) {
+ /*NOTREACHED*/
+ Tcl_Panic("sys/time.h is not compatible with MSVC");
+ }
+ if (sizeof(Tcl_StatBuf) != 48) {
+ /*NOTREACHED*/
+ Tcl_Panic("sys/stat.h is not compatible with MSVC");
+ }
+#endif
+
if (cancelTableInitialized == 0) {
Tcl_MutexLock(&cancelLock);
if (cancelTableInitialized == 0) {
diff --git a/win/configure b/win/configure
index 0b07e9f..0ae191c 100755
--- a/win/configure
+++ b/win/configure
@@ -4102,6 +4102,11 @@ cat >>confdefs.h <<\_ACEOF
#define HAVE_NO_SEH 1
_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
+#define _HAVE_32BIT_TIME_T 1
+_ACEOF
+
fi
#
diff --git a/win/tcl.m4 b/win/tcl.m4
index 7a1aa02..be876f4 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -1018,6 +1018,8 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
if test "$tcl_cv_seh" = "no" ; then
AC_DEFINE(HAVE_NO_SEH, 1,
[Defined when mingw does not support SEH])
+ AC_DEFINE(_HAVE_32BIT_TIME_T, 1,
+ [Defined for mingw to use pre-2005 time API])
fi
#