time_stubs.c: add fallback for Windows 7#13905
Conversation
Signed-off-by: Nicolas Ojeda Bar <n.oje.bar@gmail.com>
| } | ||
| if (GetSystemTime == NULL) { /* < Windows 8 */ | ||
| GetSystemTime = GetSystemTimeAsFileTime; | ||
| } |
There was a problem hiding this comment.
I added an else and a printf here, however I am seeing that this is getting called quite a few times. Shouldn't this only be happening once? (On Win 11)
There was a problem hiding this comment.
Yes, it should be called only once per process. Could there be more than one Dune process active?
There was a problem hiding this comment.
I think I've solved the mystery. We have rules that generate the help pages so there were multiple dune processes happening when I did dune build dune.install. :-)
|
CI failure is unrelated. |
|
We get this new warning on mingw: |
|
I've made #13914 to fix the warning. |
`GetProcAddress` returns `FARPROC` and therefore needs an explicit cast. This fixes the warning introduced in #13905.
|
Does OCaml 4.14 even support windows 7? If not, then this change is kind of pointless as it will be broken by the next release anyway. |
|
@rgrinberg I was able to test the patch in a Windows 7 VM so that's a yes. |
Adds a fallback for
GetSystemTimePreciseAsFileTimefor old versions of Windows (< 8).Fixes #13871