diff options
author | Marcel Raad <Marcel.Raad@teamviewer.com> | 2023-04-27 18:54:20 +0200 |
---|---|---|
committer | Marcel Raad <Marcel.Raad@teamviewer.com> | 2023-04-28 11:29:19 +0200 |
commit | da2470de96e94e1c8d276b9ae6e4c97c2cf54239 (patch) | |
tree | f923b3076474e1f56afa0826f6f1a5bcd0d34420 | |
parent | 7f712399d5338a2dd838a8bb16ca1548b491dfb3 (diff) | |
download | curl-da2470de96e94e1c8d276b9ae6e4c97c2cf54239.tar.gz |
tests/http: make curl_setup.h the first include
This is required for the macros there to take effect for system
libraries. Specifically, including the system libraries first led to
warnings about `_FILE_OFFSET_BITS` being redefined in curl_config.h on
the Solaris autobuilds for ws-data.c and ws-pingpong.c.
Also make the curl includes come first for the other source files here
for consistency.
Closes https://github.com/curl/curl/pull/11046
-rw-r--r-- | tests/http/clients/h2-download.c | 9 | ||||
-rw-r--r-- | tests/http/clients/h2-serverpush.c | 9 | ||||
-rw-r--r-- | tests/http/clients/ws-data.c | 10 | ||||
-rw-r--r-- | tests/http/clients/ws-pingpong.c | 10 |
4 files changed, 20 insertions, 18 deletions
diff --git a/tests/http/clients/h2-download.c b/tests/http/clients/h2-download.c index d87ee01e1..dd621d3f4 100644 --- a/tests/http/clients/h2-download.c +++ b/tests/http/clients/h2-download.c @@ -25,6 +25,11 @@ * HTTP/2 server push * </DESC> */ + +/* curl stuff */ +#include <curl/curl.h> +#include <curl/mprintf.h> + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -33,10 +38,6 @@ #include <sys/time.h> #include <unistd.h> -/* curl stuff */ -#include <curl/curl.h> -#include <curl/mprintf.h> - #ifndef CURLPIPE_MULTIPLEX #error "too old libcurl, cannot do HTTP/2 server push!" #endif diff --git a/tests/http/clients/h2-serverpush.c b/tests/http/clients/h2-serverpush.c index 5a1eb3c91..742a67e59 100644 --- a/tests/http/clients/h2-serverpush.c +++ b/tests/http/clients/h2-serverpush.c @@ -25,6 +25,11 @@ * HTTP/2 server push * </DESC> */ + +/* curl stuff */ +#include <curl/curl.h> +#include <curl/mprintf.h> + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -33,10 +38,6 @@ #include <sys/time.h> #include <unistd.h> -/* curl stuff */ -#include <curl/curl.h> -#include <curl/mprintf.h> - #ifndef CURLPIPE_MULTIPLEX #error "too old libcurl, cannot do HTTP/2 server push!" #endif diff --git a/tests/http/clients/ws-data.c b/tests/http/clients/ws-data.c index 93bea4ee7..d055ede3c 100644 --- a/tests/http/clients/ws-data.c +++ b/tests/http/clients/ws-data.c @@ -25,6 +25,11 @@ * Websockets data echos * </DESC> */ + +/* curl stuff */ +#include "curl_setup.h" +#include <curl/curl.h> + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -33,11 +38,6 @@ #include <sys/time.h> #include <unistd.h> - -/* curl stuff */ -#include <curl/curl.h> -#include "curl_setup.h" - #ifdef USE_WEBSOCKETS static diff --git a/tests/http/clients/ws-pingpong.c b/tests/http/clients/ws-pingpong.c index d8cab976e..59d4bd1e6 100644 --- a/tests/http/clients/ws-pingpong.c +++ b/tests/http/clients/ws-pingpong.c @@ -25,6 +25,11 @@ * Websockets pingpong * </DESC> */ + +/* curl stuff */ +#include "curl_setup.h" +#include <curl/curl.h> + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -33,11 +38,6 @@ #include <sys/time.h> #include <unistd.h> - -/* curl stuff */ -#include <curl/curl.h> -#include "curl_setup.h" - #ifdef USE_WEBSOCKETS static CURLcode ping(CURL *curl, const char *send_payload) |