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: Sun, 11 Dec 2022 18:56:00 +0200

> From: Bruno Haible <bruno@clisp.org>
> Cc: bug-gnulib@gnu.org, rogerdpack@gmail.com
> Date: Sun, 11 Dec 2022 17:20:07 +0100
> 
> > I think the code should use a run-time check regardless of the version
> > of Windows on which the program was compiled.
> 
> But the value of _WIN32_WINNT is not the version *on* which the program was
> compiled. It is the minimum version *for* which the program was compiled.
> Both the INSTALL.windows of some GNU packages, as well as
>  
> <https://learn.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt>,
> say so. Maybe we should emphasize this in the install documentation even more?

I know all that.  But the issue here is different: if this file is
compiled with _WIN32_WINNT lower than Windows 8, the prototype of
GetSystemTimePreciseAsFileTime will not be visible, because the
Windows headers hide it.  And since your code already copes with
GetSystemTimePreciseAsFileTime being unavailable, the minimum Windows
version for your code is way lower than Windows 8, it's somewhere in
the Windows 9X area.

> > So IMO only the prototype of GetSystemTimePreciseAsFileTime should be
> > conditioned by the value of _WIN32_WINNT, but the 'initialize'
> > function should be run on all versions of Windows.
> 
> As some point, I want to get rid of the initialize() function and assume
> a new enough version of the OS.

When that happens, Emacs will not be able to use Gnulib's gettime.c
module, sadly.



reply via email to

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