File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ fn main() {
6464 println ! ( "cargo:root={}" , dst. display( ) ) ;
6565 println ! ( "cargo:include={}" , include. display( ) ) ;
6666 println ! ( "cargo:static=1" ) ;
67+ println ! ( "cargo:rustc-cfg=libcurl_vendored" ) ;
6768 fs:: create_dir_all ( include. join ( "curl" ) ) . unwrap ( ) ;
6869
6970 for header in [
Original file line number Diff line number Diff line change @@ -1111,3 +1111,8 @@ extern "C" {
11111111pub fn rust_crate_version ( ) -> & ' static str {
11121112 env ! ( "CARGO_PKG_VERSION" )
11131113}
1114+
1115+ #[ doc( hidden) ]
1116+ pub fn vendored ( ) -> bool {
1117+ cfg ! ( libcurl_vendored)
1118+ }
Original file line number Diff line number Diff line change @@ -51,6 +51,11 @@ impl Version {
5151 unsafe { ( * self . inner ) . version_num as u32 }
5252 }
5353
54+ /// Returns true if this was built with the vendored version of libcurl.
55+ pub fn vendored ( & self ) -> bool {
56+ curl_sys:: vendored ( )
57+ }
58+
5459 /// Returns a human readable string of the host libcurl is built for.
5560 ///
5661 /// This is discovered as part of the build environment.
@@ -389,6 +394,7 @@ impl fmt::Debug for Version {
389394 f. field ( "version" , & self . version ( ) )
390395 . field ( "rust_crate_version" , & env ! ( "CARGO_PKG_VERSION" ) )
391396 . field ( "rust_sys_crate_version" , & curl_sys:: rust_crate_version ( ) )
397+ . field ( "vendored" , & self . vendored ( ) )
392398 . field ( "host" , & self . host ( ) )
393399 . field ( "feature_ipv6" , & self . feature_ipv6 ( ) )
394400 . field ( "feature_ssl" , & self . feature_ssl ( ) )
You can’t perform that action at this time.
0 commit comments