Skip to content

Commit

Permalink
Revert "curl: update 8.12.0"
Browse files Browse the repository at this point in the history
This reverts commit b9110bd.

8.12.0 is apparently buggy, while I haven't faced any of the bugs yet,
I don't want to spent time debugging fallouts from it, it will be
updated to 8.12.1 later.
  • Loading branch information
bapt committed Feb 12, 2025
1 parent fe3031f commit b1915d3
Show file tree
Hide file tree
Showing 1,057 changed files with 24,007 additions and 27,995 deletions.
6 changes: 2 additions & 4 deletions external/curl/CMake/CurlSymbolHiding.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@ if(WIN32 AND (ENABLE_DEBUG OR ENABLE_CURLDEBUG))
# e.g. curl_easy_perform_ev() or curl_dbg_*(),
# so disable symbol hiding for debug builds and for memory tracking.
set(CURL_HIDDEN_SYMBOLS OFF)
elseif(DOS OR AMIGA)
set(CURL_HIDDEN_SYMBOLS OFF)
endif()

set(CURL_HIDES_PRIVATE_SYMBOLS FALSE)
set(CURL_EXTERN_SYMBOL "")
set(CURL_CFLAG_SYMBOLS_HIDE "")
unset(CURL_EXTERN_SYMBOL)
unset(CURL_CFLAG_SYMBOLS_HIDE)

if(CURL_HIDDEN_SYMBOLS)
if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT MSVC)
Expand Down
59 changes: 30 additions & 29 deletions external/curl/CMake/CurlTests.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ int main(void)
int flags = 0;
if(0 != fcntl(0, F_SETFL, flags | O_NONBLOCK))
return 1;
;
return 0;
}
#endif
Expand Down Expand Up @@ -146,21 +147,24 @@ int main(void) { return 0; }
#endif

#ifdef HAVE_FILE_OFFSET_BITS
#ifdef _FILE_OFFSET_BITS
#undef _FILE_OFFSET_BITS
#endif
#define _FILE_OFFSET_BITS 64
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We cannot simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
/* Check that off_t can represent 2**63 - 1 correctly.
We cannot simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int main(void) { return 0; }
#endif

#ifdef HAVE_IOCTLSOCKET
/* includes start */
#ifdef _WIN32
# include <winsock2.h>
#endif
Expand All @@ -176,7 +180,10 @@ int main(void)
#endif

