File tree Expand file tree Collapse file tree 6 files changed +37
-3
lines changed Expand file tree Collapse file tree 6 files changed +37
-3
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " curl-sys"
3
- version = " 0.4.36+curl-7.71.1 "
3
+ version = " 0.4.36+curl-7.72.0 "
4
4
authors = [
" Alex Crichton <[email protected] >" ]
5
5
links = " curl"
6
6
build = " build.rs"
Original file line number Diff line number Diff line change @@ -292,6 +292,7 @@ fn main() {
292
292
. define ( "HAVE_IOCTLSOCKET_FIONBIO" , None )
293
293
. define ( "USE_WINSOCK" , None )
294
294
. file ( "curl/lib/system_win32.c" )
295
+ . file ( "curl/lib/version_win32.c" )
295
296
. file ( "curl/lib/curl_multibyte.c" ) ;
296
297
297
298
if cfg ! ( feature = "spnego" ) {
Original file line number Diff line number Diff line change @@ -808,7 +808,8 @@ pub const CURLVERSION_FOURTH: CURLversion = 3;
808
808
pub const CURLVERSION_FIFTH : CURLversion = 4 ;
809
809
pub const CURLVERSION_SIXTH : CURLversion = 5 ;
810
810
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 ;
812
813
813
814
#[ repr( C ) ]
814
815
pub struct curl_version_info_data {
@@ -833,6 +834,8 @@ pub struct curl_version_info_data {
833
834
pub quic_version : * const c_char ,
834
835
pub cainfo : * const c_char ,
835
836
pub capath : * const c_char ,
837
+ pub zstd_ver_num : c_uint ,
838
+ pub zstd_version : * const c_char ,
836
839
}
837
840
838
841
pub const CURL_VERSION_IPV6 : c_int = 1 << 0 ;
Original file line number Diff line number Diff line change @@ -310,6 +310,30 @@ impl Version {
310
310
}
311
311
}
312
312
}
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
+ }
313
337
}
314
338
315
339
impl fmt:: Debug for Version {
Original file line number Diff line number Diff line change @@ -61,6 +61,12 @@ fn main() {
61
61
} ) ;
62
62
63
63
cfg. skip_const ( move |s| {
64
+ if version < 72 {
65
+ match s {
66
+ "CURLVERSION_EIGHTH" => return true ,
67
+ _ => { }
68
+ }
69
+ }
64
70
if version < 70 {
65
71
match s {
66
72
"CURL_VERSION_HTTP3"
You can’t perform that action at this time.
0 commit comments