ifndef remaining

This commit is contained in:
Viktor Szakats 2025-07-25 14:59:56 +02:00
parent e290a41650
commit cfd0ef9db8
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
10 changed files with 22 additions and 22 deletions

View file

@ -1309,7 +1309,7 @@ connect_sub_chain:
}
#endif /* USE_SSL */
#if !defined(CURL_DISABLE_HTTP)
#ifndef CURL_DISABLE_HTTP
if(cf->conn->bits.tunnel_proxy) {
result = Curl_cf_http_proxy_insert_after(cf, data);
if(result)
@ -1323,7 +1323,7 @@ connect_sub_chain:
#endif /* !CURL_DISABLE_PROXY */
if(ctx->state < CF_SETUP_CNNCT_HAPROXY) {
#if !defined(CURL_DISABLE_PROXY)
#ifndef CURL_DISABLE_PROXY
if(data->set.haproxyprotocol) {
if(Curl_conn_is_ssl(cf->conn, cf->sockindex)) {
failf(data, "haproxy protocol not support with SSL "
@ -1502,7 +1502,7 @@ CURLcode Curl_conn_setup(struct Curl_easy *data,
Curl_resolv_unlink(data, &data->state.dns[sockindex]);
data->state.dns[sockindex] = dns;
#if !defined(CURL_DISABLE_HTTP)
#ifndef CURL_DISABLE_HTTP
if(!conn->cfilter[sockindex] &&
conn->handler->protocol == CURLPROTO_HTTPS) {
DEBUGASSERT(ssl_mode != CURL_CF_SSL_DISABLE);

View file

@ -58,7 +58,7 @@
#endif
#elif defined(USE_WOLFSSL)
#include <wolfssl/options.h>
#if !defined(NO_DES3)
#ifndef NO_DES3
#define USE_OPENSSL_DES
#endif
#endif
@ -129,7 +129,7 @@
#include "curl_memory.h"
#include "memdebug.h"
#if !defined(CURL_NTLM_NOT_SUPPORTED)
#ifndef CURL_NTLM_NOT_SUPPORTED
/*
* Turns a 56-bit key into being 64-bit wide.
*/
@ -329,7 +329,7 @@ CURLcode Curl_ntlm_core_mk_lm_hash(const char *password,
unsigned char *lmbuffer /* 21 bytes */)
{
unsigned char pw[14];
#if !defined(CURL_NTLM_NOT_SUPPORTED)
#ifndef CURL_NTLM_NOT_SUPPORTED
static const unsigned char magic[] = {
0x4B, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25 /* i.e. KGS!@#$% */
};
@ -380,7 +380,7 @@ static void ascii_to_unicode_le(unsigned char *dest, const char *src,
}
}
#if !defined(USE_WINDOWS_SSPI)
#ifndef USE_WINDOWS_SSPI
static void ascii_uppercase_to_unicode_le(unsigned char *dest,
const char *src, size_t srclen)
@ -422,7 +422,7 @@ CURLcode Curl_ntlm_core_mk_nt_hash(const char *password,
return result;
}
#if !defined(USE_WINDOWS_SSPI)
#ifndef USE_WINDOWS_SSPI
#define NTLMv2_BLOB_SIGNATURE "\x01\x01\x00\x00"
#define NTLMv2_BLOB_LEN (44 -16 + ntlm->target_info_len + 4)

View file

@ -47,7 +47,7 @@ CURLcode Curl_ntlm_core_mk_lm_hash(const char *password,
CURLcode Curl_ntlm_core_mk_nt_hash(const char *password,
unsigned char *ntbuffer /* 21 bytes */);
#if !defined(USE_WINDOWS_SSPI)
#ifndef USE_WINDOWS_SSPI
CURLcode Curl_hmac_md5(const unsigned char *key, unsigned int keylen,
const unsigned char *data, unsigned int datalen,

View file

@ -1003,7 +1003,7 @@ int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf,
#endif
#if defined(USE_UNIX_SOCKETS) && defined(_WIN32)
# if !defined(UNIX_PATH_MAX)
# ifndef UNIX_PATH_MAX
/* Replicating logic present in afunix.h
(distributed with newer Windows 10 SDK versions only) */
# define UNIX_PATH_MAX 108

View file

@ -248,7 +248,7 @@ static int ldap_win_bind_auth(LDAP *server, const char *user,
}
else
#endif
#if !defined(CURL_DISABLE_DIGEST_AUTH)
#ifndef CURL_DISABLE_DIGEST_AUTH
if(authflags & CURLAUTH_DIGEST) {
method = LDAP_AUTH_DIGEST;
}

View file

@ -177,7 +177,7 @@ static void my_md5_update(void *ctx,
const unsigned char *data,
unsigned int length)
{
#if !defined(HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS)
#ifndef HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS
(void)mbedtls_md5_update(ctx, data, length);
#else
(void)mbedtls_md5_update_ret(ctx, data, length);
@ -186,7 +186,7 @@ static void my_md5_update(void *ctx,
static void my_md5_final(unsigned char *digest, void *ctx)
{
#if !defined(HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS)
#ifndef HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS
(void)mbedtls_md5_finish(ctx, digest);
#else
(void)mbedtls_md5_finish_ret(ctx, digest);

View file

@ -80,7 +80,7 @@ typedef enum {
#define CURLPIPE_ANY (CURLPIPE_MULTIPLEX)
#if !defined(CURL_DISABLE_SOCKETPAIR)
#ifndef CURL_DISABLE_SOCKETPAIR
#define ENABLE_WAKEUP
#endif

View file

@ -100,7 +100,7 @@ CURLcode Curl_win32_random(unsigned char *entropy, size_t length)
}
#endif
#if !defined(USE_SSL)
#ifndef USE_SSL
/* ---- possibly non-cryptographic version following ---- */
static CURLcode weak_random(struct Curl_easy *data,
unsigned char *entropy,

View file

@ -646,7 +646,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option,
data->set.postfieldsize = arg;
break;
#ifndef CURL_DISABLE_HTTP
#if !defined(CURL_DISABLE_COOKIES)
#ifndef CURL_DISABLE_COOKIES
case CURLOPT_COOKIESESSION:
/*
* Set this option to TRUE to start a new "cookie session". It will
@ -1778,7 +1778,7 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option,
}
return Curl_setstropt(&data->set.str[STRING_ENCODING], ptr);
#if !defined(CURL_DISABLE_AWS)
#ifndef CURL_DISABLE_AWS
case CURLOPT_AWS_SIGV4:
/*
* String that is merged to some authentication
@ -1810,7 +1810,7 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option,
*/
return Curl_setstropt(&data->set.str[STRING_USERAGENT], ptr);
#if !defined(CURL_DISABLE_COOKIES)
#ifndef CURL_DISABLE_COOKIES
case CURLOPT_COOKIE:
/*
* Cookie string to send to the remote server in the request.

View file

@ -134,7 +134,7 @@ typedef mbedtls_sha256_context my_sha256_ctx;
static CURLcode my_sha256_init(void *ctx)
{
#if !defined(HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS)
#ifndef HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS
(void)mbedtls_sha256_starts(ctx, 0);
#else
(void)mbedtls_sha256_starts_ret(ctx, 0);
@ -146,7 +146,7 @@ static void my_sha256_update(void *ctx,
const unsigned char *data,
unsigned int length)
{
#if !defined(HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS)
#ifndef HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS
(void)mbedtls_sha256_update(ctx, data, length);
#else
(void)mbedtls_sha256_update_ret(ctx, data, length);
@ -155,7 +155,7 @@ static void my_sha256_update(void *ctx,
static void my_sha256_final(unsigned char *digest, void *ctx)
{
#if !defined(HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS)
#ifndef HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS
(void)mbedtls_sha256_finish(ctx, digest);
#else
(void)mbedtls_sha256_finish_ret(ctx, digest);
@ -191,7 +191,7 @@ struct sha256_ctx {
};
typedef struct sha256_ctx my_sha256_ctx;
#if !defined(CALG_SHA_256)
#ifndef CALG_SHA_256
#define CALG_SHA_256 0x0000800c
#endif