summaryrefslogtreecommitdiff
path: root/libcurl/libcurl
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-08-12 21:53:50 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-08-15 19:06:43 +0300
commitd36ad8b2a0e7a7b05853d9e397c93b6f42cc7f03 (patch)
tree45a0204786e28b80694abebb262da9b97b821479 /libcurl/libcurl
parentada686edff5697ef477047676a0835bc52c5af35 (diff)
Upgrade to 7.84.0
Diffstat (limited to 'libcurl/libcurl')
-rw-r--r--libcurl/libcurl/buildfile38
-rw-r--r--libcurl/libcurl/curl_config.h53
2 files changed, 64 insertions, 27 deletions
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(<stdatomic.h>)
+# # include_next <stdatomic.h>
+# #else
+# ...
+# typedef _Atomic(_Bool) atomic_bool;
+# ...
+# #endif
+#
+# expands into:
+#
+# #if __STDC_HOSTED__ && (1)/*__has_include_next(<stdatomic.h>)*/
+# #if 0 /* expanded by -frewrite-includes */
+# # include_next <stdatomic.h>
+# #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
+# <stdatomic.h> 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
+/* <stdatomic.h>, _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 */