make this change VCC specific

This commit is contained in:
Charlie Barto 2015-08-02 18:55:35 -04:00
commit 4d6bcbc2f4

View file

@ -58,15 +58,20 @@ elif defined(windows):
when defined(vcc): when defined(vcc):
# newest version of Visual C++ defines time_t to be of 64 bits # newest version of Visual C++ defines time_t to be of 64 bits
type TimeImpl {.importc: "time_t", header: "<time.h>".} = int64 type TimeImpl {.importc: "time_t", header: "<time.h>".} = int64
# visual c's c runtime exposes these under a different name
var
timezone {.importc: "_timezone", header: "<time.h>".}: int
tzname {.importc: "_tzname", header: "<time.h>"}: array[0..1, cstring]
else: else:
type TimeImpl {.importc: "time_t", header: "<time.h>".} = int32 type TimeImpl {.importc: "time_t", header: "<time.h>".} = int32
var
timezone {.importc, header: "<time.h>".}: int
tzname {.importc, header: "<time.h>" .}: array[0..1, cstring]
type type
Time* = distinct TimeImpl Time* = distinct TimeImpl
var
timezone {.importc: "_timezone", header: "<time.h>".}: int
tzname {.importc: "_tzname", header: "<time.h>"}: array[0..1, cstring]
elif defined(JS): elif defined(JS):
type type
Time* {.importc.} = object Time* {.importc.} = object