> From: Bruno Haible <br...@clisp.org> > Cc: Roger Pack <rogerdp...@gmail.com>, Eli Zaretskii <e...@gnu.org> > Date: Sun, 11 Dec 2022 15:22:23 +0100 > > Eli: What are the current support statements of Emacs regarding Windows > XP/Vista/7 ?
Emacs still supports even Windows 9X. And mingw.org's MinGW does the same. Which is why Emacs avoids using Gnulib functions that use APIs which aren't available on older Windows versions. > And should Gnulib declare that the minimum supported version of Windows > is Windows 8? I hope you won't, but it's your decision. > > -# 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. Agreed. > > "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. Yes, most probably. But doing so is common on Windows. > 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. I think the code should use a run-time check regardless of the version of Windows on which the program was compiled. It makes little sense to me to require GetSystemTimePreciseAsFileTime because the program was compiled on a new Windows version when you already have code that is capable of coping with the lack of that API at run time. 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.