From: Viktor Szakats Date: Sun, 13 Jul 2025 10:57:26 +0000 (+0200) Subject: build: drop support for VS2008 (Windows) X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2e1a045d8985e5daa4d9a4f908ed870a16d8e41e;p=thirdparty%2Fcurl.git build: drop support for VS2008 (Windows) Require Visual Studio 2010 or newer. Ref: https://github.com/curl/curl/discussions/15972 Follow-up to dc28bb86c1e466c667ce220fd2e51355cd8bae8d #17798 Follow-up to 63e513b106113db0b1b68bab347b80cb4cef4e65 #17380 Closes #17931 --- diff --git a/CMake/win32-cache.cmake b/CMake/win32-cache.cmake index 50c319d1b6..870acf80de 100644 --- a/CMake/win32-cache.cmake +++ b/CMake/win32-cache.cmake @@ -53,11 +53,7 @@ else() if(MSVC) set(HAVE_UNISTD_H 0) set(HAVE_STDDEF_H 1) # detected by CMake internally in check_type_size() - if(MSVC_VERSION GREATER_EQUAL 1600) - set(HAVE_STDINT_H 1) # detected by CMake internally in check_type_size() - else() - set(HAVE_STDINT_H 0) # detected by CMake internally in check_type_size() - endif() + set(HAVE_STDINT_H 1) # detected by CMake internally in check_type_size() if(MSVC_VERSION GREATER_EQUAL 1800) set(HAVE_STDBOOL_H 1) else() diff --git a/docs/DEPRECATE.md b/docs/DEPRECATE.md index d02174d8ca..102969e4b1 100644 --- a/docs/DEPRECATE.md +++ b/docs/DEPRECATE.md @@ -12,17 +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. -## VS2008 - -curl drops support for getting built with Microsoft Visual Studio 2008 in -November 2025. - -The only reason we kept support for this version is for Windows CE - and we -intend to remove support for that Operating System in this time frame as well. -Bumping the minimum to VS2010. VS2008 is a pain to support. - -Previous discussion and details: https://github.com/curl/curl/discussions/15972 - ## Windows XP In January 2026, curl drops support for Windows XP and Server 2003. Their @@ -94,3 +83,4 @@ Support for RTMP in libcurl gets removed in April 2026. - msh3 (removed in 8.16.0) - winbuild build system (removed in 8.17.0) - Windows CE (removed in 8.18.0) + - Support for Visual Studio 2008 (removed in 8.18.0) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 0db7848a22..f3db34da28 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -200,7 +200,7 @@ Building for Windows XP is required as a minimum. You can build curl with: -- Microsoft Visual Studio 2008 v9.0 or later (`_MSC_VER >= 1500`) +- Microsoft Visual Studio 2010 v10.0 or later (`_MSC_VER >= 1600`) - MinGW-w64 3.0 or later (`__MINGW64_VERSION_MAJOR >= 3`) ## Building Windows DLLs and C runtime (CRT) linkage issues diff --git a/lib/config-win32.h b/lib/config-win32.h index bf9038a894..4bf034bea3 100644 --- a/lib/config-win32.h +++ b/lib/config-win32.h @@ -56,22 +56,21 @@ # error VS2012 does not support build targets prior to Windows Vista # endif # endif - /* Default target settings and minimum build target check for - VS2008 and VS2010 */ + /* VS2010 default target settings and minimum build target check. */ # else -# define VS2008_MIN_TARGET 0x0501 /* XP */ - /* VS2008 default build target is Windows Vista (0x0600). + /* VS2010 default build target is Windows 7 (0x0601). We override default target to be Windows XP. */ -# define VS2008_DEF_TARGET 0x0501 /* XP */ +# define VS2010_MIN_TARGET 0x0501 /* XP */ +# define VS2010_DEF_TARGET 0x0501 /* XP */ # ifndef _WIN32_WINNT -# define _WIN32_WINNT VS2008_DEF_TARGET +# define _WIN32_WINNT VS2010_DEF_TARGET # endif # ifndef WINVER -# define WINVER VS2008_DEF_TARGET +# define WINVER VS2010_DEF_TARGET # endif -# if (_WIN32_WINNT < VS2008_MIN_TARGET) || (WINVER < VS2008_MIN_TARGET) -# error VS2008 does not support build targets prior to Windows XP +# if (_WIN32_WINNT < VS2010_MIN_TARGET) || (WINVER < VS2010_MIN_TARGET) +# error VS2010 does not support build targets prior to Windows XP # endif # endif #endif /* _MSC_VER */ @@ -104,7 +103,7 @@ #endif /* Define to 1 if you have the header file. */ -#if (defined(_MSC_VER) && (_MSC_VER >= 1600)) || defined(__MINGW32__) +#if defined(_MSC_VER) || defined(__MINGW32__) #define HAVE_STDINT_H 1 #endif diff --git a/lib/curl_setup.h b/lib/curl_setup.h index fe3b9e0ee3..bf7030f693 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -80,9 +80,9 @@ #error "Building curl requires mingw-w64 3.0 or later" #endif -/* Visual Studio 2008 is the minimum Visual Studio version we support. +/* Visual Studio 2010 is the minimum Visual Studio version we support. Workarounds for older versions of Visual Studio have been removed. */ -#if defined(_MSC_VER) && (_MSC_VER < 1500) +#if defined(_MSC_VER) && (_MSC_VER < 1600) #error "Ancient versions of Visual Studio are no longer supported due to bugs." #endif diff --git a/lib/curl_setup_once.h b/lib/curl_setup_once.h index 1c2194c502..7caf6c9bc5 100644 --- a/lib/curl_setup_once.h +++ b/lib/curl_setup_once.h @@ -65,8 +65,6 @@ Use it for APIs that do not or cannot support the const qualifier. */ #ifdef HAVE_STDINT_H # define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p)) -#elif defined(_WIN32) /* for VS2008 */ -# define CURL_UNCONST(p) ((void *)(ULONG_PTR)(const void *)(p)) #else # define CURL_UNCONST(p) ((void *)(p)) /* Fall back to simple cast */ #endif diff --git a/lib/rand.c b/lib/rand.c index cbfcbf2740..5eace02833 100644 --- a/lib/rand.c +++ b/lib/rand.c @@ -50,10 +50,6 @@ # include # ifdef _MSC_VER # pragma comment(lib, "bcrypt.lib") -# endif - /* Offered by mingw-w64 v3+. MS SDK v7.0A+. */ -# ifndef BCRYPT_USE_SYSTEM_PREFERRED_RNG -# define BCRYPT_USE_SYSTEM_PREFERRED_RNG 0x00000002 # endif # ifndef STATUS_SUCCESS # define STATUS_SUCCESS ((NTSTATUS)0x00000000L) diff --git a/lib/vtls/schannel_int.h b/lib/vtls/schannel_int.h index 05116dfa1a..88f03aaf68 100644 --- a/lib/vtls/schannel_int.h +++ b/lib/vtls/schannel_int.h @@ -31,7 +31,7 @@ #include "vtls.h" #include "../curl_sha256.h" -#if defined(_MSC_VER) && (_MSC_VER <= 1600) +#if defined(_MSC_VER) && (_MSC_VER < 1700) /* Workaround for warning: 'type cast' : conversion from 'int' to 'LPCSTR' of greater size */ #undef CERT_STORE_PROV_MEMORY diff --git a/lib/vtls/vtls_spack.c b/lib/vtls/vtls_spack.c index 10d16f213d..d86f31d727 100644 --- a/lib/vtls/vtls_spack.c +++ b/lib/vtls/vtls_spack.c @@ -36,17 +36,6 @@ #include "../curl_memory.h" #include "../memdebug.h" -#ifdef _MSC_VER -#if _MSC_VER >= 1600 -#include -#else -typedef unsigned char uint8_t; -typedef unsigned __int16 uint16_t; -typedef unsigned __int32 uint32_t; -typedef unsigned __int64 uint64_t; -#endif -#endif /* _MSC_VER */ - #ifndef UINT16_MAX #define UINT16_MAX 0xffff #endif