From cbe7654d728e9ad1fcf57e6519367305c06197b4 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 25 Dec 2025 22:54:22 +0100 Subject: [PATCH] windows: drop support for Visual Studio 2008 and older Closes #1769 --- RELEASE-NOTES | 3 +++ appveyor.yml | 7 ------- include/libssh2.h | 26 +++----------------------- src/libssh2_setup.h | 3 --- 4 files changed, 6 insertions(+), 33 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f053e996..3bbdd0d0 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -36,6 +36,9 @@ Deprecation notices: - The next release drops mbedTLS 2.x support, following its deprecation upstream. +- This release drops support for Visual Studio 2008 and older. + Requiring 2010 or newer (`_MSC_VER` >= 1600). + This release includes the following enhancements and bugfixes: - agent: pageant backend, bound reply copy, handle missing reply (8ddf3b31 #1711) diff --git a/appveyor.yml b/appveyor.yml index ebfd43d0..0116a443 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -88,13 +88,6 @@ environment: CRYPTO_BACKEND: 'OpenSSL' OPENSSL_ROOT_DIR: 'C:/OpenSSL-v111-Win64' - - job_name: 'VS2008, WinCNG, x86, Build-only' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' - GENERATOR: 'Visual Studio 9 2008' - PLATFORM: 'x86' - CRYPTO_BACKEND: 'WinCNG' - ENABLE_ECDSA_WINCNG: 'ON' - - job_name: 'VS2010, WinCNG, x64, Build-only, non-unity' APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' GENERATOR: 'Visual Studio 10 2010' diff --git a/include/libssh2.h b/include/libssh2.h index d794b8e9..d8c5d54c 100644 --- a/include/libssh2.h +++ b/include/libssh2.h @@ -123,20 +123,9 @@ extern "C" { # include #endif -#if defined(_MSC_VER) && (_MSC_VER < 1600) -typedef unsigned char uint8_t; -typedef unsigned short int uint16_t; -typedef unsigned int uint32_t; -typedef __int32 int32_t; -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; -typedef unsigned __int64 libssh2_uint64_t; -typedef __int64 libssh2_int64_t; -#else #include typedef unsigned long long libssh2_uint64_t; typedef long long libssh2_int64_t; -#endif #if defined(_MSC_VER) && !defined(HAVE_SSIZE_T) && !defined(ssize_t) typedef SSIZE_T ssize_t; @@ -156,13 +145,8 @@ typedef int libssh2_socket_t; /* Compile-time deprecation macros */ #if !defined(LIBSSH2_DISABLE_DEPRECATION) && !defined(LIBSSH2_LIBRARY) # if defined(_MSC_VER) -# if _MSC_VER >= 1400 -# define LIBSSH2_DEPRECATED(version, message) \ - __declspec(deprecated("since libssh2 " # version ". " message)) -# elif _MSC_VER >= 1310 -# define LIBSSH2_DEPRECATED(version, message) \ - __declspec(deprecated) -# endif +# define LIBSSH2_DEPRECATED(version, message) \ + __declspec(deprecated("since libssh2 " # version ". " message)) # elif defined(__GNUC__) && !defined(__INTEL_COMPILER) # if (defined(__clang__) && __clang_major__ >= 3) || \ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) @@ -187,11 +171,7 @@ typedef int libssh2_socket_t; */ #if defined(_MSC_VER) && !defined(_WIN32_WCE) -# if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64) -# define LIBSSH2_USE_WIN32_LARGE_FILES -# else -# define LIBSSH2_USE_WIN32_SMALL_FILES -# endif +# define LIBSSH2_USE_WIN32_LARGE_FILES #endif #if defined(__MINGW32__) && !defined(LIBSSH2_USE_WIN32_LARGE_FILES) diff --git a/src/libssh2_setup.h b/src/libssh2_setup.h index 0f17a188..c01bc47a 100644 --- a/src/libssh2_setup.h +++ b/src/libssh2_setup.h @@ -88,9 +88,6 @@ # define snprintf _snprintf # endif # endif -# if _MSC_VER < 1500 -# define vsnprintf _vsnprintf -# endif # if _MSC_VER < 1900 # define strdup _strdup /* Silence bogus warning C4127: conditional expression is constant */