From: Daniel Stenberg Date: Tue, 8 Apr 2025 06:00:12 +0000 (+0200) Subject: lib: include files using known path X-Git-Tag: curl-8_14_0~334 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=625f2c1644da58b9617479775badea21f125ce6d;p=thirdparty%2Fcurl.git lib: include files using known path by including headers using "../[header]" when done from C files in subdirectories, we do not need to specify the lib source dir as an include path and we reduce the risk of header name collisions with headers in the SDK using the same file names. Idea-by: Kai Pastor Ref: #16949 Closes #16991 --- diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 47641271f2..8369138833 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -36,10 +36,7 @@ list(APPEND HHEADERS "${CMAKE_CURRENT_BINARY_DIR}/curl_config.h") # The rest of the build -include_directories( - "${PROJECT_BINARY_DIR}/lib" # for "curl_config.h" - "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h" -) +include_directories("${PROJECT_BINARY_DIR}/lib") # for "curl_config.h" if(USE_ARES) include_directories(SYSTEM ${CARES_INCLUDE_DIRS}) endif() diff --git a/lib/Makefile.am b/lib/Makefile.am index c810129ed7..9ce95eaee8 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -50,11 +50,9 @@ CFLAGS += @CURL_CFLAG_EXTRAS@ # # $(top_srcdir)/include is for libcurl's external include files # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file -# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "private" files AM_CPPFLAGS = -I$(top_srcdir)/include \ - -I$(top_builddir)/lib \ - -I$(top_srcdir)/lib + -I$(top_builddir)/lib # Prevent LIBS from being used for all link targets LIBS = $(BLANK_AT_MAKETIME) @@ -162,10 +160,8 @@ CS_1 = CS_ = $(CS_0) checksrc: - $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \ - -W$(srcdir)/libcurl_unity.c -W$(srcdir)/curl_config.h $(srcdir)/*.[ch] \ - $(srcdir)/vauth/*.[ch] $(srcdir)/vtls/*.[ch] $(srcdir)/vquic/*.[ch] \ - $(srcdir)/vssh/*.[ch]) + $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \ + $(CSOURCES) $(HHEADERS)) if DEBUGBUILD # for debug builds, we scan the sources on all regular make invokes diff --git a/lib/vauth/cleartext.c b/lib/vauth/cleartext.c index 9dfefa3afc..4811394e19 100644 --- a/lib/vauth/cleartext.c +++ b/lib/vauth/cleartext.c @@ -25,23 +25,23 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if !defined(CURL_DISABLE_IMAP) || !defined(CURL_DISABLE_SMTP) || \ !defined(CURL_DISABLE_POP3) || \ (!defined(CURL_DISABLE_LDAP) && defined(USE_OPENLDAP)) #include -#include "urldata.h" +#include "../urldata.h" -#include "vauth/vauth.h" -#include "warnless.h" -#include "sendf.h" -#include "curl_printf.h" +#include "vauth.h" +#include "../warnless.h" +#include "../sendf.h" +#include "../curl_printf.h" /* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" /* * Curl_auth_create_plain_message() diff --git a/lib/vauth/cram.c b/lib/vauth/cram.c index c51c7285b4..d39b69a393 100644 --- a/lib/vauth/cram.c +++ b/lib/vauth/cram.c @@ -24,22 +24,22 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifndef CURL_DISABLE_DIGEST_AUTH #include -#include "urldata.h" +#include "../urldata.h" -#include "vauth/vauth.h" -#include "curl_hmac.h" -#include "curl_md5.h" -#include "warnless.h" -#include "curl_printf.h" +#include "vauth.h" +#include "../curl_hmac.h" +#include "../curl_md5.h" +#include "../warnless.h" +#include "../curl_printf.h" /* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" /* diff --git a/lib/vauth/digest.c b/lib/vauth/digest.c index 024b7bb01a..d0b7687c04 100644 --- a/lib/vauth/digest.c +++ b/lib/vauth/digest.c @@ -25,30 +25,30 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifndef CURL_DISABLE_DIGEST_AUTH #include -#include "vauth/vauth.h" -#include "vauth/digest.h" -#include "urldata.h" -#include "curl_base64.h" -#include "curl_hmac.h" -#include "curl_md5.h" -#include "curl_sha256.h" -#include "curl_sha512_256.h" -#include "vtls/vtls.h" -#include "warnless.h" -#include "strparse.h" -#include "strcase.h" -#include "curl_printf.h" -#include "rand.h" +#include "vauth.h" +#include "digest.h" +#include "../urldata.h" +#include "../curl_base64.h" +#include "../curl_hmac.h" +#include "../curl_md5.h" +#include "../curl_sha256.h" +#include "../curl_sha512_256.h" +#include "../vtls/vtls.h" +#include "../warnless.h" +#include "../strparse.h" +#include "../strcase.h" +#include "../curl_printf.h" +#include "../rand.h" /* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" #ifndef USE_WINDOWS_SSPI #define SESSION_ALGO 1 /* for algos with this bit set */ diff --git a/lib/vauth/digest_sspi.c b/lib/vauth/digest_sspi.c index ff8453541f..d3e9a23e62 100644 --- a/lib/vauth/digest_sspi.c +++ b/lib/vauth/digest_sspi.c @@ -25,25 +25,25 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(USE_WINDOWS_SSPI) && !defined(CURL_DISABLE_DIGEST_AUTH) #include -#include "vauth/vauth.h" -#include "vauth/digest.h" -#include "urldata.h" -#include "warnless.h" -#include "curl_multibyte.h" -#include "sendf.h" -#include "strdup.h" -#include "strcase.h" -#include "strerror.h" +#include "vauth.h" +#include "digest.h" +#include "../urldata.h" +#include "../warnless.h" +#include "../curl_multibyte.h" +#include "../sendf.h" +#include "../strdup.h" +#include "../strcase.h" +#include "../strerror.h" /* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" /* * Curl_auth_is_digest_supported() diff --git a/lib/vauth/gsasl.c b/lib/vauth/gsasl.c index ee11b6039d..3684c8f4b2 100644 --- a/lib/vauth/gsasl.c +++ b/lib/vauth/gsasl.c @@ -24,22 +24,22 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_GSASL #include -#include "vauth/vauth.h" -#include "urldata.h" -#include "sendf.h" +#include "vauth.h" +#include "../urldata.h" +#include "../sendf.h" #include /* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_printf.h" +#include "../curl_memory.h" +#include "../memdebug.h" bool Curl_auth_gsasl_is_supported(struct Curl_easy *data, const char *mech, diff --git a/lib/vauth/krb5_gssapi.c b/lib/vauth/krb5_gssapi.c index 3d06a472b2..b559040617 100644 --- a/lib/vauth/krb5_gssapi.c +++ b/lib/vauth/krb5_gssapi.c @@ -25,22 +25,22 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(HAVE_GSSAPI) && defined(USE_KERBEROS5) #include -#include "vauth/vauth.h" -#include "curl_sasl.h" -#include "urldata.h" -#include "curl_gssapi.h" -#include "sendf.h" -#include "curl_printf.h" +#include "vauth.h" +#include "../curl_sasl.h" +#include "../urldata.h" +#include "../curl_gssapi.h" +#include "../sendf.h" +#include "../curl_printf.h" /* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" #if defined(__GNUC__) && defined(__APPLE__) #pragma GCC diagnostic push diff --git a/lib/vauth/krb5_sspi.c b/lib/vauth/krb5_sspi.c index 2b785538ba..f9abd952a5 100644 --- a/lib/vauth/krb5_sspi.c +++ b/lib/vauth/krb5_sspi.c @@ -24,21 +24,21 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(USE_WINDOWS_SSPI) && defined(USE_KERBEROS5) #include -#include "vauth/vauth.h" -#include "urldata.h" -#include "warnless.h" -#include "curl_multibyte.h" -#include "sendf.h" +#include "vauth.h" +#include "../urldata.h" +#include "../warnless.h" +#include "../curl_multibyte.h" +#include "../sendf.h" /* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" /* * Curl_auth_is_gssapi_supported() diff --git a/lib/vauth/ntlm.c b/lib/vauth/ntlm.c index 30298af1dd..46633ae1e6 100644 --- a/lib/vauth/ntlm.c +++ b/lib/vauth/ntlm.c @@ -22,7 +22,7 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(USE_NTLM) && !defined(USE_WINDOWS_SSPI) @@ -35,24 +35,24 @@ #define DEBUG_ME 0 -#include "urldata.h" -#include "sendf.h" -#include "curl_ntlm_core.h" -#include "curl_gethostname.h" -#include "curl_multibyte.h" -#include "curl_md5.h" -#include "warnless.h" -#include "rand.h" -#include "vtls/vtls.h" -#include "strdup.h" - -#include "vauth/vauth.h" -#include "curl_endian.h" -#include "curl_printf.h" +#include "../urldata.h" +#include "../sendf.h" +#include "../curl_ntlm_core.h" +#include "../curl_gethostname.h" +#include "../curl_multibyte.h" +#include "../curl_md5.h" +#include "../warnless.h" +#include "../rand.h" +#include "../vtls/vtls.h" +#include "../strdup.h" + +#include "vauth.h" +#include "../curl_endian.h" +#include "../curl_printf.h" /* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" /* NTLM buffer fixed size, large enough for long user + host + domain */ diff --git a/lib/vauth/ntlm_sspi.c b/lib/vauth/ntlm_sspi.c index 1bc4b2fd25..0e6651a3af 100644 --- a/lib/vauth/ntlm_sspi.c +++ b/lib/vauth/ntlm_sspi.c @@ -22,23 +22,23 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(USE_WINDOWS_SSPI) && defined(USE_NTLM) #include -#include "vauth/vauth.h" -#include "urldata.h" -#include "curl_ntlm_core.h" -#include "warnless.h" -#include "curl_multibyte.h" -#include "sendf.h" -#include "strdup.h" +#include "vauth.h" +#include "../urldata.h" +#include "../curl_ntlm_core.h" +#include "../warnless.h" +#include "../curl_multibyte.h" +#include "../sendf.h" +#include "../strdup.h" /* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" /* * Curl_auth_is_ntlm_supported() diff --git a/lib/vauth/oauth2.c b/lib/vauth/oauth2.c index dc94afa365..dec2d0b2aa 100644 --- a/lib/vauth/oauth2.c +++ b/lib/vauth/oauth2.c @@ -24,22 +24,22 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if !defined(CURL_DISABLE_IMAP) || !defined(CURL_DISABLE_SMTP) || \ !defined(CURL_DISABLE_POP3) || \ (!defined(CURL_DISABLE_LDAP) && defined(USE_OPENLDAP)) #include -#include "urldata.h" +#include "../urldata.h" -#include "vauth/vauth.h" -#include "warnless.h" -#include "curl_printf.h" +#include "vauth.h" +#include "../warnless.h" +#include "../curl_printf.h" /* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" /* * Curl_auth_create_oauth_bearer_message() diff --git a/lib/vauth/spnego_gssapi.c b/lib/vauth/spnego_gssapi.c index eb415183e8..0b4a7b6d2e 100644 --- a/lib/vauth/spnego_gssapi.c +++ b/lib/vauth/spnego_gssapi.c @@ -24,23 +24,23 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(HAVE_GSSAPI) && defined(USE_SPNEGO) #include -#include "vauth/vauth.h" -#include "urldata.h" -#include "curl_base64.h" -#include "curl_gssapi.h" -#include "warnless.h" -#include "curl_multibyte.h" -#include "sendf.h" +#include "vauth.h" +#include "../urldata.h" +#include "../curl_base64.h" +#include "../curl_gssapi.h" +#include "../warnless.h" +#include "../curl_multibyte.h" +#include "../sendf.h" /* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" #if defined(__GNUC__) && defined(__APPLE__) #pragma GCC diagnostic push diff --git a/lib/vauth/spnego_sspi.c b/lib/vauth/spnego_sspi.c index 9d7333c5b1..8603098fc1 100644 --- a/lib/vauth/spnego_sspi.c +++ b/lib/vauth/spnego_sspi.c @@ -24,23 +24,23 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(USE_WINDOWS_SSPI) && defined(USE_SPNEGO) #include -#include "vauth/vauth.h" -#include "urldata.h" -#include "curl_base64.h" -#include "warnless.h" -#include "curl_multibyte.h" -#include "sendf.h" -#include "strerror.h" +#include "vauth.h" +#include "../urldata.h" +#include "../curl_base64.h" +#include "../warnless.h" +#include "../curl_multibyte.h" +#include "../sendf.h" +#include "../strerror.h" /* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" /* * Curl_auth_is_spnego_supported() diff --git a/lib/vauth/vauth.c b/lib/vauth/vauth.c index 171e53fb13..56854863ec 100644 --- a/lib/vauth/vauth.c +++ b/lib/vauth/vauth.c @@ -22,19 +22,19 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #include #include "vauth.h" -#include "urldata.h" -#include "strcase.h" -#include "curl_multibyte.h" -#include "curl_printf.h" +#include "../urldata.h" +#include "../strcase.h" +#include "../curl_multibyte.h" +#include "../curl_printf.h" /* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" /* * Curl_auth_build_spn() diff --git a/lib/vauth/vauth.h b/lib/vauth/vauth.h index 7e823484f6..7ff0b05595 100644 --- a/lib/vauth/vauth.h +++ b/lib/vauth/vauth.h @@ -26,7 +26,7 @@ #include -#include "bufref.h" +#include "../bufref.h" struct Curl_easy; diff --git a/lib/vquic/curl_msh3.c b/lib/vquic/curl_msh3.c index a5f2785b96..d473b3a19f 100644 --- a/lib/vquic/curl_msh3.c +++ b/lib/vquic/curl_msh3.c @@ -22,31 +22,31 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_MSH3 -#include "urldata.h" -#include "hash.h" -#include "hash_offt.h" -#include "timeval.h" -#include "multiif.h" -#include "sendf.h" -#include "curl_trc.h" -#include "cfilters.h" -#include "cf-socket.h" -#include "connect.h" -#include "progress.h" -#include "http1.h" +#include "../urldata.h" +#include "../hash.h" +#include "../hash_offt.h" +#include "../timeval.h" +#include "../multiif.h" +#include "../sendf.h" +#include "../curl_trc.h" +#include "../cfilters.h" +#include "../cf-socket.h" +#include "../connect.h" +#include "../progress.h" +#include "../http1.h" #include "curl_msh3.h" -#include "socketpair.h" -#include "vtls/vtls.h" -#include "vquic/vquic.h" +#include "../socketpair.h" +#include "../vtls/vtls.h" +#include "vquic.h" /* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_printf.h" +#include "../curl_memory.h" +#include "../memdebug.h" #ifdef CURL_DISABLE_SOCKETPAIR #error "MSH3 cannot be build with CURL_DISABLE_SOCKETPAIR set" diff --git a/lib/vquic/curl_msh3.h b/lib/vquic/curl_msh3.h index 33931f59bb..d2862c2d89 100644 --- a/lib/vquic/curl_msh3.h +++ b/lib/vquic/curl_msh3.h @@ -24,7 +24,7 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_MSH3 diff --git a/lib/vquic/curl_ngtcp2.c b/lib/vquic/curl_ngtcp2.c index f96cc80420..0d30cde4aa 100644 --- a/lib/vquic/curl_ngtcp2.c +++ b/lib/vquic/curl_ngtcp2.c @@ -22,7 +22,7 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(USE_NGTCP2) && defined(USE_NGHTTP3) #include @@ -35,46 +35,46 @@ #else #include #endif -#include "vtls/openssl.h" +#include "../vtls/openssl.h" #elif defined(USE_GNUTLS) #include -#include "vtls/gtls.h" +#include "../vtls/gtls.h" #elif defined(USE_WOLFSSL) #include -#include "vtls/wolfssl.h" +#include "../vtls/wolfssl.h" #endif -#include "urldata.h" -#include "hash_offt.h" -#include "sendf.h" -#include "strdup.h" -#include "rand.h" -#include "multiif.h" -#include "strcase.h" -#include "cfilters.h" -#include "cf-socket.h" -#include "connect.h" -#include "progress.h" -#include "strerror.h" -#include "dynbuf.h" -#include "http1.h" -#include "select.h" -#include "inet_pton.h" -#include "transfer.h" +#include "../urldata.h" +#include "../hash_offt.h" +#include "../sendf.h" +#include "../strdup.h" +#include "../rand.h" +#include "../multiif.h" +#include "../strcase.h" +#include "../cfilters.h" +#include "../cf-socket.h" +#include "../connect.h" +#include "../progress.h" +#include "../strerror.h" +#include "../dynbuf.h" +#include "../http1.h" +#include "../select.h" +#include "../inet_pton.h" +#include "../transfer.h" #include "vquic.h" #include "vquic_int.h" #include "vquic-tls.h" -#include "vtls/keylog.h" -#include "vtls/vtls.h" -#include "vtls/vtls_scache.h" +#include "../vtls/keylog.h" +#include "../vtls/vtls.h" +#include "../vtls/vtls_scache.h" #include "curl_ngtcp2.h" -#include "warnless.h" +#include "../warnless.h" /* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_printf.h" +#include "../curl_memory.h" +#include "../memdebug.h" #define QUIC_MAX_STREAMS (256*1024) diff --git a/lib/vquic/curl_ngtcp2.h b/lib/vquic/curl_ngtcp2.h index db3e611bd0..f653b8033e 100644 --- a/lib/vquic/curl_ngtcp2.h +++ b/lib/vquic/curl_ngtcp2.h @@ -24,7 +24,7 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(USE_NGTCP2) && defined(USE_NGHTTP3) @@ -44,7 +44,7 @@ struct Curl_cfilter; -#include "urldata.h" +#include "../urldata.h" void Curl_ngtcp2_ver(char *p, size_t len); diff --git a/lib/vquic/curl_osslq.c b/lib/vquic/curl_osslq.c index cca0ed7d0b..c2d069894d 100644 --- a/lib/vquic/curl_osslq.c +++ b/lib/vquic/curl_osslq.c @@ -22,7 +22,7 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(USE_OPENSSL_QUIC) && defined(USE_NGHTTP3) @@ -31,36 +31,36 @@ #include #include -#include "urldata.h" -#include "hash.h" -#include "sendf.h" -#include "strdup.h" -#include "rand.h" -#include "multiif.h" -#include "strcase.h" -#include "cfilters.h" -#include "cf-socket.h" -#include "connect.h" -#include "progress.h" -#include "strerror.h" -#include "dynbuf.h" -#include "http1.h" -#include "select.h" -#include "inet_pton.h" +#include "../urldata.h" +#include "../hash.h" +#include "../sendf.h" +#include "../strdup.h" +#include "../rand.h" +#include "../multiif.h" +#include "../strcase.h" +#include "../cfilters.h" +#include "../cf-socket.h" +#include "../connect.h" +#include "../progress.h" +#include "../strerror.h" +#include "../dynbuf.h" +#include "../http1.h" +#include "../select.h" +#include "../inet_pton.h" #include "vquic.h" #include "vquic_int.h" #include "vquic-tls.h" -#include "vtls/keylog.h" -#include "vtls/vtls.h" -#include "vtls/openssl.h" +#include "../vtls/keylog.h" +#include "../vtls/vtls.h" +#include "../vtls/openssl.h" #include "curl_osslq.h" -#include "warnless.h" +#include "../warnless.h" /* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_printf.h" +#include "../curl_memory.h" +#include "../memdebug.h" /* A stream window is the maximum amount we need to buffer for * each active transfer. We use HTTP/3 flow control and only ACK diff --git a/lib/vquic/curl_osslq.h b/lib/vquic/curl_osslq.h index 0e12d7023e..a2809c92bc 100644 --- a/lib/vquic/curl_osslq.h +++ b/lib/vquic/curl_osslq.h @@ -24,7 +24,7 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(USE_OPENSSL_QUIC) && defined(USE_NGHTTP3) @@ -34,7 +34,7 @@ struct Curl_cfilter; -#include "urldata.h" +#include "../urldata.h" void Curl_osslq_ver(char *p, size_t len); diff --git a/lib/vquic/curl_quiche.c b/lib/vquic/curl_quiche.c index 4e4c07a965..d48f783026 100644 --- a/lib/vquic/curl_quiche.c +++ b/lib/vquic/curl_quiche.c @@ -22,40 +22,40 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_QUICHE #include #include #include -#include "bufq.h" -#include "hash_offt.h" -#include "urldata.h" -#include "cfilters.h" -#include "cf-socket.h" -#include "sendf.h" -#include "strdup.h" -#include "rand.h" -#include "strcase.h" -#include "multiif.h" -#include "connect.h" -#include "progress.h" -#include "strerror.h" -#include "http1.h" +#include "../bufq.h" +#include "../hash_offt.h" +#include "../urldata.h" +#include "../cfilters.h" +#include "../cf-socket.h" +#include "../sendf.h" +#include "../strdup.h" +#include "../rand.h" +#include "../strcase.h" +#include "../multiif.h" +#include "../connect.h" +#include "../progress.h" +#include "../strerror.h" +#include "../http1.h" #include "vquic.h" #include "vquic_int.h" #include "vquic-tls.h" #include "curl_quiche.h" -#include "transfer.h" -#include "inet_pton.h" -#include "vtls/openssl.h" -#include "vtls/keylog.h" -#include "vtls/vtls.h" +#include "../transfer.h" +#include "../inet_pton.h" +#include "../vtls/openssl.h" +#include "../vtls/keylog.h" +#include "../vtls/vtls.h" /* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_printf.h" +#include "../curl_memory.h" +#include "../memdebug.h" /* HTTP/3 error values defined in RFC 9114, ch. 8.1 */ #define CURL_H3_NO_ERROR (0x0100) diff --git a/lib/vquic/curl_quiche.h b/lib/vquic/curl_quiche.h index bce781c1bc..9832687bdc 100644 --- a/lib/vquic/curl_quiche.h +++ b/lib/vquic/curl_quiche.h @@ -24,7 +24,7 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_QUICHE diff --git a/lib/vquic/vquic-tls.c b/lib/vquic/vquic-tls.c index ec792a65a2..fa29d2e3dc 100644 --- a/lib/vquic/vquic-tls.c +++ b/lib/vquic/vquic-tls.c @@ -22,41 +22,41 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(USE_HTTP3) && \ (defined(USE_OPENSSL) || defined(USE_GNUTLS) || defined(USE_WOLFSSL)) #ifdef USE_OPENSSL #include -#include "vtls/openssl.h" +#include "../vtls/openssl.h" #elif defined(USE_GNUTLS) #include #include #include #include #include -#include "vtls/gtls.h" +#include "../vtls/gtls.h" #elif defined(USE_WOLFSSL) #include #include #include -#include "vtls/wolfssl.h" +#include "../vtls/wolfssl.h" #endif -#include "urldata.h" -#include "curl_trc.h" -#include "cfilters.h" -#include "multiif.h" -#include "vtls/keylog.h" -#include "vtls/vtls.h" -#include "vtls/vtls_scache.h" +#include "../urldata.h" +#include "../curl_trc.h" +#include "../cfilters.h" +#include "../multiif.h" +#include "../vtls/keylog.h" +#include "../vtls/vtls.h" +#include "../vtls/vtls_scache.h" #include "vquic-tls.h" /* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_printf.h" +#include "../curl_memory.h" +#include "../memdebug.h" CURLcode Curl_vquic_tls_init(struct curl_tls_ctx *ctx, struct Curl_cfilter *cf, diff --git a/lib/vquic/vquic-tls.h b/lib/vquic/vquic-tls.h index 453f876929..bf29eecc91 100644 --- a/lib/vquic/vquic-tls.h +++ b/lib/vquic/vquic-tls.h @@ -24,16 +24,16 @@ * ***************************************************************************/ -#include "curl_setup.h" -#include "bufq.h" -#include "vtls/vtls.h" -#include "vtls/vtls_int.h" -#include "vtls/openssl.h" +#include "../curl_setup.h" +#include "../bufq.h" +#include "../vtls/vtls.h" +#include "../vtls/vtls_int.h" +#include "../vtls/openssl.h" #if defined(USE_HTTP3) && \ (defined(USE_OPENSSL) || defined(USE_GNUTLS) || defined(USE_WOLFSSL)) -#include "vtls/wolfssl.h" +#include "../vtls/wolfssl.h" struct ssl_peer; struct Curl_ssl_session; diff --git a/lib/vquic/vquic.c b/lib/vquic/vquic.c index eb08ce7a22..9f2361f885 100644 --- a/lib/vquic/vquic.c +++ b/lib/vquic/vquic.c @@ -22,7 +22,7 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef HAVE_NETINET_UDP_H #include @@ -30,26 +30,26 @@ #ifdef HAVE_FCNTL_H #include #endif -#include "urldata.h" -#include "bufq.h" -#include "dynbuf.h" -#include "cfilters.h" -#include "curl_trc.h" +#include "../urldata.h" +#include "../bufq.h" +#include "../dynbuf.h" +#include "../cfilters.h" +#include "../curl_trc.h" #include "curl_msh3.h" #include "curl_ngtcp2.h" #include "curl_osslq.h" #include "curl_quiche.h" -#include "multiif.h" -#include "rand.h" +#include "../multiif.h" +#include "../rand.h" #include "vquic.h" #include "vquic_int.h" -#include "strerror.h" -#include "strparse.h" +#include "../strerror.h" +#include "../strparse.h" /* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_printf.h" +#include "../curl_memory.h" +#include "../memdebug.h" #ifdef USE_HTTP3 diff --git a/lib/vquic/vquic.h b/lib/vquic/vquic.h index 1cd3e258f4..2c8f89114e 100644 --- a/lib/vquic/vquic.h +++ b/lib/vquic/vquic.h @@ -24,7 +24,7 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_HTTP3 struct Curl_cfilter; diff --git a/lib/vquic/vquic_int.h b/lib/vquic/vquic_int.h index 754e1f5910..894b7695c8 100644 --- a/lib/vquic/vquic_int.h +++ b/lib/vquic/vquic_int.h @@ -24,8 +24,8 @@ * ***************************************************************************/ -#include "curl_setup.h" -#include "bufq.h" +#include "../curl_setup.h" +#include "../bufq.h" #ifdef USE_HTTP3 diff --git a/lib/vssh/curl_path.c b/lib/vssh/curl_path.c index 61452a4252..caff85b646 100644 --- a/lib/vssh/curl_path.c +++ b/lib/vssh/curl_path.c @@ -22,15 +22,15 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(USE_SSH) #include "curl_path.h" #include -#include "curl_memory.h" -#include "escape.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../escape.h" +#include "../memdebug.h" #define MAX_SSHPATH_LEN 100000 /* arbitrary */ diff --git a/lib/vssh/curl_path.h b/lib/vssh/curl_path.h index 8e984174d7..1c167f9660 100644 --- a/lib/vssh/curl_path.h +++ b/lib/vssh/curl_path.h @@ -24,9 +24,9 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #include -#include "urldata.h" +#include "../urldata.h" CURLcode Curl_getworkingpath(struct Curl_easy *data, char *homedir, diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c index b20f82adbb..7ed4fbe3ea 100644 --- a/lib/vssh/libssh.c +++ b/lib/vssh/libssh.c @@ -25,7 +25,7 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_LIBSSH @@ -46,29 +46,29 @@ #endif #include -#include "urldata.h" -#include "sendf.h" -#include "hostip.h" -#include "progress.h" -#include "transfer.h" -#include "escape.h" -#include "http.h" /* for HTTP proxy tunnel stuff */ +#include "../urldata.h" +#include "../sendf.h" +#include "../hostip.h" +#include "../progress.h" +#include "../transfer.h" +#include "../escape.h" +#include "../http.h" /* for HTTP proxy tunnel stuff */ #include "ssh.h" -#include "url.h" -#include "speedcheck.h" -#include "getinfo.h" -#include "strdup.h" -#include "strcase.h" -#include "vtls/vtls.h" -#include "cfilters.h" -#include "connect.h" -#include "inet_ntop.h" -#include "parsedate.h" /* for the week day and month names */ -#include "sockaddr.h" /* required for Curl_sockaddr_storage */ -#include "strparse.h" -#include "multiif.h" -#include "select.h" -#include "warnless.h" +#include "../url.h" +#include "../speedcheck.h" +#include "../getinfo.h" +#include "../strdup.h" +#include "../strcase.h" +#include "../vtls/vtls.h" +#include "../cfilters.h" +#include "../connect.h" +#include "../inet_ntop.h" +#include "../parsedate.h" /* for the week day and month names */ +#include "../sockaddr.h" /* required for Curl_sockaddr_storage */ +#include "../strparse.h" +#include "../multiif.h" +#include "../select.h" +#include "../warnless.h" #include "curl_path.h" #ifdef HAVE_SYS_STAT_H @@ -82,9 +82,9 @@ #endif /* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_printf.h" +#include "../curl_memory.h" +#include "../memdebug.h" /* A recent macro provided by libssh. Or make our own. */ #ifndef SSH_STRING_FREE_CHAR diff --git a/lib/vssh/libssh2.c b/lib/vssh/libssh2.c index 58372478f1..ce95e8ddf9 100644 --- a/lib/vssh/libssh2.c +++ b/lib/vssh/libssh2.c @@ -24,7 +24,7 @@ /* #define CURL_LIBSSH2_DEBUG */ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_LIBSSH2 @@ -49,38 +49,37 @@ #endif #include -#include "urldata.h" -#include "sendf.h" -#include "hostip.h" -#include "progress.h" -#include "transfer.h" -#include "escape.h" -#include "http.h" /* for HTTP proxy tunnel stuff */ +#include "../urldata.h" +#include "../sendf.h" +#include "../hostip.h" +#include "../progress.h" +#include "../transfer.h" +#include "../escape.h" +#include "../http.h" /* for HTTP proxy tunnel stuff */ #include "ssh.h" -#include "url.h" -#include "speedcheck.h" -#include "getinfo.h" -#include "strdup.h" -#include "strcase.h" -#include "vtls/vtls.h" -#include "cfilters.h" -#include "connect.h" -#include "inet_ntop.h" -#include "parsedate.h" /* for the week day and month names */ -#include "sockaddr.h" /* required for Curl_sockaddr_storage */ -#include "multiif.h" -#include "select.h" -#include "warnless.h" +#include "../url.h" +#include "../speedcheck.h" +#include "../getinfo.h" +#include "../strdup.h" +#include "../strcase.h" +#include "../vtls/vtls.h" +#include "../cfilters.h" +#include "../connect.h" +#include "../inet_ntop.h" +#include "../parsedate.h" /* for the week day and month names */ +#include "../sockaddr.h" /* required for Curl_sockaddr_storage */ +#include "../multiif.h" +#include "../select.h" +#include "../warnless.h" #include "curl_path.h" -#include "strparse.h" -#include /* for base64 encoding/decoding */ -#include - +#include "../strparse.h" +#include "../curl_base64.h" /* for base64 encoding/decoding */ +#include "../curl_sha256.h" /* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_printf.h" +#include "../curl_memory.h" +#include "../memdebug.h" /* Local functions: */ static const char *sftp_libssh2_strerror(unsigned long err); diff --git a/lib/vssh/ssh.h b/lib/vssh/ssh.h index e882ff3d33..3c88c4e0b0 100644 --- a/lib/vssh/ssh.h +++ b/lib/vssh/ssh.h @@ -24,7 +24,7 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(USE_LIBSSH2) #include diff --git a/lib/vssh/wolfssh.c b/lib/vssh/wolfssh.c index 031b55da91..2b81e56969 100644 --- a/lib/vssh/wolfssh.c +++ b/lib/vssh/wolfssh.c @@ -22,29 +22,29 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_WOLFSSH #include -#include "urldata.h" -#include "cfilters.h" -#include "connect.h" -#include "sendf.h" -#include "progress.h" +#include "../urldata.h" +#include "../cfilters.h" +#include "../connect.h" +#include "../sendf.h" +#include "../progress.h" #include "curl_path.h" -#include "transfer.h" -#include "speedcheck.h" -#include "select.h" -#include "multiif.h" -#include "warnless.h" -#include "strdup.h" +#include "../transfer.h" +#include "../speedcheck.h" +#include "../select.h" +#include "../multiif.h" +#include "../warnless.h" +#include "../strdup.h" /* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_printf.h" +#include "../curl_memory.h" +#include "../memdebug.h" static CURLcode wssh_connect(struct Curl_easy *data, bool *done); static CURLcode wssh_multi_statemach(struct Curl_easy *data, bool *done); diff --git a/lib/vtls/bearssl.c b/lib/vtls/bearssl.c index 995f97d3f9..39abf0f0c1 100644 --- a/lib/vtls/bearssl.c +++ b/lib/vtls/bearssl.c @@ -21,7 +21,7 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_BEARSSL @@ -29,20 +29,20 @@ #include "bearssl.h" #include "cipher_suite.h" -#include "urldata.h" -#include "sendf.h" -#include "inet_pton.h" +#include "../urldata.h" +#include "../sendf.h" +#include "../inet_pton.h" #include "vtls.h" #include "vtls_int.h" #include "vtls_scache.h" -#include "connect.h" -#include "select.h" -#include "multiif.h" -#include "curl_printf.h" +#include "../connect.h" +#include "../select.h" +#include "../multiif.h" +#include "../curl_printf.h" /* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" struct x509_context { const br_x509_class *vtable; diff --git a/lib/vtls/bearssl.h b/lib/vtls/bearssl.h index b3651b092c..8bb254f7da 100644 --- a/lib/vtls/bearssl.h +++ b/lib/vtls/bearssl.h @@ -24,7 +24,7 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_BEARSSL diff --git a/lib/vtls/cipher_suite.c b/lib/vtls/cipher_suite.c index e9797d43d0..d058bd3f0e 100644 --- a/lib/vtls/cipher_suite.c +++ b/lib/vtls/cipher_suite.c @@ -21,13 +21,13 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(USE_SECTRANSP) || defined(USE_MBEDTLS) || \ defined(USE_BEARSSL) || defined(USE_RUSTLS) #include "cipher_suite.h" -#include "curl_printf.h" -#include "strcase.h" +#include "../curl_printf.h" +#include "../strcase.h" #include /* diff --git a/lib/vtls/cipher_suite.h b/lib/vtls/cipher_suite.h index 6d980103a5..cd556db10f 100644 --- a/lib/vtls/cipher_suite.h +++ b/lib/vtls/cipher_suite.h @@ -24,7 +24,7 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(USE_SECTRANSP) || defined(USE_MBEDTLS) || \ defined(USE_BEARSSL) || defined(USE_RUSTLS) diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c index 7db06e759a..8d13312648 100644 --- a/lib/vtls/gtls.c +++ b/lib/vtls/gtls.c @@ -30,7 +30,7 @@ * since they were not present in 1.0.X. */ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_GNUTLS @@ -40,28 +40,28 @@ #include #include -#include "urldata.h" -#include "sendf.h" -#include "inet_pton.h" +#include "../urldata.h" +#include "../sendf.h" +#include "../inet_pton.h" #include "keylog.h" #include "gtls.h" #include "vtls.h" #include "vtls_int.h" #include "vtls_scache.h" -#include "vauth/vauth.h" -#include "parsedate.h" -#include "connect.h" /* for the connect timeout */ -#include "progress.h" -#include "select.h" -#include "strcase.h" -#include "strdup.h" -#include "warnless.h" +#include "../vauth/vauth.h" +#include "../parsedate.h" +#include "../connect.h" /* for the connect timeout */ +#include "../progress.h" +#include "../select.h" +#include "../strcase.h" +#include "../strdup.h" +#include "../warnless.h" #include "x509asn1.h" -#include "multiif.h" -#include "curl_printf.h" -#include "curl_memory.h" +#include "../multiif.h" +#include "../curl_printf.h" +#include "../curl_memory.h" /* The last #include file should be: */ -#include "memdebug.h" +#include "../memdebug.h" /* Enable GnuTLS debugging by defining GTLSDEBUG */ /*#define GTLSDEBUG */ diff --git a/lib/vtls/gtls.h b/lib/vtls/gtls.h index d5e5c40c72..7366813437 100644 --- a/lib/vtls/gtls.h +++ b/lib/vtls/gtls.h @@ -24,13 +24,13 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #include #ifdef USE_GNUTLS #include -#include "timeval.h" +#include "../timeval.h" #ifdef HAVE_GNUTLS_SRP /* the function exists */ diff --git a/lib/vtls/hostcheck.c b/lib/vtls/hostcheck.c index e46439a5ec..8ca69941e8 100644 --- a/lib/vtls/hostcheck.c +++ b/lib/vtls/hostcheck.c @@ -22,7 +22,7 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(USE_OPENSSL) \ || defined(USE_SCHANNEL) @@ -34,15 +34,14 @@ #ifdef HAVE_NETINET_IN6_H #include #endif -#include "curl_memrchr.h" - +#include "../curl_memrchr.h" #include "hostcheck.h" -#include "strcase.h" -#include "hostip.h" +#include "../strcase.h" +#include "../hostip.h" -#include "curl_memory.h" +#include "../curl_memory.h" /* The last #include file should be: */ -#include "memdebug.h" +#include "../memdebug.h" /* check the two input strings with given length, but do not assume they end in nul-bytes */ diff --git a/lib/vtls/keylog.c b/lib/vtls/keylog.c index e4a8040e5a..8f4880cf8e 100644 --- a/lib/vtls/keylog.c +++ b/lib/vtls/keylog.c @@ -21,7 +21,7 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(USE_OPENSSL) || \ defined(USE_GNUTLS) || \ @@ -32,11 +32,11 @@ #include "keylog.h" #include -#include "escape.h" +#include "../escape.h" /* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" /* The fp for the open SSLKEYLOGFILE, or NULL if not open */ static FILE *keylog_file_fp; diff --git a/lib/vtls/keylog.h b/lib/vtls/keylog.h index c87e549279..a00a225616 100644 --- a/lib/vtls/keylog.h +++ b/lib/vtls/keylog.h @@ -23,7 +23,7 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #define KEYLOG_LABEL_MAXLEN (sizeof("CLIENT_HANDSHAKE_TRAFFIC_SECRET") - 1) diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c index f50bed81ed..c13be87aea 100644 --- a/lib/vtls/mbedtls.c +++ b/lib/vtls/mbedtls.c @@ -29,7 +29,7 @@ * */ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_MBEDTLS @@ -57,26 +57,26 @@ #endif /* MBEDTLS_VERSION_MAJOR >= 2 */ #include "cipher_suite.h" -#include "strcase.h" -#include "urldata.h" -#include "sendf.h" -#include "inet_pton.h" +#include "../strcase.h" +#include "../urldata.h" +#include "../sendf.h" +#include "../inet_pton.h" #include "mbedtls.h" #include "vtls.h" #include "vtls_int.h" #include "vtls_scache.h" #include "x509asn1.h" -#include "parsedate.h" -#include "connect.h" /* for the connect timeout */ -#include "select.h" -#include "multiif.h" +#include "../parsedate.h" +#include "../connect.h" /* for the connect timeout */ +#include "../select.h" +#include "../multiif.h" #include "mbedtls_threadlock.h" -#include "strdup.h" +#include "../strdup.h" /* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_printf.h" +#include "../curl_memory.h" +#include "../memdebug.h" /* ALPN for http2 */ #if defined(USE_HTTP2) && defined(MBEDTLS_SSL_ALPN) diff --git a/lib/vtls/mbedtls.h b/lib/vtls/mbedtls.h index d8a0a06eb6..3876fe36fc 100644 --- a/lib/vtls/mbedtls.h +++ b/lib/vtls/mbedtls.h @@ -24,7 +24,7 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_MBEDTLS diff --git a/lib/vtls/mbedtls_threadlock.c b/lib/vtls/mbedtls_threadlock.c index b96a904fcb..682c221852 100644 --- a/lib/vtls/mbedtls_threadlock.c +++ b/lib/vtls/mbedtls_threadlock.c @@ -22,7 +22,7 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(USE_MBEDTLS) && \ ((defined(USE_THREADS_POSIX) && defined(HAVE_PTHREAD_H)) || \ @@ -36,10 +36,10 @@ #endif #include "mbedtls_threadlock.h" -#include "curl_printf.h" -#include "curl_memory.h" +#include "../curl_printf.h" +#include "../curl_memory.h" /* The last #include file should be: */ -#include "memdebug.h" +#include "../memdebug.h" /* number of thread locks */ #define NUMT 2 diff --git a/lib/vtls/mbedtls_threadlock.h b/lib/vtls/mbedtls_threadlock.h index 484626852f..9402af6e41 100644 --- a/lib/vtls/mbedtls_threadlock.h +++ b/lib/vtls/mbedtls_threadlock.h @@ -24,7 +24,7 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_MBEDTLS diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 4d5e1be29e..4c068adc6b 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -27,7 +27,7 @@ * but vtls.c should ever call or use these functions. */ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(USE_QUICHE) || defined(USE_OPENSSL) @@ -45,26 +45,26 @@ #undef OCSP_RESPONSE #endif -#include "urldata.h" -#include "sendf.h" -#include "formdata.h" /* for the boundary function */ -#include "url.h" /* for the ssl config check function */ -#include "inet_pton.h" +#include "../urldata.h" +#include "../sendf.h" +#include "../formdata.h" /* for the boundary function */ +#include "../url.h" /* for the ssl config check function */ +#include "../inet_pton.h" #include "openssl.h" -#include "connect.h" -#include "slist.h" -#include "select.h" +#include "../connect.h" +#include "../slist.h" +#include "../select.h" #include "vtls.h" #include "vtls_int.h" #include "vtls_scache.h" -#include "vauth/vauth.h" +#include "../vauth/vauth.h" #include "keylog.h" -#include "strcase.h" +#include "../strcase.h" #include "hostcheck.h" -#include "multiif.h" -#include "strdup.h" -#include "strerror.h" -#include "curl_printf.h" +#include "../multiif.h" +#include "../strdup.h" +#include "../strerror.h" +#include "../curl_printf.h" #include #include @@ -119,11 +119,11 @@ #define OPENSSL_HAS_PROVIDERS #endif -#include "warnless.h" +#include "../warnless.h" /* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" /* Uncomment the ALLOW_RENEG line to a real #define if you want to allow TLS renegotiations when built with BoringSSL. Renegotiating is non-compliant diff --git a/lib/vtls/openssl.h b/lib/vtls/openssl.h index bc27c2291b..8d063e25ac 100644 --- a/lib/vtls/openssl.h +++ b/lib/vtls/openssl.h @@ -24,7 +24,7 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_OPENSSL /* @@ -35,7 +35,7 @@ #include #include -#include "urldata.h" +#include "../urldata.h" /* * Whether SSL_CTX_set_keylog_callback is available. diff --git a/lib/vtls/rustls.c b/lib/vtls/rustls.c index 0087d5cbf7..695988ea0f 100644 --- a/lib/vtls/rustls.c +++ b/lib/vtls/rustls.c @@ -24,22 +24,22 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_RUSTLS -#include "curl_printf.h" +#include "../curl_printf.h" #include -#include "inet_pton.h" -#include "urldata.h" -#include "sendf.h" +#include "../inet_pton.h" +#include "../urldata.h" +#include "../sendf.h" #include "vtls.h" #include "vtls_int.h" #include "rustls.h" #include "keylog.h" -#include "strerror.h" +#include "../strerror.h" #include "cipher_suite.h" #include "x509asn1.h" diff --git a/lib/vtls/rustls.h b/lib/vtls/rustls.h index bfbe23de3e..74d39d4d11 100644 --- a/lib/vtls/rustls.h +++ b/lib/vtls/rustls.h @@ -25,7 +25,7 @@ #ifndef HEADER_CURL_RUSTLS_H #define HEADER_CURL_RUSTLS_H -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_RUSTLS diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c index 6c63df2cd9..f5589a3096 100644 --- a/lib/vtls/schannel.c +++ b/lib/vtls/schannel.c @@ -29,7 +29,7 @@ * but vtls.c should ever call or use these functions. */ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_SCHANNEL @@ -42,25 +42,25 @@ #include "vtls.h" #include "vtls_int.h" #include "vtls_scache.h" -#include "strcase.h" -#include "sendf.h" -#include "connect.h" /* for the connect timeout */ -#include "strerror.h" -#include "select.h" /* for the socket readiness */ -#include "inet_pton.h" /* for IP addr SNI check */ -#include "curl_multibyte.h" -#include "warnless.h" +#include "../strcase.h" +#include "../sendf.h" +#include "../connect.h" /* for the connect timeout */ +#include "../strerror.h" +#include "../select.h" /* for the socket readiness */ +#include "../inet_pton.h" /* for IP addr SNI check */ +#include "../curl_multibyte.h" +#include "../warnless.h" #include "x509asn1.h" -#include "curl_printf.h" -#include "multiif.h" -#include "system_win32.h" -#include "version_win32.h" -#include "rand.h" -#include "strparse.h" +#include "../curl_printf.h" +#include "../multiif.h" +#include "../system_win32.h" +#include "../version_win32.h" +#include "../rand.h" +#include "../strparse.h" /* The last #include file should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" /* Some verbose debug messages are wrapped by SCH_DEV() instead of DEBUGF() * and only shown if CURL_SCHANNEL_DEV_DEBUG was defined at build time. These diff --git a/lib/vtls/schannel.h b/lib/vtls/schannel.h index 69f1baddb8..c3512dd132 100644 --- a/lib/vtls/schannel.h +++ b/lib/vtls/schannel.h @@ -24,7 +24,7 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_SCHANNEL @@ -50,10 +50,10 @@ #include #include -#include "curl_sspi.h" +#include "../curl_sspi.h" -#include "cfilters.h" -#include "urldata.h" +#include "../cfilters.h" +#include "../urldata.h" /* has been included via the above . * Or in case of ldap.c, it was included via . diff --git a/lib/vtls/schannel_int.h b/lib/vtls/schannel_int.h index 81476bc6d8..f9513b31f9 100644 --- a/lib/vtls/schannel_int.h +++ b/lib/vtls/schannel_int.h @@ -24,7 +24,7 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_SCHANNEL diff --git a/lib/vtls/schannel_verify.c b/lib/vtls/schannel_verify.c index a8c18ae2ac..b44b9e8ee3 100644 --- a/lib/vtls/schannel_verify.c +++ b/lib/vtls/schannel_verify.c @@ -29,7 +29,7 @@ * only be invoked by code in schannel.c. */ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_SCHANNEL #ifndef USE_WINDOWS_SSPI @@ -39,19 +39,19 @@ #include "schannel.h" #include "schannel_int.h" -#include "inet_pton.h" +#include "../inet_pton.h" #include "vtls.h" #include "vtls_int.h" -#include "sendf.h" -#include "strerror.h" -#include "curl_multibyte.h" -#include "curl_printf.h" +#include "../sendf.h" +#include "../strerror.h" +#include "../curl_multibyte.h" +#include "../curl_printf.h" #include "hostcheck.h" -#include "version_win32.h" +#include "../version_win32.h" /* The last #include file should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" #define BACKEND ((struct schannel_ssl_backend_data *)connssl->backend) diff --git a/lib/vtls/sectransp.c b/lib/vtls/sectransp.c index 24061a51e3..f0094df584 100644 --- a/lib/vtls/sectransp.c +++ b/lib/vtls/sectransp.c @@ -28,18 +28,18 @@ * TLS/SSL layer. No code but vtls.c should ever call or use these functions. */ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_SECTRANSP -#include "urldata.h" /* for the Curl_easy definition */ -#include "curl_base64.h" -#include "strparse.h" -#include "multiif.h" -#include "strcase.h" +#include "../urldata.h" /* for the Curl_easy definition */ +#include "../curl_base64.h" +#include "../strparse.h" +#include "../multiif.h" +#include "../strcase.h" #include "x509asn1.h" #include "vtls_scache.h" -#include "strerror.h" +#include "../strerror.h" #include "cipher_suite.h" #ifdef __clang__ @@ -134,19 +134,19 @@ #include #endif /* CURL_BUILD_MAC */ -#include "sendf.h" -#include "inet_pton.h" -#include "connect.h" -#include "select.h" +#include "../sendf.h" +#include "../inet_pton.h" +#include "../connect.h" +#include "../select.h" #include "vtls.h" #include "vtls_int.h" #include "sectransp.h" -#include "curl_printf.h" -#include "strdup.h" +#include "../curl_printf.h" +#include "../strdup.h" -#include "curl_memory.h" +#include "../curl_memory.h" /* The last #include file should be: */ -#include "memdebug.h" +#include "../memdebug.h" /* From MacTypes.h (which we cannot include because it is not present in diff --git a/lib/vtls/sectransp.h b/lib/vtls/sectransp.h index 0f1085ad91..c82dc18445 100644 --- a/lib/vtls/sectransp.h +++ b/lib/vtls/sectransp.h @@ -24,7 +24,7 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_SECTRANSP diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c index 6da7554900..8893b1a0af 100644 --- a/lib/vtls/vtls.c +++ b/lib/vtls/vtls.c @@ -38,7 +38,7 @@ https://httpd.apache.org/docs/2.0/ssl/ssl_intro.html */ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef HAVE_SYS_TYPES_H #include @@ -50,8 +50,8 @@ #include #endif -#include "urldata.h" -#include "cfilters.h" +#include "../urldata.h" +#include "../cfilters.h" #include "vtls.h" /* generic SSL protos etc */ #include "vtls_int.h" @@ -66,28 +66,28 @@ #include "bearssl.h" /* BearSSL versions */ #include "rustls.h" /* Rustls versions */ -#include "slist.h" -#include "sendf.h" -#include "strcase.h" -#include "url.h" -#include "progress.h" -#include "share.h" -#include "multiif.h" -#include "timeval.h" -#include "curl_md5.h" -#include "curl_sha256.h" -#include "warnless.h" -#include "curl_base64.h" -#include "curl_printf.h" -#include "inet_pton.h" -#include "connect.h" -#include "select.h" -#include "strdup.h" -#include "rand.h" +#include "../slist.h" +#include "../sendf.h" +#include "../strcase.h" +#include "../url.h" +#include "../progress.h" +#include "../share.h" +#include "../multiif.h" +#include "../timeval.h" +#include "../curl_md5.h" +#include "../curl_sha256.h" +#include "../warnless.h" +#include "../curl_base64.h" +#include "../curl_printf.h" +#include "../inet_pton.h" +#include "../connect.h" +#include "../select.h" +#include "../strdup.h" +#include "../rand.h" /* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" #define CLONE_STRING(var) \ diff --git a/lib/vtls/vtls.h b/lib/vtls/vtls.h index b751c3743c..0302151bb5 100644 --- a/lib/vtls/vtls.h +++ b/lib/vtls/vtls.h @@ -23,7 +23,7 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" struct connectdata; struct ssl_config_data; @@ -44,7 +44,7 @@ struct dynbuf; #define SSLSUPP_CIPHER_LIST (1<<9) /* supports TLS 1.0-1.2 ciphersuites */ #ifdef USE_ECH -# include "curl_base64.h" +# include "../curl_base64.h" # define ECH_ENABLED(__data__) \ (__data__->set.tls_ech && \ !(__data__->set.tls_ech & CURLECH_DISABLE)\ diff --git a/lib/vtls/vtls_int.h b/lib/vtls/vtls_int.h index 5dadbb1f24..0632a07657 100644 --- a/lib/vtls/vtls_int.h +++ b/lib/vtls/vtls_int.h @@ -23,9 +23,9 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ -#include "curl_setup.h" -#include "cfilters.h" -#include "urldata.h" +#include "../curl_setup.h" +#include "../cfilters.h" +#include "../urldata.h" #include "vtls.h" #ifdef USE_SSL diff --git a/lib/vtls/vtls_scache.c b/lib/vtls/vtls_scache.c index ea80055ad6..2d8e30c41b 100644 --- a/lib/vtls/vtls_scache.c +++ b/lib/vtls/vtls_scache.c @@ -22,7 +22,7 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_SSL @@ -36,28 +36,28 @@ #include #endif -#include "urldata.h" -#include "cfilters.h" +#include "../urldata.h" +#include "../cfilters.h" #include "vtls.h" /* generic SSL protos etc */ #include "vtls_int.h" #include "vtls_scache.h" #include "vtls_spack.h" -#include "strcase.h" -#include "url.h" -#include "llist.h" -#include "share.h" -#include "curl_trc.h" -#include "curl_sha256.h" -#include "rand.h" -#include "warnless.h" -#include "curl_printf.h" -#include "strdup.h" +#include "../strcase.h" +#include "../url.h" +#include "../llist.h" +#include "../share.h" +#include "../curl_trc.h" +#include "../curl_sha256.h" +#include "../rand.h" +#include "../warnless.h" +#include "../curl_printf.h" +#include "../strdup.h" /* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" static bool cf_ssl_peer_key_is_global(const char *peer_key); diff --git a/lib/vtls/vtls_scache.h b/lib/vtls/vtls_scache.h index 8ef6eecba7..c95fa42af1 100644 --- a/lib/vtls/vtls_scache.h +++ b/lib/vtls/vtls_scache.h @@ -23,9 +23,9 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ -#include "curl_setup.h" -#include "cfilters.h" -#include "urldata.h" +#include "../curl_setup.h" +#include "../cfilters.h" +#include "../urldata.h" #ifdef USE_SSL diff --git a/lib/vtls/vtls_spack.c b/lib/vtls/vtls_spack.c index 8fe9c151f1..e49be6d6b2 100644 --- a/lib/vtls/vtls_spack.c +++ b/lib/vtls/vtls_spack.c @@ -22,19 +22,19 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_SSLS_EXPORT -#include "urldata.h" -#include "curl_trc.h" +#include "../urldata.h" +#include "../curl_trc.h" #include "vtls_scache.h" #include "vtls_spack.h" -#include "strdup.h" +#include "../strdup.h" /* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" #ifdef _MSC_VER #if _MSC_VER >= 1600 diff --git a/lib/vtls/vtls_spack.h b/lib/vtls/vtls_spack.h index 98699456a5..4cdabae30e 100644 --- a/lib/vtls/vtls_spack.h +++ b/lib/vtls/vtls_spack.h @@ -23,7 +23,7 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_SSLS_EXPORT diff --git a/lib/vtls/wolfssl.c b/lib/vtls/wolfssl.c index a7ea34aa68..5550dfb1f3 100644 --- a/lib/vtls/wolfssl.c +++ b/lib/vtls/wolfssl.c @@ -28,7 +28,7 @@ * */ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_WOLFSSL @@ -56,30 +56,30 @@ #include -#include "urldata.h" -#include "sendf.h" -#include "inet_pton.h" +#include "../urldata.h" +#include "../sendf.h" +#include "../inet_pton.h" #include "vtls.h" #include "vtls_int.h" #include "vtls_scache.h" #include "keylog.h" -#include "parsedate.h" -#include "connect.h" /* for the connect timeout */ -#include "progress.h" -#include "select.h" -#include "strcase.h" -#include "strdup.h" +#include "../parsedate.h" +#include "../connect.h" /* for the connect timeout */ +#include "../progress.h" +#include "../select.h" +#include "../strcase.h" +#include "../strdup.h" #include "x509asn1.h" -#include "curl_printf.h" -#include "multiif.h" +#include "../curl_printf.h" +#include "../multiif.h" #include #include #include "wolfssl.h" /* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_memory.h" +#include "../memdebug.h" #ifdef HAVE_WOLFSSL_CTX_GENERATEECHCONFIG #define USE_ECH_WOLFSSL diff --git a/lib/vtls/wolfssl.h b/lib/vtls/wolfssl.h index dfb951b693..c741f01bd9 100644 --- a/lib/vtls/wolfssl.h +++ b/lib/vtls/wolfssl.h @@ -23,11 +23,11 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #ifdef USE_WOLFSSL -#include "urldata.h" +#include "../urldata.h" struct alpn_spec; struct ssl_peer; diff --git a/lib/vtls/x509asn1.c b/lib/vtls/x509asn1.c index 1d272c04e7..09951529f7 100644 --- a/lib/vtls/x509asn1.c +++ b/lib/vtls/x509asn1.c @@ -22,7 +22,7 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(USE_GNUTLS) || defined(USE_WOLFSSL) || \ defined(USE_SCHANNEL) || defined(USE_SECTRANSP) || \ @@ -39,22 +39,22 @@ #endif #include -#include "urldata.h" -#include "strcase.h" -#include "curl_ctype.h" +#include "../urldata.h" +#include "../strcase.h" +#include "../curl_ctype.h" #include "hostcheck.h" -#include "vtls/vtls.h" -#include "vtls/vtls_int.h" -#include "sendf.h" -#include "inet_pton.h" -#include "curl_base64.h" +#include "vtls.h" +#include "vtls_int.h" +#include "../sendf.h" +#include "../inet_pton.h" +#include "../curl_base64.h" #include "x509asn1.h" -#include "dynbuf.h" +#include "../dynbuf.h" /* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" +#include "../curl_printf.h" +#include "../curl_memory.h" +#include "../memdebug.h" /* * Constants. diff --git a/lib/vtls/x509asn1.h b/lib/vtls/x509asn1.h index e1abff06c8..ef2e8c369c 100644 --- a/lib/vtls/x509asn1.h +++ b/lib/vtls/x509asn1.h @@ -25,14 +25,14 @@ * ***************************************************************************/ -#include "curl_setup.h" +#include "../curl_setup.h" #if defined(USE_GNUTLS) || defined(USE_WOLFSSL) || \ defined(USE_SCHANNEL) || defined(USE_SECTRANSP) || \ defined(USE_MBEDTLS) || defined(USE_RUSTLS) -#include "cfilters.h" -#include "urldata.h" +#include "../cfilters.h" +#include "../urldata.h" /* * Types. diff --git a/scripts/mk-unity.pl b/scripts/mk-unity.pl index f9ebf2524c..4ad86d1c77 100755 --- a/scripts/mk-unity.pl +++ b/scripts/mk-unity.pl @@ -35,6 +35,8 @@ if(!@ARGV) { die "Usage: $0 [] [--exclude ]\n"; } +my $srcdir = shift @ARGV; + # Specific sources to exclude or add as an extra source file my @src; my %exclude; @@ -58,6 +60,11 @@ HEADER foreach my $src (@src) { if($src =~ /\.c$/g && !exists $exclude{$src}) { - print "#include \"$src\"\n"; + if(-e "$srcdir/$src") { + print "#include \"$srcdir/$src\"\n"; + } + else { + print "#include \"$src\"\n"; + } } } diff --git a/src/Makefile.am b/src/Makefile.am index dc431e1395..f6df54ef76 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -121,7 +121,7 @@ endif # Use absolute directory to disable VPATH ASCIIPAGE=$(top_builddir)/docs/cmdline-opts/curl.txt MKHELP=$(top_srcdir)/src/mkhelp.pl -HUGE=tool_hugehelp.c +HUGE=$(builddir)/tool_hugehelp.c HUGECMD = $(HUGEIT_$(V)) HUGEIT_0 = @echo " HUGE " $@; @@ -164,7 +164,7 @@ curl_cfiles_gen += $(HUGE) curl_hfiles_gen += tool_hugehelp.h CLEANFILES += $(HUGE) -CA_EMBED_CSOURCE = tool_ca_embed.c +CA_EMBED_CSOURCE = $(builddir)/tool_ca_embed.c curl_cfiles_gen += $(CA_EMBED_CSOURCE) CLEANFILES += $(CA_EMBED_CSOURCE) if CURL_CA_EMBED_SET @@ -184,12 +184,7 @@ CS_ = $(CS_0) # ignore generated C files since they play by slightly different rules! checksrc: - $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \ - -W$(srcdir)/$(HUGE) \ - -W$(srcdir)/$(CA_EMBED_CSOURCE) \ - -W$(srcdir)/curltool_unity.c \ - -W$(srcdir)/libcurltool_unity.c \ - $(srcdir)/*.[ch]) + $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) $(CURL_CFILES) $(CURL_HFILES)) if DEBUGBUILD # for debug builds, we scan the sources on all regular make invokes