windows: bump minimum to Vista (from XP)

After this patch curl requires targeting Vista or newer, and a toolchain
with Vista support.

Supported MSVC compilers (VS2010+) all support Vista:
- VS2012+ target Win8 (or later) by default.
- VS2010 targets Win7 by default.

Supported mingw-w64 versions (v3+) all support Vista:
- mingw-w64 v9+ target Win10 by default.
- mingw-w64 v8 and older target Server 2003 (~XP) by default.
  After this patch it may be necessary to override the default Windows
  target version to Vista (or newer) via:
  autotools: `CPPFLAGS=-D_WIN32_WINNT=0x0600`
  cmake: `-DCURL_TARGET_WINDOWS_VERSION=0x0600`
- mingw-w64 v6+ allow changing the default at toolchain build-time.

Notes:
- For non-MSVC, non-mingw-w64 toolchains, `if_nametoindex` needs to be
  allowlisted in `curl_setup.h`, if they do support it.

Fixes #17985 (discussion)
Closes #18009
This commit is contained in:
Viktor Szakats 2025-07-24 03:06:39 +02:00
parent 6c8956c1cb
commit b17ef873ae
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
27 changed files with 136 additions and 611 deletions

View file

@ -12,13 +12,6 @@ email the
as soon as possible and explain to us why this is a problem for you and
how your use case cannot be satisfied properly using a workaround.
## Windows XP
In January 2026, curl drops support for Windows XP and Server 2003. Their
"mainstream support" ended in 2014, with final updates on May 14, 2019.
Making the new minimum target Windows version Vista / Server 2008.
## c-ares 1.16.0
In March 2026, we drop support for all c-ares versions before 1.16.0.
@ -77,3 +70,4 @@ CMake 3.18 was released on 2020-07-15.
- Windows CE (removed in 8.18.0)
- Support for Visual Studio 2008 (removed in 8.18.0)
- OpenSSL 1.1.1 and older (removed in 8.18.0)
- Support for Windows XP (removed in 8.19.0)

View file

@ -196,7 +196,7 @@ library check.
# Windows
Building for Windows XP is required as a minimum.
Building for Windows Vista/Server 2008 is required as a minimum.
You can build curl with:

View file

@ -36,7 +36,7 @@ We aim to support these or later versions.
- nghttp2 1.15.0 (2016-09-25)
- OpenLDAP 2.0 (2000-08-01)
- OpenSSL 3.0.0 (2021-09-07)
- Windows XP 5.1 (2001-08-24 - 2009-04-14)
- Windows Vista 6.0 (2006-11-08 - 2012-04-10)
- wolfSSL 3.4.6 (2017-09-22)
- zlib 1.2.5.2 (2011-12-11)
- zstd 1.0 (2016-08-31)

View file

@ -38,11 +38,7 @@ int main(void)
}
#else
#ifdef _WIN32
#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0600 /* Requires Windows Vista */
#endif
#ifdef _WIN32 /* Requires Windows Vista+ */
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>