bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gettimeofday.c windows version?


From: Eli Zaretskii
Subject: Re: gettimeofday.c windows version?
Date: Fri, 23 Dec 2022 10:46:34 +0200

> From: Roger Pack <rogerdpack@gmail.com>
> Date: Fri, 23 Dec 2022 01:38:01 -0700
> Cc: bug-gnulib@gnu.org, Eli Zaretskii <eliz@gnu.org>
> 
> 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.

That's what I suggested: to remove the compile-time test, and always
call GetSystemTimePreciseAsFileTime via a function pointer, testing
whether it's supported at run time.  I'm not sure Bruno agreed,
though.

> 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.

I guess MinGW64 and MSYS2 are following Cygwin or Microsoft in
dropping old Windows version too quickly.  You are welcome to lobby
those two to be less radical, although I'm unsure what are the chances
of that to succeed.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]