summaryrefslogtreecommitdiffstats
path: root/vendor/curl-sys
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:47:55 +0000
commit2aadc03ef15cb5ca5cc2af8a7c08e070742f0ac4 (patch)
tree033cc839730fda84ff08db877037977be94e5e3a /vendor/curl-sys
parentInitial commit. (diff)
downloadcargo-2aadc03ef15cb5ca5cc2af8a7c08e070742f0ac4.tar.xz
cargo-2aadc03ef15cb5ca5cc2af8a7c08e070742f0ac4.zip
Adding upstream version 0.70.1+ds1.upstream/0.70.1+ds1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/curl-sys')
-rw-r--r--vendor/curl-sys/.cargo-checksum.json1
-rw-r--r--vendor/curl-sys/Cargo.toml64
-rw-r--r--vendor/curl-sys/LICENSE19
-rw-r--r--vendor/curl-sys/build.rs608
-rw-r--r--vendor/curl-sys/debian/patches/avoid-spurious-rebuilds.patch12
-rw-r--r--vendor/curl-sys/debian/patches/disable-libz-sys.patch27
-rw-r--r--vendor/curl-sys/debian/patches/disable-rustls.patch22
-rw-r--r--vendor/curl-sys/debian/patches/disable-vendor.patch25
-rw-r--r--vendor/curl-sys/debian/patches/drop-non-linux.patch22
-rw-r--r--vendor/curl-sys/debian/patches/series5
-rw-r--r--vendor/curl-sys/lib.rs1173
11 files changed, 1978 insertions, 0 deletions
diff --git a/vendor/curl-sys/.cargo-checksum.json b/vendor/curl-sys/.cargo-checksum.json
new file mode 100644
index 0000000..87f4826
--- /dev/null
+++ b/vendor/curl-sys/.cargo-checksum.json
@@ -0,0 +1 @@
+{"files":{},"package":"b4a0d18d88360e374b16b2273c832b5e57258ffc1d4aa4f96b108e0738d5752f"} \ No newline at end of file
diff --git a/vendor/curl-sys/Cargo.toml b/vendor/curl-sys/Cargo.toml
new file mode 100644
index 0000000..df3fb3f
--- /dev/null
+++ b/vendor/curl-sys/Cargo.toml
@@ -0,0 +1,64 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g., crates.io) dependencies.
+#
+# If you are reading this file be aware that the original Cargo.toml
+# will likely look very different (and much more reasonable).
+# See Cargo.toml.orig for the original contents.
+
+[package]
+edition = "2018"
+name = "curl-sys"
+version = "0.4.68+curl-8.4.0"
+authors = ["Alex Crichton <alex@alexcrichton.com>"]
+build = "build.rs"
+links = "curl"
+description = "Native bindings to the libcurl library"
+documentation = "https://docs.rs/curl-sys"
+categories = ["external-ffi-bindings"]
+license = "MIT"
+repository = "https://github.com/alexcrichton/curl-rust"
+
+[lib]
+name = "curl_sys"
+path = "lib.rs"
+
+[dependencies.libc]
+version = "0.2.2"
+
+[dependencies.libnghttp2-sys]
+version = "0.1.3"
+optional = true
+
+[build-dependencies.cc]
+version = "1.0"
+
+[build-dependencies.pkg-config]
+version = "0.3.3"
+
+[features]
+default = ["ssl"]
+force-system-lib-on-osx = []
+http2 = ["libnghttp2-sys"]
+mesalink = []
+ntlm = []
+poll_7_68_0 = []
+protocol-ftp = []
+spnego = []
+ssl = ["openssl-sys"]
+static-curl = []
+static-ssl = ["openssl-sys"]
+upkeep_7_62_0 = []
+
+[target."cfg(all(unix, not(target_os = \"macos\")))".dependencies.openssl-sys]
+version = "0.9.64"
+optional = true
+
+[badges.appveyor]
+repository = "alexcrichton/curl-rust"
+
+[badges.travis-ci]
+repository = "alexcrichton/curl-rust"
diff --git a/vendor/curl-sys/LICENSE b/vendor/curl-sys/LICENSE
new file mode 100644
index 0000000..5f5e4b0
--- /dev/null
+++ b/vendor/curl-sys/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2014 Carl Lerche
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/curl-sys/build.rs b/vendor/curl-sys/build.rs
new file mode 100644
index 0000000..ecad625
--- /dev/null
+++ b/vendor/curl-sys/build.rs
@@ -0,0 +1,608 @@
+use std::env;
+use std::fs;
+use std::path::{Path, PathBuf};
+use std::process::Command;
+
+fn main() {
+ let target = env::var("TARGET").unwrap();
+ let windows = target.contains("windows");
+
+ if cfg!(feature = "mesalink") {
+ println!("cargo:warning=MesaLink support has been removed as of curl 7.82.0, will use default TLS backend instead.");
+ }
+
+ // This feature trumps all others, and is largely set by rustbuild to force
+ // usage of the system library to ensure that we're always building an
+ // ABI-compatible Cargo.
+ if cfg!(feature = "force-system-lib-on-osx") && target.contains("apple") {
+ return println!("cargo:rustc-flags=-l curl");
+ }
+
+ // On Debian, always probe for a system-wide libcurl even when linking statically
+ if true {
+ if cfg!(feature = "static-curl") { println!("cargo:static=1"); }
+ // OSX ships libcurl by default, so we just use that version
+ // so long as it has the right features enabled.
+ if target.contains("apple") && (!cfg!(feature = "http2") || curl_config_reports_http2()) {
+ return println!("cargo:rustc-flags=-l curl");
+ }
+
+ // Next, fall back and try to use pkg-config if its available.
+ if windows {
+ if try_vcpkg() {
+ return;
+ }
+ } else if try_pkg_config() {
+ return;
+ }
+ }
+
+ if !Path::new("curl/.git").exists() {
+ let _ = Command::new("git")
+ .args(&["submodule", "update", "--init", "curl"])
+ .status();
+ }
+
+ if target.contains("apple") {
+ // On (older) OSX we need to link against the clang runtime,
+ // which is hidden in some non-default path.
+ //
+ // More details at https://github.com/alexcrichton/curl-rust/issues/279.
+ if let Some(path) = macos_link_search_path() {
+ println!("cargo:rustc-link-lib=clang_rt.osx");
+ println!("cargo:rustc-link-search={}", path);
+ }
+ }
+
+ let dst = PathBuf::from(env::var_os("OUT_DIR").unwrap());
+ let include = dst.join("include");
+ let build = dst.join("build");
+ println!("cargo:root={}", dst.display());
+ println!("cargo:include={}", include.display());
+ println!("cargo:static=1");
+ println!("cargo:rustc-cfg=libcurl_vendored");
+ fs::create_dir_all(include.join("curl")).unwrap();
+
+ for header in [
+ "curl.h",
+ "curlver.h",
+ "easy.h",
+ "options.h",
+ "header.h",
+ "mprintf.h",
+ "multi.h",
+ "stdcheaders.h",
+ "system.h",
+ "urlapi.h",
+ "typecheck-gcc.h",
+ "websockets.h",
+ ]
+ .iter()
+ {
+ fs::copy(
+ format!("curl/include/curl/{}", header),
+ include.join("curl").join(header),
+ )
+ .unwrap();
+ }
+
+ let pkgconfig = dst.join("lib/pkgconfig");
+ fs::create_dir_all(&pkgconfig).unwrap();
+ let contents = fs::read_to_string("curl/libcurl.pc.in").unwrap();
+ fs::write(
+ pkgconfig.join("libcurl.pc"),
+ contents
+ .replace("@prefix@", dst.to_str().unwrap())
+ .replace("@exec_prefix@", "")
+ .replace("@libdir@", dst.join("lib").to_str().unwrap())
+ .replace("@includedir@", include.to_str().unwrap())
+ .replace("@CPPFLAG_CURL_STATICLIB@", "-DCURL_STATICLIB")
+ .replace("@LIBCURL_LIBS@", "")
+ .replace("@SUPPORT_FEATURES@", "")
+ .replace("@SUPPORT_PROTOCOLS@", "")
+ .replace("@CURLVERSION@", "8.4.0"),
+ )
+ .unwrap();
+
+ let mut cfg = cc::Build::new();
+ cfg.out_dir(&build)
+ .include("curl/lib")
+ .include("curl/include")
+ .define("BUILDING_LIBCURL", None)
+ .define("CURL_DISABLE_DICT", None)
+ .define("CURL_DISABLE_GOPHER", None)
+ .define("CURL_DISABLE_IMAP", None)
+ .define("CURL_DISABLE_LDAP", None)
+ .define("CURL_DISABLE_LDAPS", None)
+ .define("CURL_DISABLE_POP3", None)
+ .define("CURL_DISABLE_RTSP", None)
+ .define("CURL_DISABLE_SMB", None)
+ .define("CURL_DISABLE_SMTP", None)
+ .define("CURL_DISABLE_TELNET", None)
+ .define("CURL_DISABLE_TFTP", None)
+ .define("CURL_STATICLIB", None)
+ .define("ENABLE_IPV6", None)
+ .define("HAVE_ASSERT_H", None)
+ .define("OS", "\"unknown\"") // TODO
+ .define("HAVE_ZLIB_H", None)
+ .define("HAVE_LONGLONG", None)
+ .define("HAVE_LIBZ", None)
+ .define("HAVE_BOOL_T", None)
+ .define("HAVE_STDBOOL_H", None)
+ .file("curl/lib/asyn-thread.c")
+ .file("curl/lib/altsvc.c")
+ .file("curl/lib/base64.c")
+ .file("curl/lib/bufq.c")
+ .file("curl/lib/bufref.c")
+ .file("curl/lib/cfilters.c")
+ .file("curl/lib/cf-h1-proxy.c")
+ .file("curl/lib/cf-haproxy.c")
+ .file("curl/lib/cf-https-connect.c")
+ .file("curl/lib/cf-socket.c")
+ .file("curl/lib/conncache.c")
+ .file("curl/lib/connect.c")
+ .file("curl/lib/content_encoding.c")
+ .file("curl/lib/cookie.c")
+ .file("curl/lib/curl_addrinfo.c")
+ .file("curl/lib/curl_get_line.c")
+ .file("curl/lib/curl_memrchr.c")
+ .file("curl/lib/curl_range.c")
+ .file("curl/lib/curl_threads.c")
+ .file("curl/lib/curl_trc.c")
+ .file("curl/lib/doh.c")
+ .file("curl/lib/dynbuf.c")
+ .file("curl/lib/dynhds.c")
+ .file("curl/lib/easy.c")
+ .file("curl/lib/escape.c")
+ .file("curl/lib/file.c")
+ .file("curl/lib/fileinfo.c")
+ .file("curl/lib/fopen.c")
+ .file("curl/lib/formdata.c")
+ .file("curl/lib/getenv.c")
+ .file("curl/lib/getinfo.c")
+ .file("curl/lib/hash.c")
+ .file("curl/lib/headers.c")
+ .file("curl/lib/hmac.c")
+ .file("curl/lib/hostasyn.c")
+ .file("curl/lib/hostip.c")
+ .file("curl/lib/hostip6.c")
+ .file("curl/lib/hsts.c")
+ .file("curl/lib/http.c")
+ .file("curl/lib/http1.c")
+ .file("curl/lib/http_aws_sigv4.c")
+ .file("curl/lib/http_chunks.c")
+ .file("curl/lib/http_digest.c")
+ .file("curl/lib/http_proxy.c")
+ .file("curl/lib/idn.c")
+ .file("curl/lib/if2ip.c")
+ .file("curl/lib/inet_ntop.c")
+ .file("curl/lib/inet_pton.c")
+ .file("curl/lib/llist.c")
+ .file("curl/lib/md5.c")
+ .file("curl/lib/mime.c")
+ .file("curl/lib/macos.c")
+ .file("curl/lib/mprintf.c")
+ .file("curl/lib/mqtt.c")
+ .file("curl/lib/multi.c")
+ .file("curl/lib/netrc.c")
+ .file("curl/lib/nonblock.c")
+ .file("curl/lib/noproxy.c")
+ .file("curl/lib/parsedate.c")
+ .file("curl/lib/progress.c")
+ .file("curl/lib/rand.c")
+ .file("curl/lib/rename.c")
+ .file("curl/lib/select.c")
+ .file("curl/lib/sendf.c")
+ .file("curl/lib/setopt.c")
+ .file("curl/lib/sha256.c")
+ .file("curl/lib/share.c")
+ .file("curl/lib/slist.c")
+ .file("curl/lib/socks.c")
+ .file("curl/lib/socketpair.c")
+ .file("curl/lib/speedcheck.c")
+ .file("curl/lib/splay.c")
+ .file("curl/lib/strcase.c")
+ .file("curl/lib/strdup.c")
+ .file("curl/lib/strerror.c")
+ .file("curl/lib/strtok.c")
+ .file("curl/lib/strtoofft.c")
+ .file("curl/lib/timeval.c")
+ .file("curl/lib/transfer.c")
+ .file("curl/lib/url.c")
+ .file("curl/lib/urlapi.c")
+ .file("curl/lib/version.c")
+ .file("curl/lib/vauth/digest.c")
+ .file("curl/lib/vauth/vauth.c")
+ .file("curl/lib/vquic/curl_msh3.c")
+ .file("curl/lib/vquic/curl_ngtcp2.c")
+ .file("curl/lib/vquic/curl_quiche.c")
+ .file("curl/lib/vquic/vquic.c")
+ .file("curl/lib/vtls/hostcheck.c")
+ .file("curl/lib/vtls/keylog.c")
+ .file("curl/lib/vtls/vtls.c")
+ .file("curl/lib/warnless.c")
+ .file("curl/lib/timediff.c")
+ .define("HAVE_GETADDRINFO", None)
+ .define("HAVE_GETPEERNAME", None)
+ .define("HAVE_GETSOCKNAME", None)
+ .warnings(false);
+
+ if cfg!(feature = "ntlm") {
+ cfg.file("curl/lib/curl_des.c")
+ .file("curl/lib/curl_endian.c")
+ .file("curl/lib/curl_gethostname.c")
+ .file("curl/lib/curl_ntlm_core.c")
+ .file("curl/lib/curl_ntlm_wb.c")
+ .file("curl/lib/http_ntlm.c")
+ .file("curl/lib/md4.c")
+ .file("curl/lib/vauth/ntlm.c")
+ .file("curl/lib/vauth/ntlm_sspi.c");
+ } else {
+ cfg.define("CURL_DISABLE_NTLM", None);
+ }
+
+ if cfg!(feature = "protocol-ftp") {
+ cfg.file("curl/lib/curl_fnmatch.c")
+ .file("curl/lib/ftp.c")
+ .file("curl/lib/ftplistparser.c")
+ .file("curl/lib/pingpong.c");
+ } else {
+ cfg.define("CURL_DISABLE_FTP", None);
+ }
+
+ if cfg!(feature = "http2") {
+ cfg.define("USE_NGHTTP2", None)
+ .define("NGHTTP2_STATICLIB", None)
+ .file("curl/lib/cf-h2-proxy.c")
+ .file("curl/lib/http2.c");
+
+ println!("cargo:rustc-cfg=link_libnghttp2");
+ if let Some(path) = env::var_os("DEP_NGHTTP2_ROOT") {
+ let path = PathBuf::from(path);
+ cfg.include(path.join("include"));
+ }
+ }
+
+ println!("cargo:rustc-cfg=link_libz");
+ if let Some(path) = env::var_os("DEP_Z_INCLUDE") {
+ cfg.include(path);
+ }
+
+ if cfg!(feature = "spnego") {
+ cfg.define("USE_SPNEGO", None)
+ .file("curl/lib/http_negotiate.c")
+ .file("curl/lib/vauth/vauth.c");
+ }
+
+ // Configure TLS backend. Since Cargo does not support mutually exclusive
+ // features, make sure we only compile one vtls.
+ if cfg!(feature = "rustls") {
+ cfg.define("USE_RUSTLS", None)
+ .file("curl/lib/vtls/rustls.c")
+ .include(env::var_os("DEP_RUSTLS_FFI_INCLUDE").unwrap());
+ } else if cfg!(feature = "windows-static-ssl") {
+ if windows {
+ cfg.define("USE_OPENSSL", None)
+ .file("curl/lib/vtls/openssl.c");
+ // We need both openssl and zlib
+ // Those can be installed with
+ // ```shell
+ // git clone https://github.com/microsoft/vcpkg
+ // cd vcpkg
+ // ./bootstrap-vcpkg.bat -disableMetrics
+ // ./vcpkg.exe integrate install
+ // ./vcpkg.exe install openssl:x64-windows-static-md
+ // ```
+ #[cfg(target_env = "msvc")]
+ vcpkg::Config::new().find_package("openssl").ok();
+ #[cfg(target_env = "msvc")]
+ vcpkg::Config::new().find_package("zlib").ok();
+ } else {
+ panic!("Not available on non windows platform")
+ }
+ } else if cfg!(feature = "ssl") {
+ if windows {
+ // For windows, spnego feature is auto on in case ssl feature is on.
+ // Please see definition of USE_SPNEGO in curl_setup.h for more info.
+ cfg.define("USE_WINDOWS_SSPI", None)
+ .define("USE_SCHANNEL", None)
+ .file("curl/lib/http_negotiate.c")
+ .file("curl/lib/curl_sspi.c")
+ .file("curl/lib/socks_sspi.c")
+ .file("curl/lib/vauth/spnego_sspi.c")
+ .file("curl/lib/vauth/vauth.c")
+ .file("curl/lib/vtls/schannel.c")
+ .file("curl/lib/vtls/schannel_verify.c")
+ .file("curl/lib/vtls/x509asn1.c");
+ } else if target.contains("-apple-") {
+ cfg.define("USE_SECTRANSP", None)
+ .file("curl/lib/vtls/sectransp.c")
+ .file("curl/lib/vtls/x509asn1.c");
+ if xcode_major_version().map_or(true, |v| v >= 9) {
+ // On earlier Xcode versions (<9), defining HAVE_BUILTIN_AVAILABLE
+ // would cause __bultin_available() to fail to compile due to
+ // unrecognized platform names, so we try to check for Xcode
+ // version first (if unknown, assume it's recent, as in >= 9).
+ cfg.define("HAVE_BUILTIN_AVAILABLE", "1");
+ }
+ } else {
+ cfg.define("USE_OPENSSL", None)
+ .file("curl/lib/vtls/openssl.c");
+
+ println!("cargo:rustc-cfg=link_openssl");
+ if let Some(path) = env::var_os("DEP_OPENSSL_INCLUDE") {
+ cfg.include(path);
+ }
+ }
+ }
+
+ // Configure platform-specific details.
+ if windows {
+ cfg.define("WIN32", None)
+ .define("USE_THREADS_WIN32", None)
+ .define("HAVE_IOCTLSOCKET_FIONBIO", None)
+ .define("USE_WINSOCK", None)
+ .file("curl/lib/bufref.c")
+ .file("curl/lib/system_win32.c")
+ .file("curl/lib/version_win32.c")
+ .file("curl/lib/vauth/digest_sspi.c")
+ .file("curl/lib/curl_multibyte.c");
+
+ if cfg!(feature = "spnego") {
+ cfg.file("curl/lib/vauth/spnego_sspi.c");
+ }
+ } else {
+ cfg.define("RECV_TYPE_ARG1", "int")
+ .define("HAVE_PTHREAD_H", None)
+ .define("HAVE_ARPA_INET_H", None)
+ .define("HAVE_ERRNO_H", None)
+ .define("HAVE_FCNTL_H", None)
+ .define("HAVE_NETDB_H", None)
+ .define("HAVE_NETINET_IN_H", None)
+ .define("HAVE_NETINET_TCP_H", None)
+ .define("HAVE_POLL_H", None)
+ .define("HAVE_FCNTL_O_NONBLOCK", None)
+ .define("HAVE_SYS_SELECT_H", None)
+ .define("HAVE_SYS_STAT_H", None)
+ .define("HAVE_SYS_TIME_H", None)
+ .define("HAVE_UNISTD_H", None)
+ .define("HAVE_RECV", None)
+ .define("HAVE_SELECT", None)
+ .define("HAVE_SEND", None)
+ .define("HAVE_SOCKET", None)
+ .define("HAVE_STERRROR_R", None)
+ .define("HAVE_SOCKETPAIR", None)
+ .define("HAVE_STRUCT_TIMEVAL", None)
+ .define("HAVE_SYS_UN_H", None)
+ .define("USE_THREADS_POSIX", None)
+ .define("USE_UNIX_SOCKETS", None)
+ .define("RECV_TYPE_ARG2", "void*")
+ .define("RECV_TYPE_ARG3", "size_t")
+ .define("RECV_TYPE_ARG4", "int")
+ .define("RECV_TYPE_RETV", "ssize_t")
+ .define("SEND_QUAL_ARG2", "const")
+ .define("SEND_TYPE_ARG1", "int")
+ .define("SEND_TYPE_ARG2", "void*")
+ .define("SEND_TYPE_ARG3", "size_t")
+ .define("SEND_TYPE_ARG4", "int")
+ .define("SEND_TYPE_RETV", "ssize_t")
+ .define("SIZEOF_CURL_OFF_T", "8")
+ .define("SIZEOF_INT", "4")
+ .define("SIZEOF_SHORT", "2");
+
+ if target.contains("-apple-") {
+ cfg.define("__APPLE__", None)
+ .define("HAVE_MACH_ABSOLUTE_TIME", None);
+ } else {
+ cfg.define("HAVE_CLOCK_GETTIME_MONOTONIC", None)
+ .define("HAVE_GETTIMEOFDAY", None)
+ // poll() on various versions of macOS are janky, so only use it
+ // on non-macOS unix-likes. This matches the official default
+ // build configuration as well.
+ .define("HAVE_POLL_FINE", None);
+ }
+
+ if cfg!(feature = "spnego") {
+ cfg.define("HAVE_GSSAPI", None)
+ .file("curl/lib/curl_gssapi.c")
+ .file("curl/lib/socks_gssapi.c")
+ .file("curl/lib/vauth/spnego_gssapi.c");
+ if let Some(path) = env::var_os("GSSAPI_ROOT") {
+ let path = PathBuf::from(path);
+ cfg.include(path.join("include"));
+ }
+
+ // Link against the MIT gssapi library. It might be desirable to add support for
+ // choosing between MIT and Heimdal libraries in the future.
+ println!("cargo:rustc-link-lib=gssapi_krb5");
+ }
+
+ let width = env::var("CARGO_CFG_TARGET_POINTER_WIDTH")
+ .unwrap()
+ .parse::<usize>()
+ .unwrap();
+ cfg.define("SIZEOF_SSIZE_T", Some(&(width / 8).to_string()[..]));
+ cfg.define("SIZEOF_SIZE_T", Some(&(width / 8).to_string()[..]));
+ cfg.define("SIZEOF_LONG", Some(&(width / 8).to_string()[..]));
+
+ cfg.flag("-fvisibility=hidden");
+ }
+
+ cfg.compile("curl");
+
+ if windows {
+ println!("cargo:rustc-link-lib=ws2_32");
+ println!("cargo:rustc-link-lib=crypt32");
+ }
+
+ // Illumos/Solaris requires explicit linking with libnsl
+ if target.contains("solaris") {
+ println!("cargo:rustc-link-lib=nsl");
+ }
+
+ if target.contains("-apple-") {
+ println!("cargo:rustc-link-lib=framework=Security");
+ println!("cargo:rustc-link-lib=framework=CoreFoundation");
+ println!("cargo:rustc-link-lib=framework=CoreServices");
+ println!("cargo:rustc-link-lib=framework=SystemConfiguration");
+ }
+}
+
+#[cfg(not(target_env = "msvc"))]
+fn try_vcpkg() -> bool {
+ false
+}
+
+#[cfg(target_env = "msvc")]
+fn try_vcpkg() -> bool {
+ // the import library for the dll is called libcurl_imp
+ let mut successful_probe_details = match vcpkg::Config::new()
+ .lib_names("libcurl_imp", "libcurl")
+ .emit_includes(true)
+ .probe("curl")
+ {
+ Ok(details) => Some(details),
+ Err(e) => {
+ println!("first run of vcpkg did not find libcurl: {}", e);
+ None
+ }
+ };
+
+ if successful_probe_details.is_none() {
+ match vcpkg::Config::new()
+ .lib_name("libcurl")
+ .emit_includes(true)
+ .probe("curl")
+ {
+ Ok(details) => successful_probe_details = Some(details),
+ Err(e) => println!("second run of vcpkg did not find libcurl: {}", e),
+ }
+ }
+
+ if successful_probe_details.is_some() {
+ // Found libcurl which depends on openssl, libssh2 and zlib
+ // in the a default vcpkg installation. Probe for them
+ // but do not fail if they are not present as we may be working
+ // with a customized vcpkg installation.
+ vcpkg::Config::new()
+ .lib_name("libeay32")
+ .lib_name("ssleay32")
+ .probe("openssl")
+ .ok();
+
+ vcpkg::probe_package("libssh2").ok();
+
+ vcpkg::Config::new()
+ .lib_names("zlib", "zlib1")
+ .probe("zlib")
+ .ok();
+
+ println!("cargo:rustc-link-lib=crypt32");
+ println!("cargo:rustc-link-lib=gdi32");
+ println!("cargo:rustc-link-lib=user32");
+ println!("cargo:rustc-link-lib=wldap32");
+ return true;
+ }
+ false
+}
+
+fn try_pkg_config() -> bool {
+ let mut cfg = pkg_config::Config::new();
+ cfg.cargo_metadata(false);
+ let lib = match cfg.probe("libcurl") {
+ Ok(lib) => lib,
+ Err(e) => {
+ println!(
+ "Couldn't find libcurl from pkgconfig ({:?}), \
+ compiling it from source...",
+ e
+ );
+ return false;
+ }
+ };
+
+ // Not all system builds of libcurl have http2 features enabled, so if we've
+ // got a http2-requested build then we may fall back to a build from source.
+ if cfg!(feature = "http2") && !curl_config_reports_http2() {
+ return false;
+ }
+
+ // Re-find the library to print cargo's metadata, then print some extra
+ // metadata as well.
+ cfg.cargo_metadata(true).probe("libcurl").unwrap();
+ for path in lib.include_paths.iter() {
+ println!("cargo:include={}", path.display());
+ }
+ true
+}
+
+fn xcode_major_version() -> Option<u8> {
+ let status = Command::new("xcode-select").arg("-p").status().ok()?;
+ if status.success() {
+ let output = Command::new("xcodebuild").arg("-version").output().ok()?;
+ if output.status.success() {
+ let stdout = String::from_utf8_lossy(&output.stdout);
+ println!("xcode version: {}", stdout);
+ let mut words = stdout.split_whitespace();
+ if words.next()? == "Xcode" {
+ let version = words.next()?;
+ return version[..version.find('.')?].parse().ok();
+ }
+ }
+ }
+ println!("unable to determine Xcode version, assuming >= 9");
+ None
+}
+
+fn curl_config_reports_http2() -> bool {
+ let output = Command::new("curl-config").arg("--features").output();
+ let output = match output {
+ Ok(out) => out,
+ Err(e) => {
+ println!("failed to run curl-config ({}), building from source", e);
+ return false;
+ }
+ };
+ if !output.status.success() {
+ println!("curl-config failed: {}", output.status);
+ return false;
+ }
+ let stdout = String::from_utf8_lossy(&output.stdout);
+ if !stdout.contains("HTTP2") {
+ println!(
+ "failed to find http-2 feature enabled in pkg-config-found \
+ libcurl, building from source"
+ );
+ return false;
+ }
+
+ true
+}
+
+fn macos_link_search_path() -> Option<String> {
+ let output = cc::Build::new()
+ .get_compiler()
+ .to_command()
+ .arg("--print-search-dirs")
+ .output()
+ .ok()?;
+ if !output.status.success() {
+ println!(
+ "failed to run 'clang --print-search-dirs', continuing without a link search path"
+ );
+ return None;
+ }
+
+ let stdout = String::from_utf8_lossy(&output.stdout);
+ for line in stdout.lines() {
+ if line.contains("libraries: =") {
+ let path = line.split('=').nth(1)?;
+ if !path.is_empty() {
+ return Some(format!("{}/lib/darwin", path));
+ }
+ }
+ }
+
+ println!("failed to determine link search path, continuing without it");
+ None
+}
diff --git a/vendor/curl-sys/debian/patches/avoid-spurious-rebuilds.patch b/vendor/curl-sys/debian/patches/avoid-spurious-rebuilds.patch
new file mode 100644
index 0000000..37046e6
--- /dev/null
+++ b/vendor/curl-sys/debian/patches/avoid-spurious-rebuilds.patch
@@ -0,0 +1,12 @@
+Since we excluded the "curl" source code directory, this check is no longer
+applicable and would always lead to rebuilds since the file is non-existent.
+--- a/build.rs
++++ b/build.rs
+@@ -4,7 +4,6 @@
+ use std::process::Command;
+
+ fn main() {
+- println!("cargo:rerun-if-changed=curl");
+ let target = env::var("TARGET").unwrap();
+ let windows = target.contains("windows");
+
diff --git a/vendor/curl-sys/debian/patches/disable-libz-sys.patch b/vendor/curl-sys/debian/patches/disable-libz-sys.patch
new file mode 100644
index 0000000..b865d75
--- /dev/null
+++ b/vendor/curl-sys/debian/patches/disable-libz-sys.patch
@@ -0,0 +1,27 @@
+Description: for now, disable libz to avoid NEW trip
+
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -33,11 +33,6 @@
+ version = "0.1.3"
+ optional = true
+
+-[dependencies.libz-sys]
+-version = "1.0.18"
+-features = ["libc"]
+-default-features = false
+-
+ [dependencies.rustls-ffi]
+ version = "0.8"
+ features = ["no_log_capture"]
+@@ -64,10 +59,6 @@
+ static-ssl = ["openssl-sys"]
+ upkeep_7_62_0 = []
+ windows-static-ssl = []
+-zlib-ng-compat = [
+- "libz-sys/zlib-ng",
+- "static-curl",
+-]
+
+ [target."cfg(all(unix, not(target_os = \"macos\")))".dependencies.openssl-sys]
+ version = "0.9.64"
diff --git a/vendor/curl-sys/debian/patches/disable-rustls.patch b/vendor/curl-sys/debian/patches/disable-rustls.patch
new file mode 100644
index 0000000..7b8c51f
--- /dev/null
+++ b/vendor/curl-sys/debian/patches/disable-rustls.patch
@@ -0,0 +1,22 @@
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -33,11 +33,6 @@
+ version = "0.1.3"
+ optional = true
+
+-[dependencies.rustls-ffi]
+-version = "0.8"
+-features = ["no_log_capture"]
+-optional = true
+-
+ [build-dependencies.cc]
+ version = "1.0"
+
+@@ -52,7 +47,6 @@
+ ntlm = []
+ poll_7_68_0 = []
+ protocol-ftp = []
+-rustls = ["rustls-ffi"]
+ spnego = []
+ ssl = ["openssl-sys"]
+ static-curl = []
diff --git a/vendor/curl-sys/debian/patches/disable-vendor.patch b/vendor/curl-sys/debian/patches/disable-vendor.patch
new file mode 100644
index 0000000..8c37dda
--- /dev/null
+++ b/vendor/curl-sys/debian/patches/disable-vendor.patch
@@ -0,0 +1,25 @@
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -61,7 +61,7 @@
+ spnego = []
+ ssl = ["openssl-sys"]
+ static-curl = []
+-static-ssl = ["openssl-sys/vendored"]
++static-ssl = ["openssl-sys"]
+ upkeep_7_62_0 = []
+ windows-static-ssl = []
+ zlib-ng-compat = [
+--- a/build.rs
++++ b/build.rs
+@@ -18,8 +18,9 @@
+ return println!("cargo:rustc-flags=-l curl");
+ }
+
+- // If the static-curl feature is disabled, probe for a system-wide libcurl.
+- if !cfg!(feature = "static-curl") {
++ // On Debian, always probe for a system-wide libcurl even when linking statically
++ if true {
++ if cfg!(feature = "static-curl") { println!("cargo:static=1"); }
+ // OSX ships libcurl by default, so we just use that version
+ // so long as it has the right features enabled.
+ if target.contains("apple") && (!cfg!(feature = "http2") || curl_config_reports_http2()) {
diff --git a/vendor/curl-sys/debian/patches/drop-non-linux.patch b/vendor/curl-sys/debian/patches/drop-non-linux.patch
new file mode 100644
index 0000000..b0d2350
--- /dev/null
+++ b/vendor/curl-sys/debian/patches/drop-non-linux.patch
@@ -0,0 +1,22 @@
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -52,19 +51,11 @@
+ static-curl = []
+ static-ssl = ["openssl-sys"]
+ upkeep_7_62_0 = []
+-windows-static-ssl = []
+
+ [target."cfg(all(unix, not(target_os = \"macos\")))".dependencies.openssl-sys]
+ version = "0.9.64"
+ optional = true
+
+-[target."cfg(target_env = \"msvc\")".build-dependencies.vcpkg]
+-version = "0.2"
+-
+-[target."cfg(windows)".dependencies.windows-sys]
+-version = "0.48"
+-features = ["Win32_Networking_WinSock"]
+-
+ [badges.appveyor]
+ repository = "alexcrichton/curl-rust"
+
diff --git a/vendor/curl-sys/debian/patches/series b/vendor/curl-sys/debian/patches/series
new file mode 100644
index 0000000..3321281
--- /dev/null
+++ b/vendor/curl-sys/debian/patches/series
@@ -0,0 +1,5 @@
+avoid-spurious-rebuilds.patch
+disable-vendor.patch
+disable-libz-sys.patch
+disable-rustls.patch
+drop-non-linux.patch
diff --git a/vendor/curl-sys/lib.rs b/vendor/curl-sys/lib.rs
new file mode 100644
index 0000000..6dd5697
--- /dev/null
+++ b/vendor/curl-sys/lib.rs
@@ -0,0 +1,1173 @@
+#![allow(bad_style)]
+#![doc(html_root_url = "https://docs.rs/curl-sys/0.4")]
+
+// These `extern crate` are required for conditional linkages of curl.
+#[cfg(link_libnghttp2)]
+extern crate libnghttp2_sys;
+#[cfg(link_libz)]
+extern crate libz_sys;
+#[cfg(link_openssl)]
+extern crate openssl_sys;
+#[cfg(feature = "rustls")]
+extern crate rustls_ffi;
+
+use libc::c_ulong;
+use libc::{c_char, c_double, c_int, c_long, c_short, c_uint, c_void, size_t, time_t};
+
+#[cfg(unix)]
+pub use libc::fd_set;
+#[cfg(windows)]
+pub use windows_sys::Win32::Networking::WinSock::FD_SET as fd_set;
+#[cfg(windows)]
+use windows_sys::Win32::Networking::WinSock::SOCKADDR;
+
+#[cfg(target_env = "msvc")]
+#[doc(hidden)]
+pub type __enum_ty = libc::c_int;
+#[cfg(not(target_env = "msvc"))]
+#[doc(hidden)]
+pub type __enum_ty = libc::c_uint;
+
+pub type CURLINFO = __enum_ty;
+pub type CURLoption = __enum_ty;
+pub type CURLcode = __enum_ty;
+pub type CURLversion = __enum_ty;
+pub type curl_off_t = i64;
+
+pub enum CURL {}
+
+#[cfg(unix)]
+pub type curl_socket_t = libc::c_int;
+#[cfg(unix)]
+pub const CURL_SOCKET_BAD: curl_socket_t = -1;
+#[cfg(all(windows, target_pointer_width = "32"))]
+pub type curl_socket_t = libc::c_uint;
+#[cfg(all(windows, target_pointer_width = "64"))]
+pub type curl_socket_t = u64;
+#[cfg(windows)]
+pub const CURL_SOCKET_BAD: curl_socket_t = !0;
+
+pub enum curl_httppost {
+ // Note that this changed in some versions of libcurl, so we currently don't
+ // bind the fields as they're apparently not stable.
+ // pub next: *mut curl_httppost,
+ // pub name: *mut c_char,
+ // pub namelength: c_long,
+ // pub contents: *mut c_char,
+ // pub contentslength: c_long,
+ // pub buffer: *mut c_char,
+ // pub bufferlength: c_long,
+ // pub contenttype: *mut c_char,
+ // pub contentheader: *mut curl_slist,
+ // pub more: *mut curl_httppost,
+ // pub flags: c_long,
+ // pub showfilename: *mut c_char,
+ // pub userp: *mut c_void,
+}
+
+// pub const HTTPPOST_FILENAME: c_long = 1 << 0;
+// pub const HTTPPOST_READFILE: c_long = 1 << 1;
+// pub const HTTPPOST_PTRNAME: c_long = 1 << 2;
+// pub const HTTPPOST_PTRCONTENTS: c_long = 1 << 3;
+// pub const HTTPPOST_BUFFER: c_long = 1 << 4;
+// pub const HTTPPOST_PTRBUFFER: c_long = 1 << 5;
+// pub const HTTPPOST_CALLBACK: c_long = 1 << 6;
+
+pub type curl_progress_callback =
+ extern "C" fn(*mut c_void, c_double, c_double, c_double, c_double) -> c_int;
+// pub type curl_xferinfo_callback = extern fn(*mut c_void,
+// curl_off_t,
+// curl_off_t,
+// curl_off_t,
+// curl_off_t) -> c_int;
+
+pub const CURL_WRITEFUNC_PAUSE: size_t = 0x10000001;
+
+pub type curl_write_callback = extern "C" fn(*mut c_char, size_t, size_t, *mut c_void) -> size_t;
+
+pub type curlfiletype = __enum_ty;
+pub const CURLFILETYPE_FILE: curlfiletype = 0;
+pub const CURLFILETYPE_DIRECTORY: curlfiletype = 1;
+pub const CURLFILETYPE_SYMLINK: curlfiletype = 2;
+pub const CURLFILETYPE_DEVICE_BLOCK: curlfiletype = 3;
+pub const CURLFILETYPE_DEVICE_CHAR: curlfiletype = 4;
+pub const CURLFILETYPE_NAMEDPIPE: curlfiletype = 5;
+pub const CURLFILETYPE_SOCKET: curlfiletype = 6;
+pub const CURLFILETYPE_DOOR: curlfiletype = 7;
+pub const CURLFILETYPE_UNKNOWN: curlfiletype = 8;
+
+pub const CURLFINFOFLAG_KNOWN_FILENAME: c_uint = 1 << 0;
+pub const CURLFINFOFLAG_KNOWN_FILETYPE: c_uint = 1 << 1;
+pub const CURLFINFOFLAG_KNOWN_TIME: c_uint = 1 << 2;
+pub const CURLFINFOFLAG_KNOWN_PERM: c_uint = 1 << 3;
+pub const CURLFINFOFLAG_KNOWN_UID: c_uint = 1 << 4;
+pub const CURLFINFOFLAG_KNOWN_GID: c_uint = 1 << 5;
+pub const CURLFINFOFLAG_KNOWN_SIZE: c_uint = 1 << 6;
+pub const CURLFINFOFLAG_KNOWN_HLINKCOUNT: c_uint = 1 << 7;
+
+#[repr(C)]
+pub struct curl_fileinfo {
+ pub filename: *mut c_char,
+ pub filetype: curlfiletype,
+ pub time: time_t,
+ pub perm: c_uint,
+ pub uid: c_int,
+ pub gid: c_int,
+ pub size: curl_off_t,
+ pub hardlinks: c_long,
+
+ pub strings_time: *mut c_char,
+ pub strings_perm: *mut c_char,
+ pub strings_user: *mut c_char,
+ pub strings_group: *mut c_char,
+ pub strings_target: *mut c_char,
+
+ pub flags: c_uint,
+ pub b_data: *mut c_char,
+ pub b_size: size_t,
+ pub b_used: size_t,
+}
+
+pub const CURL_BLOB_NOCOPY: c_uint = 0;
+pub const CURL_BLOB_COPY: c_uint = 1;
+
+#[repr(C)]
+pub struct curl_blob {
+ pub data: *mut c_void,
+ pub len: size_t,
+ pub flags: c_uint,
+}
+
+pub const CURL_CHUNK_BGN_FUNC_OK: c_long = 0;
+pub const CURL_CHUNK_BGN_FUNC_FAIL: c_long = 1;
+pub const CURL_CHUNK_BGN_FUNC_SKIP: c_long = 2;
+pub type curl_chunk_bgn_callback = extern "C" fn(*const c_void, *mut c_void, c_int) -> c_long;
+
+pub const CURL_CHUNK_END_FUNC_OK: c_long = 0;
+pub const CURL_CHUNK_END_FUNC_FAIL: c_long = 1;
+pub type curl_chunk_end_callback = extern "C" fn(*mut c_void) -> c_long;
+
+pub const CURL_FNMATCHFUNC_MATCH: c_int = 0;
+pub const CURL_FNMATCHFUNC_NOMATCH: c_int = 1;
+pub const CURL_FNMATCHFUNC_FAIL: c_int = 2;
+pub type curl_fnmatch_callback = extern "C" fn(*mut c_void, *const c_char, *const c_char) -> c_int;
+
+pub const CURL_SEEKFUNC_OK: c_int = 0;
+pub const CURL_SEEKFUNC_FAIL: c_int = 1;
+pub const CURL_SEEKFUNC_CANTSEEK: c_int = 2;
+pub type curl_seek_callback = extern "C" fn(*mut c_void, curl_off_t, c_int) -> c_int;
+
+pub const CURL_READFUNC_ABORT: size_t = 0x10000000;
+pub const CURL_READFUNC_PAUSE: size_t = 0x10000001;
+pub type curl_read_callback = extern "C" fn(*mut c_char, size_t, size_t, *mut c_void) -> size_t;
+
+// pub const CURL_SOCKOPT_OK: c_int = 0;
+// pub const CURL_SOCKOPT_ERROR: c_int = 1;
+// pub const CURL_SOCKOPT_ALREADY_CONNECTED: c_int = 2;
+// pub type curl_sockopt_callback = extern fn(*mut c_void,
+// curl_socket_t,
+// curlsocktype) -> c_int;
+
+pub type curlioerr = __enum_ty;
+pub const CURLIOE_OK: curlioerr = 0;
+pub const CURLIOE_UNKNOWNCMD: curlioerr = 1;
+pub const CURLIOE_FAILRESTART: curlioerr = 2;
+
+pub type curliocmd = __enum_ty;
+pub const CURLIOCMD_NOP: curliocmd = 0;
+pub const CURLIOCMD_RESTARTREAD: curliocmd = 1;
+
+pub type curl_ioctl_callback = extern "C" fn(*mut CURL, c_int, *mut c_void) -> curlioerr;
+
+pub type curl_malloc_callback = extern "C" fn(size_t) -> *mut c_void;
+pub type curl_free_callback = extern "C" fn(*mut c_void);
+pub type curl_realloc_callback = extern "C" fn(*mut c_void, size_t) -> *mut c_void;
+pub type curl_strdup_callback = extern "C" fn(*const c_char) -> *mut c_char;
+pub type curl_calloc_callback = extern "C" fn(size_t, size_t) -> *mut c_void;
+
+pub type curl_infotype = __enum_ty;
+pub const CURLINFO_TEXT: curl_infotype = 0;
+pub const CURLINFO_HEADER_IN: curl_infotype = 1;
+pub const CURLINFO_HEADER_OUT: curl_infotype = 2;
+pub const CURLINFO_DATA_IN: curl_infotype = 3;
+pub const CURLINFO_DATA_OUT: curl_infotype = 4;
+pub const CURLINFO_SSL_DATA_IN: curl_infotype = 5;
+pub const CURLINFO_SSL_DATA_OUT: curl_infotype = 6;
+
+pub type curl_debug_callback =
+ extern "C" fn(*mut CURL, curl_infotype, *mut c_char, size_t, *mut c_void) -> c_int;
+
+pub const CURLE_OK: CURLcode = 0;
+pub const CURLE_UNSUPPORTED_PROTOCOL: CURLcode = 1;
+pub const CURLE_FAILED_INIT: CURLcode = 2;
+pub const CURLE_URL_MALFORMAT: CURLcode = 3;
+// pub const CURLE_NOT_BUILT_IN: CURLcode = 4;
+pub const CURLE_COULDNT_RESOLVE_PROXY: CURLcode = 5;
+pub const CURLE_COULDNT_RESOLVE_HOST: CURLcode = 6;
+pub const CURLE_COULDNT_CONNECT: CURLcode = 7;
+pub const CURLE_FTP_WEIRD_SERVER_REPLY: CURLcode = 8;
+pub const CURLE_REMOTE_ACCESS_DENIED: CURLcode = 9;
+// pub const CURLE_FTP_ACCEPT_FAILED: CURLcode = 10;
+pub const CURLE_FTP_WEIRD_PASS_REPLY: CURLcode = 11;
+// pub const CURLE_FTP_ACCEPT_TIMEOUT: CURLcode = 12;
+pub const CURLE_FTP_WEIRD_PASV_REPLY: CURLcode = 13;
+pub const CURLE_FTP_WEIRD_227_FORMAT: CURLcode = 14;
+pub const CURLE_FTP_CANT_GET_HOST: CURLcode = 15;
+pub const CURLE_HTTP2: CURLcode = 16;
+pub const CURLE_FTP_COULDNT_SET_TYPE: CURLcode = 17;
+pub const CURLE_PARTIAL_FILE: CURLcode = 18;
+pub const CURLE_FTP_COULDNT_RETR_FILE: CURLcode = 19;
+pub const CURLE_OBSOLETE20: CURLcode = 20;
+pub const CURLE_QUOTE_ERROR: CURLcode = 21;
+pub const CURLE_HTTP_RETURNED_ERROR: CURLcode = 22;
+pub const CURLE_WRITE_ERROR: CURLcode = 23;
+pub const CURLE_OBSOLETE24: CURLcode = 24;
+pub const CURLE_UPLOAD_FAILED: CURLcode = 25;
+pub const CURLE_READ_ERROR: CURLcode = 26;
+pub const CURLE_OUT_OF_MEMORY: CURLcode = 27;
+pub const CURLE_OPERATION_TIMEDOUT: CURLcode = 28;
+pub const CURLE_OBSOLETE29: CURLcode = 29;
+pub const CURLE_FTP_PORT_FAILED: CURLcode = 30;
+pub const CURLE_FTP_COULDNT_USE_REST: CURLcode = 31;
+pub const CURLE_OBSOLETE32: CURLcode = 32;
+pub const CURLE_RANGE_ERROR: CURLcode = 33;
+pub const CURLE_HTTP_POST_ERROR: CURLcode = 34;
+pub const CURLE_SSL_CONNECT_ERROR: CURLcode = 35;
+pub const CURLE_BAD_DOWNLOAD_RESUME: CURLcode = 36;
+pub const CURLE_FILE_COULDNT_READ_FILE: CURLcode = 37;
+pub const CURLE_LDAP_CANNOT_BIND: CURLcode = 38;
+pub const CURLE_LDAP_SEARCH_FAILED: CURLcode = 39;
+pub const CURLE_OBSOLETE40: CURLcode = 40;
+pub const CURLE_FUNCTION_NOT_FOUND: CURLcode = 41;
+pub const CURLE_ABORTED_BY_CALLBACK: CURLcode = 42;
+pub const CURLE_BAD_FUNCTION_ARGUMENT: CURLcode = 43;
+pub const CURLE_OBSOLETE44: CURLcode = 44;
+pub const CURLE_INTERFACE_FAILED: CURLcode = 45;
+pub const CURLE_OBSOLETE46: CURLcode = 46;
+pub const CURLE_TOO_MANY_REDIRECTS: CURLcode = 47;
+pub const CURLE_UNKNOWN_OPTION: CURLcode = 48;
+pub const CURLE_TELNET_OPTION_SYNTAX: CURLcode = 49;
+pub const CURLE_OBSOLETE50: CURLcode = 50;
+pub const CURLE_PEER_FAILED_VERIFICATION: CURLcode = 60;
+pub const CURLE_GOT_NOTHING: CURLcode = 52;
+pub const CURLE_SSL_ENGINE_NOTFOUND: CURLcode = 53;
+pub const CURLE_SSL_ENGINE_SETFAILED: CURLcode = 54;
+pub const CURLE_SEND_ERROR: CURLcode = 55;
+pub const CURLE_RECV_ERROR: CURLcode = 56;
+pub const CURLE_OBSOLETE57: CURLcode = 57;
+pub const CURLE_SSL_CERTPROBLEM: CURLcode = 58;
+pub const CURLE_SSL_CIPHER: CURLcode = 59;
+pub const CURLE_SSL_CACERT: CURLcode = 60;
+pub const CURLE_BAD_CONTENT_ENCODING: CURLcode = 61;
+pub const CURLE_LDAP_INVALID_URL: CURLcode = 62;
+pub const CURLE_FILESIZE_EXCEEDED: CURLcode = 63;
+pub const CURLE_USE_SSL_FAILED: CURLcode = 64;
+pub const CURLE_SEND_FAIL_REWIND: CURLcode = 65;
+pub const CURLE_SSL_ENGINE_INITFAILED: CURLcode = 66;
+pub const CURLE_LOGIN_DENIED: CURLcode = 67;
+pub const CURLE_TFTP_NOTFOUND: CURLcode = 68;
+pub const CURLE_TFTP_PERM: CURLcode = 69;
+pub const CURLE_REMOTE_DISK_FULL: CURLcode = 70;
+pub const CURLE_TFTP_ILLEGAL: CURLcode = 71;
+pub const CURLE_TFTP_UNKNOWNID: CURLcode = 72;
+pub const CURLE_REMOTE_FILE_EXISTS: CURLcode = 73;
+pub const CURLE_TFTP_NOSUCHUSER: CURLcode = 74;
+pub const CURLE_CONV_FAILED: CURLcode = 75;
+pub const CURLE_CONV_REQD: CURLcode = 76;
+pub const CURLE_SSL_CACERT_BADFILE: CURLcode = 77;
+pub const CURLE_REMOTE_FILE_NOT_FOUND: CURLcode = 78;
+pub const CURLE_SSH: CURLcode = 79;
+pub const CURLE_SSL_SHUTDOWN_FAILED: CURLcode = 80;
+pub const CURLE_AGAIN: CURLcode = 81;
+pub const CURLE_SSL_CRL_BADFILE: CURLcode = 82;
+pub const CURLE_SSL_ISSUER_ERROR: CURLcode = 83;
+pub const CURLE_FTP_PRET_FAILED: CURLcode = 84;
+pub const CURLE_RTSP_CSEQ_ERROR: CURLcode = 85;
+pub const CURLE_RTSP_SESSION_ERROR: CURLcode = 86;
+pub const CURLE_FTP_BAD_FILE_LIST: CURLcode = 87;
+pub const CURLE_CHUNK_FAILED: CURLcode = 88;
+pub const CURLE_NO_CONNECTION_AVAILABLE: CURLcode = 89;
+pub const CURLE_SSL_PINNEDPUBKEYNOTMATCH: CURLcode = 90;
+pub const CURLE_SSL_INVALIDCERTSTATUS: CURLcode = 91;
+pub const CURLE_HTTP2_STREAM: CURLcode = 92;
+pub const CURLE_RECURSIVE_API_CALL: CURLcode = 93;
+
+pub type curl_conv_callback = extern "C" fn(*mut c_char, size_t) -> CURLcode;
+pub type curl_ssl_ctx_callback = extern "C" fn(*mut CURL, *mut c_void, *mut c_void) -> CURLcode;
+
+pub type curl_proxytype = __enum_ty;
+pub const CURLPROXY_HTTP: curl_proxytype = 0;
+pub const CURLPROXY_HTTP_1_0: curl_proxytype = 1;
+pub const CURLPROXY_SOCKS4: curl_proxytype = 4;
+pub const CURLPROXY_SOCKS5: curl_proxytype = 5;
+pub const CURLPROXY_SOCKS4A: curl_proxytype = 6;
+pub const CURLPROXY_SOCKS5_HOSTNAME: curl_proxytype = 7;
+
+pub const CURLAUTH_NONE: c_ulong = 0;
+pub const CURLAUTH_BASIC: c_ulong = 1 << 0;
+pub const CURLAUTH_DIGEST: c_ulong = 1 << 1;
+pub const CURLAUTH_GSSNEGOTIATE: c_ulong = 1 << 2;
+pub const CURLAUTH_NTLM: c_ulong = 1 << 3;
+pub const CURLAUTH_DIGEST_IE: c_ulong = 1 << 4;
+pub const CURLAUTH_NTLM_WB: c_ulong = 1 << 5;
+pub const CURLAUTH_AWS_SIGV4: c_ulong = 1 << 7;
+// pub const CURLAUTH_ONLY: c_ulong = 1 << 31;
+pub const CURLAUTH_ANY: c_ulong = !CURLAUTH_DIGEST_IE;
+pub const CURLAUTH_ANYSAFE: c_ulong = !(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE);
+
+// pub const CURLSSH_AUTH_ANY: c_ulong = !0;
+// pub const CURLSSH_AUTH_NONE: c_ulong = 0;
+// pub const CURLSSH_AUTH_PUBLICKEY: c_ulong = 1 << 0;
+// pub const CURLSSH_AUTH_PASSWORD: c_ulong = 1 << 1;
+// pub const CURLSSH_AUTH_HOST: c_ulong = 1 << 2;
+// pub const CURLSSH_AUTH_KEYBOARD: c_ulong = 1 << 3;
+// pub const CURLSSH_AUTH_AGENT: c_ulong = 1 << 4;
+// pub const CURLSSH_AUTH_DEFAULT: c_ulong = CURLSSH_AUTH_ANY;
+
+pub const CURLGSSAPI_DELEGATION_NONE: c_ulong = 0;
+pub const CURLGSSAPI_DELEGATION_POLICY_FLAG: c_ulong = 1 << 0;
+pub const CURLGSSAPI_DELEGATION_FLAG: c_ulong = 1 << 1;
+
+// pub type curl_khtype = __enum_ty;
+// pub const CURLKHTYPE_UNKNOWN: curl_khtype = 0;
+// pub const CURLKHTYPE_RSA1: curl_khtype = 1;
+// pub const CURLKHTYPE_RSA: curl_khtype = 2;
+// pub const CURLKHTYPE_DSS: curl_khtype = 3;
+
+// #[repr(C)]
+// pub struct curl_khkey {
+// pub key: *const c_char,
+// pub len: size_t,
+// pub keytype: curl_khtype,
+// }
+
+// pub type curl_khstat = __enum_ty;
+// pub const CURLKHSTAT_FINE_ADD_TO_FILE: curl_khstat = 0;
+// pub const CURLKHSTAT_FINE: curl_khstat = 1;
+// pub const CURLKHSTAT_REJECT: curl_khstat = 2;
+// pub const CURLKHSTAT_DEFER: curl_khstat = 3;
+//
+// pub type curl_khmatch = __enum_ty;
+// pub const CURLKHMATCH_OK: curl_khmatch = 0;
+// pub const CURLKHMATCH_MISMATCH: curl_khmatch = 1;
+// pub const CURLKHMATCH_MISSING: curl_khmatch = 2;
+
+// pub type curl_sshkeycallback = extern fn(*mut CURL,
+// *const curl_khkey,
+// *const curl_khkey,
+// curl_khmatch,
+// *mut c_void) -> c_int;
+
+pub const CURL_NETRC_IGNORED: c_ulong = 0;
+pub const CURL_NETRC_OPTIONAL: c_ulong = 1;
+pub const CURL_NETRC_REQUIRED: c_ulong = 2;
+
+pub type curl_usessl = __enum_ty;
+pub const CURLUSESSL_NONE: curl_usessl = 0;
+pub const CURLUSESSL_TRY: curl_usessl = 1;
+pub const CURLUSESSL_CONTROL: curl_usessl = 2;
+pub const CURLUSESSL_ALL: curl_usessl = 3;
+
+pub const CURLPROTO_HTTP: c_int = 1 << 0;
+pub const CURLPROTO_HTTPS: c_int = 1 << 1;
+pub const CURLPROTO_FILE: c_int = 1 << 10;
+
+pub const CURLOPTTYPE_LONG: CURLoption = 0;
+pub const CURLOPTTYPE_OBJECTPOINT: CURLoption = 10_000;
+pub const CURLOPTTYPE_FUNCTIONPOINT: CURLoption = 20_000;
+pub const CURLOPTTYPE_OFF_T: CURLoption = 30_000;
+pub const CURLOPTTYPE_BLOB: CURLoption = 40_000;
+const CURLOPTTYPE_VALUES: CURLoption = CURLOPTTYPE_LONG;
+
+pub const CURLOPT_FILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 1;
+pub const CURLOPT_URL: CURLoption = CURLOPTTYPE_OBJECTPOINT + 2;
+pub const CURLOPT_PORT: CURLoption = CURLOPTTYPE_LONG + 3;
+pub const CURLOPT_PROXY: CURLoption = CURLOPTTYPE_OBJECTPOINT + 4;
+pub const CURLOPT_USERPWD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 5;
+pub const CURLOPT_PROXYUSERPWD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 6;
+pub const CURLOPT_RANGE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 7;
+pub const CURLOPT_INFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 9;
+pub const CURLOPT_ERRORBUFFER: CURLoption = CURLOPTTYPE_OBJECTPOINT + 10;
+pub const CURLOPT_WRITEFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 11;
+pub const CURLOPT_READFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 12;
+pub const CURLOPT_TIMEOUT: CURLoption = CURLOPTTYPE_LONG + 13;
+pub const CURLOPT_INFILESIZE: CURLoption = CURLOPTTYPE_LONG + 14;
+pub const CURLOPT_POSTFIELDS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 15;
+pub const CURLOPT_REFERER: CURLoption = CURLOPTTYPE_OBJECTPOINT + 16;
+pub const CURLOPT_FTPPORT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 17;
+pub const CURLOPT_USERAGENT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 18;
+pub const CURLOPT_LOW_SPEED_LIMIT: CURLoption = CURLOPTTYPE_LONG + 19;
+pub const CURLOPT_LOW_SPEED_TIME: CURLoption = CURLOPTTYPE_LONG + 20;
+pub const CURLOPT_RESUME_FROM: CURLoption = CURLOPTTYPE_LONG + 21;
+pub const CURLOPT_COOKIE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 22;
+pub const CURLOPT_HTTPHEADER: CURLoption = CURLOPTTYPE_OBJECTPOINT + 23;
+pub const CURLOPT_HTTPPOST: CURLoption = CURLOPTTYPE_OBJECTPOINT + 24;
+pub const CURLOPT_SSLCERT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 25;
+pub const CURLOPT_KEYPASSWD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 26;
+pub const CURLOPT_CRLF: CURLoption = CURLOPTTYPE_LONG + 27;
+pub const CURLOPT_QUOTE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 28;
+pub const CURLOPT_WRITEHEADER: CURLoption = CURLOPTTYPE_OBJECTPOINT + 29;
+pub const CURLOPT_COOKIEFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 31;
+pub const CURLOPT_SSLVERSION: CURLoption = CURLOPTTYPE_LONG + 32;
+pub const CURLOPT_TIMECONDITION: CURLoption = CURLOPTTYPE_LONG + 33;
+pub const CURLOPT_TIMEVALUE: CURLoption = CURLOPTTYPE_LONG + 34;
+pub const CURLOPT_CUSTOMREQUEST: CURLoption = CURLOPTTYPE_OBJECTPOINT + 36;
+pub const CURLOPT_STDERR: CURLoption = CURLOPTTYPE_OBJECTPOINT + 37;
+pub const CURLOPT_POSTQUOTE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 39;
+pub const CURLOPT_WRITEINFO: CURLoption = CURLOPTTYPE_OBJECTPOINT + 40;
+pub const CURLOPT_VERBOSE: CURLoption = CURLOPTTYPE_LONG + 41;
+pub const CURLOPT_HEADER: CURLoption = CURLOPTTYPE_LONG + 42;
+pub const CURLOPT_NOPROGRESS: CURLoption = CURLOPTTYPE_LONG + 43;
+pub const CURLOPT_NOBODY: CURLoption = CURLOPTTYPE_LONG + 44;
+pub const CURLOPT_FAILONERROR: CURLoption = CURLOPTTYPE_LONG + 45;
+pub const CURLOPT_UPLOAD: CURLoption = CURLOPTTYPE_LONG + 46;
+pub const CURLOPT_POST: CURLoption = CURLOPTTYPE_LONG + 47;
+pub const CURLOPT_DIRLISTONLY: CURLoption = CURLOPTTYPE_LONG + 48;
+pub const CURLOPT_APPEND: CURLoption = CURLOPTTYPE_LONG + 50;
+pub const CURLOPT_NETRC: CURLoption = CURLOPTTYPE_LONG + 51;
+pub const CURLOPT_FOLLOWLOCATION: CURLoption = CURLOPTTYPE_LONG + 52;
+pub const CURLOPT_TRANSFERTEXT: CURLoption = CURLOPTTYPE_LONG + 53;
+pub const CURLOPT_PUT: CURLoption = CURLOPTTYPE_LONG + 54;
+pub const CURLOPT_PROGRESSFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 56;
+pub const CURLOPT_PROGRESSDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 57;
+pub const CURLOPT_AUTOREFERER: CURLoption = CURLOPTTYPE_LONG + 58;
+pub const CURLOPT_PROXYPORT: CURLoption = CURLOPTTYPE_LONG + 59;
+pub const CURLOPT_POSTFIELDSIZE: CURLoption = CURLOPTTYPE_LONG + 60;
+pub const CURLOPT_HTTPPROXYTUNNEL: CURLoption = CURLOPTTYPE_LONG + 61;
+pub const CURLOPT_INTERFACE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 62;
+pub const CURLOPT_KRBLEVEL: CURLoption = CURLOPTTYPE_OBJECTPOINT + 63;
+pub const CURLOPT_SSL_VERIFYPEER: CURLoption = CURLOPTTYPE_LONG + 64;
+pub const CURLOPT_CAINFO: CURLoption = CURLOPTTYPE_OBJECTPOINT + 65;
+pub const CURLOPT_MAXREDIRS: CURLoption = CURLOPTTYPE_LONG + 68;
+pub const CURLOPT_FILETIME: CURLoption = CURLOPTTYPE_LONG + 69;
+pub const CURLOPT_TELNETOPTIONS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 70;
+pub const CURLOPT_MAXCONNECTS: CURLoption = CURLOPTTYPE_LONG + 71;
+pub const CURLOPT_CLOSEPOLICY: CURLoption = CURLOPTTYPE_LONG + 72;
+pub const CURLOPT_FRESH_CONNECT: CURLoption = CURLOPTTYPE_LONG + 74;
+pub const CURLOPT_FORBID_REUSE: CURLoption = CURLOPTTYPE_LONG + 75;
+pub const CURLOPT_RANDOM_FILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 76;
+pub const CURLOPT_EGDSOCKET: CURLoption = CURLOPTTYPE_OBJECTPOINT + 77;
+pub const CURLOPT_CONNECTTIMEOUT: CURLoption = CURLOPTTYPE_LONG + 78;
+pub const CURLOPT_HEADERFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 79;
+pub const CURLOPT_HTTPGET: CURLoption = CURLOPTTYPE_LONG + 80;
+pub const CURLOPT_SSL_VERIFYHOST: CURLoption = CURLOPTTYPE_LONG + 81;
+pub const CURLOPT_COOKIEJAR: CURLoption = CURLOPTTYPE_OBJECTPOINT + 82;
+pub const CURLOPT_SSL_CIPHER_LIST: CURLoption = CURLOPTTYPE_OBJECTPOINT + 83;
+pub const CURLOPT_HTTP_VERSION: CURLoption = CURLOPTTYPE_LONG + 84;
+pub const CURLOPT_FTP_USE_EPSV: CURLoption = CURLOPTTYPE_LONG + 85;
+pub const CURLOPT_SSLCERTTYPE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 86;
+pub const CURLOPT_SSLKEY: CURLoption = CURLOPTTYPE_OBJECTPOINT + 87;
+pub const CURLOPT_SSLKEYTYPE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 88;
+pub const CURLOPT_SSLENGINE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 89;
+pub const CURLOPT_SSLENGINE_DEFAULT: CURLoption = CURLOPTTYPE_LONG + 90;
+pub const CURLOPT_DNS_USE_GLOBAL_CACHE: CURLoption = CURLOPTTYPE_LONG + 91;
+pub const CURLOPT_DNS_CACHE_TIMEOUT: CURLoption = CURLOPTTYPE_LONG + 92;
+pub const CURLOPT_PREQUOTE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 93;
+pub const CURLOPT_DEBUGFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 94;
+pub const CURLOPT_DEBUGDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 95;
+pub const CURLOPT_COOKIESESSION: CURLoption = CURLOPTTYPE_LONG + 96;
+pub const CURLOPT_CAPATH: CURLoption = CURLOPTTYPE_OBJECTPOINT + 97;
+pub const CURLOPT_BUFFERSIZE: CURLoption = CURLOPTTYPE_LONG + 98;
+pub const CURLOPT_NOSIGNAL: CURLoption = CURLOPTTYPE_LONG + 99;
+pub const CURLOPT_SHARE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 100;
+pub const CURLOPT_PROXYTYPE: CURLoption = CURLOPTTYPE_LONG + 101;
+pub const CURLOPT_ACCEPT_ENCODING: CURLoption = CURLOPTTYPE_OBJECTPOINT + 102;
+pub const CURLOPT_PRIVATE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 103;
+pub const CURLOPT_HTTP200ALIASES: CURLoption = CURLOPTTYPE_OBJECTPOINT + 104;
+pub const CURLOPT_UNRESTRICTED_AUTH: CURLoption = CURLOPTTYPE_LONG + 105;
+pub const CURLOPT_FTP_USE_EPRT: CURLoption = CURLOPTTYPE_LONG + 106;
+pub const CURLOPT_HTTPAUTH: CURLoption = CURLOPTTYPE_LONG + 107;
+pub const CURLOPT_SSL_CTX_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 108;
+pub const CURLOPT_SSL_CTX_DATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 109;
+pub const CURLOPT_FTP_CREATE_MISSING_DIRS: CURLoption = CURLOPTTYPE_LONG + 110;
+pub const CURLOPT_PROXYAUTH: CURLoption = CURLOPTTYPE_LONG + 111;
+pub const CURLOPT_FTP_RESPONSE_TIMEOUT: CURLoption = CURLOPTTYPE_LONG + 112;
+pub const CURLOPT_IPRESOLVE: CURLoption = CURLOPTTYPE_LONG + 113;
+pub const CURLOPT_MAXFILESIZE: CURLoption = CURLOPTTYPE_LONG + 114;
+pub const CURLOPT_INFILESIZE_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 115;
+pub const CURLOPT_RESUME_FROM_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 116;
+pub const CURLOPT_MAXFILESIZE_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 117;
+pub const CURLOPT_NETRC_FILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 118;
+pub const CURLOPT_USE_SSL: CURLoption = CURLOPTTYPE_LONG + 119;
+pub const CURLOPT_POSTFIELDSIZE_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 120;
+pub const CURLOPT_TCP_NODELAY: CURLoption = CURLOPTTYPE_LONG + 121;
+pub const CURLOPT_FTPSSLAUTH: CURLoption = CURLOPTTYPE_LONG + 129;
+pub const CURLOPT_IOCTLFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 130;
+pub const CURLOPT_IOCTLDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 131;
+pub const CURLOPT_FTP_ACCOUNT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 134;
+pub const CURLOPT_COOKIELIST: CURLoption = CURLOPTTYPE_OBJECTPOINT + 135;
+pub const CURLOPT_IGNORE_CONTENT_LENGTH: CURLoption = CURLOPTTYPE_LONG + 136;
+pub const CURLOPT_FTP_SKIP_PASV_IP: CURLoption = CURLOPTTYPE_LONG + 137;
+pub const CURLOPT_FTP_FILEMETHOD: CURLoption = CURLOPTTYPE_LONG + 138;
+pub const CURLOPT_LOCALPORT: CURLoption = CURLOPTTYPE_LONG + 139;
+pub const CURLOPT_LOCALPORTRANGE: CURLoption = CURLOPTTYPE_LONG + 140;
+pub const CURLOPT_CONNECT_ONLY: CURLoption = CURLOPTTYPE_LONG + 141;
+pub const CURLOPT_CONV_FROM_NETWORK_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 142;
+pub const CURLOPT_CONV_TO_NETWORK_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 143;
+pub const CURLOPT_CONV_FROM_UTF8_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 144;
+pub const CURLOPT_MAX_SEND_SPEED_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 145;
+pub const CURLOPT_MAX_RECV_SPEED_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 146;
+pub const CURLOPT_FTP_ALTERNATIVE_TO_USER: CURLoption = CURLOPTTYPE_OBJECTPOINT + 147;
+pub const CURLOPT_SOCKOPTFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 148;
+pub const CURLOPT_SOCKOPTDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 149;
+pub const CURLOPT_SSL_SESSIONID_CACHE: CURLoption = CURLOPTTYPE_LONG + 150;
+pub const CURLOPT_SSH_AUTH_TYPES: CURLoption = CURLOPTTYPE_LONG + 151;
+pub const CURLOPT_SSH_PUBLIC_KEYFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 152;
+pub const CURLOPT_SSH_PRIVATE_KEYFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 153;
+pub const CURLOPT_FTP_SSL_CCC: CURLoption = CURLOPTTYPE_LONG + 154;
+pub const CURLOPT_TIMEOUT_MS: CURLoption = CURLOPTTYPE_LONG + 155;
+pub const CURLOPT_CONNECTTIMEOUT_MS: CURLoption = CURLOPTTYPE_LONG + 156;
+pub const CURLOPT_HTTP_TRANSFER_DECODING: CURLoption = CURLOPTTYPE_LONG + 157;
+pub const CURLOPT_HTTP_CONTENT_DECODING: CURLoption = CURLOPTTYPE_LONG + 158;
+pub const CURLOPT_NEW_FILE_PERMS: CURLoption = CURLOPTTYPE_LONG + 159;
+pub const CURLOPT_NEW_DIRECTORY_PERMS: CURLoption = CURLOPTTYPE_LONG + 160;
+pub const CURLOPT_POSTREDIR: CURLoption = CURLOPTTYPE_LONG + 161;
+pub const CURLOPT_SSH_HOST_PUBLIC_KEY_MD5: CURLoption = CURLOPTTYPE_OBJECTPOINT + 162;
+pub const CURLOPT_OPENSOCKETFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 163;
+pub const CURLOPT_OPENSOCKETDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 164;
+pub const CURLOPT_COPYPOSTFIELDS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 165;
+pub const CURLOPT_PROXY_TRANSFER_MODE: CURLoption = CURLOPTTYPE_LONG + 166;
+pub const CURLOPT_SEEKFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 167;
+pub const CURLOPT_SEEKDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 168;
+pub const CURLOPT_CRLFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 169;
+pub const CURLOPT_ISSUERCERT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 170;
+pub const CURLOPT_ADDRESS_SCOPE: CURLoption = CURLOPTTYPE_LONG + 171;
+pub const CURLOPT_CERTINFO: CURLoption = CURLOPTTYPE_LONG + 172;
+pub const CURLOPT_USERNAME: CURLoption = CURLOPTTYPE_OBJECTPOINT + 173;
+pub const CURLOPT_PASSWORD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 174;
+pub const CURLOPT_PROXYUSERNAME: CURLoption = CURLOPTTYPE_OBJECTPOINT + 175;
+pub const CURLOPT_PROXYPASSWORD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 176;
+pub const CURLOPT_NOPROXY: CURLoption = CURLOPTTYPE_OBJECTPOINT + 177;
+pub const CURLOPT_TFTP_BLKSIZE: CURLoption = CURLOPTTYPE_LONG + 178;
+pub const CURLOPT_SOCKS5_GSSAPI_SERVICE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 179;
+pub const CURLOPT_SOCKS5_GSSAPI_NEC: CURLoption = CURLOPTTYPE_LONG + 180;
+pub const CURLOPT_PROTOCOLS: CURLoption = CURLOPTTYPE_LONG + 181;
+pub const CURLOPT_REDIR_PROTOCOLS: CURLoption = CURLOPTTYPE_LONG + 182;
+pub const CURLOPT_SSH_KNOWNHOSTS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 183;
+pub const CURLOPT_SSH_KEYFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 184;
+pub const CURLOPT_SSH_KEYDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 185;
+pub const CURLOPT_MAIL_FROM: CURLoption = CURLOPTTYPE_OBJECTPOINT + 186;
+pub const CURLOPT_MAIL_RCPT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 187;
+pub const CURLOPT_FTP_USE_PRET: CURLoption = CURLOPTTYPE_LONG + 188;
+pub const CURLOPT_RTSP_REQUEST: CURLoption = CURLOPTTYPE_LONG + 189;
+pub const CURLOPT_RTSP_SESSION_ID: CURLoption = CURLOPTTYPE_OBJECTPOINT + 190;
+pub const CURLOPT_RTSP_STREAM_URI: CURLoption = CURLOPTTYPE_OBJECTPOINT + 191;
+pub const CURLOPT_RTSP_TRANSPORT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 192;
+pub const CURLOPT_RTSP_CLIENT_CSEQ: CURLoption = CURLOPTTYPE_LONG + 193;
+pub const CURLOPT_RTSP_SERVER_CSEQ: CURLoption = CURLOPTTYPE_LONG + 194;
+pub const CURLOPT_INTERLEAVEDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 195;
+pub const CURLOPT_INTERLEAVEFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 196;
+pub const CURLOPT_WILDCARDMATCH: CURLoption = CURLOPTTYPE_LONG + 197;
+pub const CURLOPT_CHUNK_BGN_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 198;
+pub const CURLOPT_CHUNK_END_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 199;
+pub const CURLOPT_FNMATCH_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 200;
+pub const CURLOPT_CHUNK_DATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 201;
+pub const CURLOPT_FNMATCH_DATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 202;
+pub const CURLOPT_RESOLVE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 203;
+pub const CURLOPT_TLSAUTH_USERNAME: CURLoption = CURLOPTTYPE_OBJECTPOINT + 204;
+pub const CURLOPT_TLSAUTH_PASSWORD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 205;
+pub const CURLOPT_TLSAUTH_TYPE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 206;
+pub const CURLOPT_TRANSFER_ENCODING: CURLoption = CURLOPTTYPE_LONG + 207;
+pub const CURLOPT_CLOSESOCKETFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 208;
+pub const CURLOPT_CLOSESOCKETDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 209;
+pub const CURLOPT_GSSAPI_DELEGATION: CURLoption = CURLOPTTYPE_LONG + 210;
+pub const CURLOPT_DNS_SERVERS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 211;
+// pub const CURLOPT_ACCEPTTIMEOUT_MS: CURLoption = CURLOPTTYPE_LONG + 212;
+pub const CURLOPT_TCP_KEEPALIVE: CURLoption = CURLOPTTYPE_LONG + 213;
+pub const CURLOPT_TCP_KEEPIDLE: CURLoption = CURLOPTTYPE_LONG + 214;
+pub const CURLOPT_TCP_KEEPINTVL: CURLoption = CURLOPTTYPE_LONG + 215;
+pub const CURLOPT_SSL_OPTIONS: CURLoption = CURLOPTTYPE_LONG + 216;
+// pub const CURLOPT_MAIL_AUTH: CURLoption = CURLOPTTYPE_OBJECTPOINT + 217;
+// pub const CURLOPT_SASL_IR: CURLoption = CURLOPTTYPE_LONG + 218;
+// pub const CURLOPT_XFERINFOFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 219;
+// pub const CURLOPT_XOAUTH2_BEARER: CURLoption = CURLOPTTYPE_OBJECTPOINT + 220;
+// pub const CURLOPT_DNS_INTERFACE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 221;
+// pub const CURLOPT_DNS_LOCAL_IP4: CURLoption = CURLOPTTYPE_OBJECTPOINT + 222;
+// pub const CURLOPT_DNS_LOCAL_IP6: CURLoption = CURLOPTTYPE_OBJECTPOINT + 223;
+// pub const CURLOPT_LOGIN_OPTIONS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 224;
+pub const CURLOPT_EXPECT_100_TIMEOUT_MS: CURLoption = CURLOPTTYPE_LONG + 227;
+pub const CURLOPT_PINNEDPUBLICKEY: CURLoption = CURLOPTTYPE_OBJECTPOINT + 230;
+pub const CURLOPT_UNIX_SOCKET_PATH: CURLoption = CURLOPTTYPE_OBJECTPOINT + 231;
+pub const CURLOPT_PATH_AS_IS: CURLoption = CURLOPTTYPE_LONG + 234;
+pub const CURLOPT_PIPEWAIT: CURLoption = CURLOPTTYPE_LONG + 237;
+pub const CURLOPT_CONNECT_TO: CURLoption = CURLOPTTYPE_OBJECTPOINT + 243;
+pub const CURLOPT_PROXY_CAINFO: CURLoption = CURLOPTTYPE_OBJECTPOINT + 246;
+pub const CURLOPT_PROXY_CAPATH: CURLoption = CURLOPTTYPE_OBJECTPOINT + 247;
+pub const CURLOPT_PROXY_SSL_VERIFYPEER: CURLoption = CURLOPTTYPE_LONG + 248;
+pub const CURLOPT_PROXY_SSL_VERIFYHOST: CURLoption = CURLOPTTYPE_LONG + 249;
+pub const CURLOPT_PROXY_SSLVERSION: CURLoption = CURLOPTTYPE_VALUES + 250;
+pub const CURLOPT_PROXY_SSLCERT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 254;
+pub const CURLOPT_PROXY_SSLCERTTYPE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 255;
+pub const CURLOPT_PROXY_SSLKEY: CURLoption = CURLOPTTYPE_OBJECTPOINT + 256;
+pub const CURLOPT_PROXY_SSLKEYTYPE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 257;
+pub const CURLOPT_PROXY_KEYPASSWD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 258;
+pub const CURLOPT_PROXY_SSL_CIPHER_LIST: CURLoption = CURLOPTTYPE_OBJECTPOINT + 259;
+pub const CURLOPT_PROXY_CRLFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 260;
+pub const CURLOPT_PROXY_SSL_OPTIONS: CURLoption = CURLOPTTYPE_LONG + 261;
+
+pub const CURLOPT_ABSTRACT_UNIX_SOCKET: CURLoption = CURLOPTTYPE_OBJECTPOINT + 264;
+
+pub const CURLOPT_DOH_URL: CURLoption = CURLOPTTYPE_OBJECTPOINT + 279;
+pub const CURLOPT_UPLOAD_BUFFERSIZE: CURLoption = CURLOPTTYPE_LONG + 280;
+
+pub const CURLOPT_HTTP09_ALLOWED: CURLoption = CURLOPTTYPE_LONG + 285;
+
+pub const CURLOPT_MAXAGE_CONN: CURLoption = CURLOPTTYPE_LONG + 288;
+
+pub const CURLOPT_SSLCERT_BLOB: CURLoption = CURLOPTTYPE_BLOB + 291;
+pub const CURLOPT_SSLKEY_BLOB: CURLoption = CURLOPTTYPE_BLOB + 292;
+pub const CURLOPT_PROXY_SSLCERT_BLOB: CURLoption = CURLOPTTYPE_BLOB + 293;
+pub const CURLOPT_PROXY_SSLKEY_BLOB: CURLoption = CURLOPTTYPE_BLOB + 294;
+pub const CURLOPT_ISSUERCERT_BLOB: CURLoption = CURLOPTTYPE_BLOB + 295;
+
+pub const CURLOPT_PROXY_ISSUERCERT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 296;
+pub const CURLOPT_PROXY_ISSUERCERT_BLOB: CURLoption = CURLOPTTYPE_BLOB + 297;
+
+pub const CURLOPT_AWS_SIGV4: CURLoption = CURLOPTTYPE_OBJECTPOINT + 305;
+
+pub const CURLOPT_DOH_SSL_VERIFYPEER: CURLoption = CURLOPTTYPE_LONG + 306;
+pub const CURLOPT_DOH_SSL_VERIFYHOST: CURLoption = CURLOPTTYPE_LONG + 307;
+pub const CURLOPT_DOH_SSL_VERIFYSTATUS: CURLoption = CURLOPTTYPE_LONG + 308;
+pub const CURLOPT_CAINFO_BLOB: CURLoption = CURLOPTTYPE_BLOB + 309;
+pub const CURLOPT_PROXY_CAINFO_BLOB: CURLoption = CURLOPTTYPE_BLOB + 310;
+
+pub const CURL_IPRESOLVE_WHATEVER: c_int = 0;
+pub const CURL_IPRESOLVE_V4: c_int = 1;
+pub const CURL_IPRESOLVE_V6: c_int = 2;
+
+pub const CURLSSLOPT_ALLOW_BEAST: c_long = 1 << 0;
+pub const CURLSSLOPT_NO_REVOKE: c_long = 1 << 1;
+pub const CURLSSLOPT_NO_PARTIALCHAIN: c_long = 1 << 2;
+pub const CURLSSLOPT_REVOKE_BEST_EFFORT: c_long = 1 << 3;
+pub const CURLSSLOPT_NATIVE_CA: c_long = 1 << 4;
+pub const CURLSSLOPT_AUTO_CLIENT_CERT: c_long = 1 << 5;
+
+/// These enums are for use with the CURLOPT_HTTP_VERSION option.
+///
+/// Setting this means we don't care, and that we'd like the library to choose
+/// the best possible for us!
+pub const CURL_HTTP_VERSION_NONE: c_int = 0;
+/// Please use HTTP 1.0 in the request
+pub const CURL_HTTP_VERSION_1_0: c_int = 1;
+/// Please use HTTP 1.1 in the request
+pub const CURL_HTTP_VERSION_1_1: c_int = 2;
+/// Please use HTTP 2 in the request
+/// (Added in CURL 7.33.0)
+pub const CURL_HTTP_VERSION_2_0: c_int = 3;
+/// Use version 2 for HTTPS, version 1.1 for HTTP
+/// (Added in CURL 7.47.0)
+pub const CURL_HTTP_VERSION_2TLS: c_int = 4;
+/// Please use HTTP 2 without HTTP/1.1 Upgrade
+/// (Added in CURL 7.49.0)
+pub const CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE: c_int = 5;
+/// Use HTTP/3, fallback to HTTP/2 or HTTP/1 if needed.
+/// (Added in CURL 7.66.0)
+pub const CURL_HTTP_VERSION_3: c_int = 30;
+
+// Note that the type here is wrong, it's just intended to just be an enum.
+pub const CURL_SSLVERSION_DEFAULT: CURLoption = 0;
+pub const CURL_SSLVERSION_TLSv1: CURLoption = 1;
+pub const CURL_SSLVERSION_SSLv2: CURLoption = 2;
+pub const CURL_SSLVERSION_SSLv3: CURLoption = 3;
+pub const CURL_SSLVERSION_TLSv1_0: CURLoption = 4;
+pub const CURL_SSLVERSION_TLSv1_1: CURLoption = 5;
+pub const CURL_SSLVERSION_TLSv1_2: CURLoption = 6;
+pub const CURL_SSLVERSION_TLSv1_3: CURLoption = 7;
+
+pub const CURLOPT_READDATA: CURLoption = CURLOPT_INFILE;
+pub const CURLOPT_WRITEDATA: CURLoption = CURLOPT_FILE;
+pub const CURLOPT_HEADERDATA: CURLoption = CURLOPT_WRITEHEADER;
+
+pub type curl_TimeCond = __enum_ty;
+pub const CURL_TIMECOND_NONE: curl_TimeCond = 0;
+pub const CURL_TIMECOND_IFMODSINCE: curl_TimeCond = 1;
+pub const CURL_TIMECOND_IFUNMODSINCE: curl_TimeCond = 2;
+pub const CURL_TIMECOND_LASTMOD: curl_TimeCond = 3;
+
+pub type CURLformoption = __enum_ty;
+pub const CURLFORM_NOTHING: CURLformoption = 0;
+pub const CURLFORM_COPYNAME: CURLformoption = 1;
+pub const CURLFORM_PTRNAME: CURLformoption = 2;
+pub const CURLFORM_NAMELENGTH: CURLformoption = 3;
+pub const CURLFORM_COPYCONTENTS: CURLformoption = 4;
+pub const CURLFORM_PTRCONTENTS: CURLformoption = 5;
+pub const CURLFORM_CONTENTSLENGTH: CURLformoption = 6;
+pub const CURLFORM_FILECONTENT: CURLformoption = 7;
+pub const CURLFORM_ARRAY: CURLformoption = 8;
+pub const CURLFORM_OBSOLETE: CURLformoption = 9;
+pub const CURLFORM_FILE: CURLformoption = 10;
+pub const CURLFORM_BUFFER: CURLformoption = 11;
+pub const CURLFORM_BUFFERPTR: CURLformoption = 12;
+pub const CURLFORM_BUFFERLENGTH: CURLformoption = 13;
+pub const CURLFORM_CONTENTTYPE: CURLformoption = 14;
+pub const CURLFORM_CONTENTHEADER: CURLformoption = 15;
+pub const CURLFORM_FILENAME: CURLformoption = 16;
+pub const CURLFORM_END: CURLformoption = 17;
+pub const CURLFORM_STREAM: CURLformoption = 19;
+
+pub type CURLFORMcode = __enum_ty;
+pub const CURL_FORMADD_OK: CURLFORMcode = 0;
+pub const CURL_FORMADD_MEMORY: CURLFORMcode = 1;
+pub const CURL_FORMADD_OPTION_TWICE: CURLFORMcode = 2;
+pub const CURL_FORMADD_NULL: CURLFORMcode = 3;
+pub const CURL_FORMADD_UNKNOWN_OPTION: CURLFORMcode = 4;
+pub const CURL_FORMADD_INCOMPLETE: CURLFORMcode = 5;
+pub const CURL_FORMADD_ILLEGAL_ARRAY: CURLFORMcode = 6;
+pub const CURL_FORMADD_DISABLED: CURLFORMcode = 7;
+
+pub const CURL_REDIR_POST_301: c_ulong = 1;
+pub const CURL_REDIR_POST_302: c_ulong = 2;
+pub const CURL_REDIR_POST_303: c_ulong = 4;
+pub const CURL_REDIR_POST_ALL: c_ulong =
+ CURL_REDIR_POST_301 | CURL_REDIR_POST_302 | CURL_REDIR_POST_303;
+
+#[repr(C)]
+pub struct curl_forms {
+ pub option: CURLformoption,
+ pub value: *const c_char,
+}
+
+pub type curl_formget_callback = extern "C" fn(*mut c_void, *const c_char, size_t) -> size_t;
+
+#[repr(C)]
+pub struct curl_slist {
+ pub data: *mut c_char,
+ pub next: *mut curl_slist,
+}
+
+#[repr(C)]
+pub struct curl_certinfo {
+ pub num_of_certs: c_int,
+ pub certinfo: *mut *mut curl_slist,
+}
+
+// pub type curl_sslbackend = __enum_ty;
+// pub const CURLSSLBACKEND_NONE: curl_sslbackend = 0;
+// pub const CURLSSLBACKEND_OPENSSL: curl_sslbackend = 1;
+// pub const CURLSSLBACKEND_GNUTLS: curl_sslbackend = 2;
+// pub const CURLSSLBACKEND_NSS: curl_sslbackend = 3;
+// pub const CURLSSLBACKEND_QSOSSL: curl_sslbackend = 4;
+// pub const CURLSSLBACKEND_GSKIT: curl_sslbackend = 5;
+// pub const CURLSSLBACKEND_POLARSSL: curl_sslbackend = 6;
+// pub const CURLSSLBACKEND_CYASSL: curl_sslbackend = 7;
+// pub const CURLSSLBACKEND_SCHANNEL: curl_sslbackend = 8;
+// pub const CURLSSLBACKEND_DARWINSSL: curl_sslbackend = 9;
+
+// #[repr(C)]
+// pub struct curl_tlssessioninfo {
+// pub backend: curl_sslbackend,
+// pub internals: *mut c_void,
+// }
+
+pub const CURLINFO_STRING: CURLINFO = 0x100000;
+pub const CURLINFO_LONG: CURLINFO = 0x200000;
+pub const CURLINFO_DOUBLE: CURLINFO = 0x300000;
+pub const CURLINFO_SLIST: CURLINFO = 0x400000;
+pub const CURLINFO_MASK: CURLINFO = 0x0fffff;
+pub const CURLINFO_TYPEMASK: CURLINFO = 0xf00000;
+
+pub const CURLINFO_EFFECTIVE_URL: CURLINFO = CURLINFO_STRING + 1;
+pub const CURLINFO_RESPONSE_CODE: CURLINFO = CURLINFO_LONG + 2;
+pub const CURLINFO_TOTAL_TIME: CURLINFO = CURLINFO_DOUBLE + 3;
+pub const CURLINFO_NAMELOOKUP_TIME: CURLINFO = CURLINFO_DOUBLE + 4;
+pub const CURLINFO_CONNECT_TIME: CURLINFO = CURLINFO_DOUBLE + 5;
+pub const CURLINFO_PRETRANSFER_TIME: CURLINFO = CURLINFO_DOUBLE + 6;
+pub const CURLINFO_SIZE_UPLOAD: CURLINFO = CURLINFO_DOUBLE + 7;
+pub const CURLINFO_SIZE_DOWNLOAD: CURLINFO = CURLINFO_DOUBLE + 8;
+pub const CURLINFO_SPEED_DOWNLOAD: CURLINFO = CURLINFO_DOUBLE + 9;
+pub const CURLINFO_SPEED_UPLOAD: CURLINFO = CURLINFO_DOUBLE + 10;
+pub const CURLINFO_HEADER_SIZE: CURLINFO = CURLINFO_LONG + 11;
+pub const CURLINFO_REQUEST_SIZE: CURLINFO = CURLINFO_LONG + 12;
+pub const CURLINFO_SSL_VERIFYRESULT: CURLINFO = CURLINFO_LONG + 13;
+pub const CURLINFO_FILETIME: CURLINFO = CURLINFO_LONG + 14;
+pub const CURLINFO_CONTENT_LENGTH_DOWNLOAD: CURLINFO = CURLINFO_DOUBLE + 15;
+pub const CURLINFO_CONTENT_LENGTH_UPLOAD: CURLINFO = CURLINFO_DOUBLE + 16;
+pub const CURLINFO_STARTTRANSFER_TIME: CURLINFO = CURLINFO_DOUBLE + 17;
+pub const CURLINFO_CONTENT_TYPE: CURLINFO = CURLINFO_STRING + 18;
+pub const CURLINFO_REDIRECT_TIME: CURLINFO = CURLINFO_DOUBLE + 19;
+pub const CURLINFO_REDIRECT_COUNT: CURLINFO = CURLINFO_LONG + 20;
+pub const CURLINFO_PRIVATE: CURLINFO = CURLINFO_STRING + 21;
+pub const CURLINFO_HTTP_CONNECTCODE: CURLINFO = CURLINFO_LONG + 22;
+pub const CURLINFO_HTTPAUTH_AVAIL: CURLINFO = CURLINFO_LONG + 23;
+pub const CURLINFO_PROXYAUTH_AVAIL: CURLINFO = CURLINFO_LONG + 24;
+pub const CURLINFO_OS_ERRNO: CURLINFO = CURLINFO_LONG + 25;
+pub const CURLINFO_NUM_CONNECTS: CURLINFO = CURLINFO_LONG + 26;
+pub const CURLINFO_SSL_ENGINES: CURLINFO = CURLINFO_SLIST + 27;
+pub const CURLINFO_COOKIELIST: CURLINFO = CURLINFO_SLIST + 28;
+pub const CURLINFO_LASTSOCKET: CURLINFO = CURLINFO_LONG + 29;
+pub const CURLINFO_FTP_ENTRY_PATH: CURLINFO = CURLINFO_STRING + 30;
+pub const CURLINFO_REDIRECT_URL: CURLINFO = CURLINFO_STRING + 31;
+pub const CURLINFO_PRIMARY_IP: CURLINFO = CURLINFO_STRING + 32;
+pub const CURLINFO_APPCONNECT_TIME: CURLINFO = CURLINFO_DOUBLE + 33;
+pub const CURLINFO_CERTINFO: CURLINFO = CURLINFO_SLIST + 34;
+pub const CURLINFO_CONDITION_UNMET: CURLINFO = CURLINFO_LONG + 35;
+pub const CURLINFO_RTSP_SESSION_ID: CURLINFO = CURLINFO_STRING + 36;
+pub const CURLINFO_RTSP_CLIENT_CSEQ: CURLINFO = CURLINFO_LONG + 37;
+pub const CURLINFO_RTSP_SERVER_CSEQ: CURLINFO = CURLINFO_LONG + 38;
+pub const CURLINFO_RTSP_CSEQ_RECV: CURLINFO = CURLINFO_LONG + 39;
+pub const CURLINFO_PRIMARY_PORT: CURLINFO = CURLINFO_LONG + 40;
+pub const CURLINFO_LOCAL_IP: CURLINFO = CURLINFO_STRING + 41;
+pub const CURLINFO_LOCAL_PORT: CURLINFO = CURLINFO_LONG + 42;
+// pub const CURLINFO_TLS_SESSION: CURLINFO = CURLINFO_SLIST + 43;
+
+pub type curl_closepolicy = __enum_ty;
+pub const CURLCLOSEPOLICY_NONE: curl_closepolicy = 0;
+pub const CURLCLOSEPOLICY_OLDEST: curl_closepolicy = 1;
+pub const CURLCLOSEPOLICY_LEAST_RECENTLY_USED: curl_closepolicy = 2;
+pub const CURLCLOSEPOLICY_LEAST_TRAFFIC: curl_closepolicy = 3;
+pub const CURLCLOSEPOLICY_SLOWEST: curl_closepolicy = 4;
+pub const CURLCLOSEPOLICY_CALLBACK: curl_closepolicy = 5;
+
+pub const CURL_GLOBAL_SSL: c_long = 1 << 0;
+pub const CURL_GLOBAL_WIN32: c_long = 1 << 1;
+pub const CURL_GLOBAL_ALL: c_long = CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32;
+pub const CURL_GLOBAL_NOTHING: c_long = 0;
+pub const CURL_GLOBAL_DEFAULT: c_long = CURL_GLOBAL_ALL;
+// pub const CURL_GLOBAL_ACK_EINTR: c_long = 1 << 2;
+
+pub type curl_lock_data = __enum_ty;
+pub const CURL_LOCK_DATA_NONE: curl_lock_data = 0;
+pub const CURL_LOCK_DATA_SHARE: curl_lock_data = 1;
+pub const CURL_LOCK_DATA_COOKIE: curl_lock_data = 2;
+pub const CURL_LOCK_DATA_DNS: curl_lock_data = 3;
+pub const CURL_LOCK_DATA_SSL_SESSION: curl_lock_data = 4;
+pub const CURL_LOCK_DATA_CONNECT: curl_lock_data = 5;
+
+pub type curl_lock_access = __enum_ty;
+pub const CURL_LOCK_ACCESS_NONE: curl_lock_access = 0;
+pub const CURL_LOCK_ACCESS_SHARED: curl_lock_access = 1;
+pub const CURL_LOCK_ACCESS_SINGLE: curl_lock_access = 2;
+
+pub type curl_lock_function =
+ extern "C" fn(*mut CURL, curl_lock_data, curl_lock_access, *mut c_void);
+pub type curl_unlock_function = extern "C" fn(*mut CURL, curl_lock_data, *mut c_void);
+
+pub enum CURLSH {}
+
+pub type CURLSHcode = __enum_ty;
+pub const CURLSHE_OK: CURLSHcode = 0;
+pub const CURLSHE_BAD_OPTION: CURLSHcode = 1;
+pub const CURLSHE_IN_USE: CURLSHcode = 2;
+pub const CURLSHE_INVALID: CURLSHcode = 3;
+pub const CURLSHE_NOMEM: CURLSHcode = 4;
+// pub const CURLSHE_NOT_BUILT_IN: CURLSHcode = 5;
+
+pub type CURLSHoption = __enum_ty;
+pub const CURLSHOPT_NONE: CURLSHoption = 0;
+pub const CURLSHOPT_SHARE: CURLSHoption = 1;
+pub const CURLSHOPT_UNSHARE: CURLSHoption = 2;
+pub const CURLSHOPT_LOCKFUNC: CURLSHoption = 3;
+pub const CURLSHOPT_UNLOCKFUNC: CURLSHoption = 4;
+pub const CURLSHOPT_USERDATA: CURLSHoption = 5;
+
+pub const CURLVERSION_FIRST: CURLversion = 0;
+pub const CURLVERSION_SECOND: CURLversion = 1;
+pub const CURLVERSION_THIRD: CURLversion = 2;
+pub const CURLVERSION_FOURTH: CURLversion = 3;
+pub const CURLVERSION_FIFTH: CURLversion = 4;
+pub const CURLVERSION_SIXTH: CURLversion = 5;
+pub const CURLVERSION_SEVENTH: CURLversion = 6;
+pub const CURLVERSION_EIGHTH: CURLversion = 7;
+pub const CURLVERSION_NINTH: CURLversion = 8;
+pub const CURLVERSION_TENTH: CURLversion = 9;
+pub const CURLVERSION_ELEVENTH: CURLversion = 10;
+pub const CURLVERSION_NOW: CURLversion = CURLVERSION_ELEVENTH;
+
+#[repr(C)]
+pub struct curl_version_info_data {
+ pub age: CURLversion,
+ pub version: *const c_char,
+ pub version_num: c_uint,
+ pub host: *const c_char,
+ pub features: c_int,
+ pub ssl_version: *const c_char,
+ pub ssl_version_num: c_long,
+ pub libz_version: *const c_char,
+ pub protocols: *const *const c_char,
+ pub ares: *const c_char,
+ pub ares_num: c_int,
+ pub libidn: *const c_char,
+ pub iconv_ver_num: c_int,
+ pub libssh_version: *const c_char,
+ pub brotli_ver_num: c_uint,
+ pub brotli_version: *const c_char,
+ pub nghttp2_ver_num: c_uint,
+ pub nghttp2_version: *const c_char,
+ pub quic_version: *const c_char,
+ pub cainfo: *const c_char,
+ pub capath: *const c_char,
+ pub zstd_ver_num: c_uint,
+ pub zstd_version: *const c_char,
+ pub hyper_version: *const c_char,
+ pub gsasl_version: *const c_char,
+ pub feature_names: *const *const c_char,
+}
+
+pub const CURL_VERSION_IPV6: c_int = 1 << 0;
+pub const CURL_VERSION_KERBEROS4: c_int = 1 << 1;
+pub const CURL_VERSION_SSL: c_int = 1 << 2;
+pub const CURL_VERSION_LIBZ: c_int = 1 << 3;
+pub const CURL_VERSION_NTLM: c_int = 1 << 4;
+pub const CURL_VERSION_GSSNEGOTIATE: c_int = 1 << 5;
+pub const CURL_VERSION_DEBUG: c_int = 1 << 6;
+pub const CURL_VERSION_ASYNCHDNS: c_int = 1 << 7;
+pub const CURL_VERSION_SPNEGO: c_int = 1 << 8;
+pub const CURL_VERSION_LARGEFILE: c_int = 1 << 9;
+pub const CURL_VERSION_IDN: c_int = 1 << 10;
+pub const CURL_VERSION_SSPI: c_int = 1 << 11;
+pub const CURL_VERSION_CONV: c_int = 1 << 12;
+pub const CURL_VERSION_CURLDEBUG: c_int = 1 << 13;
+pub const CURL_VERSION_TLSAUTH_SRP: c_int = 1 << 14;
+pub const CURL_VERSION_NTLM_WB: c_int = 1 << 15;
+pub const CURL_VERSION_HTTP2: c_int = 1 << 16;
+pub const CURL_VERSION_UNIX_SOCKETS: c_int = 1 << 19;
+pub const CURL_VERSION_HTTPS_PROXY: c_int = 1 << 21;
+pub const CURL_VERSION_BROTLI: c_int = 1 << 23;
+pub const CURL_VERSION_ALTSVC: c_int = 1 << 24;
+pub const CURL_VERSION_HTTP3: c_int = 1 << 25;
+pub const CURL_VERSION_ZSTD: c_int = 1 << 26;
+pub const CURL_VERSION_UNICODE: c_int = 1 << 27;
+pub const CURL_VERSION_HSTS: c_int = 1 << 28;
+pub const CURL_VERSION_GSASL: c_int = 1 << 29;
+
+pub const CURLPAUSE_RECV: c_int = 1 << 0;
+pub const CURLPAUSE_RECV_CONT: c_int = 0;
+pub const CURLPAUSE_SEND: c_int = 1 << 2;
+pub const CURLPAUSE_SEND_CONT: c_int = 0;
+
+pub enum CURLM {}
+
+pub type CURLMcode = c_int;
+pub const CURLM_CALL_MULTI_PERFORM: CURLMcode = -1;
+pub const CURLM_OK: CURLMcode = 0;
+pub const CURLM_BAD_HANDLE: CURLMcode = 1;
+pub const CURLM_BAD_EASY_HANDLE: CURLMcode = 2;
+pub const CURLM_OUT_OF_MEMORY: CURLMcode = 3;
+pub const CURLM_INTERNAL_ERROR: CURLMcode = 4;
+pub const CURLM_BAD_SOCKET: CURLMcode = 5;
+pub const CURLM_UNKNOWN_OPTION: CURLMcode = 6;
+// pub const CURLM_ADDED_ALREADY: CURLMcode = 7;
+
+pub type CURLMSG = __enum_ty;
+pub const CURLMSG_NONE: CURLMSG = 0;
+pub const CURLMSG_DONE: CURLMSG = 1;
+
+#[repr(C)]
+pub struct CURLMsg {
+ pub msg: CURLMSG,
+ pub easy_handle: *mut CURL,
+ pub data: *mut c_void,
+}
+
+pub const CURL_WAIT_POLLIN: c_short = 0x1;
+pub const CURL_WAIT_POLLPRI: c_short = 0x2;
+pub const CURL_WAIT_POLLOUT: c_short = 0x4;
+
+#[repr(C)]
+pub struct curl_waitfd {
+ pub fd: curl_socket_t,
+ pub events: c_short,
+ pub revents: c_short,
+}
+
+pub const CURL_POLL_NONE: c_int = 0;
+pub const CURL_POLL_IN: c_int = 1;
+pub const CURL_POLL_OUT: c_int = 2;
+pub const CURL_POLL_INOUT: c_int = 3;
+pub const CURL_POLL_REMOVE: c_int = 4;
+pub const CURL_CSELECT_IN: c_int = 1;
+pub const CURL_CSELECT_OUT: c_int = 2;
+pub const CURL_CSELECT_ERR: c_int = 4;
+pub const CURL_SOCKET_TIMEOUT: curl_socket_t = CURL_SOCKET_BAD;
+
+pub type curl_socket_callback =
+ extern "C" fn(*mut CURL, curl_socket_t, c_int, *mut c_void, *mut c_void) -> c_int;
+pub type curl_multi_timer_callback = extern "C" fn(*mut CURLM, c_long, *mut c_void) -> c_int;
+
+pub type CURLMoption = __enum_ty;
+pub const CURLMOPT_SOCKETFUNCTION: CURLMoption = CURLOPTTYPE_FUNCTIONPOINT + 1;
+pub const CURLMOPT_SOCKETDATA: CURLMoption = CURLOPTTYPE_OBJECTPOINT + 2;
+pub const CURLMOPT_PIPELINING: CURLMoption = CURLOPTTYPE_LONG + 3;
+pub const CURLMOPT_TIMERFUNCTION: CURLMoption = CURLOPTTYPE_FUNCTIONPOINT + 4;
+pub const CURLMOPT_TIMERDATA: CURLMoption = CURLOPTTYPE_OBJECTPOINT + 5;
+pub const CURLMOPT_MAXCONNECTS: CURLMoption = CURLOPTTYPE_LONG + 6;
+pub const CURLMOPT_MAX_HOST_CONNECTIONS: CURLMoption = CURLOPTTYPE_LONG + 7;
+pub const CURLMOPT_MAX_PIPELINE_LENGTH: CURLMoption = CURLOPTTYPE_LONG + 8;
+pub const CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE: CURLMoption = CURLOPTTYPE_OFF_T + 9;
+pub const CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE: CURLMoption = CURLOPTTYPE_OFF_T + 10;
+pub const CURLMOPT_PIPELINING_SITE_BL: CURLMoption = CURLOPTTYPE_OBJECTPOINT + 11;
+pub const CURLMOPT_PIPELINING_SERVER_BL: CURLMoption = CURLOPTTYPE_OBJECTPOINT + 12;
+pub const CURLMOPT_MAX_TOTAL_CONNECTIONS: CURLMoption = CURLOPTTYPE_LONG + 13;
+pub const CURLMOPT_PUSHFUNCTION: CURLMoption = CURLOPTTYPE_FUNCTIONPOINT + 14;
+pub const CURLMOPT_PUSHDATA: CURLMoption = CURLOPTTYPE_OBJECTPOINT + 15;
+pub const CURLMOPT_MAX_CONCURRENT_STREAMS: CURLMoption = CURLOPTTYPE_LONG + 16;
+
+// These enums are for use with the CURLMOPT_PIPELINING option.
+pub const CURLPIPE_NOTHING: c_long = 0;
+pub const CURLPIPE_HTTP1: c_long = 1;
+pub const CURLPIPE_MULTIPLEX: c_long = 2;
+
+pub const CURL_ERROR_SIZE: usize = 256;
+
+pub type curl_opensocket_callback =
+ extern "C" fn(*mut c_void, curlsocktype, *mut curl_sockaddr) -> curl_socket_t;
+pub type curlsocktype = __enum_ty;
+pub const CURLSOCKTYPE_IPCXN: curlsocktype = 0;
+pub const CURLSOCKTYPE_ACCEPT: curlsocktype = 1;
+pub const CURLSOCKTYPE_LAST: curlsocktype = 2;
+
+#[repr(C)]
+pub struct curl_sockaddr {
+ pub family: c_int,
+ pub socktype: c_int,
+ pub protocol: c_int,
+ pub addrlen: c_uint,
+ #[cfg(unix)]
+ pub addr: libc::sockaddr,
+ #[cfg(windows)]
+ pub addr: SOCKADDR,
+}
+
+extern "C" {
+ pub fn curl_formadd(
+ httppost: *mut *mut curl_httppost,
+ last_post: *mut *mut curl_httppost,
+ ...
+ ) -> CURLFORMcode;
+ pub fn curl_formget(
+ form: *mut curl_httppost,
+ arg: *mut c_void,
+ append: curl_formget_callback,
+ ) -> c_int;
+ pub fn curl_formfree(form: *mut curl_httppost);
+
+ pub fn curl_version() -> *mut c_char;
+
+ pub fn curl_easy_escape(handle: *mut CURL, string: *const c_char, length: c_int)
+ -> *mut c_char;
+ pub fn curl_easy_unescape(
+ handle: *mut CURL,
+ string: *const c_char,
+ length: c_int,
+ outlength: *mut c_int,
+ ) -> *mut c_char;
+ pub fn curl_free(p: *mut c_void);
+
+ pub fn curl_global_init(flags: c_long) -> CURLcode;
+ pub fn curl_global_init_mem(
+ flags: c_long,
+ m: curl_malloc_callback,
+ f: curl_free_callback,
+ r: curl_realloc_callback,
+ s: curl_strdup_callback,
+ c: curl_calloc_callback,
+ ) -> CURLcode;
+ pub fn curl_global_cleanup();
+
+ pub fn curl_slist_append(list: *mut curl_slist, val: *const c_char) -> *mut curl_slist;
+ pub fn curl_slist_free_all(list: *mut curl_slist);
+
+ pub fn curl_getdate(p: *const c_char, _: *const time_t) -> time_t;
+
+ pub fn curl_share_init() -> *mut CURLSH;
+ pub fn curl_share_setopt(sh: *mut CURLSH, opt: CURLSHoption, ...) -> CURLSHcode;
+ pub fn curl_share_cleanup(sh: *mut CURLSH) -> CURLSHcode;
+
+ pub fn curl_version_info(t: CURLversion) -> *mut curl_version_info_data;
+
+ pub fn curl_easy_strerror(code: CURLcode) -> *const c_char;
+ pub fn curl_share_strerror(code: CURLSHcode) -> *const c_char;
+ pub fn curl_easy_pause(handle: *mut CURL, bitmask: c_int) -> CURLcode;
+
+ pub fn curl_easy_init() -> *mut CURL;
+ pub fn curl_easy_setopt(curl: *mut CURL, option: CURLoption, ...) -> CURLcode;
+ pub fn curl_easy_perform(curl: *mut CURL) -> CURLcode;
+ pub fn curl_easy_cleanup(curl: *mut CURL);
+ pub fn curl_easy_getinfo(curl: *mut CURL, info: CURLINFO, ...) -> CURLcode;
+ pub fn curl_easy_duphandle(curl: *mut CURL) -> *mut CURL;
+ pub fn curl_easy_reset(curl: *mut CURL);
+ pub fn curl_easy_recv(
+ curl: *mut CURL,
+ buffer: *mut c_void,
+ buflen: size_t,
+ n: *mut size_t,
+ ) -> CURLcode;
+ pub fn curl_easy_send(
+ curl: *mut CURL,
+ buffer: *const c_void,
+ buflen: size_t,
+ n: *mut size_t,
+ ) -> CURLcode;
+
+ #[cfg(feature = "upkeep_7_62_0")]
+ pub fn curl_easy_upkeep(curl: *mut CURL) -> CURLcode;
+
+ pub fn curl_multi_init() -> *mut CURLM;
+ pub fn curl_multi_add_handle(multi_handle: *mut CURLM, curl_handle: *mut CURL) -> CURLMcode;
+ pub fn curl_multi_remove_handle(multi_handle: *mut CURLM, curl_handle: *mut CURL) -> CURLMcode;
+ pub fn curl_multi_fdset(
+ multi_handle: *mut CURLM,
+ read_fd_set: *mut fd_set,
+ write_fd_set: *mut fd_set,
+ exc_fd_set: *mut fd_set,
+ max_fd: *mut c_int,
+ ) -> CURLMcode;
+ pub fn curl_multi_wait(
+ multi_handle: *mut CURLM,
+ extra_fds: *mut curl_waitfd,
+ extra_nfds: c_uint,
+ timeout_ms: c_int,
+ ret: *mut c_int,
+ ) -> CURLMcode;
+
+ #[cfg(feature = "poll_7_68_0")]
+ pub fn curl_multi_poll(
+ multi_handle: *mut CURLM,
+ extra_fds: *mut curl_waitfd,
+ extra_nfds: c_uint,
+ timeout_ms: c_int,
+ ret: *mut c_int,
+ ) -> CURLMcode;
+
+ #[cfg(feature = "poll_7_68_0")]
+ pub fn curl_multi_wakeup(multi_handle: *mut CURLM) -> CURLMcode;
+
+ pub fn curl_multi_perform(multi_handle: *mut CURLM, running_handles: *mut c_int) -> CURLMcode;
+ pub fn curl_multi_cleanup(multi_handle: *mut CURLM) -> CURLMcode;
+ pub fn curl_multi_info_read(
+ multi_handle: *mut CURLM,
+ msgs_in_queue: *mut c_int,
+ ) -> *mut CURLMsg;
+ pub fn curl_multi_strerror(code: CURLMcode) -> *const c_char;
+ pub fn curl_multi_socket(
+ multi_handle: *mut CURLM,
+ s: curl_socket_t,
+ running_handles: *mut c_int,
+ ) -> CURLMcode;
+ pub fn curl_multi_socket_action(
+ multi_handle: *mut CURLM,
+ s: curl_socket_t,
+ ev_bitmask: c_int,
+ running_handles: *mut c_int,
+ ) -> CURLMcode;
+ pub fn curl_multi_socket_all(
+ multi_handle: *mut CURLM,
+ running_handles: *mut c_int,
+ ) -> CURLMcode;
+ pub fn curl_multi_timeout(multi_handle: *mut CURLM, milliseconds: *mut c_long) -> CURLMcode;
+ pub fn curl_multi_setopt(multi_handle: *mut CURLM, option: CURLMoption, ...) -> CURLMcode;
+ pub fn curl_multi_assign(
+ multi_handle: *mut CURLM,
+ sockfd: curl_socket_t,
+ sockp: *mut c_void,
+ ) -> CURLMcode;
+}
+
+pub fn rust_crate_version() -> &'static str {
+ env!("CARGO_PKG_VERSION")
+}
+
+#[doc(hidden)]
+pub fn vendored() -> bool {
+ cfg!(libcurl_vendored)
+}