diff options
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 5ca4b82..f59c161 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -413,21 +413,24 @@ Tcl_CreateInterp(void) Tcl_Panic("Tcl_CallFrame must not be smaller than CallFrame"); } -#if defined(_WIN32) && !defined(_WIN64) - if (sizeof(time_t) == 4 || sizeof(time_t) == 8) { - Tcl_StatBuf buf; - if ( - sizeof(buf.st_atime) != sizeof(time_t) || - sizeof(buf.st_mtime) != sizeof(time_t) || - sizeof(buf.st_ctime) != sizeof(time_t) - ) { - /*NOTREACHED*/ - Tcl_Panic("<sys/stat.h> is not compatible with MSVC"); - } - } else { +#if defined(_WIN32) && !defined(_WIN64) && !defined(_USE_64BIT_TIME_T) \ + && !defined(__MINGW_USE_VC2005_COMPAT) + /* If Tcl is compiled on Win32 using -D_USE_64BIT_TIME_T or + * -D__MINGW_USE_VC2005_COMPAT, the result is a binary incompatible + * with the 'standard' build of Tcl: All extensions using Tcl_StatBuf + * or interal functions like TclpGetDate() need to be recompiled in + * the same way. Therefore, this is not officially supported. + * In stead, it is recommended to use Win64 or Tcl 9.0 (not released yet) + */ + if (sizeof(time_t) != 4) { /*NOTREACHED*/ Tcl_Panic("<time.h> is not compatible with MSVC"); } + if ((TclOffset(Tcl_StatBuf,st_atime) != 32) + || (TclOffset(Tcl_StatBuf,st_ctime) != 40)) { + /*NOTREACHED*/ + Tcl_Panic("<sys/stat.h> is not compatible with MSVC"); + } #endif /* |