diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-07-10 21:02:58 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-07-10 21:02:58 (GMT) |
commit | 0ac369da08268513bd59ff640a4effd77027a012 (patch) | |
tree | 30edefc336e6c808c0c3967fc0c1790730defb60 /generic/tclBasic.c | |
parent | 5c69fce733edf887bb423858dcfc950581ea3427 (diff) | |
download | tcl-0ac369da08268513bd59ff640a4effd77027a012.zip tcl-0ac369da08268513bd59ff640a4effd77027a012.tar.gz tcl-0ac369da08268513bd59ff640a4effd77027a012.tar.bz2 |
little tweaks, makeing it possible to use either _USE_64BIT_TIME_T or __MINGW_USE_VC2005_COMPAT interchangably.
Put some more remarks, making it more clear what the effect of this is.
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 /* |