summaryrefslogtreecommitdiffstats
path: root/generic/tclDecls.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-10-12 14:18:18 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-10-12 14:18:18 (GMT)
commit473ebe84efb63f84c2db3a04cad292b6ce4d4c15 (patch)
treea2377209ec36d296143f78fd843cd2f71d148b66 /generic/tclDecls.h
parentf43dd68346925f9c2ab0b55fe60e1cec2526d9dc (diff)
downloadtcl-473ebe84efb63f84c2db3a04cad292b6ce4d4c15.zip
tcl-473ebe84efb63f84c2db3a04cad292b6ce4d4c15.tar.gz
tcl-473ebe84efb63f84c2db3a04cad292b6ce4d4c15.tar.bz2
Fix build failure with --enable-symbols build on Windows: Some code makes assumptions on Tcl_Time structure ...
Diffstat (limited to 'generic/tclDecls.h')
-rw-r--r--generic/tclDecls.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index 26d1cd6..23f0bae 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -3954,12 +3954,16 @@ extern const TclStubs *tclStubsPtr;
/* Handle Win64 tk.dll being loaded in Cygwin64. */
# define Tcl_GetTime(t) \
do { \
- Tcl_Time *_timePtr = (t); \
- _timePtr->reserved = -1; \
- tclStubsPtr->tcl_GetTime((_timePtr)); \
- if (_timePtr->reserved != -1) { \
- _timePtr->usec = _timePtr->reserved; \
+ union { \
+ Tcl_Time now; \
+ __int64 reserved; \
+ } _t; \
+ _t.reserved = -1; \
+ tclStubsPtr->tcl_GetTime((&_t.now)); \
+ if (_t.reserved != -1) { \
+ _t.now.usec = _t.reserved; \
} \
+ *t = _t.now; \
} while (0)
# endif
# if defined(__CYGWIN__) && defined(TCL_WIDE_INT_IS_LONG)