bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Cc: Roger Pack <rogerdpack@gmail.com>, Eli Zaretskii <eliz@gnu.org>
Subject: Re: gettimeofday.c windows version?
Date: Sun, 11 Dec 2022 15:22:23 +0100	[thread overview]
Message-ID: <2153083.vXnMlVU4IS@nimes> (raw)
In-Reply-To: <CAPfeOntYnn7+xLnzN8yis4o4aagRaikUqHA0-Kxd7Z5QMfBiWg@mail.gmail.com>

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





  parent reply	other threads:[~2022-12-11 14:22 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-11  6:01 gettimeofday.c windows version? Roger Pack
2022-12-11  7:05 ` Roger Pack
2022-12-11 14:22 ` Bruno Haible [this message]
2022-12-11 15:09   ` Eli Zaretskii
2022-12-11 16:20     ` Bruno Haible
2022-12-11 16:56       ` Eli Zaretskii
2022-12-11 17:25         ` Eli Zaretskii
2022-12-11 18:25           ` Bruno Haible
2022-12-11 18:55             ` Eli Zaretskii
2022-12-12  7:17               ` Paul Eggert
2022-12-12 12:19                 ` Bruno Haible
2022-12-12 13:06                 ` Eli Zaretskii
2022-12-12 14:25                   ` Bruno Haible
2022-12-12 14:40                     ` Eli Zaretskii
2022-12-12 19:44                       ` Paul Eggert
2022-12-12 20:37                         ` Eli Zaretskii
2022-12-16 23:35                           ` Paul Eggert
2022-12-17  8:09                             ` Eli Zaretskii
2022-12-12 19:14                     ` Gisle Vanem
2022-12-23  8:38   ` Roger Pack
2022-12-23  8:46     ` Eli Zaretskii
2022-12-23 23:47     ` Paul Eggert
2022-12-24  6:46       ` Eli Zaretskii
2022-12-24  7:42         ` Paul Eggert
2022-12-24  8:34           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2153083.vXnMlVU4IS@nimes \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=eliz@gnu.org \
    --cc=rogerdpack@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).