Skip to content

Commit d1dd91c

Browse files
committed
curl: update to 8.4.0
1 parent 7867752 commit d1dd91c

File tree

2,419 files changed

+40586
-35893
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,419 files changed

+40586
-35893
lines changed

external/curl/CHANGES

Lines changed: 6093 additions & 5562 deletions
Large diffs are not rendered by default.

external/curl/CMake/CurlSymbolHiding.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ include(CheckCSourceCompiles)
2626
option(CURL_HIDDEN_SYMBOLS "Set to ON to hide libcurl internal symbols (=hide all symbols that aren't officially external)." ON)
2727
mark_as_advanced(CURL_HIDDEN_SYMBOLS)
2828

29+
if(WIN32 AND ENABLE_CURLDEBUG)
30+
# We need to export internal debug functions (e.g. curl_dbg_*), so disable
31+
# symbol hiding for debug builds.
32+
set(CURL_HIDDEN_SYMBOLS OFF)
33+
endif()
34+
2935
if(CURL_HIDDEN_SYMBOLS)
3036
set(SUPPORTS_SYMBOL_HIDING FALSE)
3137

external/curl/CMake/CurlTests.c

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,6 @@
2121
* SPDX-License-Identifier: curl
2222
*
2323
***************************************************************************/
24-
#ifdef TIME_WITH_SYS_TIME
25-
/* Time with sys/time test */
26-
27-
#include <sys/types.h>
28-
#include <sys/time.h>
29-
#include <time.h>
30-
31-
int
32-
main ()
33-
{
34-
if ((struct tm *) 0)
35-
return 0;
36-
;
37-
return 0;
38-
}
39-
40-
#endif
4124

4225
#ifdef HAVE_FCNTL_O_NONBLOCK
4326

