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
This commit is contained in:
Daniel Stenberg 2025-04-08 08:00:12 +02:00
parent 7e4d516bcb
commit 625f2c1644
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
71 changed files with 580 additions and 587 deletions

View file

@ -22,15 +22,15 @@
*
***************************************************************************/
#include "curl_setup.h"
#include "../curl_setup.h"
#if defined(USE_SSH)
#include "curl_path.h"
#include <curl/curl.h>
#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 */

View file

@ -24,9 +24,9 @@
*
***************************************************************************/
#include "curl_setup.h"
#include "../curl_setup.h"
#include <curl/curl.h>
#include "urldata.h"
#include "../urldata.h"
CURLcode Curl_getworkingpath(struct Curl_easy *data,
char *homedir,

View file

@ -25,7 +25,7 @@
*
***************************************************************************/
#include "curl_setup.h"
#include "../curl_setup.h"
#ifdef USE_LIBSSH
@ -46,29 +46,29 @@
#endif
#include <curl/curl.h>
#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

View file

@ -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 <curl/curl.h>
#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 <curl_base64.h> /* for base64 encoding/decoding */
#include <curl_sha256.h>
#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);

View file

@ -24,7 +24,7 @@
*
***************************************************************************/
#include "curl_setup.h"
#include "../curl_setup.h"
#if defined(USE_LIBSSH2)
#include <libssh2.h>

View file

@ -22,29 +22,29 @@
*
***************************************************************************/
#include "curl_setup.h"
#include "../curl_setup.h"
#ifdef USE_WOLFSSH
#include <limits.h>
#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);