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)
commit13a2a82c8148e5c706fa75c02a501df9f06ab426 (patch)
tree2ce6286cd13d706c6b0acb2b13ef9ac8fea15311
parent06130c47bf72c6c6ee8ca8e1ab43995dc23ce22d (diff)
parentb55a06a8a58b5323fee95d10a288fbf3a36f2d6a (diff)
downloadtcl-13a2a82c8148e5c706fa75c02a501df9f06ab426.zip
tcl-13a2a82c8148e5c706fa75c02a501df9f06ab426.tar.gz
tcl-13a2a82c8148e5c706fa75c02a501df9f06ab426.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
#