Skip to content

Commit 81873ad

Browse files
authored
Merge pull request #184 from mulimoen/feature/hdf5-1_12_1
Add support for hdf5 1.12.1
2 parents 994f33a + d679e0c commit 81873ad

File tree

9 files changed

+52
-6
lines changed

9 files changed

+52
-6
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,11 @@ jobs:
9494
- {os: macos, version: 1.10.5, mpi: openmpi, channel: conda-forge, rust: beta}
9595
- {os: ubuntu, version: 1.10.6, channel: anaconda, rust: stable}
9696
- {os: ubuntu, version: 1.10.6, mpi: mpich, channel: conda-forge, rust: nightly}
97+
# - {os: ubuntu, version: 1.10.8, channel: conda-forge, rust: stable}
9798
- {os: ubuntu, version: 1.12.0, mpi: openmpi, channel: conda-forge, rust: stable}
9899
- {os: macos, version: 1.12.0, channel: conda-forge, rust: stable}
99100
- {os: windows, version: 1.12.0, channel: conda-forge, rust: stable}
101+
- {os: ubuntu, version: 1.12.1, channel: conda-forge, rust: stable}
100102
defaults:
101103
run:
102104
shell: bash -l {0}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
- `Error` now implements `From<Infallible>`, which allows passing convertible
88
extents (like tuples of integers) where `impl TryInto<Extents>` is required.
9+
- Support for HDF5 versions 1.12.1 and 1.10.8.
910

1011
## 0.8.0
1112

