From 702743bb07c7dd95f1aa49bca857a4ee4ac99b51 Mon Sep 17 00:00:00 2001 From: Mus Date: Tue, 4 Sep 2018 18:39:49 -0400 Subject: [PATCH] Correct H50get_info deprecation for earlier releases (#510) * Update before_script in OSX travis to forcibly link gcc Otherwise we obtain the following linking failure: Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink include/c++ Target /usr/local/include/c++ already exists. You may want to remove it: rm '/usr/local/include/c++' To force the link and overwrite all conflicting files: brew link --overwrite gcc To list all files that would be deleted: brew link --overwrite --dry-run gcc Possible conflicting files are: /usr/local/include/c++ -> /usr/local/Caskroom/oclint/0.13.1,17.4.0/oclint-0.13.1/include/c++ * Correct H50get_info deprecation for earlier releases This function was renamed/deprecated in hdf5 releases newer than 10.2. Here we update the function to map to the old realase behavior for the latest hdf5 versions. --- src/HDF5.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/HDF5.jl b/src/HDF5.jl index 832ad207c..590f4a638 100644 --- a/src/HDF5.jl +++ b/src/HDF5.jl @@ -2084,7 +2084,7 @@ for (jlname, h5name, outtype, argtypes, argsyms, msg) in (:h5f_get_vfd_handle, :H5Fget_vfd_handle, Herr, (Hid, Hid, Ptr{Ptr{Cint}}), (:file_id, :fapl_id, :file_handle), "Error getting VFD handle"), (:h5g_close, :H5Gclose, Herr, (Hid,), (:group_id,), "Error closing group"), (:h5g_get_info, :H5Gget_info, Herr, (Hid, Ptr{H5Ginfo}), (:group_id, :buf), "Error getting group info"), - (:h5o_get_info, :H5Oget_info, Herr, (Hid, Ptr{H5Oinfo}), (:object_id, :buf), "Error getting object info"), + (:h5o_get_info, :H5Oget_info1, Herr, (Hid, Ptr{H5Oinfo}), (:object_id, :buf), "Error getting object info"), (:h5o_close, :H5Oclose, Herr, (Hid,), (:object_id,), "Error closing object"), (:h5p_close, :H5Pclose, Herr, (Hid,), (:id,), "Error closing property list"), (:h5p_get_dxpl_mpio, :H5Pget_dxpl_mpio, Herr, (Hid, Ptr{Cint}), (:dxpl_id, :xfer_mode), "Error getting MPIO transfer mode"), @@ -2114,6 +2114,11 @@ for (jlname, h5name, outtype, argtypes, argsyms, msg) in (:h5t_set_size, :H5Tset_size, Herr, (Hid, Csize_t), (:dtype_id, :sz), "Error setting size of datatype"), ) + # emulate 1.8 and 1.10 release interface (new release should use HF0get_info2 or use the macro mapping H5Oget_info) + if h5name == :H5Oget_info1 && libversion <= v"1.10.2" + h5name = :H5Oget_info + end + ex_dec = funcdecexpr(jlname, length(argtypes), argsyms) library = startswith(string(h5name), "H5DO") ? libhdf5_hl : libhdf5 if isempty(library)