@@ -510,7 +493,7 @@ main() {
510493
int
511494
main() {
512495
_Atomic int i = 1;
513-
i = 0; // Force an atomic-write operation.
496+
i = 0; /* Force an atomic-write operation. */
514497
return i;
515498
}
516499
#endif

external/curl/CMake/FindNGTCP2.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ Find the ngtcp2 library
3131
This module accepts optional COMPONENTS to control the crypto library (these are
3232
mutually exclusive)::
3333
34-
OpenSSL: Use libngtcp2_crypto_quictls
35-
GnuTLS: Use libngtcp2_crypto_gnutls
34+
quictls, LibreSSL: Use libngtcp2_crypto_quictls
35+
BoringSSL, AWS-LC: Use libngtcp2_crypto_boringssl
36+
wolfSSL: Use libngtcp2_crypto_wolfssl
37+
GnuTLS: Use libngtcp2_crypto_gnutls
3638
3739
Result Variables
3840
^^^^^^^^^^^^^^^^

external/curl/CMake/FindNSS.cmake

Lines changed: 0 additions & 40 deletions
This file was deleted.

external/curl/CMake/OtherTests.cmake

Lines changed: 89 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#
2323
###########################################################################
2424
include(CheckCSourceCompiles)
25+
include(CheckCSourceRuns)
26+
2527
# The begin of the sources (macros and includes)
2628
set(_source_epilogue "#undef inline")
2729

@@ -38,7 +40,7 @@ if(HAVE_WINDOWS_H)
3840
set(_source_epilogue
3941
"${_source_epilogue}\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif")
4042
set(signature_call_conv "PASCAL")
41-
if(HAVE_LIBWS2_32)
43+
if(WIN32)
4244
set(CMAKE_REQUIRED_LIBRARIES ws2_32)
4345
endif()
4446
else()
@@ -57,10 +59,9 @@ check_c_source_compiles("${_source_epilogue}
5759

5860
if(NOT HAVE_WINDOWS_H)
5961
add_header_include(HAVE_SYS_TIME_H "sys/time.h")
60-
add_header_include(TIME_WITH_SYS_TIME "time.h")
61-
add_header_include(HAVE_TIME_H "time.h")
6262
endif()
6363
check_c_source_compiles("${_source_epilogue}
64+
#include <time.h>
6465
int main(void) {
6566
struct timeval ts;
6667
ts.tv_sec = 0;
@@ -90,7 +91,6 @@ if(NOT CMAKE_CROSSCOMPILING)
9091
# only try this on non-apple platforms
9192

9293
# if not cross-compilation...
93-
include(CheckCSourceRuns)
9494
set(CMAKE_REQUIRED_FLAGS "")
9595
if(HAVE_SYS_POLL_H)
9696
set(CMAKE_REQUIRED_FLAGS "-DHAVE_SYS_POLL_H")
@@ -134,3 +134,88 @@ if(NOT CMAKE_CROSSCOMPILING)
134134
endif()
135135
endif()
136136

137+
# Detect HAVE_GETADDRINFO_THREADSAFE
138+
139+
if(WIN32)
140+
set(HAVE_GETADDRINFO_THREADSAFE ${HAVE_GETADDRINFO})
141+
elseif(NOT HAVE_GETADDRINFO)
142+
set(HAVE_GETADDRINFO_THREADSAFE FALSE)
143+
elseif(CMAKE_SYSTEM_NAME STREQUAL "AIX" OR
144+
CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR
145+
CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR
146+
CMAKE_SYSTEM_NAME STREQUAL "HP-UX" OR
147+
CMAKE_SYSTEM_NAME STREQUAL "MidnightBSD" OR
148+
CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR
149+
CMAKE_SYSTEM_NAME STREQUAL "SunOS")
150+
set(HAVE_GETADDRINFO_THREADSAFE TRUE)
151+
elseif(CMAKE_SYSTEM_NAME MATCHES "BSD")
152+
set(HAVE_GETADDRINFO_THREADSAFE FALSE)
153+
endif()
154+
155+
if(NOT DEFINED HAVE_GETADDRINFO_THREADSAFE)
156+
157+
set(_save_epilogue "${_source_epilogue}")
158+
set(_source_epilogue "#undef inline")
159+
160+
add_header_include(HAVE_SYS_SOCKET_H "sys/socket.h")
161+
add_header_include(HAVE_SYS_TIME_H "sys/time.h")
162+
add_header_include(HAVE_NETDB_H "netdb.h")
163+
164+
check_c_source_compiles("${_source_epilogue}
165+
int main(void)
166+
{
167+
#ifdef h_errno
168+
return 0;
169+
#else
170+
force compilation error
171+
#endif
172+
}" HAVE_H_ERRNO)
173+
174+
if(NOT HAVE_H_ERRNO)
175+
check_c_source_runs("${_source_epilogue}
176+
int main(void)
177+
{
178+
h_errno = 2;
179+
return h_errno != 0 ? 1 : 0;
180+
}" HAVE_H_ERRNO_ASSIGNABLE)
181+
182+
if(NOT HAVE_H_ERRNO_ASSIGNABLE)
183+
check_c_source_compiles("${_source_epilogue}
184+
int main(void)
185+
{
186+
#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200809L)
187+
return 0;
188+
#elif defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 700)
189+
return 0;
190+
#else
191+
force compilation error
192+
#endif
193+
}" HAVE_H_ERRNO_SBS_ISSUE_7)
194+
endif()
195+
endif()
196+
197+
if(HAVE_H_ERRNO OR HAVE_H_ERRNO_ASSIGNABLE OR HAVE_H_ERRNO_SBS_ISSUE_7)
198+
set(HAVE_GETADDRINFO_THREADSAFE TRUE)
199+
endif()
200+
201+
set(_source_epilogue "${_save_epilogue}")
202+
endif()
203+
204+
if(NOT DEFINED HAVE_CLOCK_GETTIME_MONOTONIC_RAW)
205+
set(_save_epilogue "${_source_epilogue}")
206+
set(_source_epilogue "#undef inline")
207+
208+
add_header_include(HAVE_SYS_TYPES_H "sys/types.h")
209+
add_header_include(HAVE_SYS_TIME_H "sys/time.h")
210+
211+
check_c_source_compiles("${_source_epilogue}
212+
#include <time.h>
213+
int main(void)
214+
{
215+
struct timespec ts;
216+
(void)clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
217+
return 0;
218+
}" HAVE_CLOCK_GETTIME_MONOTONIC_RAW)
219+
220+
set(_source_epilogue "${_save_epilogue}")
221+
endif()

external/curl/CMake/Platforms/WindowsCache.cmake

Lines changed: 49 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,41 +23,80 @@
2323
###########################################################################
2424
if(NOT UNIX)
2525
if(WIN32)
26+
27+
set(HAVE_WINDOWS_H 1)
28+
set(HAVE_WS2TCPIP_H 1)
29+
set(HAVE_WINSOCK2_H 1)
30+
31+
if(MINGW)
32+
set(HAVE_SNPRINTF 1)
33+
set(HAVE_UNISTD_H 1)
34+
set(HAVE_INTTYPES_H 1)
35+
set(HAVE_STRTOLL 1)
36+
set(HAVE_BASENAME 1)
37+
elseif(MSVC)
38+
if(NOT MSVC_VERSION LESS 1800)
39+
set(HAVE_INTTYPES_H 1)
40+
set(HAVE_STRTOLL 1)
41+
else()
42+
set(HAVE_INTTYPES_H 0)
43+
set(HAVE_STRTOLL 0)
44+
endif()
45+
if(NOT MSVC_VERSION LESS 1900)
46+
set(HAVE_SNPRINTF 1)
47+
else()
48+
set(HAVE_SNPRINTF 0)
49+
endif()
50+
set(HAVE_BASENAME 0)
51+
endif()
52+
2653
set(HAVE_LIBSOCKET 0)
2754
set(HAVE_GETHOSTNAME 1)
2855
set(HAVE_LIBZ 0)
2956

57+
set(HAVE_ARC4RANDOM 0)
58+
set(HAVE_FNMATCH 0)
59+
set(HAVE_SCHED_YIELD 0)
3060
set(HAVE_ARPA_INET_H 0)
3161
set(HAVE_FCNTL_H 1)
62+
set(HAVE_IFADDRS_H 0)
3263
set(HAVE_IO_H 1)
3364
set(HAVE_NETDB_H 0)
3465
set(HAVE_NETINET_IN_H 0)
66+
set(HAVE_NETINET_TCP_H 0)
67+
set(HAVE_NETINET_UDP_H 0)
3568
set(HAVE_NET_IF_H 0)
69+
set(HAVE_IOCTL_SIOCGIFADDR 0)
70+
set(HAVE_POLL_H 0)
71+
set(HAVE_POLL_FINE 0)
3672
set(HAVE_PWD_H 0)
37-
set(HAVE_SETJMP_H 1)
38-
set(HAVE_SIGNAL_H 1)
39-
set(HAVE_STDLIB_H 1)
4073
set(HAVE_STRINGS_H 0)
41-
set(HAVE_STRING_H 1)
74+
set(HAVE_SYS_FILIO_H 0)
75+
set(HAVE_SYS_WAIT_H 0)
76+
set(HAVE_SYS_IOCTL_H 0)
4277
set(HAVE_SYS_PARAM_H 0)
4378
set(HAVE_SYS_POLL_H 0)
79+
set(HAVE_SYS_RESOURCE_H 0)
4480
set(HAVE_SYS_SELECT_H 0)
4581
set(HAVE_SYS_SOCKET_H 0)
4682
set(HAVE_SYS_SOCKIO_H 0)
4783
set(HAVE_SYS_STAT_H 1)
4884
set(HAVE_SYS_TIME_H 0)
4985
set(HAVE_SYS_TYPES_H 1)
86+
set(HAVE_SYS_UN_H 0)
5087
set(HAVE_SYS_UTIME_H 1)
5188
set(HAVE_TERMIOS_H 0)
5289
set(HAVE_TERMIO_H 0)
53-
set(HAVE_TIME_H 1)
5490
set(HAVE_UTIME_H 0)
5591

92+
set(HAVE_FSEEKO 0)
93+
set(HAVE__FSEEKI64 1)
5694
set(HAVE_SOCKET 1)
5795
set(HAVE_SELECT 1)
5896
set(HAVE_STRDUP 1)
5997
set(HAVE_STRICMP 1)
6098
set(HAVE_STRCMPI 1)
99+
set(HAVE_MEMRCHR 0)
61100
set(HAVE_GETTIMEOFDAY 0)
62101
set(HAVE_CLOSESOCKET 1)
63102
set(HAVE_SIGSETJMP 0)
@@ -66,10 +105,14 @@ if(NOT UNIX)
66105
set(HAVE_GETPWUID 0)
67106
set(HAVE_GETEUID 0)
68107
set(HAVE_UTIME 1)
69-
set(HAVE_RAND_EGD 0)
70108
set(HAVE_GMTIME_R 0)
109+
set(HAVE_CLOCK_GETTIME_MONOTONIC_RAW 0)
71110
set(HAVE_GETHOSTBYNAME_R 0)
72111
set(HAVE_SIGNAL 1)
112+
set(HAVE_LINUX_TCP_H 0)
113+
set(HAVE_GLIBC_STRERROR_R 0)
114+
set(HAVE_MACH_ABSOLUTE_TIME 0)
115+
set(HAVE_GETIFADDRS 0)
73116

74117
set(HAVE_GETHOSTBYNAME_R_3 0)
75118
set(HAVE_GETHOSTBYNAME_R_3_REENTRANT 0)
@@ -78,7 +121,6 @@ if(NOT UNIX)
78121
set(HAVE_GETHOSTBYNAME_R_6 0)
79122
set(HAVE_GETHOSTBYNAME_R_6_REENTRANT 0)
80123

81-
set(TIME_WITH_SYS_TIME 0)
82124
set(HAVE_O_NONBLOCK 0)
83125
set(HAVE_IN_ADDR_T 0)
84126
set(STDC_HEADERS 1)

external/curl/CMake/curl-config.cmake.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@ endif()
3333

3434
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
3535
check_required_components("@PROJECT_NAME@")
36+
37+
# Alias for either shared or static library
38+
add_library(@PROJECT_NAME@::libcurl ALIAS @PROJECT_NAME@::@LIB_SELECTED@)

0 commit comments

Comments
 (0)