mirror of
https://github.com/curl/curl.git
synced 2026-07-23 17:57:17 +03:00
checksrc: ensure using ifdef/ifndef when possible, fix fallouts
Follow-up to 89771d19d5 #18018
Closes #20065
This commit is contained in:
parent
e8415a8296
commit
4ad87f2cb8
9 changed files with 30 additions and 11 deletions
|
|
@ -30,7 +30,7 @@
|
|||
#include "amigaos.h"
|
||||
|
||||
#ifdef HAVE_PROTO_BSDSOCKET_H
|
||||
# if defined(__amigaos4__)
|
||||
# ifdef __amigaos4__
|
||||
# include <bsdsocket/socketbasetags.h>
|
||||
# elif !defined(USE_AMISSL)
|
||||
# include <amitcp/socketbasetags.h>
|
||||
|
|
|
|||
|
|
@ -521,7 +521,7 @@ static CURLcode setopt_bool(struct Curl_easy *data, CURLoption option,
|
|||
case CURLOPT_HTTP09_ALLOWED:
|
||||
s->http09_allowed = enabled;
|
||||
break;
|
||||
#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
|
||||
|
|
|
|||
|
|
@ -1527,7 +1527,7 @@ const struct Curl_handler *Curl_getn_scheme_handler(const char *scheme,
|
|||
#else
|
||||
NULL,
|
||||
#endif
|
||||
#if defined(USE_SSH)
|
||||
#ifdef USE_SSH
|
||||
&Curl_handler_scp,
|
||||
#else
|
||||
NULL,
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ static CURLcode sftp_error_to_CURLE(int err)
|
|||
return CURLE_SSH;
|
||||
}
|
||||
|
||||
#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
|
||||
#ifndef CURL_DISABLE_VERBOSE_STRINGS
|
||||
static const char *myssh_statename(sshstate state)
|
||||
{
|
||||
static const char * const names[] = {
|
||||
|
|
@ -287,7 +287,7 @@ static void myssh_set_state(struct Curl_easy *data,
|
|||
struct ssh_conn *sshc,
|
||||
sshstate nowstate)
|
||||
{
|
||||
#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
|
||||
#ifndef CURL_DISABLE_VERBOSE_STRINGS
|
||||
if(sshc->state != nowstate) {
|
||||
CURL_TRC_SSH(data, "[%s] -> [%s]",
|
||||
myssh_statename(sshc->state),
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ static LIBSSH2_FREE_FUNC(my_libssh2_free)
|
|||
Curl_cfree(ptr);
|
||||
}
|
||||
|
||||
#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
|
||||
#ifndef CURL_DISABLE_VERBOSE_STRINGS
|
||||
static const char *myssh_statename(sshstate state)
|
||||
{
|
||||
static const char * const names[] = {
|
||||
|
|
@ -357,7 +357,7 @@ static void myssh_set_state(struct Curl_easy *data,
|
|||
struct ssh_conn *sshc,
|
||||
sshstate nowstate)
|
||||
{
|
||||
#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
|
||||
#ifndef CURL_DISABLE_VERBOSE_STRINGS
|
||||
if(sshc->state != nowstate) {
|
||||
CURL_TRC_SSH(data, "[%s] -> [%s]",
|
||||
myssh_statename(sshc->state),
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ CURLcode Curl_vtls_apple_verify(struct Curl_cfilter *cf,
|
|||
#endif
|
||||
|
||||
#ifdef SUPPORTS_SecTrustEvaluateWithError
|
||||
#if defined(HAVE_BUILTIN_AVAILABLE)
|
||||
#ifdef HAVE_BUILTIN_AVAILABLE
|
||||
if(__builtin_available(macOS 10.14, iOS 12, tvOS 12, watchOS 5, *)) {
|
||||
#else
|
||||
if(1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue