From bc724a0a8128e662a97eaa04fcf0134bdb229916 Mon Sep 17 00:00:00 2001 From: Yuriy Glukhov Date: Mon, 2 Apr 2018 19:35:43 +0300 Subject: Fixed compilation of times.nim with mingw 4.9.2 C++ 32bit --- lib/pure/times.nim | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/pure/times.nim b/lib/pure/times.nim index 75b5bac43..c53a300d2 100644 --- a/lib/pure/times.nim +++ b/lib/pure/times.nim @@ -53,8 +53,11 @@ when defined(posix): elif defined(windows): import winlean - # newest version of Visual C++ defines time_t to be of 64 bits - type CTime {.importc: "time_t", header: "".} = distinct int64 + when defined(i386) and defined(gcc): + type CTime {.importc: "time_t", header: "".} = distinct int32 + else: + # newest version of Visual C++ defines time_t to be of 64 bits + type CTime {.importc: "time_t", header: "".} = distinct int64 # visual c's c runtime exposes these under a different name var timezone {.importc: "_timezone", header: "".}: int @@ -1398,7 +1401,7 @@ proc getLocalTime*(time: Time): DateTime {.tags: [], raises: [], benign, depreca proc getGMTime*(time: Time): DateTime {.tags: [], raises: [], benign, deprecated.} = ## Converts the calendar time `time` to broken-down time representation, - ## expressed in Coordinated Universal Time (UTC). + ## expressed in Coordinated Universal Time (UTC). ## ## **Deprecated since v0.18.0:** use ``utc`` instead time.utc -- cgit 1.4.1-2-gfad0