From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id C3AA21F852 for ; Fri, 23 Dec 2022 08:38:47 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="jEOGesI8"; dkim-atps=neutral Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8dZN-00040A-RL; Fri, 23 Dec 2022 03:38:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p8dZM-0003zZ-1a for bug-gnulib@gnu.org; Fri, 23 Dec 2022 03:38:20 -0500 Received: from mail-yw1-x1134.google.com ([2607:f8b0:4864:20::1134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p8dZJ-0007W6-Pa; Fri, 23 Dec 2022 03:38:19 -0500 Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-3b56782b3f6so57974267b3.13; Fri, 23 Dec 2022 00:38:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=eMVfjwLxNa8F5Q2AX1q9TgqLpR+fK5HxgTjQw+qlpLM=; b=jEOGesI8JCA04gV7ZTSviJBROsP/y4NoanCrm/iMZXvpgGREw5pU42hpSP33Th2Nu2 F0we/hpv7p3zbVdbBr6OWw4RjdSFeDcjziIBjVbQwC3t4c0zkBxIDAYnPj5zFHMybY33 iPGSkjvRA/wORZiu5qIMYS5PpyDFeIVTHriejt4znpFChBj29os6Cm0l6jCgsRj2tnZm gmXPnr1hxdUZrGdWnvPVjIHRsQECHX4D4YDdDWuSIgISjbBRQDpmmv85fWLFMXRvBFyL gi90dToeemzSekwiimtHCfnHuhD1WzTetEpnOA4jX73BJFEEeQZUPsbXT396NbdRb6Tn ZCAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eMVfjwLxNa8F5Q2AX1q9TgqLpR+fK5HxgTjQw+qlpLM=; b=g7viO5mcgkAOg41G65+u0qPfKCZLR80msUsMFhCzpV40zOIGk+5Uk+/7wiG/Gn6ZY4 fq87flDdjJPTtB+e4BcPVnK5MlSLg7U+40rQ/yAj+yu4ci0I8Tqd6vJPDamDoZezf4Iy s96BYCAnB43QKUsammXAD+AURbsLN3V5X9KCJ2Zh82YpY3ua4KIodMaxx75FwmZt3XIj Pqg3nPx3dEhq+gMTmSf6Q5o6WF9oQ+WCgX3Gfreyd8mIGwzH+2ISg7f+JveIQAPa7Ib7 ZtGxR8LJSTLtsJRLzZnaZWmHaOP6Pd8scs/PMW1UuPFpkMp0NkzEQjyeGUu/yvM8QVzc FXKw== X-Gm-Message-State: AFqh2kq4bDYC9BjFsfIxiUyzp88+FNsSEISQDasKIBnAwwKCvqyLw/6X oyDH6q3+tlvh7LodOX3yAywCBCdxh/J0Sb/OishU8XMv1i8= X-Google-Smtp-Source: AMrXdXuxX/n/xTRJsRvK/0vXCT7nc0ESvWmLsj8KhKEbwY15IlxwI/z/6JMSLktGAkHVqIKtkQpIn9nY4DcGYT5jHf8= X-Received: by 2002:a81:6908:0:b0:45d:f0c4:cf4f with SMTP id e8-20020a816908000000b0045df0c4cf4fmr859332ywc.251.1671784694716; Fri, 23 Dec 2022 00:38:14 -0800 (PST) MIME-Version: 1.0 References: <2153083.vXnMlVU4IS@nimes> In-Reply-To: <2153083.vXnMlVU4IS@nimes> From: Roger Pack Date: Fri, 23 Dec 2022 01:38:01 -0700 Message-ID: Subject: Re: gettimeofday.c windows version? To: Bruno Haible Cc: bug-gnulib@gnu.org, Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000de9c1005f07ab4be" Received-SPF: pass client-ip=2607:f8b0:4864:20::1134; envelope-from=rogerdpack@gmail.com; helo=mail-yw1-x1134.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org --000000000000de9c1005f07ab4be Content-Type: text/plain; charset="UTF-8" On Sun, Dec 11, 2022 at 7:22 AM Bruno Haible wrote: > 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 > 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. > OK it appears newer mingw have a default target of windows 10 for some reason. gnutls embedded in this case: $ x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I../.. -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -mtune=generic -O3 -MT gettimeofday.o -MD -MP -MF $depbase.Tpo -c -o - -dM -E gettimeofday.c | grep WIN32_WINNT #define _WIN32_WINNT 0xa00 https://www.mail-archive.com/mingw-w64-public@lists.sourceforge.net/msg18212.html Maybe instead it could always call initialize and "prefer" GetSystemTimePreciseAsFileTime, then be compatible with < windows 8 without having to manually set _WIN32_WINNT. Basically everything using Gnulib gettimeofday + mingw today might "accidentally" lose windows 7 compat without realizing it. Though I guess you could call that Mingw's fault, it was a bit confusing. Thanks, Merry Christmas! --000000000000de9c1005f07ab4be Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sun, Dec 11, 2022 at 7:22 AM Bruno= Haible <bruno@clis= p.org> wrote:
Roger Pack wrote:
> I received some complaints saying in mingw it was"requiring windo= ws 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><= br> the function GetSystemTimePreciseAsFileTime is not present in Windows 7 and=
older.

Looking at the table at
<https://en.wikipedia.org/wik= i/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<= br> 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?=C2=A0 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 @@
>=C2=A0 # undef LoadLibrary
>=C2=A0 # define LoadLibrary LoadLibraryA
>
> -# if !(_WIN32_WINNT >=3D _WIN32_WINNT_WIN8)
> +# if (_WIN32_WINNT >=3D _WIN32_WINNT_WIN8)
>
>=C2=A0 /* Avoid warnings from gcc -Wcast-function-type.=C2=A0 */
>=C2=A0 #=C2=A0 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, a= nd
your user is running it under Windows 7 or older.

Which object file is it that links to GetSystemTimePreciseAsFileTime?
=C2=A0- If it's not gettimeofday.c, it's not in Gnulib's respon= sibility.
=C2=A0- If it is gettimeofday.c, this file must have been compiled with a =C2=A0 =C2=A0_WIN32_WINNT value >=3D _WIN32_WINNT_WIN8. You need to look= in your
=C2=A0 =C2=A0build files where this value come from. Maybe it is even the d= efault
=C2=A0 =C2=A0with your compiler version; if that version is new enough, tha= t would
=C2=A0 =C2=A0make sense.
<= br>
OK it appears newer mingw have a default target of windows 10= for some reason.=C2=A0 gnutls embedded in this case:
$ x86_6= 4-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I../.. =C2=A0 -U_FORTIFY_SOURCE -D_F= ORTIFY_SOURCE=3D0 =C2=A0-mtune=3Dgeneric -O3 -MT gettimeofday.o -MD -MP -MF= $depbase.Tpo -c -o - -dM -E gettimeofday.c | grep WIN32_WINNT
#d= efine _WIN32_WINNT 0xa00

Maybe instead it could always call initialize and= "prefer" GetSystemTimePreciseAsFileTime, then be compatible with= < windows 8 without having to manually set=20 _WIN32_WINNT.
Basically everything using Gnulib gettimeofday + mi= ngw today might "accidentally" lose windows 7 compat without real= izing it.=C2=A0 Though I guess you could call that Mingw's fault, it wa= s a bit confusing.
Thanks, Merry Christmas!
=20
--000000000000de9c1005f07ab4be--