summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2018-04-05 23:06:38 +0100
committerGitHub <noreply@github.com>2018-04-05 23:06:38 +0100
commit1bd456098621929cee4aedf04c730afe02867295 (patch)
treeae92b6ade75b47ea32e73248d43c3ccc166efb9c /lib/pure
parentad230256b691d2178671f550c8a5ba519ff743f2 (diff)
parentbc724a0a8128e662a97eaa04fcf0134bdb229916 (diff)
downloadNim-1bd456098621929cee4aedf04c730afe02867295.tar.gz
Merge pull request #7471 from yglukhov/fixed-times-cpp-windows-32
Fixed compilation of times.nim with mingw 4.9.2 C++ 32bit
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/times.nim9
1 files changed, 6 insertions, 3 deletions
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: "<time.h>".} = distinct int64
+  when defined(i386) and defined(gcc):
+    type CTime {.importc: "time_t", header: "<time.h>".} = distinct int32
+  else:
+    # newest version of Visual C++ defines time_t to be of 64 bits
+    type CTime {.importc: "time_t", header: "<time.h>".} = distinct int64
   # visual c's c runtime exposes these under a different name
   var timezone {.importc: "_timezone", header: "<time.h>".}: 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