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 11[package ]
22name = " curl-sys"
3- version = " 0.4.36+curl-7.71.1 "
3+ version = " 0.4.36+curl-7.72.0 "
44authors = [
" Alex Crichton <[email protected] >" ]
55links = " curl"
66build = " build.rs"
Original file line number Diff line number Diff 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" ) {
Original file line number Diff line number Diff line change @@ -808,7 +808,8 @@ pub const CURLVERSION_FOURTH: CURLversion = 3;
808808pub const CURLVERSION_FIFTH : CURLversion = 4 ;
809809pub const CURLVERSION_SIXTH : CURLversion = 5 ;
810810pub 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 ) ]
814815pub 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
838841pub const CURL_VERSION_IPV6 : c_int = 1 << 0 ;
Original file line number Diff line number Diff 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
315339impl fmt:: Debug for Version {
Original file line number Diff line number Diff 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"
You can’t perform that action at this time.
0 commit comments