diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | generic/tclBasic.c | 15 | ||||
-rwxr-xr-x | win/configure | 5 | ||||
-rw-r--r-- | win/tcl.m4 | 2 |
4 files changed, 30 insertions, 0 deletions
@@ -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 d3b5490..c691018 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -15,6 +15,10 @@ * 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" #include <float.h> @@ -410,6 +414,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 + /* * Initialize support for namespaces and create the global namespace * (whose name is ""; an alias is "::"). This also initializes the Tcl diff --git a/win/configure b/win/configure index a1c0f6d..111f5a4 100755 --- a/win/configure +++ b/win/configure @@ -4031,6 +4031,11 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_NO_SEH 1 _ACEOF + +cat >>confdefs.h <<\_ACEOF +#define _HAVE_32BIT_TIME_T 1 +_ACEOF + fi # @@ -1006,6 +1006,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 # |