netcdf-c/h5_test
Dana Robinson a2dff313f7 Fix for H5Literate() callback versioning
The netCDF library supports many versions of HDF5, which handles API
compatibility via a set of API-call-specific macros. netCDF uses
H5Literate(), which was versioned in the 1.12.x maintenance line
in order to better support the virtual object layer (VOL).

h5_test/tst_h_files4.c failed to compile with certain compilers when the
HDF5 library was built using pre-VOL versions of the library- e.g., 1.10,
which can be configured with --with-default-api-version=110. This was due
to the API compatibility macros being used to select the 1.10 version of
H5Literate(), but not its callback function, which was set using a
`H5_VERSION_GE()` macro that does not take the compatibility macros into
consideration.

Fixing the problem involved removing the `H5_VERSION_GE()` macro and
letting the compatibility macros handle the versioning, and using the
`H5_USE_XXX_API_DEFAULT` symbols to protect the H5Oopen_by_addr() call
used in the callback (a new call that wasn't versioned, hence the
different protection mechanism).

Tested w/ HDF5's develop branch w/ both 1.14 and 1.10 API bindings

Fixes #2886 (4118 in HDF5's issue tracker)
2024-03-13 08:25:59 -07:00
..
CMakeLists.txt CMake: Use target_link_libraries with HDF5::HDF5 target 2024-02-16 10:51:20 +00:00
h5_err_macros.h Continuing to replace references. 2018-12-04 16:51:40 -07:00
Makefile.am added new test tst_h_par_compress.c 2020-07-08 12:17:37 -06:00
ref_tst_compounds.nc
ref_tst_h_compounds2.h5
ref_tst_h_compounds.h5
run_par_tests.sh.in fixed warning in tst_parallel5.c 2020-07-08 12:24:48 -06:00
tst_h_atts3.c Fix most float conversion warnings 2023-10-26 16:01:24 +01:00
tst_h_atts4.c Fix most float conversion warnings 2023-10-26 16:01:24 +01:00
tst_h_atts.c Remove need for HDF5-1.6 API being defined 2021-04-28 13:59:24 -06:00
tst_h_compounds2.c Remove need for HDF5-1.6 API being defined 2021-04-28 13:59:24 -06:00
tst_h_compounds.c Replaced trivial uses of sprintf with snprintf 2023-12-08 13:30:38 -05:00
tst_h_dimscales1.c Remove need for HDF5-1.6 API being defined 2021-04-28 13:59:24 -06:00
tst_h_dimscales2.c count argument in H5Sselect_hyperslab 2023-12-12 16:45:19 -07:00
tst_h_dimscales3.c Remove need for HDF5-1.6 API being defined 2021-04-28 13:59:24 -06:00
tst_h_dimscales4.c Replaced trivial uses of sprintf with snprintf 2023-12-08 13:30:38 -05:00
tst_h_dimscales.c Replaced trivial uses of sprintf with snprintf 2023-12-08 13:30:38 -05:00
tst_h_endian_float.c Remove need for HDF5-1.6 API being defined 2021-04-28 13:59:24 -06:00
tst_h_enums.c count argument in H5Sselect_hyperslab 2023-12-12 16:45:19 -07:00
tst_h_files2.c Remove need for HDF5-1.6 API being defined 2021-04-28 13:59:24 -06:00
tst_h_files4.c Fix for H5Literate() callback versioning 2024-03-13 08:25:59 -07:00
tst_h_files.c count argument in H5Sselect_hyperslab 2023-12-12 16:45:19 -07:00
tst_h_grps.c Remove need for HDF5-1.6 API being defined 2021-04-28 13:59:24 -06:00
tst_h_ints.c Spelling fixes 2019-09-18 08:03:01 -06:00
tst_h_mem.c Replaced trivial uses of sprintf with snprintf 2023-12-08 13:30:38 -05:00
tst_h_opaques.c Remove need for HDF5-1.6 API being defined 2021-04-28 13:59:24 -06:00
tst_h_par_compress.c count argument in H5Sselect_hyperslab 2023-12-12 16:45:19 -07:00
tst_h_par.c count argument in H5Sselect_hyperslab 2023-12-12 16:45:19 -07:00
tst_h_rename.c Remove need for HDF5-1.6 API being defined 2021-04-28 13:59:24 -06:00
tst_h_strings1.c Updated copyright date. 2018-12-04 17:03:56 -07:00
tst_h_strings2.c count argument in H5Sselect_hyperslab 2023-12-12 16:45:19 -07:00
tst_h_strings.c Remove need for HDF5-1.6 API being defined 2021-04-28 13:59:24 -06:00
tst_h_vars2.c Replaced trivial uses of sprintf with snprintf 2023-12-08 13:30:38 -05:00
tst_h_vars3.c Remove need for HDF5-1.6 API being defined 2021-04-28 13:59:24 -06:00
tst_h_vars.c count argument in H5Sselect_hyperslab 2023-12-12 16:45:19 -07:00
tst_h_vl.c Silence conversion warnings from malloc arguments 2023-11-24 18:20:52 +00:00
tst_h_wrt_cmp.c Remove need for HDF5-1.6 API being defined 2021-04-28 13:59:24 -06:00