[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gettimeofday.c windows version?
From: |
Bruno Haible |
Subject: |
Re: gettimeofday.c windows version? |
Date: |
Sun, 11 Dec 2022 15:22:23 +0100 |
Roger Pack wrote:
> I received some complaints saying in mingw it was"requiring windows 8" for
> a certain library.
>
> "Entry point not found, GetSystemTimePreciseAsFileTime could not be located
> in the dynamic link library KERNEL32.dll".
Indeed, according to
<https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsystemtimepreciseasfiletime>
the function GetSystemTimePreciseAsFileTime is not present in Windows 7 and
older.
Looking at the table at
<https://en.wikipedia.org/wiki/Microsoft_Windows#Timeline_of_releases> I see
that Windows 7 is out of "extended support" already for more than 2 years.
That means, users with such machines (connected to the internet) live very
dangerously.
Eli: What are the current support statements of Emacs regarding Windows
XP/Vista/7 ?
And should Gnulib declare that the minimum supported version of Windows
is Windows 8?
> Perhaps the following patch? Thanks! :)
>
> diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c
> index 36c7920af..428cc4f30 100644
> --- a/lib/gettimeofday.c
> +++ b/lib/gettimeofday.c
> @@ -35,7 +35,7 @@
> # undef LoadLibrary
> # define LoadLibrary LoadLibraryA
>
> -# if !(_WIN32_WINNT >= _WIN32_WINNT_WIN8)
> +# if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
>
> /* Avoid warnings from gcc -Wcast-function-type. */
> # define GetProcAddress \
>
Nope, this patch is not right.
> "Entry point not found, GetSystemTimePreciseAsFileTime could not be located
> in the dynamic link library KERNEL32.dll".
It looks like some code links directly to GetSystemTimePreciseAsFileTime, and
your user is running it under Windows 7 or older.
Which object file is it that links to GetSystemTimePreciseAsFileTime?
- If it's not gettimeofday.c, it's not in Gnulib's responsibility.
- If it is gettimeofday.c, this file must have been compiled with a
_WIN32_WINNT value >= _WIN32_WINNT_WIN8. You need to look in your
build files where this value come from. Maybe it is even the default
with your compiler version; if that version is new enough, that would
make sense.
Bruno
- gettimeofday.c windows version?, Roger Pack, 2022/12/11
- Re: gettimeofday.c windows version?, Roger Pack, 2022/12/11
- Re: gettimeofday.c windows version?,
Bruno Haible <=
- Re: gettimeofday.c windows version?, Eli Zaretskii, 2022/12/11
- Re: gettimeofday.c windows version?, Bruno Haible, 2022/12/11
- Re: gettimeofday.c windows version?, Eli Zaretskii, 2022/12/11
- Re: gettimeofday.c windows version?, Eli Zaretskii, 2022/12/11
- Re: gettimeofday.c windows version?, Bruno Haible, 2022/12/11
- Re: gettimeofday.c windows version?, Eli Zaretskii, 2022/12/11
- Re: gettimeofday.c windows version?, Paul Eggert, 2022/12/12
- Re: gettimeofday.c windows version?, Bruno Haible, 2022/12/12
- Re: gettimeofday.c windows version?, Eli Zaretskii, 2022/12/12
- Re: gettimeofday.c windows version?, Bruno Haible, 2022/12/12