Merged
Conversation
time_t should be a 64-bit type on all relevant windows CRT versions including mingw-w64 - MSDN recommends against using the 32-bit version which only is happens when `_USE_32BIT_TIME_T` is explicitly defined - instead of guessing (and guessing wrong, as happens with recent mingw versions), we can simply use the 64-bit version always.
Araq
reviewed
Mar 26, 2026
| # and 64-bit versions of windows: | ||
| # https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/time-time32-time64 | ||
| # For the avoidance of doubt, always use 64-bit version | ||
| type Time* {.importc: "__time64_t", header: "<time.h>".} = distinct clonglong |
Member
There was a problem hiding this comment.
Can cause subtle regressions due to
type
clonglong* {.importc: "long long", nodecl.} = int64
where the importc affect generic instance caching. Of course this could also simply mean more code now works correctly thanks to that. So we don't know if the benefits outweigh the risks. (God do I love the fact that we produce C code instead of simply targetting the ABI...)
Contributor
Author
There was a problem hiding this comment.
hm - problem is, the current version doesn't compile at all with recent mingw-i686 since clong != clonglong on the C size
Contributor
Author
There was a problem hiding this comment.
Contributor
|
Thanks for your hard work on this PR! Hint: mm: orc; opt: speed; options: -d:release |
narimiran
pushed a commit
that referenced
this pull request
Apr 1, 2026
time_t should be a 64-bit type on all relevant windows CRT versions including mingw-w64 - MSDN recommends against using the 32-bit version which only is happens when `_USE_32BIT_TIME_T` is explicitly defined - instead of guessing (and guessing wrong, as happens with recent mingw versions), we can simply use the 64-bit version always. (cherry picked from commit e53058d)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
time_t should be a 64-bit type on all relevant windows CRT versions including mingw-w64 - MSDN recommends against using the 32-bit version which only is happens when
_USE_32BIT_TIME_Tis explicitly defined - instead of guessing (and guessing wrong, as happens with recent mingw versions), we can simply use the 64-bit version always.