#ifdef HAVE_IOCTLSOCKET_CAMEL
#include <proto/bsdsocket.h>
/* includes start */
#ifdef _WIN32
# include <winsock2.h>
#endif
int main(void)
{
/* IoctlSocket source code */
Expand All @@ -188,9 +195,9 @@ int main(void)
#endif

#ifdef HAVE_IOCTLSOCKET_CAMEL_FIONBIO
#include <proto/bsdsocket.h>
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
/* includes start */
#ifdef _WIN32
# include <winsock2.h>
#endif
int main(void)
{
Expand All @@ -204,6 +211,7 @@ int main(void)
#endif

#ifdef HAVE_IOCTLSOCKET_FIONBIO
/* includes start */
#ifdef _WIN32
# include <winsock2.h>
#endif
Expand All @@ -219,6 +227,7 @@ int main(void)

#ifdef HAVE_IOCTL_FIONBIO
/* headers for FIONBIO test */
/* includes start */
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
Expand Down Expand Up @@ -246,6 +255,7 @@ int main(void)

#ifdef HAVE_IOCTL_SIOCGIFADDR
/* headers for FIONBIO test */
/* includes start */
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
Expand Down Expand Up @@ -273,15 +283,18 @@ int main(void)
#endif

#ifdef HAVE_SETSOCKOPT_SO_NONBLOCK
/* includes start */
#ifdef _WIN32
# include <winsock2.h>
#endif
/* includes start */
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
/* includes end */
int main(void)
{
if(0 != setsockopt(0, SOL_SOCKET, SO_NONBLOCK, 0, 0))
Expand Down Expand Up @@ -359,6 +372,7 @@ int main(void)
#endif

#ifdef HAVE_ATOMIC
/* includes start */
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
Expand All @@ -368,6 +382,8 @@ int main(void)
#ifdef HAVE_STDATOMIC_H
# include <stdatomic.h>
#endif
/* includes end */

int main(void)
{
_Atomic int i = 1;
Expand All @@ -377,12 +393,14 @@ int main(void)
#endif

#ifdef HAVE_WIN32_WINNT
/* includes start */
#ifdef _WIN32
# ifndef NOGDI
# define NOGDI
# define NOGDI
# endif
# include <windows.h>
#endif
/* includes end */

#define enquote(x) #x
#define expand(x) enquote(x)
Expand All @@ -393,20 +411,3 @@ int main(void)
return 0;
}
#endif

#ifdef MINGW64_VERSION
#ifdef __MINGW32__
# include <_mingw.h>
#endif

#define enquote(x) #x
#define expand(x) enquote(x)
#pragma message("MINGW64_VERSION=" \
expand(__MINGW64_VERSION_MAJOR) "." \
expand(__MINGW64_VERSION_MINOR))

int main(void)
{
return 0;
}
#endif
70 changes: 35 additions & 35 deletions external/curl/CMake/FindBrotli.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,47 +34,47 @@
# - `BROTLI_FOUND`: System has brotli.
# - `BROTLI_INCLUDE_DIRS`: The brotli include directories.
# - `BROTLI_LIBRARIES`: The brotli library names.
# - `BROTLI_LIBRARY_DIRS`: The brotli library directories.
# - `BROTLI_PC_REQUIRES`: The brotli pkg-config packages.
# - `BROTLI_CFLAGS`: Required compiler flags.
# - `BROTLI_VERSION`: Version of brotli.

set(BROTLI_PC_REQUIRES "libbrotlidec")

if(CURL_USE_PKGCONFIG AND
NOT DEFINED BROTLI_INCLUDE_DIR AND
NOT DEFINED BROTLICOMMON_LIBRARY AND
NOT DEFINED BROTLIDEC_LIBRARY)
if(CURL_USE_PKGCONFIG)
find_package(PkgConfig QUIET)
pkg_check_modules(BROTLI "libbrotlicommon")
pkg_check_modules(BROTLIDEC ${BROTLI_PC_REQUIRES})
pkg_check_modules(PC_BROTLI "libbrotlidec")
endif()

if(BROTLI_FOUND AND BROTLIDEC_FOUND)
list(APPEND BROTLIDEC_LIBRARIES ${BROTLI_LIBRARIES}) # order is significant: brotlidec then brotlicommon
list(REVERSE BROTLIDEC_LIBRARIES)
list(REMOVE_DUPLICATES BROTLIDEC_LIBRARIES)
list(REVERSE BROTLIDEC_LIBRARIES)
set(BROTLI_LIBRARIES ${BROTLIDEC_LIBRARIES})
string(REPLACE ";" " " BROTLI_CFLAGS "${BROTLI_CFLAGS}")
message(STATUS "Found Brotli (via pkg-config): ${BROTLI_INCLUDE_DIRS} (found version \"${BROTLI_VERSION}\")")
else()
find_path(BROTLI_INCLUDE_DIR "brotli/decode.h")
find_library(BROTLICOMMON_LIBRARY NAMES "brotlicommon")
find_library(BROTLIDEC_LIBRARY NAMES "brotlidec")
find_path(BROTLI_INCLUDE_DIR "brotli/decode.h"
HINTS
${PC_BROTLI_INCLUDEDIR}
${PC_BROTLI_INCLUDE_DIRS}
)

find_library(BROTLICOMMON_LIBRARY NAMES "brotlicommon"
HINTS
${PC_BROTLI_LIBDIR}
${PC_BROTLI_LIBRARY_DIRS}
)
find_library(BROTLIDEC_LIBRARY NAMES "brotlidec"
HINTS
${PC_BROTLI_LIBDIR}
${PC_BROTLI_LIBRARY_DIRS}
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Brotli
REQUIRED_VARS
BROTLI_INCLUDE_DIR
BROTLIDEC_LIBRARY
BROTLICOMMON_LIBRARY
)
if(PC_BROTLI_VERSION)
set(BROTLI_VERSION ${PC_BROTLI_VERSION})
endif()

if(BROTLI_FOUND)
set(BROTLI_INCLUDE_DIRS ${BROTLI_INCLUDE_DIR})
set(BROTLI_LIBRARIES ${BROTLIDEC_LIBRARY} ${BROTLICOMMON_LIBRARY})
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Brotli
REQUIRED_VARS
BROTLI_INCLUDE_DIR
BROTLIDEC_LIBRARY
BROTLICOMMON_LIBRARY
VERSION_VAR
BROTLI_VERSION
)

mark_as_advanced(BROTLI_INCLUDE_DIR BROTLIDEC_LIBRARY BROTLICOMMON_LIBRARY)
if(BROTLI_FOUND)
set(BROTLI_INCLUDE_DIRS ${BROTLI_INCLUDE_DIR})
set(BROTLI_LIBRARIES ${BROTLIDEC_LIBRARY} ${BROTLICOMMON_LIBRARY})
endif()

mark_as_advanced(BROTLI_INCLUDE_DIR BROTLIDEC_LIBRARY BROTLICOMMON_LIBRARY)
94 changes: 44 additions & 50 deletions external/curl/CMake/FindCares.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,64 +33,58 @@
# - `CARES_FOUND`: System has c-ares.
# - `CARES_INCLUDE_DIRS`: The c-ares include directories.
# - `CARES_LIBRARIES`: The c-ares library names.
# - `CARES_LIBRARY_DIRS`: The c-ares library directories.
# - `CARES_PC_REQUIRES`: The c-ares pkg-config packages.
# - `CARES_CFLAGS`: Required compiler flags.
# - `CARES_VERSION`: Version of c-ares.

set(CARES_PC_REQUIRES "libcares")

if(CURL_USE_PKGCONFIG AND
NOT DEFINED CARES_INCLUDE_DIR AND
NOT DEFINED CARES_LIBRARY)
if(CURL_USE_PKGCONFIG)
find_package(PkgConfig QUIET)
pkg_check_modules(CARES ${CARES_PC_REQUIRES})
pkg_check_modules(PC_CARES "libcares")
endif()

if(CARES_FOUND)
string(REPLACE ";" " " CARES_CFLAGS "${CARES_CFLAGS}")
message(STATUS "Found Cares (via pkg-config): ${CARES_INCLUDE_DIRS} (found version \"${CARES_VERSION}\")")
else()
find_path(CARES_INCLUDE_DIR NAMES "ares.h")
find_library(CARES_LIBRARY NAMES ${CARES_NAMES} "cares")
find_path(CARES_INCLUDE_DIR NAMES "ares.h"
HINTS
${PC_CARES_INCLUDEDIR}
${PC_CARES_INCLUDE_DIRS}
)

unset(CARES_VERSION CACHE)
if(CARES_INCLUDE_DIR AND EXISTS "${CARES_INCLUDE_DIR}/ares_version.h")
set(_version_regex1 "#[\t ]*define[\t ]+ARES_VERSION_MAJOR[\t ]+([0-9]+).*")
set(_version_regex2 "#[\t ]*define[\t ]+ARES_VERSION_MINOR[\t ]+([0-9]+).*")
set(_version_regex3 "#[\t ]*define[\t ]+ARES_VERSION_PATCH[\t ]+([0-9]+).*")
file(STRINGS "${CARES_INCLUDE_DIR}/ares_version.h" _version_str1 REGEX "${_version_regex1}")
file(STRINGS "${CARES_INCLUDE_DIR}/ares_version.h" _version_str2 REGEX "${_version_regex2}")
file(STRINGS "${CARES_INCLUDE_DIR}/ares_version.h" _version_str3 REGEX "${_version_regex3}")
string(REGEX REPLACE "${_version_regex1}" "\\1" _version_str1 "${_version_str1}")
string(REGEX REPLACE "${_version_regex2}" "\\1" _version_str2 "${_version_str2}")
string(REGEX REPLACE "${_version_regex3}" "\\1" _version_str3 "${_version_str3}")
set(CARES_VERSION "${_version_str1}.${_version_str2}.${_version_str3}")
unset(_version_regex1)
unset(_version_regex2)
unset(_version_regex3)
unset(_version_str1)
unset(_version_str2)
unset(_version_str3)
endif()
find_library(CARES_LIBRARY NAMES ${CARES_NAMES} "cares"
HINTS
${PC_CARES_LIBDIR}
${PC_CARES_LIBRARY_DIRS}
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Cares
REQUIRED_VARS
CARES_INCLUDE_DIR
CARES_LIBRARY
VERSION_VAR
CARES_VERSION
)
if(PC_CARES_VERSION)
set(CARES_VERSION ${PC_CARES_VERSION})
elseif(CARES_INCLUDE_DIR AND EXISTS "${CARES_INCLUDE_DIR}/ares_version.h")
set(_version_regex1 "#[\t ]*define[\t ]+ARES_VERSION_MAJOR[\t ]+([0-9]+).*")
set(_version_regex2 "#[\t ]*define[\t ]+ARES_VERSION_MINOR[\t ]+([0-9]+).*")
set(_version_regex3 "#[\t ]*define[\t ]+ARES_VERSION_PATCH[\t ]+([0-9]+).*")
file(STRINGS "${CARES_INCLUDE_DIR}/ares_version.h" _version_str1 REGEX "${_version_regex1}")
file(STRINGS "${CARES_INCLUDE_DIR}/ares_version.h" _version_str2 REGEX "${_version_regex2}")
file(STRINGS "${CARES_INCLUDE_DIR}/ares_version.h" _version_str3 REGEX "${_version_regex3}")
string(REGEX REPLACE "${_version_regex1}" "\\1" _version_str1 "${_version_str1}")
string(REGEX REPLACE "${_version_regex2}" "\\1" _version_str2 "${_version_str2}")
string(REGEX REPLACE "${_version_regex3}" "\\1" _version_str3 "${_version_str3}")
set(CARES_VERSION "${_version_str1}.${_version_str2}.${_version_str3}")
unset(_version_regex1)
unset(_version_regex2)
unset(_version_regex3)
unset(_version_str1)
unset(_version_str2)
unset(_version_str3)
endif()

if(CARES_FOUND)
set(CARES_INCLUDE_DIRS ${CARES_INCLUDE_DIR})
set(CARES_LIBRARIES ${CARES_LIBRARY})
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Cares
REQUIRED_VARS
CARES_INCLUDE_DIR
CARES_LIBRARY
VERSION_VAR
CARES_VERSION
)

mark_as_advanced(CARES_INCLUDE_DIR CARES_LIBRARY)
if(CARES_FOUND)
set(CARES_INCLUDE_DIRS ${CARES_INCLUDE_DIR})
set(CARES_LIBRARIES ${CARES_LIBRARY})
endif()

if(CARES_FOUND AND WIN32)
list(APPEND CARES_LIBRARIES "iphlpapi") # for if_indextoname and others
endif()
mark_as_advanced(CARES_INCLUDE_DIR CARES_LIBRARY)
Loading

0 comments on commit b1915d3

Please sign in to comment.