From 600738f7bc52ff5243cb4830957433918944e0ce Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 14 Jul 2025 17:08:05 +0200 Subject: [PATCH] guard --- lib/curl_md5.h | 4 ++-- lib/curl_sasl.c | 4 ++-- lib/curl_sha256.h | 4 ++-- lib/md5.c | 4 ++-- lib/sha256.c | 4 ++-- lib/vtls/hostcheck.c | 3 +-- lib/vtls/schannel_int.h | 8 ++++---- tests/unit/unit1601.c | 4 ++-- tests/unit/unit1610.c | 4 ++-- tests/unit/unit1612.c | 4 ++-- 10 files changed, 21 insertions(+), 22 deletions(-) diff --git a/lib/curl_md5.h b/lib/curl_md5.h index ec27503b14..8402b5da2d 100644 --- a/lib/curl_md5.h +++ b/lib/curl_md5.h @@ -24,8 +24,8 @@ * ***************************************************************************/ -#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) \ - || !defined(CURL_DISABLE_DIGEST_AUTH) +#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) || \ + !defined(CURL_DISABLE_DIGEST_AUTH) #include "curl_hmac.h" diff --git a/lib/curl_sasl.c b/lib/curl_sasl.c index 766de44b85..c2f60ac44d 100644 --- a/lib/curl_sasl.c +++ b/lib/curl_sasl.c @@ -615,8 +615,8 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct Curl_easy *data, struct bufref resp; const char *hostname; int port; -#if defined(USE_KERBEROS5) || defined(USE_NTLM) \ - || !defined(CURL_DISABLE_DIGEST_AUTH) +#if defined(USE_KERBEROS5) || defined(USE_NTLM) || \ + !defined(CURL_DISABLE_DIGEST_AUTH) const char *service = data->set.str[STRING_SERVICE_NAME] ? data->set.str[STRING_SERVICE_NAME] : sasl->params->service; diff --git a/lib/curl_sha256.h b/lib/curl_sha256.h index f532939d05..f5c2748e35 100644 --- a/lib/curl_sha256.h +++ b/lib/curl_sha256.h @@ -25,8 +25,8 @@ * ***************************************************************************/ -#if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) \ - || defined(USE_LIBSSH2) || defined(USE_SSL) +#if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) || \ + defined(USE_LIBSSH2) || defined(USE_SSL) #include #include "curl_hmac.h" diff --git a/lib/md5.c b/lib/md5.c index 6a273c56c0..e50b616e90 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -24,8 +24,8 @@ #include "curl_setup.h" -#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) \ - || !defined(CURL_DISABLE_DIGEST_AUTH) +#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) || \ + !defined(CURL_DISABLE_DIGEST_AUTH) #include #include diff --git a/lib/sha256.c b/lib/sha256.c index d73e0ef093..ab28f8a655 100644 --- a/lib/sha256.c +++ b/lib/sha256.c @@ -25,8 +25,8 @@ #include "curl_setup.h" -#if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) \ - || defined(USE_LIBSSH2) || defined(USE_SSL) +#if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) || \ + defined(USE_LIBSSH2) || defined(USE_SSL) #include "curlx/warnless.h" #include "curl_sha256.h" diff --git a/lib/vtls/hostcheck.c b/lib/vtls/hostcheck.c index 68af9be57d..23ba33951f 100644 --- a/lib/vtls/hostcheck.c +++ b/lib/vtls/hostcheck.c @@ -24,8 +24,7 @@ #include "../curl_setup.h" -#if defined(USE_OPENSSL) \ - || defined(USE_SCHANNEL) +#if defined(USE_OPENSSL) || defined(USE_SCHANNEL) /* these backends use functions from this file */ #ifdef HAVE_NETINET_IN_H diff --git a/lib/vtls/schannel_int.h b/lib/vtls/schannel_int.h index cc478e4174..8717919259 100644 --- a/lib/vtls/schannel_int.h +++ b/lib/vtls/schannel_int.h @@ -30,13 +30,13 @@ #include "vtls.h" -#if (defined(__MINGW32__) || defined(CERT_CHAIN_REVOCATION_CHECK_CHAIN)) \ - && !defined(CURL_WINDOWS_UWP) +#if (defined(__MINGW32__) || defined(CERT_CHAIN_REVOCATION_CHECK_CHAIN)) && \ + !defined(CURL_WINDOWS_UWP) #define HAS_MANUAL_VERIFY_API #endif -#if defined(CryptStringToBinary) && defined(CRYPT_STRING_HEX) \ - && !defined(DISABLE_SCHANNEL_CLIENT_CERT) +#if defined(CryptStringToBinary) && defined(CRYPT_STRING_HEX) && \ + !defined(DISABLE_SCHANNEL_CLIENT_CERT) #define HAS_CLIENT_CERT_PATH #endif diff --git a/tests/unit/unit1601.c b/tests/unit/unit1601.c index c80622ba13..093a633ec7 100644 --- a/tests/unit/unit1601.c +++ b/tests/unit/unit1601.c @@ -29,8 +29,8 @@ static CURLcode test_unit1601(char *arg) { UNITTEST_BEGIN_SIMPLE -#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) \ - || !defined(CURL_DISABLE_DIGEST_AUTH) +#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) || \ + !defined(CURL_DISABLE_DIGEST_AUTH) static const char string1[] = "1"; static const char string2[] = "hello-you-fool"; diff --git a/tests/unit/unit1610.c b/tests/unit/unit1610.c index 2cded4df46..f59c302433 100644 --- a/tests/unit/unit1610.c +++ b/tests/unit/unit1610.c @@ -36,8 +36,8 @@ static CURLcode test_unit1610(char *arg) { UNITTEST_BEGIN(t1610_setup()) -#if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) \ - || defined(USE_LIBSSH2) +#if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) || \ + defined(USE_LIBSSH2) static const char string1[] = "1"; static const char string2[] = "hello-you-fool"; diff --git a/tests/unit/unit1612.c b/tests/unit/unit1612.c index 8faf67f85f..8fda6e3791 100644 --- a/tests/unit/unit1612.c +++ b/tests/unit/unit1612.c @@ -30,8 +30,8 @@ static CURLcode test_unit1612(char *arg) { UNITTEST_BEGIN_SIMPLE -#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) \ - || !defined(CURL_DISABLE_DIGEST_AUTH) +#if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) || \ + !defined(CURL_DISABLE_DIGEST_AUTH) static const char password[] = "Pa55worD"; static const char string1[] = "1";