Skip to content

Commit d7817da

Browse files
authored
Bump curl to 7.72.0 (#354)
1 parent 6e714f7 commit d7817da

File tree

6 files changed

+37
-3
lines changed

6 files changed

+37
-3
lines changed

curl-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "curl-sys"
3-
version = "0.4.36+curl-7.71.1"
3+
version = "0.4.36+curl-7.72.0"
44
authors = ["Alex Crichton <[email protected]>"]
55
links = "curl"
66
build = "build.rs"

curl-sys/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ fn main() {
292292
.define("HAVE_IOCTLSOCKET_FIONBIO", None)
293293
.define("USE_WINSOCK", None)
294294
.file("curl/lib/system_win32.c")
295+
.file("curl/lib/version_win32.c")
295296
.file("curl/lib/curl_multibyte.c");
296297

297298
if cfg!(feature = "spnego") {

curl-sys/curl

Submodule curl updated 197 files

curl-sys/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,8 @@ pub const CURLVERSION_FOURTH: CURLversion = 3;
808808
pub const CURLVERSION_FIFTH: CURLversion = 4;
809809
pub const CURLVERSION_SIXTH: CURLversion = 5;
810810
pub const CURLVERSION_SEVENTH: CURLversion = 6;
811-
pub const CURLVERSION_NOW: CURLversion = CURLVERSION_SEVENTH;
811+
pub const CURLVERSION_EIGHTH: CURLversion = 7;
812+
pub const CURLVERSION_NOW: CURLversion = CURLVERSION_EIGHTH;
812813

813814
#[repr(C)]
814815
pub struct curl_version_info_data {
@@ -833,6 +834,8 @@ pub struct curl_version_info_data {
833834
pub quic_version: *const c_char,
834835
pub cainfo: *const c_char,
835836
pub capath: *const c_char,
837+
pub zstd_ver_num: c_uint,
838+
pub zstd_version: *const c_char,
836839
}
837840

838841
pub const CURL_VERSION_IPV6: c_int = 1 << 0;

src/version.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,30 @@ impl Version {
310310
}
311311
}
312312
}
313+
314+
/// If avaiable, the numeric zstd version
315+
///
316+
/// Represented as `(MAJOR << 24) | (MINOR << 12) | PATCH`
317+
pub fn zstd_ver_num(&self) -> Option<u32> {
318+
unsafe {
319+
if (*self.inner).age >= curl_sys::CURLVERSION_EIGHTH {
320+
Some((*self.inner).zstd_ver_num)
321+
} else {
322+
None
323+
}
324+
}
325+
}
326+
327+
/// If available, the human readable version of zstd
328+
pub fn zstd_version(&self) -> Option<&str> {
329+
unsafe {
330+
if (*self.inner).age >= curl_sys::CURLVERSION_EIGHTH {
331+
::opt_str((*self.inner).zstd_version)
332+
} else {
333+
None
334+
}
335+
}
336+
}
313337
}
314338

315339
impl fmt::Debug for Version {

systest/build.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ fn main() {
6161
});
6262

6363
cfg.skip_const(move |s| {
64+
if version < 72 {
65+
match s {
66+
"CURLVERSION_EIGHTH" => return true,
67+
_ => {}
68+
}
69+
}
6470
if version < 70 {
6571
match s {
6672
"CURL_VERSION_HTTP3"

0 commit comments

Comments
 (0)