diff --git a/lib/vquic/vquic.c b/lib/vquic/vquic.c index 1b7dc1d3aa..2a85c750d7 100644 --- a/lib/vquic/vquic.c +++ b/lib/vquic/vquic.c @@ -22,32 +22,35 @@ * ***************************************************************************/ #include "../curl_setup.h" +#include "../urldata.h" +#include "vquic.h" + +#include "../curl_trc.h" + +#if !defined(CURL_DISABLE_HTTP) && defined(USE_HTTP3) #ifdef HAVE_NETINET_UDP_H #include #endif + #ifdef USE_NGHTTP3 #include #endif -#include "../urldata.h" + #include "../bufq.h" #include "../curlx/dynbuf.h" #include "../curlx/fopen.h" #include "../cfilters.h" -#include "../curl_trc.h" #include "curl_ngtcp2.h" #include "curl_quiche.h" #include "../multiif.h" #include "../progress.h" #include "../rand.h" -#include "vquic.h" #include "vquic_int.h" #include "../curlx/strerr.h" #include "../curlx/strparse.h" -#if !defined(CURL_DISABLE_HTTP) && defined(USE_HTTP3) - #define NW_CHUNK_SIZE (64 * 1024) #define NW_SEND_CHUNKS 1 diff --git a/lib/vquic/vquic_int.h b/lib/vquic/vquic_int.h index dbe1fca777..0652f69662 100644 --- a/lib/vquic/vquic_int.h +++ b/lib/vquic/vquic_int.h @@ -25,10 +25,10 @@ ***************************************************************************/ #include "../curl_setup.h" -#include "../bufq.h" - #ifdef USE_HTTP3 +#include "../bufq.h" + #define MAX_PKT_BURST 10 #define MAX_UDP_PAYLOAD_SIZE 1452 @@ -121,8 +121,6 @@ CURLcode vquic_recv_packets(struct Curl_cfilter *cf, size_t max_pkts, vquic_recv_pkts_cb *recv_cb, void *userp); -#endif /* !USE_HTTP3 */ - #ifdef USE_NGTCP2 struct ngtcp2_mem; struct ngtcp2_mem *Curl_ngtcp2_mem(void); @@ -132,4 +130,6 @@ struct nghttp3_mem; struct nghttp3_mem *Curl_nghttp3_mem(void); #endif +#endif /* !USE_HTTP3 */ + #endif /* HEADER_CURL_VQUIC_QUIC_INT_H */ diff --git a/lib/vssh/ssh.h b/lib/vssh/ssh.h index 78889bf60e..45740ecdad 100644 --- a/lib/vssh/ssh.h +++ b/lib/vssh/ssh.h @@ -24,6 +24,7 @@ * ***************************************************************************/ #include "../curl_setup.h" +#include "../urldata.h" extern const struct Curl_protocol Curl_protocol_sftp; extern const struct Curl_protocol Curl_protocol_scp; @@ -31,6 +32,8 @@ extern const struct Curl_protocol Curl_protocol_scp; extern const struct Curl_scheme Curl_scheme_sftp; extern const struct Curl_scheme Curl_scheme_scp; +#ifdef USE_SSH + #ifdef USE_LIBSSH2 #include #include @@ -236,8 +239,6 @@ struct ssh_conn { #endif /* USE_LIBSSH2 */ -#ifdef USE_SSH - #ifdef CURLVERBOSE const char *Curl_ssh_statename(sshstate state); #else @@ -255,11 +256,10 @@ void Curl_ssh_cleanup(void); void Curl_ssh_version(char *buffer, size_t buflen); void Curl_ssh_attach(struct Curl_easy *data, struct connectdata *conn); -#else -/* for non-SSH builds */ +#else /* !USE_SSH */ #define Curl_ssh_cleanup() #define Curl_ssh_attach(x, y) #define Curl_ssh_init() 0 -#endif +#endif /* USE_SSH */ #endif /* HEADER_CURL_SSH_H */ diff --git a/lib/vssh/vssh.c b/lib/vssh/vssh.c index b52b09b696..7bb06a8222 100644 --- a/lib/vssh/vssh.c +++ b/lib/vssh/vssh.c @@ -22,10 +22,11 @@ * ***************************************************************************/ #include "../curl_setup.h" +#include "ssh.h" + +#ifdef USE_SSH #include "vssh.h" -#include "ssh.h" -#ifdef USE_SSH #include "../curlx/strparse.h" #include "../curl_trc.h" #include "../escape.h" diff --git a/lib/vssh/vssh.h b/lib/vssh/vssh.h index 4d5b7ad24e..4e1e1d8c6f 100644 --- a/lib/vssh/vssh.h +++ b/lib/vssh/vssh.h @@ -25,6 +25,8 @@ ***************************************************************************/ #include "../curl_setup.h" +#ifdef USE_SSH + #include "../urldata.h" CURLcode Curl_getworkingpath(struct Curl_easy *data, @@ -36,5 +38,5 @@ CURLcode Curl_get_pathname(const char **cpp, char **path, const char *homedir); CURLcode Curl_ssh_range(struct Curl_easy *data, const char *range, curl_off_t filesize, curl_off_t *startp, curl_off_t *sizep); - +#endif /* USE_SSH */ #endif /* HEADER_CURL_VSSH_VSSH_H */ diff --git a/lib/vtls/apple.c b/lib/vtls/apple.c index 7c2ea4989f..2717d24f60 100644 --- a/lib/vtls/apple.c +++ b/lib/vtls/apple.c @@ -40,19 +40,15 @@ #include "../curl_setup.h" +#ifdef USE_APPLE_SECTRUST + #include "../urldata.h" #include "../cfilters.h" #include "../curl_trc.h" #include "vtls.h" #include "apple.h" -#ifdef USE_APPLE_SECTRUST #include -#endif - - -#ifdef USE_APPLE_SECTRUST -#define SSL_SYSTEM_VERIFIER #if (defined(MAC_OS_X_VERSION_MAX_ALLOWED) && \ MAC_OS_X_VERSION_MAX_ALLOWED >= 101400) || \ diff --git a/lib/vtls/schannel_verify.c b/lib/vtls/schannel_verify.c index 0b5cd2d662..6550899b03 100644 --- a/lib/vtls/schannel_verify.c +++ b/lib/vtls/schannel_verify.c @@ -30,6 +30,7 @@ #include "../curl_setup.h" #ifdef USE_SCHANNEL + #ifndef USE_WINDOWS_SSPI #error "cannot compile Schannel support without SSPI." #endif diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c index 8c87dd3d9c..8df23a6660 100644 --- a/lib/vtls/vtls.c +++ b/lib/vtls/vtls.c @@ -147,7 +147,7 @@ static const struct alpn_spec ALPN_SPEC_H2_H11 = { static const struct alpn_spec ALPN_SPEC_H11_H2 = { { ALPN_HTTP_1_1, ALPN_H2 }, 2 }; -#endif +#endif /* USE_HTTP2 */ #if !defined(CURL_DISABLE_HTTP) || !defined(CURL_DISABLE_PROXY) static const struct alpn_spec *alpn_get_spec(http_majors wanted, diff --git a/lib/vtls/vtls_int.h b/lib/vtls/vtls_int.h index bbcf905035..48674eded6 100644 --- a/lib/vtls/vtls_int.h +++ b/lib/vtls/vtls_int.h @@ -25,13 +25,13 @@ ***************************************************************************/ #include "../curl_setup.h" +#ifdef USE_SSL + #include "../cfilters.h" #include "../select.h" #include "../urldata.h" #include "vtls.h" -#ifdef USE_SSL - struct Curl_ssl; struct ssl_connect_data; struct Curl_ssl_session; diff --git a/lib/vtls/vtls_scache.h b/lib/vtls/vtls_scache.h index 2a99e779e5..410fe656e0 100644 --- a/lib/vtls/vtls_scache.h +++ b/lib/vtls/vtls_scache.h @@ -25,11 +25,11 @@ ***************************************************************************/ #include "../curl_setup.h" +#ifdef USE_SSL + #include "../cfilters.h" #include "../urldata.h" -#ifdef USE_SSL - struct Curl_cfilter; struct Curl_easy; struct Curl_ssl_scache;