diff options
| -rw-r--r-- | generic/tcl.h | 3 | ||||
| -rw-r--r-- | generic/tclDecls.h | 14 | ||||
| -rw-r--r-- | generic/tclIO.c | 14 |
3 files changed, 16 insertions, 15 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 86bd693..fa61efc 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -1353,9 +1353,6 @@ typedef enum { typedef struct Tcl_Time { long sec; /* Seconds. */ long usec; /* Microseconds. */ -#if defined(_WIN32) && defined(_WIN64) - long long reserved; /* Not used, except for win64 <-> Cygwin64 interoperability. */ -#endif } Tcl_Time; typedef void (Tcl_SetTimerProc) (CONST86 Tcl_Time *timePtr); diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 71c5e47..11952c1 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -4135,12 +4135,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; \ + long long 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) diff --git a/generic/tclIO.c b/generic/tclIO.c index 44568e4..2d2f2fc 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -9436,13 +9436,13 @@ MBWrite( if (bufPtr) { /* Split the overflowing buffer in two */ int extra = (int) (inBytes - csPtr->toRead); - /* Note that going with int for extra assumes that inBytes is not too - * much over toRead to require a wide itself. If that gets violated - * then the calculations involving extra must be made wide too. - * - * Noted with Win32/MSVC debug build treating the warning (possible of - * data in __int64 to int conversion) as error. - */ + /* Note that going with int for extra assumes that inBytes is not too + * much over toRead to require a wide itself. If that gets violated + * then the calculations involving extra must be made wide too. + * + * Noted with Win32/MSVC debug build treating the warning (possible of + * data in long long to int conversion) as error. + */ bufPtr = AllocChannelBuffer(extra); |
