]> Savannah Git Hosting - gnulib.git/commit
Improve pattern for defining _WIN32_WINNT.
authorBruno Haible <bruno@clisp.org>
Thu, 28 May 2020 00:06:51 +0000 (02:06 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 28 May 2020 00:06:51 +0000 (02:06 +0200)
commite0dc0ffc6f2f2a4826156d7451e1dc6e80e53243
tree6196a3f129d889d3104b15dc595f5f01f04eea37
parent41b5ed4b01857881d356e15f86b3dd081fe3f6c8
Improve pattern for defining _WIN32_WINNT.

Newer versions of the Windows API may not only add, but also remove API
functions. Therefore, when the user is e.g. building for Windows 10, we
should not set _WIN32_WINNT to e.g. Windows 8, as this may enable the
use of APIs that were present in Windows 8 but removed in Windows 10.

Suggested by Steve Lhomme <robux4@ycbcr.xyz> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00318.html>.

* lib/ftruncate.c (_WIN32_WINNT): Don't set to a smaller value.
* lib/sethostname.c (_WIN32_WINNT): Likewise.
* lib/stat-w32.c (_WIN32_WINNT): Likewise.
ChangeLog
lib/ftruncate.c
lib/sethostname.c
lib/stat-w32.c