]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests/http: make curl_setup.h the first include
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Thu, 27 Apr 2023 16:54:20 +0000 (18:54 +0200)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Fri, 28 Apr 2023 09:29:19 +0000 (11:29 +0200)
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

tests/http/clients/h2-download.c
tests/http/clients/h2-serverpush.c
tests/http/clients/ws-data.c
tests/http/clients/ws-pingpong.c

index d87ee01e1b115d555f57e52958dc42ad47f77b2a..dd621d3f4f51e92555f59bcb38137b5e315c6988 100644 (file)
  * HTTP/2 server push
  * </DESC>
  */
+
+/* curl stuff */
+#include <curl/curl.h>
+#include <curl/mprintf.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #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
index 5a1eb3c91c4a2aef564e9e63bc6dae0cb5a19abc..742a67e596606d2053cf40fa6bbbbdd12899a535 100644 (file)
  * HTTP/2 server push
  * </DESC>
  */
+
+/* curl stuff */
+#include <curl/curl.h>
+#include <curl/mprintf.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #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
index 93bea4ee75271aa9f36ec77e2db8730624b20d07..d055ede3c6d26375869876cfa7ccb61fcb1b66b9 100644 (file)
  * Websockets data echos
  * </DESC>
  */
+
+/* curl stuff */
+#include "curl_setup.h"
+#include <curl/curl.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/time.h>
 #include <unistd.h>
 
-
-/* curl stuff */
-#include <curl/curl.h>
-#include "curl_setup.h"
-
 #ifdef USE_WEBSOCKETS
 
 static
index d8cab976e8e96a9b21388eaa89c676ae708bbb80..59d4bd1e6593841c62bde3c1edf975086343c8cb 100644 (file)
  * Websockets pingpong
  * </DESC>
  */
+
+/* curl stuff */
+#include "curl_setup.h"
+#include <curl/curl.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #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)