hdf5-sys/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,8 @@ impl Config {
613613
let version = self.header.version;
614614
assert!(version >= Version::new(1, 8, 4), "required HDF5 version: >=1.8.4");
615615
let mut vs: Vec<_> = (5..=21).map(|v| Version::new(1, 8, v)).collect(); // 1.8.[5-21]
616-
vs.extend((0..=7).map(|v| Version::new(1, 10, v))); // 1.10.[0-7]
617-
vs.push(Version::new(1, 12, 0)); // 1.12.0
616+
vs.extend((0..=8).map(|v| Version::new(1, 10, v))); // 1.10.[0-8]
617+
vs.extend((0..=1).map(|v| Version::new(1, 12, v))); // 1.12.[0-1]
618618
for v in vs.into_iter().filter(|&v| version >= v) {
619619
println!("cargo:rustc-cfg=feature=\"{}.{}.{}\"", v.major, v.minor, v.micro);
620620
println!("cargo:version_{}_{}_{}=1", v.major, v.minor, v.micro);

hdf5-sys/src/h5.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ extern "C" {
8787
pub fn H5is_library_threadsafe(is_ts: *mut hbool_t) -> herr_t;
8888
}
8989

90-
#[cfg(all(feature = "1.10.7", not(feature = "1.12.0")))]
90+
#[cfg(any(all(feature = "1.10.7", not(feature = "1.12.0")), feature = "1.12.1"))]
9191
#[repr(C)]
9292
pub struct H5_alloc_stats_t {
9393
total_alloc_bytes: c_ulonglong,
@@ -99,7 +99,7 @@ pub struct H5_alloc_stats_t {
9999
peak_alloc_blocks_count: size_t,
100100
}
101101

102-
#[cfg(all(feature = "1.10.7", not(feature = "1.12.0")))]
102+
#[cfg(any(all(feature = "1.10.7", not(feature = "1.12.0")), feature = "1.12.1"))]
103103
extern "C" {
104104
pub fn H5get_alloc_stats(stats: *mut H5_alloc_stats_t) -> herr_t;
105105
pub fn H5get_free_list_sizes(

hdf5-sys/src/h5e.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,12 @@ mod globals {
289289
extern_static!(H5E_CANTREMOVE, H5E_CANTREMOVE_g);
290290
extern_static!(H5E_CANTCONVERT, H5E_CANTCONVERT_g);
291291
extern_static!(H5E_BADSIZE, H5E_BADSIZE_g);
292+
#[cfg(feature = "1.12.1")]
293+
extern_static!(H5E_CANTLOCKFILE, H5E_CANTLOCKFILE_g);
294+
#[cfg(feature = "1.12.1")]
295+
extern_static!(H5E_CANTUNLOCKFILE, H5E_CANTUNLOCKFILE_g);
296+
#[cfg(feature = "1.12.1")]
297+
extern_static!(H5E_LIB, H5E_LIB_g);
292298
}
293299

294300
#[cfg(all(target_env = "msvc", not(feature = "static")))]
@@ -447,4 +453,10 @@ mod globals {
447453
extern_static!(H5E_CANTREMOVE, __imp_H5E_CANTREMOVE_g);
448454
extern_static!(H5E_CANTCONVERT, __imp_H5E_CANTCONVERT_g);
449455
extern_static!(H5E_BADSIZE, __imp_H5E_BADSIZE_g);
456+
#[cfg(feature = "1.12.1")]
457+
extern_static!(H5E_CANTLOCKFILE, __imp_H5E_CANTLOCKFILE_g);
458+
#[cfg(feature = "1.12.1")]
459+
extern_static!(H5E_CANTUNLOCKFILE, __imp_H5E_CANTUNLOCKFILE_g);
460+
#[cfg(feature = "1.12.1")]
461+
extern_static!(H5E_LIB, __imp_H5E_LIB_g);
450462
}

hdf5-sys/src/h5fd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ pub mod ros3 {
417417
}
418418
}
419419

420-
#[cfg(all(feature = "1.10.7", not(feature = "1.12.0")))]
420+
#[cfg(any(all(feature = "1.10.7", not(feature = "1.12.0")), feature = "1.12.1"))]
421421
pub mod splitter {
422422
use super::*;
423423

hdf5-sys/src/h5p.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ extern "C" {
771771
pub fn H5Pset_dset_no_attrs_hint(dcpl_id: hid_t, minimize: hbool_t) -> herr_t;
772772
}
773773

774-
#[cfg(all(feature = "1.10.7", not(feature = "1.12.0")))]
774+
#[cfg(any(all(feature = "1.10.7", not(feature = "1.12.0")), feature = "1.12.1"))]
775775
extern "C" {
776776
pub fn H5Pget_file_locking(
777777
fapl_id: hid_t, use_file_locking: *mut hbool_t, ignore_when_disable: *mut hbool_t,

hdf5-sys/src/h5s.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,8 @@ extern "C" {
143143
nbytes: *mut size_t, off: *mut hsize_t, len: *mut size_t,
144144
) -> herr_t;
145145
}
146+
147+
#[cfg(feature = "1.12.1")]
148+
extern "C" {
149+
pub fn H5Ssel_iter_reset(sel_iter_id: hid_t, space_id: hid_t) -> hid_t;
150+
}

hdf5-sys/src/h5vl.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,29 @@ extern "C" {
2222
) -> hid_t;
2323
pub fn H5VLunregister_connector(vol_id: hid_t) -> herr_t;
2424
}
25+
26+
#[cfg(feature = "1.12.1")]
27+
#[repr(C)]
28+
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
29+
pub enum H5VL_subclass_t {
30+
H5VL_SUBCLS_NONE,
31+
H5VL_SUBCLS_INFO,
32+
H5VL_SUBCLS_WRAP,
33+
H5VL_SUBCLS_ATTR,
34+
H5VL_SUBCLS_DATASET,
35+
H5VL_SUBCLS_DATATYPE,
36+
H5VL_SUBCLS_FILE,
37+
H5VL_SUBCLS_GROUP,
38+
H5VL_SUBCLS_LINK,
39+
H5VL_SUBCLS_OBJECT,
40+
H5VL_SUBCLS_REQUEST,
41+
H5VL_SUBCLS_BLOB,
42+
H5VL_SUBCLS_TOKEN,
43+
}
44+
45+
#[cfg(feature = "1.12.1")]
46+
extern "C" {
47+
pub fn H5VLquery_optional(
48+
obj_id: hid_t, subcls: H5VL_subclass_t, opt_type: c_int, supported: *mut hbool_t,
49+
) -> herr_t;
50+
}

0 commit comments

Comments
 (0)