summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
#