]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
crypto/bio/bio_print.c: maintain consistent MSVC feature macro guards
authorRichard Levitte <levitte@openssl.org>
Wed, 25 Feb 2026 14:38:17 +0000 (15:38 +0100)
committerRichard Levitte <levitte@openssl.org>
Thu, 26 Feb 2026 17:11:07 +0000 (18:11 +0100)
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Thu Feb 26 17:12:02 2026
(Merged from https://github.com/openssl/openssl/pull/30177)

crypto/bio/bio_print.c

index 2a78cd637348e1e6f0f590e27e4565ae1acad993..730587ff26b208218d89a4ac70c2d007f99e0771 100644 (file)
@@ -28,7 +28,7 @@ int BIO_printf(BIO *bio, const char *format, ...)
     return ret;
 }
 
-#if defined(_WIN32)
+#if defined(_MSC_VER) && _MSC_VER < 1900
 /*
  * _MSC_VER described here:
  * https://learn.microsoft.com/en-us/cpp/overview/compiler-versions?view=msvc-170
@@ -70,7 +70,9 @@ static int msvc_bio_vprintf(BIO *bio, const char *format, va_list args)
 
     return ret;
 }
+#endif
 
+#ifdef _WIN32
 /*
  * This function is for unit test on windows only when built with Visual Studio
  */
@@ -85,13 +87,12 @@ int ossl_BIO_snprintf_msvc(char *buf, size_t n, const char *format, ...)
 
     return ret;
 }
-
 #endif
 
 int BIO_vprintf(BIO *bio, const char *format, va_list args)
 {
     va_list cp_args;
-#if !defined(_MSC_VER) || _MSC_VER > 1900
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
     int sz;
 #endif
     int ret = -1;