From 9a0b40af735fb3e2dd24296fc61bea0e5b78e133 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 21 Apr 2026 17:57:16 +0200 Subject: [PATCH] tidy-up: version-related comments and messages If it improves consistency across builds and sources, prefer 'greater' or newer/later/+, prefer no 'v'/'version` prefix. Closes #1866 --- .clang-tidy.yml | 4 ++-- CMakeLists.txt | 4 ++-- RELEASE-NOTES | 2 +- cmake/PickyWarnings.cmake | 6 +++--- cmake/libssh2-config.in.cmake | 2 +- configure.ac | 2 +- docs/DEPENDENCIES.md | 2 +- docs/INSTALL-CMAKE.md | 2 +- docs/libssh2_session_flag.md | 2 +- docs/libssh2_session_startup.md | 2 +- docs/libssh2_sftp_write.md | 2 +- docs/libssh2_trace_sethandler.md | 2 +- include/libssh2.h | 2 +- os400/libssh2rpg/libssh2.rpgle.in | 4 ++-- src/libssh2_priv.h | 4 ++-- src/openssl.c | 2 +- vms/libssh2_make_kit.dcl | 8 ++++---- vms/readme.vms | 8 ++++---- 18 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.clang-tidy.yml b/.clang-tidy.yml index 8909dbf2..04e1215d 100644 --- a/.clang-tidy.yml +++ b/.clang-tidy.yml @@ -8,7 +8,7 @@ Checks: - clang-analyzer-* - -clang-analyzer-optin.performance.Padding - - -clang-analyzer-security.ArrayBound # due to false positives with clang-tidy v21.1.0+ + - -clang-analyzer-security.ArrayBound # due to false positives with clang-tidy 21.1.0+ - -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling - bugprone-assert-side-effect - bugprone-assignment-in-if-condition @@ -46,4 +46,4 @@ Checks: CheckOptions: readability-inconsistent-declaration-parameter-name.Strict: true -HeaderFilterRegex: '.*' # Default in v22.1.0+ +HeaderFilterRegex: '.*' # Default in 22.1.0+ diff --git a/CMakeLists.txt b/CMakeLists.txt index 639e3910..7a6fb56d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,7 +87,7 @@ endfunction() # CMake does not recognize some targets accurately. Touch up configuration manually as a workaround. if(WINDOWS_STORE AND MINGW) # mingw UWP build - # CMake (as of v3.31.2) gets confused and applies the MSVC rc.exe command-line + # CMake (as of 3.31.2) gets confused and applies the MSVC rc.exe command-line # template to windres. Reset it to the windres template via 'Modules/Platform/Windows-windres.cmake': set(CMAKE_RC_COMPILE_OBJECT " -O coff ") endif() @@ -476,7 +476,7 @@ if(CRYPTO_BACKEND STREQUAL "WinCNG" OR NOT CRYPTO_BACKEND) set(CRYPTO_BACKEND_DEFINE "LIBSSH2_WINCNG") list(APPEND LIBSSH2_LIBS "crypt32" "bcrypt") - option(ENABLE_ECDSA_WINCNG "Enable WinCNG ECDSA support (requires Windows 10 or later)" OFF) + option(ENABLE_ECDSA_WINCNG "Enable WinCNG ECDSA support (requires Windows 10 or newer)" OFF) add_feature_info("WinCNG" ENABLE_ECDSA_WINCNG "WinCNG ECDSA support") if(ENABLE_ECDSA_WINCNG) set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "LIBSSH2_ECDSA_WINCNG") diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 180298fb..0b1bf4aa 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -199,7 +199,7 @@ This release includes the following enhancements and bugfixes: - cmake: pre-fill more, simplify control flow (300da4e2 #1620) - cmake: drop redundant `-lws2_32` meant for `libssh2.pc` (22784a56 #1619 #827 #811 #1535 #1128) - cmake: add linter, fix issues (694b9d96 #1610) -- cmake: test integration with old cmake (v3.11.4 2018-03-28) (f522f10c #1591) +- cmake: test integration with old cmake (f522f10c #1591) - cmake: honor individual picky option overrides found in `CMAKE_C_FLAGS` (62ad6a84 #1590) - cmake: fix copy-paste typo in integration tests for old cmake (4e78006c #1592 #1589) - cmake: extend integration tests (77df7677 #1589) diff --git a/cmake/PickyWarnings.cmake b/cmake/PickyWarnings.cmake index 6a571190..1e641631 100644 --- a/cmake/PickyWarnings.cmake +++ b/cmake/PickyWarnings.cmake @@ -69,7 +69,7 @@ if(PICKY_COMPILER) # to suppress undesired warnings in case -Weverything is passed as a custom option. # Assume these options always exist with both clang and gcc. - # Require clang 3.0 / gcc 2.95 or later. + # Require clang 3.0 / gcc 2.95 or greater. list(APPEND _picky_enable -Wbad-function-cast # clang 2.7 gcc 2.95 -Wconversion # clang 2.7 gcc 2.95 @@ -174,7 +174,7 @@ if(PICKY_COMPILER) if((CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0) OR (CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12)) list(APPEND _picky_enable - -Wimplicit-fallthrough # clang 4.0 gcc 7.0 appleclang 9.0 # We do silencing for clang 10.0 and above only + -Wimplicit-fallthrough # clang 4.0 gcc 7.0 appleclang 9.0 # We do silencing for clang 10.0+ only -Wxor-used-as-pow # clang 10.0 gcc 13.0 appleclang 12.0 ) endif() @@ -340,7 +340,7 @@ if(PICKY_COMPILER) list(APPEND _picky "${_ccopt}") endif() endforeach() - elseif(MSVC AND MSVC_VERSION LESS_EQUAL 1951) # Skip for untested/unreleased newer versions + elseif(MSVC AND MSVC_VERSION LESS_EQUAL 1951) # Enable for tested versions only list(APPEND _picky "-Wall") list(APPEND _picky "-wd4061") # enumerator 'A' in switch of enum 'B' is not explicitly handled by a case label list(APPEND _picky "-wd4191") # 'type cast': unsafe conversion from 'FARPROC' to 'void (__cdecl *)(void)' diff --git a/cmake/libssh2-config.in.cmake b/cmake/libssh2-config.in.cmake index db577af0..4cb44bad 100644 --- a/cmake/libssh2-config.in.cmake +++ b/cmake/libssh2-config.in.cmake @@ -8,7 +8,7 @@ option(LIBSSH2_USE_PKGCONFIG "Enable pkg-config to detect @PROJECT_NAME@ depende if(CMAKE_VERSION VERSION_LESS @CMAKE_MINIMUM_REQUIRED_VERSION@) message(STATUS "@PROJECT_NAME@: @PROJECT_NAME@-specific Find modules require " - "CMake @CMAKE_MINIMUM_REQUIRED_VERSION@ or upper, found: ${CMAKE_VERSION}.") + "CMake @CMAKE_MINIMUM_REQUIRED_VERSION@ or greater, found: ${CMAKE_VERSION}.") endif() include(CMakeFindDependencyMacro) diff --git a/configure.ac b/configure.ac index 79f01e90..ff7999ea 100644 --- a/configure.ac +++ b/configure.ac @@ -175,7 +175,7 @@ fi dnl ECDSA support with WinCNG AC_ARG_ENABLE(ecdsa-wincng, AS_HELP_STRING([--enable-ecdsa-wincng], - WinCNG ECDSA support (requires Windows 10 or later)), + WinCNG ECDSA support (requires Windows 10 or newer)), [wincng_ecdsa=$enableval]) if test "$wincng_ecdsa" = yes; then AC_DEFINE(LIBSSH2_ECDSA_WINCNG, 1, [Enable WinCNG ECDSA support]) diff --git a/docs/DEPENDENCIES.md b/docs/DEPENDENCIES.md index 72117c38..7f096311 100644 --- a/docs/DEPENDENCIES.md +++ b/docs/DEPENDENCIES.md @@ -6,7 +6,7 @@ SPDX-License-Identifier: BSD-3-Clause ## Dependencies -We aim to support these or later versions. +We aim to support these or later versions: - Libgcrypt 1.8 (2017-07-18) - LibreSSL 3.7.0 (2022-12-12) diff --git a/docs/INSTALL-CMAKE.md b/docs/INSTALL-CMAKE.md index 0727176b..ad90e718 100644 --- a/docs/INSTALL-CMAKE.md +++ b/docs/INSTALL-CMAKE.md @@ -12,7 +12,7 @@ Web site source code: # Installation instructions with CMake -To build libssh2 you need [CMake v3.18 or later](https://cmake.org/download/) +To build libssh2 you need [CMake 3.18 or greater](https://cmake.org/download/) and one of the following cryptography libraries: * Libgcrypt diff --git a/docs/libssh2_session_flag.md b/docs/libssh2_session_flag.md index 671ce33f..03a8ebd7 100644 --- a/docs/libssh2_session_flag.md +++ b/docs/libssh2_session_flag.md @@ -44,4 +44,4 @@ Returns regular libssh2 error code. # AVAILABILITY This function has existed since the age of dawn. LIBSSH2_FLAG_COMPRESS was -added in version 1.2.8. +added in libssh2 1.2.8. diff --git a/docs/libssh2_session_startup.md b/docs/libssh2_session_startup.md index 7c8c49cf..77845791 100644 --- a/docs/libssh2_session_startup.md +++ b/docs/libssh2_session_startup.md @@ -23,7 +23,7 @@ int libssh2_session_startup(LIBSSH2_SESSION *session, int socket); # DESCRIPTION -Starting in libssh2 version 1.2.8 this function is considered deprecated. Use +Starting in libssh2 1.2.8 this function is considered deprecated. Use *libssh2_session_handshake(3)* instead. *session* - Session instance as returned by libssh2_session_init_ex(3) diff --git a/docs/libssh2_sftp_write.md b/docs/libssh2_sftp_write.md index fac63dc1..bef820a9 100644 --- a/docs/libssh2_sftp_write.md +++ b/docs/libssh2_sftp_write.md @@ -43,7 +43,7 @@ least 32K of data to this function. # WRITE AHEAD -Starting in libssh2 version 1.2.8, the default behavior of libssh2 is to +Starting in libssh2 1.2.8, the default behavior of libssh2 is to create several smaller outgoing packets for all data you pass to this function and it returns a positive number as soon as the first packet is acknowledged from the server. diff --git a/docs/libssh2_trace_sethandler.md b/docs/libssh2_trace_sethandler.md index 1690c677..192eef21 100644 --- a/docs/libssh2_trace_sethandler.md +++ b/docs/libssh2_trace_sethandler.md @@ -45,4 +45,4 @@ and a typical "release build" might not. # AVAILABILITY -Added in libssh2 version 1.2.3 +Added in libssh2 1.2.3 diff --git a/include/libssh2.h b/include/libssh2.h index 365e0702..927b595c 100644 --- a/include/libssh2.h +++ b/include/libssh2.h @@ -59,7 +59,7 @@ Where XX, YY and ZZ are the main version, release and patch numbers in hexadecimal (using 8 bits each). All three numbers are always represented - using two digits. 1.2 would appear as "0x010200" while version 9.11.7 + using two digits. Version 1.2 would appear as "0x010200" while 9.11.7 appears as "0x090b07". This 6-digit (24 bits) hexadecimal number does not show pre-release number, diff --git a/os400/libssh2rpg/libssh2.rpgle.in b/os400/libssh2rpg/libssh2.rpgle.in index 931c550b..2e2efdfb 100644 --- a/os400/libssh2rpg/libssh2.rpgle.in +++ b/os400/libssh2rpg/libssh2.rpgle.in @@ -60,8 +60,8 @@ * * Where XX, YY and ZZ are the main version, release and patch numbers in * hexadecimal (using 8 bits each). All three numbers are always - * represented using two digits. 1.2 would appear as "0x010200" while - * version 9.11.7 appears as "0x090b07". + * represented using two digits. Version 1.2 would appear as "0x010200" + * while 9.11.7 appears as "0x090b07". * * This 6-digit (24 bits) hexadecimal number does not show pre-release * number, and it is always a greater number in a more recent release. It diff --git a/src/libssh2_priv.h b/src/libssh2_priv.h index 18ddd8e4..9bb090d3 100644 --- a/src/libssh2_priv.h +++ b/src/libssh2_priv.h @@ -81,7 +81,7 @@ #ifdef LIBSSH2_HAVE_ZLIB #ifndef ZLIB_CONST -#define ZLIB_CONST /* Use z_const. Supported by v1.2.5.2 and upper. */ +#define ZLIB_CONST /* Use z_const. Supported by 1.2.5.2 and greater. */ #endif #endif @@ -156,7 +156,7 @@ C++ always supports 'inline'. */ # define SSH2_INLINE inline /* 'inline' keyword supported */ #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -/* C99 (and later) supports 'inline' keyword */ +/* C99 (and newer) supports 'inline' keyword */ # define SSH2_INLINE inline /* 'inline' keyword supported */ #elif defined(__GNUC__) && __GNUC__ >= 3 /* GCC supports '__inline__' as an extension */ diff --git a/src/openssl.c b/src/openssl.c index 46edd250..0694a8a5 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -952,7 +952,7 @@ int ssh2_cipher_crypt(ssh2_cipher_ctx *ctx, SSH2_CIPHER_T(algo), int encrypt, in!=NULL is equivalent to EVP_CipherUpdate in==NULL is equivalent to EVP_CipherFinal */ #if defined(LIBSSH2_WOLFSSL) && LIBWOLFSSL_VERSION_HEX < 0x05007000 - /* Workaround for wolfSSL bug fixed in v5.7.0: + /* Workaround for wolfSSL bug fixed in 5.7.0: https://github.com/wolfSSL/wolfssl/pull/7143 */ unsigned char buf2[EVP_MAX_BLOCK_LENGTH]; int outb; diff --git a/vms/libssh2_make_kit.dcl b/vms/libssh2_make_kit.dcl index aae17c95..d30da092 100644 --- a/vms/libssh2_make_kit.dcl +++ b/vms/libssh2_make_kit.dcl @@ -201,12 +201,12 @@ $ write pt "the SSH protocol. This is the OpenVMS port of that library." $ write pt "Further information at https://libssh2.org/." $ write pt "" $ write pt "1 NEED_VMS83" -$ write pt "=prompt OpenVMS 8.3 or later is not installed on your system." -$ write pt "This product requires OpenVMS 8.3 or later to function." +$ write pt "=prompt OpenVMS 8.3 or greater is not installed on your system." +$ write pt "This product requires OpenVMS 8.3 or greater to function." $ write pt "" $ write pt "1 NEED_SSL" -$ write pt "=prompt HP OpenSSL 1.3 or later is not installed on your system." -$ write pt "This product requires HP OpenSSL 1.3 or later to function." +$ write pt "=prompt HP OpenSSL 1.3 or greater is not installed on your system." +$ write pt "This product requires HP OpenSSL 1.3 or greater to function." $ write pt "" $ write pt "1 RELEASE_NOTES" $ write pt "=prompt Release notes and the libssh2 help library are available in [gnv.usr.share.doc.libssh2] directory." diff --git a/vms/readme.vms b/vms/readme.vms index 5bdc524a..f865c002 100644 --- a/vms/readme.vms +++ b/vms/readme.vms @@ -20,13 +20,13 @@ Installing the PCSI kit Prerequisites ------------- -- VMS version 8.3 minimal. +- VMS 8.3 or greater. See the remarks at prerequisites for building the kit - TCP/IP stack, both TCP/IP services and Multinet should work. See the remarks at prerequisites for building the kit -- HP OPENSSL V1.3 minimal. +- HP OpenSSL 1.3 or greater. See the remarks at prerequisites for building the kit -- JEM ZLIB V1.2-3E1 minimal. +- JEM ZLIB 1.2-3E1 or greater. See the remarks at prerequisites for building the kit The first three dependencies are tested at installation time, and @@ -153,7 +153,7 @@ You need to have the following available: - An Alpha or Itanium VMS system. Due to dependencies on zlib, ssl and ODS-5, support on VAXen would be cumbersome at least. -- VMS version 8.3 minimal. This is a requirement of gnv$zlibshr.exe against +- VMS 8.3 or greater. This is a requirement of gnv$zlibshr.exe against which shared image library libssh2 is linked. If you use another zlib to link against, you can make it work under lower versions of VMS. I have made it work on VMS 7.3-2 with not a lot of difficulty.