summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-05-16 08:20:16 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-05-16 08:20:16 (GMT)
commit880f2f98f5cb2c020219b568c53c4e03d4d28633 (patch)
tree85d0a8fc64ecc4d7424767f0d5f2e14060e82b86
parent666ba89bc057e3cb71acbd5c7d983d4579969428 (diff)
downloadtcl-880f2f98f5cb2c020219b568c53c4e03d4d28633.zip
tcl-880f2f98f5cb2c020219b568c53c4e03d4d28633.tar.gz
tcl-880f2f98f5cb2c020219b568c53c4e03d4d28633.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.c15
-rwxr-xr-xwin/configure3
-rw-r--r--win/tcl.m42
4 files changed, 28 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index e200cd0..507c5d9 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-06 Jan Nijtmans <nijtmans@users.sf.net>
* generic/tclStubInit.c: Add support for Cygwin64, which has a 64-bit
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index bd4ad5d..0fd025a 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -15,6 +15,10 @@
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
+#if defined(_WIN32) && !defined(_WIN64)
+# define _USE_32BIT_TIME_T
+#endif
+
#include "tclInt.h"
#include "tclCompile.h"
#ifndef TCL_GENERIC_ONLY
@@ -312,6 +316,17 @@ Tcl_CreateInterp()
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
+
/*
* Initialize support for namespaces and create the global namespace
* (whose name is ""; an alias is "::"). This also initializes the
diff --git a/win/configure b/win/configure
index 0f36f24..cfd28d3 100755
--- a/win/configure
+++ b/win/configure
@@ -1744,6 +1744,9 @@ echo "$ac_t""$tcl_cv_seh" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_NO_SEH 1
EOF
+ cat >> confdefs.h <<\EOF
+#define _HAVE_32BIT_TIME_T 1
+EOF
fi
diff --git a/win/tcl.m4 b/win/tcl.m4
index 7c55fc9..e6b6714 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -989,6 +989,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
#