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
This commit is contained in:
Marcel Raad 2023-04-27 18:54:20 +02:00
parent 7f712399d5
commit da2470de96
No known key found for this signature in database
GPG Key ID: 33C416EFAE4D6F02
4 changed files with 20 additions and 18 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)