fixes #23838: Compilation by MinGW for cpu=i386 with time_t bug (#23876)

Change Time type in std/time_t to `distinct clong` instead of `distinct
int32`
This commit is contained in:
Ward
2024-07-22 20:23:18 +08:00
committed by GitHub
parent 7b50d05d6b
commit c83a9c4c5c

View File

@@ -14,7 +14,7 @@ when defined(nimdoc):
## Wrapper for `time_t`. On posix, this is an alias to `posix.Time`.
elif defined(windows):
when defined(i386) and defined(gcc):
type Time* {.importc: "time_t", header: "<time.h>".} = distinct int32
type Time* {.importc: "time_t", header: "<time.h>".} = distinct clong
else:
# newest version of Visual C++ defines time_t to be of 64 bits
type Time* {.importc: "time_t", header: "<time.h>".} = distinct int64