To make all src and test code refer to curlx headers the same way.
Also:
- src: move `curlx.h` include to `tool_setup.h`.
- src/tool_setup.h: drop stray `curlx/timeval.h`.
- servers: de-duplicate `curlx.h` and `curl_setup.h` includes.
- libtests, units: drop stray curlx sub-headers in favor of
`<curlx/curlx.h>`.
- tests: include `curlx.h` with `<>` instead of `""`. To match
other parts of the codebase.
Closes #17680
set_property(DIRECTORY APPEND PROPERTY INCLUDE_DIRECTORIES
"${PROJECT_BINARY_DIR}/lib" # for "curl_config.h"
- "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h"
- "${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx functions
+ "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h", curlx
"${CMAKE_CURRENT_SOURCE_DIR}" # for "tool_hugehelp.c"
)
AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib \
- -I$(top_srcdir)/lib/curlx \
-I$(srcdir)
bin_PROGRAMS = curl
#endif
#include "terminal.h"
-#include <curlx.h>
#include <memdebug.h> /* keep this as LAST include */
#ifdef HAVE_TERMIOS_H
***************************************************************************/
#include "tool_setup.h"
-#include <curlx.h>
-
#include "tool_cfgable.h"
#include "tool_msgs.h"
#include "tool_cb_dbg.h"
#include <unistd.h>
#endif
-#include <curlx.h>
-
#include "tool_cfgable.h"
#include "tool_doswin.h"
#include "tool_msgs.h"
***************************************************************************/
#include "tool_setup.h"
-#include <curlx.h>
-
#include "tool_cfgable.h"
#include "tool_cb_prg.h"
#include "tool_util.h"
#include <sys/select.h>
#endif
-#include <curlx.h>
-
#include "tool_cfgable.h"
#include "tool_cb_rea.h"
#include "tool_operate.h"
***************************************************************************/
#include "tool_setup.h"
-#include <curlx.h>
-
#include "tool_cfgable.h"
#include "tool_operate.h"
#include "tool_cb_see.h"
#include <sys/stat.h>
-#include <curlx.h>
-
#include "tool_cfgable.h"
#include "tool_msgs.h"
#include "tool_cb_wrt.h"
#include "tool_formparse.h"
#include "tool_paramhlp.h"
#include "tool_main.h"
-#include <curlx.h>
#include <memdebug.h> /* keep this as LAST include */
void config_init(struct OperationConfig *config)
# include <direct.h>
#endif
-#include <curlx.h>
-
#include "tool_dirhie.h"
#include "tool_msgs.h"
#include "tool_doswin.h"
#include "tool_msgs.h"
-#include <curlx.h>
#include <memdebug.h> /* keep this as LAST include */
#ifdef _WIN32
#ifndef CURL_DISABLE_LIBCURL_OPTION
-#include <curlx.h>
-
#include "tool_cfgable.h"
#include "tool_easysrc.h"
#include "tool_msgs.h"
#include "tool_filetime.h"
#include "tool_cfgable.h"
#include "tool_msgs.h"
-#include <curlx.h>
#ifdef HAVE_UTIME_H
# include <utime.h>
#include <fcntl.h>
#endif
-#include <curlx.h>
-
#include "tool_findfile.h"
#include "tool_cfgable.h"
***************************************************************************/
#include "tool_setup.h"
-#include <curlx.h>
-
#include "tool_cfgable.h"
#include "tool_msgs.h"
#include "tool_getparam.h"
***************************************************************************/
#include "tool_setup.h"
-#include <curlx.h>
#include "tool_cfgable.h"
#include "tool_cb_prg.h"
#include "tool_filetime.h"
***************************************************************************/
#include "tool_setup.h"
-#include <curlx.h>
-
#include "tool_help.h"
#include "tool_libinfo.h"
#include "tool_util.h"
***************************************************************************/
#include "tool_setup.h"
-#include <curlx.h>
-
#include "tool_cfgable.h"
#include "tool_msgs.h"
#include "tool_getparam.h"
#include "tool_setup.h"
#ifndef CURL_DISABLE_IPFS
-#include <curlx.h>
#include "tool_cfgable.h"
#include "tool_msgs.h"
***************************************************************************/
#include "tool_setup.h"
-#include <curlx.h>
#include "tool_libinfo.h"
#include <memdebug.h> /* keep this as LAST include */
#include <fcntl.h>
#endif
-#include <curlx.h>
-
#include "tool_cfgable.h"
#include "tool_doswin.h"
#include "tool_msgs.h"
***************************************************************************/
#include "tool_setup.h"
-#include <curlx.h>
-
#include "tool_cfgable.h"
#include "tool_msgs.h"
#include "tool_cb_prg.h"
#include <uv.h>
#endif
-#include <curlx.h>
-
#include "tool_cfgable.h"
#include "tool_cb_dbg.h"
#include "tool_cb_hdr.h"
#include "tool_setup.h"
#include "tool_operate.h"
-#include <curlx.h>
#include "tool_cfgable.h"
#include "tool_doswin.h"
#include "tool_operhlp.h"
***************************************************************************/
#include "tool_setup.h"
-#include <curlx.h>
-
#include "tool_cfgable.h"
#include "tool_getparam.h"
#include "tool_getpass.h"
***************************************************************************/
#include "tool_setup.h"
-#include <curlx.h>
#include "tool_cfgable.h"
#include "tool_getparam.h"
#include "tool_helpers.h"
#include "tool_operate.h"
#include "tool_progress.h"
#include "tool_util.h"
-#include <curlx.h>
/* The point of this function would be to return a string of the input data,
but never longer than 5 columns (+ one zero byte).
#ifndef CURL_DISABLE_LIBCURL_OPTION
-#include <curlx.h>
#include "tool_cfgable.h"
#include "tool_easysrc.h"
#include "tool_setopt.h"
#include <curl/curl.h> /* external interface */
-#include "timeval.h"
+#include <curlx/curlx.h>
/*
* Platform specific stuff.
***************************************************************************/
#include "tool_setup.h"
-#include <curlx.h>
#include "tool_cfgable.h"
#include "tool_cb_dbg.h"
#include "tool_msgs.h"
***************************************************************************/
#include "tool_setup.h"
-#include <curlx.h>
#include "tool_cfgable.h"
#include "tool_doswin.h"
#include "tool_urlglob.h"
#include "tool_setup.h"
#include "tool_util.h"
-#include <curlx.h>
#include <memdebug.h> /* keep this as LAST include */
#ifdef _WIN32
#include <unixlib.h>
#endif
-#include <curlx.h>
#include "curlmsg_vms.h"
#include "tool_vms.h"
#include <memdebug.h> /* keep this as LAST include */
***************************************************************************/
#include "tool_setup.h"
-#include <curlx.h>
#include "tool_cfgable.h"
#include "tool_writeout.h"
#include "tool_writeout_json.h"
***************************************************************************/
#include "tool_setup.h"
-#include <curlx.h>
#include "tool_cfgable.h"
#include "tool_writeout_json.h"
#include "tool_writeout.h"
***************************************************************************/
#include "tool_setup.h"
-#include <curlx.h>
#include "tool_cfgable.h"
#include "tool_getparam.h"
#include "tool_helpers.h"
***************************************************************************/
#include "tool_getparam.h"
-#include <curlx.h>
struct tool_var {
struct tool_var *next;
target_link_libraries(${BUNDLE} ${LIB_SELECTED} ${CURL_LIBS})
target_include_directories(${BUNDLE} PRIVATE
"${PROJECT_BINARY_DIR}/lib" # for "curl_config.h"
- "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h"
- "${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx
+ "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h", curlx
"${CMAKE_CURRENT_SOURCE_DIR}" # for the generated bundle source to find included test sources
)
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_NO_OLDIES")
AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib \
- -I$(top_srcdir)/lib/curlx \
-I$(srcdir)
# Get BUNDLE, FIRSTFILES, CURLX_CFILES, TESTFILES variables
#include <curl/curl.h>
-#include "curlx.h"
+#include <curlx/curlx.h>
#define ERR() \
do { \
target_link_libraries(${BUNDLE} ${LIB_SELECTED} ${CURL_LIBS})
target_include_directories(${BUNDLE} PRIVATE
"${PROJECT_BINARY_DIR}/lib" # for "curl_config.h"
- "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h"
- "${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx
+ "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h", curlx
"${CMAKE_CURRENT_SOURCE_DIR}" # for the generated bundle source to find included test sources
"${PROJECT_SOURCE_DIR}/tests/unit" # for "curlcheck.h"
)
AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib \
- -I$(top_srcdir)/lib/curlx \
-I$(srcdir) \
-I$(top_srcdir)/tests/unit
extern const struct entry_s s_entries[];
-#include "curlx.h"
+#include <curlx/curlx.h>
#endif /* HEADER_LIBTEST_FIRST_H */
target_link_libraries(${BUNDLE} ${CURL_LIBS})
target_include_directories(${BUNDLE} PRIVATE
"${PROJECT_BINARY_DIR}/lib" # for "curl_config.h"
- "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h"
- "${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx
+ "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h", curlx
"${CMAKE_CURRENT_SOURCE_DIR}" # for the generated bundle source to find included test sources
)
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "WITHOUT_LIBCURL")
AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib \
- -I$(top_srcdir)/lib/curlx \
-I$(srcdir)
# Get BUNDLE, FIRSTFILES, UTILS, CURLX_CFILES, TESTFILES variables
#include <netdb.h>
#endif
-#include <curlx.h> /* from the private lib dir */
+#include <curlx/curlx.h>
/* adjust for old MSVC */
#if defined(_MSC_VER) && (_MSC_VER < 1900)
* it!
*/
-
/* buffer is this excessively large only to be able to support things like
- test 1003 which tests exceedingly large server response lines */
+ test 1003 which tests exceedingly large server response lines */
#define BUFFER_SIZE 17010
static bool verbose = FALSE;
target_link_libraries(${BUNDLE} curltool curlu)
target_include_directories(${BUNDLE} PRIVATE
"${PROJECT_BINARY_DIR}/lib" # for "curl_config.h"
- "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h"
- "${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx
+ "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h", curlx
"${PROJECT_SOURCE_DIR}/src" # for tool headers
"${PROJECT_SOURCE_DIR}/tests/libtest" # for "first.h"
"${PROJECT_SOURCE_DIR}/tests/unit" # for "curlcheck.h"
AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib \
- -I$(top_srcdir)/lib/curlx \
-I$(top_srcdir)/src \
-I$(top_srcdir)/tests/libtest \
-I$(top_srcdir)/tests/unit \
target_link_libraries(${BUNDLE} curlu)
target_include_directories(${BUNDLE} PRIVATE
"${PROJECT_BINARY_DIR}/lib" # for "curl_config.h"
- "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h"
- "${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx
+ "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h", curlx
"${PROJECT_SOURCE_DIR}/tests/libtest" # for "first.h"
"${CMAKE_CURRENT_SOURCE_DIR}" # for the generated bundle source to find included test sources
)
AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib \
- -I$(top_srcdir)/lib/curlx \
-I$(top_srcdir)/tests/libtest \
-I$(srcdir)
#include "urldata.h"
#include "url.h" /* for Curl_safefree */
-#include "curlx/base64.h"
+#include <curlx/base64.h>
#include "memdebug.h" /* LAST include file */
static CURLcode test_unit1302(char *arg)
#include <arpa/inet.h>
#endif
-#include <curlx.h>
-
#include "hash.h"
#include "hostip.h"
***************************************************************************/
#include "curlcheck.h"
-#include "timeval.h"
+#include <curlx/timeval.h>
static CURLcode test_unit1323(char *arg)
{
***************************************************************************/
#include "curlcheck.h"
-#include <curlx.h>
-
#include "hash.h"
#include <memdebug.h> /* LAST include file */
***************************************************************************/
#include "curlcheck.h"
-#include <curlx.h>
#include "hash.h"
+
#include <memdebug.h> /* LAST include file */
static const size_t slots = 3;
***************************************************************************/
#include "curlcheck.h"
-#include <curlx.h>
-#include <uint-hash.h>
+#include "uint-hash.h"
+
#include <memdebug.h> /* LAST include file */
static void t1616_mydtor(unsigned int id, void *elem)
***************************************************************************/
#include "curlcheck.h"
+#include <curlx/dynbuf.h>
+
#include "doh.h"
-#include "dynbuf.h"
static CURLcode test_unit1650(char *arg)
{
#include <netinet/in6.h>
#endif
-#include "curlx/strparse.h"
+#include <curlx/strparse.h>
#include "memdebug.h" /* LAST include file */
***************************************************************************/
#include "curlcheck.h"
+#include <curlx/dynbuf.h>
+
#include "http_aws_sigv4.h"
-#include "dynbuf.h"
static CURLcode test_unit1979(char *arg)
{
***************************************************************************/
#include "curlcheck.h"
+#include <curlx/dynbuf.h>
+
#include "http_aws_sigv4.h"
-#include "dynbuf.h"
static CURLcode test_unit1980(char *arg)
{
***************************************************************************/
#include "curlcheck.h"
-#include <curlx.h>
+#include <curlx/curlx.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
***************************************************************************/
#include "curlcheck.h"
+#include <curlx/dynbuf.h>
+
#include "urldata.h"
-#include "dynbuf.h"
#include "dynhds.h"
#include "curl_trc.h"