diff options
author | David Allsopp <david.allsopp@metastack.com> | 2022-06-28 11:15:38 +0100 |
---|---|---|
committer | David Allsopp <david.allsopp@metastack.com> | 2022-10-14 13:26:51 +0100 |
commit | 671a92760444d5c4cd19ce85f9095efbfd5c2615 (patch) | |
tree | bdb2b4eeeaf30ec3d1500a4ec116c227325fd9aa /otherlibs | |
parent | 7eefbf8c757460f3a9bff91734a871d7b0a5e632 (diff) | |
download | ocaml-671a92760444d5c4cd19ce85f9095efbfd5c2615.tar.gz |
C11 usage of [U]LARGE_INTEGER
For the mingw-w64 ports, we require a C11 compiler, which support
anonymous structures and they're a default language extension in all
supported versions of MSVC.
Diffstat (limited to 'otherlibs')
-rw-r--r-- | otherlibs/unix/times_win32.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/otherlibs/unix/times_win32.c b/otherlibs/unix/times_win32.c index 81312a5970..37fdef9d09 100644 --- a/otherlibs/unix/times_win32.c +++ b/otherlibs/unix/times_win32.c @@ -20,10 +20,7 @@ static double to_sec(FILETIME ft) { - ULARGE_INTEGER tmp; - - tmp.u.LowPart = ft.dwLowDateTime; - tmp.u.HighPart = ft.dwHighDateTime; + ULARGE_INTEGER tmp = {{ft.dwLowDateTime, ft.dwHighDateTime}}; /* convert to seconds: GetProcessTimes returns number of 100-nanosecond intervals */ |