From d36ad8b2a0e7a7b05853d9e397c93b6f42cc7f03 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 12 Aug 2022 21:53:50 +0300 Subject: Upgrade to 7.84.0 --- libcurl/libcurl/buildfile | 38 ++++++++++++++++++++++++++++++- libcurl/libcurl/curl_config.h | 53 ++++++++++++++++++++++--------------------- 2 files changed, 64 insertions(+), 27 deletions(-) (limited to 'libcurl/libcurl') diff --git a/libcurl/libcurl/buildfile b/libcurl/libcurl/buildfile index d44293f..58f7bb2 100644 --- a/libcurl/libcurl/buildfile +++ b/libcurl/libcurl/buildfile @@ -29,6 +29,40 @@ vsc{libcurl}: lib/in{libcurl} CURL_LT_SHLIB_VERSIONED_FLAVOUR = 'OPENSSL_' } +# It seems that for earlier versions of clang the __has_include_next() macro +# is broken in the -frewrite-includes mode. So, in particular, the following +# fragment of llvm-6.0's stdatomic.h: +# +# #if __STDC_HOSTED__ && __has_include_next() +# # include_next +# #else +# ... +# typedef _Atomic(_Bool) atomic_bool; +# ... +# #endif +# +# expands into: +# +# #if __STDC_HOSTED__ && (1)/*__has_include_next()*/ +# #if 0 /* expanded by -frewrite-includes */ +# # include_next +# #endif /* expanded by -frewrite-includes */ +# # 31 "/usr/lib/llvm-6.0/lib/clang/6.0.0/include/stdatomic.h" 3 +# # 32 "/usr/lib/llvm-6.0/lib/clang/6.0.0/include/stdatomic.h" 3 +# #else +# ... +# typedef _Atomic(_Bool) atomic_bool; +# ... +# #endif +# +# This ends up with no atomic_* types defined, etc. +# +# Thus, we enable reprocessing for the source files which (indirectly) include +# for Clang versions prior to 7.0. +# +if ($c.id == 'clang' && $c.version.major < 7) + lib/obj{easy version}: cc.reprocess = true + # Build options. # c.poptions += -DBUILDING_LIBCURL -DHAVE_CONFIG_H \ @@ -95,7 +129,9 @@ switch $tclass, $tsys # used for the API function declarations. Thus, we don't bother # generating/passing the exported symbol list file. # - c.libs += -framework CoreFoundation -framework Security + c.libs += -framework CoreFoundation \ + -framework SystemConfiguration \ + -framework Security } case 'windows', 'mingw32' { diff --git a/libcurl/libcurl/curl_config.h b/libcurl/libcurl/curl_config.h index 3bebb85..868a327 100644 --- a/libcurl/libcurl/curl_config.h +++ b/libcurl/libcurl/curl_config.h @@ -84,6 +84,9 @@ #undef CURL_DISABLE_GETOPTIONS #undef CURL_DISABLE_MQTT #undef CURL_DISABLE_SOCKETPAIR +#undef CURL_DISABLE_HEADERS_API +#undef CURL_DISABLE_HSTS +#undef CURL_DISABLE_NTLM /* Diabled features. */ @@ -104,8 +107,6 @@ #undef USE_LIBPSL #undef USE_MANUAL #undef USE_MBEDTLS -#undef USE_MESALINK -#undef USE_METALINK #undef USE_NGHTTP2 #undef USE_NGHTTP3 #undef USE_NGTCP2 @@ -115,10 +116,10 @@ #undef USE_QUICHE #undef USE_BEARSSL #undef USE_GSASL -#undef USE_HSTS #undef USE_HYPER #undef USE_RUSTLS #undef USE_WOLFSSH +#undef USE_MSH3 /* Specific for (non-) Linux. */ @@ -202,6 +203,9 @@ # define HAVE_TERMIOS_H 1 # define HAVE_UTIMES 1 # define HAVE_SUSECONDS_T 1 +# define HAVE_FCHMOD 1 +# define HAVE_NETINET_UDP_H 1 +# define HAVE_SENDMSG 1 # define CURL_SA_FAMILY_T sa_family_t # define GETHOSTNAME_TYPE_ARG2 size_t @@ -230,7 +234,6 @@ # define HAVE_SYS_UTIME_H 1 # define HAVE_WINDOWS_H 1 # define HAVE_WINSOCK2_H 1 -# define HAVE_WINSOCK_H 1 # undef _UNICODE # undef UNICODE @@ -290,6 +293,7 @@ # define HAVE_VARIADIC_MACROS_GCC 1 # define HAVE_OPENSSL_SRP 1 # define HAVE_FTRUNCATE 1 +# define HAVE_SCHED_YIELD 1 # define TIME_WITH_SYS_TIME 1 #else @@ -318,10 +322,8 @@ #define HAVE_GETPEERNAME 1 #define HAVE_GETSOCKNAME 1 #define HAVE_LONGLONG 1 -#define HAVE_OPENSSL_VERSION 1 #define HAVE_SOCKET 1 #define HAVE_SELECT 1 -#define HAVE_SIG_ATOMIC_T 1 #define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 #define HAVE_STRDUP 1 #define HAVE_STRTOLL 1 @@ -332,8 +334,25 @@ #define HAVE_TIME_H 1 #define HAVE_UTIME 1 #define HAVE_VARIADIC_MACROS_C99 1 +#define HAVE_STRICMP 1 -#define STDC_HEADERS 1 +/* , _Atomic, atomic_*, etc + * + * @@ TMP Note that upstream's package version 7.84.0 fails to compile with + * older versions of Clang with the 'unknown builtin' error (trying to + * use __builtin_ia32_pause()). At the time of this writing this issue + * is fixed but the fixed version is not released yet. When it is + * released, drop the check and define HAVE_ATOMIC + * unconditionally. Until then the curl_global_*() functions will be + * thread-unsafe for Clang versions prior to 6.0 (as they are for + * libcurl versions prior to 7.84.0). + */ +#if !defined(__STDC_NO_ATOMICS__) && \ + (!defined(__clang__) || __clang_major__ >= 6) +# define HAVE_ATOMIC 1 +#endif + +#define STDC_HEADERS 1 #undef _ALL_SOURCE #undef _LARGE_FILES @@ -357,13 +376,10 @@ #undef HAVE_PROTO_BSDSOCKET_H #undef HAVE_RAND_EGD #undef HAVE_SETSOCKOPT_SO_NONBLOCK -#undef HAVE_SIG_ATOMIC_T_VOLATILE -#undef HAVE_SSLV2_CLIENT_METHOD #undef HAVE_STRCMPI #undef HAVE_STROPTS_H #undef HAVE_TERMIO_H #undef HAVE_TIME_T_UNSIGNED -#undef HAVE_WOLFSSLV3_CLIENT_METHOD #undef HAVE_WOLFSSL_GET_PEER_CERTIFICATE #undef HAVE_WOLFSSL_USEALPN #undef HAVE_WRITABLE_ARGV @@ -376,18 +392,9 @@ #undef HAVE_CLOSE_S #undef HAVE_EXTRA_STRDUP_H #undef HAVE_EXTRA_STRICMP_H -#undef HAVE_LIBSSH2_VERSION #undef HAVE_SSL_GET_SHUTDOWN -#undef HAVE_VXWORKS_STRERROR_R #undef RECVFROM_TYPE_ARG6_IS_VOID -#undef HAVE_GETNAMEINFO -#undef GETNAMEINFO_QUAL_ARG1 -#undef GETNAMEINFO_TYPE_ARG1 -#undef GETNAMEINFO_TYPE_ARG2 -#undef GETNAMEINFO_TYPE_ARG46 -#undef GETNAMEINFO_TYPE_ARG7 - #undef HAVE_RECVFROM #undef RECVFROM_TYPE_ARG1 #undef RECVFROM_TYPE_ARG2 @@ -397,9 +404,6 @@ #undef RECVFROM_TYPE_ARG6 #undef RECVFROM_TYPE_RETV -#undef HAVE_ICONV -#undef CURL_ICONV_CODESET_OF_HOST - #undef NEED_MEMORY_H #undef NEED_REENTRANT #undef NEED_THREAD_SAFE @@ -412,8 +416,6 @@ #undef CURLDEBUG #undef DEBUGBUILD #undef ENABLE_QUIC -#undef OPEN_NEEDS_ARG3 -#undef CURL_DOES_CONVERSIONS /* While upstream defines the macro for Clang, it fails to build for older * version of Clang on Mac OS. Thus, we never define it. @@ -501,7 +503,6 @@ */ #define SIZEOF_CURL_OFF_T 8 -#define RETSIGTYPE void #define SEND_QUAL_ARG2 const /* We can probably assume that on platforms we build for, these keywords, @@ -522,6 +523,6 @@ #undef LONG_MAX #undef LONG_MIN -*/ + */ #endif /* LIBCURL_CURL_CONFIG_H */ -- cgit v1.1