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 `GetSystemTimePreciseAsFileTime` for old versions of Windows (< 8). Fixes #13871 Signed-off-by: Nicolas Ojeda Bar <n.oje.bar@gmail.com>
Adds a fallback for `GetSystemTimePreciseAsFileTime` for old versions of Windows (< 8). Fixes #13871 Signed-off-by: Nicolas Ojeda Bar <n.oje.bar@gmail.com> Signed-off-by: Shon Feder <shon.feder@gmail.com>
CHANGES: ### Fixed - Restore compatibility with Windows 7 (ocaml/dune#13905, @nojb) - `dune test` now runs tests in the default context only. When there is a single context, it is treated as the default. This fixes a crash when the workspace has no context named "default". (ocaml/dune#13930, fixes ocaml/dune#13904, @Alizter) - Fix `dune trace cat --chrome-trace` to adhere to the Chrome Trace Event Format by providing timestamps and durations at microsecond granularity (ocaml/dune#13911, fixes ocaml/dune#13906, @Alizter)
Adds a fallback for
GetSystemTimePreciseAsFileTimefor old versions of Windows (< 8).Fixes #13871