Skip to content

Commit

Permalink
Bump curl to 7.72.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Aug 29, 2020
1 parent 6e714f7 commit e29b2d9
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 3 deletions.
2 changes: 1 addition & 1 deletion curl-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "curl-sys"
version = "0.4.36+curl-7.71.1"
version = "0.4.36+curl-7.72.0"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
links = "curl"
build = "build.rs"
Expand Down
1 change: 1 addition & 0 deletions curl-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ fn main() {
.define("HAVE_IOCTLSOCKET_FIONBIO", None)
.define("USE_WINSOCK", None)
.file("curl/lib/system_win32.c")
.file("curl/lib/version_win32.c")
.file("curl/lib/curl_multibyte.c");

if cfg!(feature = "spnego") {
Expand Down
2 changes: 1 addition & 1 deletion curl-sys/curl
Submodule curl updated 197 files
5 changes: 4 additions & 1 deletion curl-sys/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,8 @@ 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_NOW: CURLversion = CURLVERSION_SEVENTH;
pub const CURLVERSION_EIGHTH: CURLversion = 7;
pub const CURLVERSION_NOW: CURLversion = CURLVERSION_EIGHTH;

#[repr(C)]
pub struct curl_version_info_data {
Expand All @@ -833,6 +834,8 @@ pub struct curl_version_info_data {
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 const CURL_VERSION_IPV6: c_int = 1 << 0;
Expand Down
24 changes: 24 additions & 0 deletions src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,30 @@ impl Version {
}
}
}

/// If avaiable, the numeric zstd version
///
/// Represented as `(MAJOR << 24) | (MINOR << 12) | PATCH`
pub fn zstd_ver_num(&self) -> Option<u32> {
unsafe {
if (*self.inner).age >= curl_sys::CURLVERSION_EIGHTH {
Some((*self.inner).zstd_ver_num)
} else {
None
}
}
}

/// If available, the human readable version of zstd
pub fn zstd_version(&self) -> Option<&str> {
unsafe {
if (*self.inner).age >= curl_sys::CURLVERSION_EIGHTH {
::opt_str((*self.inner).zstd_version)
} else {
None
}
}
}
}

impl fmt::Debug for Version {
Expand Down
6 changes: 6 additions & 0 deletions systest/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ fn main() {
});

cfg.skip_const(move |s| {
if version < 72 {
match s {
"CURLVERSION_EIGHTH" => return true,
_ => {}
}
}
if version < 70 {
match s {
"CURL_VERSION_HTTP3"
Expand Down

0 comments on commit e29b2d9

Please sign in to comment.