File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ pub struct Header {
153153 pub have_stdbool_h : bool ,
154154 pub have_direct : bool ,
155155 pub have_parallel : bool ,
156+ pub have_threadsafe : bool ,
156157 pub version : Version ,
157158}
158159
@@ -172,6 +173,8 @@ impl ParseCallbacks for HeaderParser {
172173 hdr. have_direct = value > 0 ;
173174 } else if name == "H5_HAVE_PARALLEL" {
174175 hdr. have_parallel = value > 0 ;
176+ } else if name == "H5_HAVE_THREADSAFE" {
177+ hdr. have_threadsafe = value > 0 ;
175178 }
176179 None
177180 }
@@ -563,6 +566,18 @@ impl Config {
563566 for v in vs. into_iter ( ) . filter ( |& v| version >= v) {
564567 println ! ( "cargo:rustc-cfg=hdf5_{}_{}_{}" , v. major, v. minor, v. micro) ;
565568 }
569+ if self . header . have_stdbool_h {
570+ println ! ( "cargo:rustc-cfg=h5_have_stdbool_h" ) ;
571+ }
572+ if self . header . have_direct {
573+ println ! ( "cargo:rustc-cfg=h5_have_direct" ) ;
574+ }
575+ if self . header . have_parallel {
576+ println ! ( "cargo:rustc-cfg=h5_have_parallel" ) ;
577+ }
578+ if self . header . have_threadsafe {
579+ println ! ( "cargo:rustc-cfg=h5_have_threadsafe" ) ;
580+ }
566581 }
567582}
568583
Original file line number Diff line number Diff line change @@ -80,6 +80,9 @@ pub fn emit_cfg_flags() {
8080 check_and_emit ! ( hdf5_1_10_2) ;
8181 check_and_emit ! ( hdf5_1_10_3) ;
8282 check_and_emit ! ( hdf5_1_10_4) ;
83+ check_and_emit ! ( h5_have_direct) ;
84+ check_and_emit ! ( h5_have_parallel) ;
85+ check_and_emit ! ( h5_have_threadsafe) ;
8386}
8487
8588#[ cfg( test) ]
You can’t perform that action at this time.
0 commit comments