summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2013-04-19 17:24:43 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2013-04-19 17:24:43 (GMT)
commit0e1e79f0e02606364018806d465d48eed8ffd153 (patch)
treec7bffe852a3f284a397638536558b2a198a8bfdb
parent14d8e1c2b5ecaf2e298984f269094dd5f2bd735f (diff)
downloadhdf5-0e1e79f0e02606364018806d465d48eed8ffd153.zip
hdf5-0e1e79f0e02606364018806d465d48eed8ffd153.tar.gz
hdf5-0e1e79f0e02606364018806d465d48eed8ffd153.tar.bz2
[svn-r23601] Bring revisions #23341 - 23597 from trunk to revise_chunks.
h5committtested.
-rw-r--r--MANIFEST8
-rw-r--r--README.txt2
-rwxr-xr-xbin/cmakehdf519
-rw-r--r--c++/src/H5DxferProp.cpp37
-rw-r--r--c++/src/H5DxferProp.h7
-rw-r--r--c++/src/H5File.cpp24
-rw-r--r--c++/src/H5Location.cpp33
-rw-r--r--c++/src/H5Location.h10
-rw-r--r--c++/src/Makefile.in2
-rw-r--r--c++/src/h5c++.in38
-rw-r--r--c++/test/dsets.cpp6
-rw-r--r--c++/test/tattr.cpp78
-rw-r--r--c++/test/tcompound.cpp1
-rw-r--r--c++/test/tfile.cpp12
-rw-r--r--c++/test/tfilter.cpp4
-rw-r--r--c++/test/th5s.cpp1
-rw-r--r--c++/test/tlinks.cpp3
-rw-r--r--c++/test/trefer.cpp2
-rw-r--r--c++/test/ttypes.cpp4
-rw-r--r--c++/test/tvlstr.cpp5
-rw-r--r--config/apple48
-rw-r--r--[-rwxr-xr-x]config/cmake/CTestCustom.cmake0
-rw-r--r--config/cmake/ConfigureChecks.cmake2
-rw-r--r--config/cmake/H5pubconf.h.in6
-rw-r--r--[-rwxr-xr-x]config/cmake/cacheinit.cmake0
-rw-r--r--[-rwxr-xr-x]config/cmake/mccacheinit.cmake0
-rw-r--r--config/gnu-flags83
-rw-r--r--config/lt_vers.am2
-rwxr-xr-xconfigure2764
-rw-r--r--configure.ac128
-rw-r--r--fortran/src/H5Off.f9014
-rw-r--r--fortran/src/Makefile.in2
-rw-r--r--fortran/src/h5fc.in46
-rw-r--r--fortran/src/hdf5_fortrandll.def.in1
-rw-r--r--fortran/test/tH5O.f902
-rw-r--r--fortran/test/tH5T_F03.f9013
-rw-r--r--fortran/test/tf.f9011
-rw-r--r--hl/c++/src/Makefile.in2
-rw-r--r--hl/fortran/src/Makefile.in2
-rw-r--r--hl/src/Makefile.in2
-rw-r--r--hl/test/CMakeLists.txt7
-rw-r--r--hl/test/test_ds.c694
-rw-r--r--release_docs/INSTALL_parallel67
-rw-r--r--release_docs/RELEASE.txt65
-rw-r--r--src/CMakeLists.txt15
-rw-r--r--src/H5.c1
-rw-r--r--src/H5AC.c37
-rw-r--r--src/H5ACprivate.h5
-rw-r--r--src/H5C.c37
-rw-r--r--src/H5Dchunk.c2
-rw-r--r--src/H5Edefin.h4
-rw-r--r--src/H5Einit.h12
-rw-r--r--src/H5Epubgen.h6
-rw-r--r--src/H5Eterm.h4
-rw-r--r--src/H5FDmulti.c172
-rw-r--r--src/H5FDmulti.h3
-rw-r--r--src/H5HFsection.c2
-rw-r--r--src/H5PL.c661
-rw-r--r--src/H5PLextern.h84
-rw-r--r--src/H5PLprivate.h53
-rw-r--r--src/H5Pfapl.c6
-rw-r--r--src/H5Pocpl.c78
-rw-r--r--src/H5Tconv.c19
-rw-r--r--src/H5Z.c89
-rw-r--r--src/H5Zprivate.h1
-rw-r--r--src/H5Zpublic.h1
-rw-r--r--src/H5config.h.in6
-rw-r--r--src/H5err.txt5
-rw-r--r--src/H5private.h12
-rw-r--r--src/H5public.h4
-rw-r--r--src/Makefile.am5
-rw-r--r--src/Makefile.in14
-rw-r--r--test/CMakeLists.txt123
-rw-r--r--test/Makefile.am40
-rw-r--r--test/Makefile.in279
-rw-r--r--test/dynlib1.c97
-rw-r--r--test/dynlib2.c91
-rw-r--r--test/dynlib3.c102
-rw-r--r--test/plugin.c732
-rw-r--r--test/test_plugin.sh.in93
-rw-r--r--test/testerror.sh.in9
-rw-r--r--test/testframe.c4
-rw-r--r--test/tfile.c12
-rw-r--r--testpar/t_cache.c119
-rw-r--r--testpar/t_dset.c60
-rw-r--r--testpar/testphdf5.c4
-rw-r--r--testpar/testphdf5.h1
-rw-r--r--tools/h5copy/h5copy.c79
-rw-r--r--tools/h5copy/testh5copy.sh.in10
-rw-r--r--tools/h5diff/ph5diff_main.c5
-rw-r--r--tools/h5dump/CMakeLists.txt29
-rw-r--r--tools/h5dump/testh5dump.sh.in69
-rw-r--r--tools/h5ls/h5ls.c247
-rw-r--r--tools/h5repack/CMakeLists.txt12
-rw-r--r--tools/h5repack/h5repack.sh.in34
-rw-r--r--tools/h5repack/h5repack_copy.c10
-rw-r--r--tools/lib/CMakeLists.txt6
-rw-r--r--tools/lib/h5diff.c34
-rw-r--r--tools/lib/h5diff.h205
-rw-r--r--tools/lib/h5diff_array.c689
-rw-r--r--tools/lib/h5diff_attr.c14
-rw-r--r--tools/lib/h5tools_dump.c16
-rw-r--r--tools/lib/h5tools_utils.h2
-rw-r--r--tools/misc/h5cc.in39
-rw-r--r--tools/misc/h5mkgrp.c13
-rw-r--r--[-rwxr-xr-x]tools/misc/h5perf_gentest.c0
-rw-r--r--tools/misc/h5redeploy.in96
-rw-r--r--tools/testfiles/tfletcher32.ddl2
-rw-r--r--tools/testfiles/tshuffle.ddl2
-rw-r--r--tools/testfiles/tuserfilter.ddl4
-rw-r--r--vms/src/h5pubconf.h6
111 files changed, 5816 insertions, 3168 deletions
diff --git a/MANIFEST b/MANIFEST
index 8ec08d5..3ded7a2 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -862,6 +862,9 @@
./src/H5Ppublic.h
./src/H5Pstrcpl.c
./src/H5Ptest.c
+./src/H5PL.c
+./src/H5PLprivate.h
+./src/H5PLextern.h
./src/H5R.c
./src/H5Rdeprec.c
./src/H5Rpkg.h
@@ -973,6 +976,9 @@
./test/dt_arith.c
./test/dtypes.c
./test/dtransform.c
+./test/dynlib1.c
+./test/dynlib2.c
+./test/dynlib3.c
./test/earray.c
./test/efc.c
./test/enc_dec_plist.c
@@ -1047,6 +1053,7 @@
./test/ntypes.c
./test/ohdr.c
./test/objcopy.c
+./test/plugin.c
./test/reserved.c
./test/pool.c
./test/set_extent.c
@@ -1080,6 +1087,7 @@
./test/testhdf5.c
./test/testhdf5.h
./test/testlibinfo.sh.in
+./test/test_plugin.sh.in
./test/testmeta.c
./test/testswmr.sh
./test/tfile.c
diff --git a/README.txt b/README.txt
index d703d87..965dbf8 100644
--- a/README.txt
+++ b/README.txt
@@ -1,4 +1,4 @@
-HDF5 version 1.9.148-FA_a5 currently under development
+HDF5 version 1.9.149-FA_a5 currently under development
Please refer to the release_docs/INSTALL file for installation instructions.
------------------------------------------------------------------------------
diff --git a/bin/cmakehdf5 b/bin/cmakehdf5
index c024ad1..2480497 100755
--- a/bin/cmakehdf5
+++ b/bin/cmakehdf5
@@ -70,6 +70,7 @@ set (CTEST_SOURCE_DIRECTORY "../hdf5")
set (CTEST_BINARY_DIRECTORY ".")
set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
set (CTEST_BUILD_CONFIGURATION "Release")
+set (CTEST_MAX_N 8)
# -- CDash variables
set (LOCAL_NO_SUBMIT TRUE) # No CDash submit.
@@ -87,6 +88,9 @@ set (ADD_BUILD_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=/usr/local/hdf5.1.8 -DHDF5_A
include(ProcessorCount)
ProcessorCount(N)
if(NOT N EQUAL 0)
+ if(N GREATER ${CTEST_MAX_N})
+ set(N ${CTEST_MAX_N})
+ endif(N GREATER ${CTEST_MAX_N})
set(CTEST_BUILD_FLAGS -j${N})
set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
endif()
@@ -188,22 +192,31 @@ CTEST_START (${MODEL} TRACK ${MODEL})
if (NOT LOCAL_SKIP_UPDATE)
CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
endif (NOT LOCAL_SKIP_UPDATE)
-CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}")
+CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+if(NOT res STREQUAL "0")
+ message (FATAL_ERROR "Configure FAILED")
+endif()
message ("Configure DONE")
CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}")
if (NOT LOCAL_NO_SUBMIT)
CTEST_SUBMIT (PARTS Update Configure Notes)
endif (NOT LOCAL_NO_SUBMIT)
-CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res)
if (NOT LOCAL_NO_SUBMIT)
CTEST_SUBMIT (PARTS Build)
endif (NOT LOCAL_NO_SUBMIT)
+if(NOT res STREQUAL "0")
+ message (FATAL_ERROR "Build FAILED")
+endif()
message ("build DONE")
if (NOT LOCAL_SKIP_TEST)
- CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+ CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
if (NOT LOCAL_NO_SUBMIT)
CTEST_SUBMIT (PARTS Test)
endif (NOT LOCAL_NO_SUBMIT)
+ if(NOT res STREQUAL "0")
+ message (FATAL_ERROR "Test FAILED")
+ endif()
message ("test DONE")
endif (NOT LOCAL_SKIP_TEST)
diff --git a/c++/src/H5DxferProp.cpp b/c++/src/H5DxferProp.cpp
index 0785735..bc3e0af 100644
--- a/c++/src/H5DxferProp.cpp
+++ b/c++/src/H5DxferProp.cpp
@@ -266,43 +266,6 @@ void DSetMemXferPropList::getVlenMemManager( H5MM_allocate_t& alloc_func, void**
}
//--------------------------------------------------------------------------
-// Function: DSetMemXferPropList::setMulti
-///\brief Sets the data transfer property list for the multi-file driver.
-///\param memb_dxpl - OUT: Array of data access property lists
-///\exception H5::PropListIException
-///\par Description
-/// This function can only be used after the member map has
-/// been set with FileAccPropList::setMulti (not done - BMR.)
-// Programmer: Binh-Minh Ribler - April, 2004
-//--------------------------------------------------------------------------
-void DSetMemXferPropList::setMulti(const hid_t *memb_dxpl)
-{
- herr_t ret_value = H5Pset_dxpl_multi(id, memb_dxpl);
- if (ret_value < 0)
- {
- throw PropListIException("DSetMemXferPropList::setMulti",
- "H5Pset_dxpl_multi failed");
- }
-}
-
-//--------------------------------------------------------------------------
-// Function: DSetMemXferPropList::getMulti
-///\brief Returns multi-file data transfer property list information.
-///\param memb_dxpl - OUT: Array of data access property lists
-///\exception H5::PropListIException
-// Programmer: Binh-Minh Ribler - April, 2004
-//--------------------------------------------------------------------------
-void DSetMemXferPropList::getMulti(hid_t *memb_dxpl)
-{
- herr_t ret_value = H5Pget_dxpl_multi(id, memb_dxpl);
- if (ret_value < 0)
- {
- throw PropListIException("DSetMemXferPropList::getMulti",
- "H5Pget_dxpl_multi failed");
- }
-}
-
-//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::setSmallDataBlockSize
///\brief Sets the size of a contiguous block reserved for small data.
///\param size - IN: Maximum size, in bytes, of the small data block.
diff --git a/c++/src/H5DxferProp.h b/c++/src/H5DxferProp.h
index 66216d8..bf481c3 100644
--- a/c++/src/H5DxferProp.h
+++ b/c++/src/H5DxferProp.h
@@ -66,12 +66,6 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
void getVlenMemManager( H5MM_allocate_t& alloc, void** alloc_info,
H5MM_free_t& free, void** free_info ) const;
- // Sets the data transfer property list for the multi-file driver.
- void setMulti(const hid_t *memb_dxpl);
-
- // Returns multi-file data transfer property list information.
- void getMulti(hid_t *memb_dxpl);
-
// Sets the size of a contiguous block reserved for small data.
void setSmallDataBlockSize(hsize_t size);
@@ -109,3 +103,4 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
}
#endif
#endif
+
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index 92c4d32..ede7469 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -61,7 +61,7 @@ H5File::H5File() : H5Location(), id(0) {}
/// modifying default file meta-data. Default to
/// FileCreatPropList::DEFAULT
///\param access_plist - IN: File access property list. Default to
-/// FileCreatPropList::DEFAULT
+/// FileAccPropList::DEFAULT
///\par Description
/// Valid values of \a flags include:
/// \li \c H5F_ACC_TRUNC - Truncate file, if it already exists,
@@ -77,11 +77,18 @@ H5File::H5File() : H5Location(), id(0) {}
/// please refer to the \b Special \b case section in the C layer
/// Reference Manual at:
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5F.html#File-Create
+// Notes With a PGI compiler (~2012-2013), the exception thrown by p_get_file
+// could not be caught in the applications. Added try block here
+// to catch then re-throw it. -BMR 2013/03/21
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : H5Location(0)
{
- p_get_file(name, flags, create_plist, access_plist);
+ try {
+ p_get_file(name, flags, create_plist, access_plist);
+ } catch (FileIException open_file) {
+ throw open_file;
+ }
}
//--------------------------------------------------------------------------
@@ -94,12 +101,19 @@ H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& c
/// modifying default file meta-data. Default to
/// FileCreatPropList::DEFAULT
///\param access_plist - IN: File access property list. Default to
-/// FileCreatPropList::DEFAULT
+/// FileAccPropList::DEFAULT
+// Notes With a PGI compiler (~2012-2013), the exception thrown by p_get_file
+// could not be caught in the applications. Added try block here
+// to catch then re-throw it. -BMR 2013/03/21
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::H5File( const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : H5Location(0)
{
- p_get_file(name.c_str(), flags, create_plist, access_plist);
+ try {
+ p_get_file(name.c_str(), flags, create_plist, access_plist);
+ } catch (FileIException open_file) {
+ throw open_file;
+ }
}
//--------------------------------------------------------------------------
@@ -187,7 +201,7 @@ bool H5File::isHdf5(const H5std_string& name )
///\param name - IN: Name of the file
///\param flags - IN: File access flags
///\param access_plist - IN: File access property list. Default to
-/// FileCreatPropList::DEFAULT
+/// FileAccPropList::DEFAULT
///\par Description
/// Valid values of \a flags include:
/// H5F_ACC_RDWR: Open with read/write access. If the file is
diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp
index b93cd86..98878d7 100644
--- a/c++/src/H5Location.cpp
+++ b/c++/src/H5Location.cpp
@@ -250,6 +250,39 @@ int H5Location::getNumAttrs() const
}
//--------------------------------------------------------------------------
+// Function: H5Location::attrExists
+///\brief Checks whether the named attribute exists at this location.
+///\param name - IN: Name of the attribute to be queried
+///\exception H5::AttributeIException
+// Programmer Binh-Minh Ribler - 2013
+//--------------------------------------------------------------------------
+bool H5Location::attrExists(const char* name) const
+{
+ // Call C routine H5Aexists to determine whether an attribute exists
+ // at this location, which could be specified by a file, group, dataset,
+ // or named datatype.
+ herr_t ret_value = H5Aexists(getId(), name);
+ if( ret_value > 0 )
+ return true;
+ else if(ret_value == 0)
+ return false;
+ else // Raise exception when H5Aexists returns a negative value
+ throw AttributeIException(inMemFunc("attrExists"), "H5Aexists failed");
+}
+
+//--------------------------------------------------------------------------
+// Function: H5Location::attrExists
+///\brief This is an overloaded member function, provided for convenience.
+/// It differs from the above function in that it takes
+/// a reference to an \c H5std_string for \a name.
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
+bool H5Location::attrExists(const H5std_string& name) const
+{
+ return(attrExists(name.c_str()));
+}
+
+//--------------------------------------------------------------------------
// Function: H5Location::removeAttr
///\brief Removes the named attribute from this object.
///\param name - IN: Name of the attribute to be removed
diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h
index d1dd892..8eae454 100644
--- a/c++/src/H5Location.h
+++ b/c++/src/H5Location.h
@@ -79,11 +79,15 @@ class H5_DLLCPP H5Location : public IdComponent {
// misleading, so getRefObjType is used in the new function instead.
// Iterate user's function over the attributes at this location.
- int iterateAttrs( attr_operator_t user_op, unsigned* idx = NULL, void* op_data = NULL );
+ int iterateAttrs(attr_operator_t user_op, unsigned* idx = NULL, void* op_data = NULL);
+
+ // Checks whether the named attribute exists at this location.
+ bool attrExists(const char* name) const;
+ bool attrExists(const H5std_string& name) const;
// Removes the named attribute from this location.
- void removeAttr( const char* name ) const;
- void removeAttr( const H5std_string& name ) const;
+ void removeAttr(const char* name) const;
+ void removeAttr(const H5std_string& name) const;
// Renames the named attribute to a new name.
void renameAttr(const char* oldname, const char* newname) const;
diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in
index b025f0b..37e5d1b 100644
--- a/c++/src/Makefile.in
+++ b/c++/src/Makefile.in
@@ -467,7 +467,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 138
+LT_VERS_REVISION = 139
LT_VERS_AGE = 0
# Include src directory
diff --git a/c++/src/h5c++.in b/c++/src/h5c++.in
index 20435eb..4c86c6a 100644
--- a/c++/src/h5c++.in
+++ b/c++/src/h5c++.in
@@ -83,11 +83,12 @@ CXXLINKERBASE="@CXX@"
# CXXFLAGS, CPPFLAGS and LDFLAGS are reserved for use by the script user.
# FLAGS brought from the hdf5 build are put in H5BLD_*FLAGS.
-# User's CPPFLAGS and CXXFLAGS come after their H5BLD counterparts to override
-# them. User's LDFLAGS come just before clibpath, user's LIBS come after
-# $link_objs and before the hdf5 libraries in $link_args, followed by any
-# external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
-# or LIBS carried in from the hdf5 build.
+# User's CPPFLAGS and CXXFLAGS come after their H5BLD counterparts. User's
+# LDFLAGS come just before clibpath, user's LIBS come after $link_objs and
+# before the hdf5 libraries in $link_args, followed by any external library
+# paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in
+# from the hdf5 build. The order of the flags is intended to give precedence
+# to the user's flags.
H5BLD_CXXFLAGS="@AM_CXXFLAGS@ @CXXFLAGS@"
H5BLD_CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@"
H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@"
@@ -100,7 +101,16 @@ CPPFLAGS="${HDF5_CPPFLAGS:-$CPPFLAGSBASE}"
LDFLAGS="${HDF5_LDFLAGS:-$LDFLAGSBASE}"
LIBS="${HDF5_LIBS:-$LIBSBASE}"
-USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}"
+# If a static library is available, the default will be to use it. If the only
+# available library is shared, it will be used by default. The user can
+# override either default, although choosing an unavailable library will result
+# in link errors.
+STATIC_AVAILABLE="@enable_static@"
+if test "${STATIC_AVAILABLE}" = "yes"; then
+ USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}"
+else
+ USE_SHARED_LIB="${HDF5_USE_SHLIB:-yes}"
+fi
usage() {
# A wonderfully informative "usage" message.
@@ -112,8 +122,9 @@ usage() {
echo " subdirectories [default: $prefix]"
echo " -show Show the commands without executing them"
echo " -showconfig Show the HDF5 library configuration summary"
- echo " -shlib Compile with shared HDF5 libraries"
- echo " -noshlib Compile with static HDF5 libraries [default]"
+ echo " -shlib Compile with shared HDF5 libraries [default when built with"
+ echo " disable-static]"
+ echo " -noshlib Compile with static HDF5 libraries [default when static available]"
echo " "
echo " <compile line> - the normal compile line options for your compiler."
echo " $prog_name uses the same compiler you used to compile"
@@ -365,11 +376,12 @@ if test "x$do_link" = "xyes"; then
# module. It's okay if they're included twice in the compile line.
link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS"
- # User's CPPFLAGS and CXXFLAGS come after their H5BLD counterparts to override
- # them. User's LDFLAGS come just before clibpath, user's LIBS come after
- # $link_objs and before the hdf5 libraries in $link_args, followed by any
- # external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
- # or LIBS carried in from the hdf5 build.
+ # User's CPPFLAGS and CXXFLAGS come after their H5BLD counterparts. User's
+ # LDFLAGS come just before clibpath, user's LIBS come after $link_objs and
+ # before the hdf5 libraries in $link_args, followed by any external library
+ # paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in
+ # from the hdf5 build. The order of the flags is intended to give precedence
+ # to the user's flags.
$SHOW $CXXLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args $shared_link
diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp
index e822b36..643762b 100644
--- a/c++/test/dsets.cpp
+++ b/c++/test/dsets.cpp
@@ -285,13 +285,7 @@ test_simple_io( H5File& file)
static herr_t
test_datasize()
{
-
SUBTEST("DataSet::getInMemDataSize()");
-
- int points[100][200];
- int check[100][200];
- int i, j, n;
-
try
{
// Open FILE1.
diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp
index 100e725..7e77e85 100644
--- a/c++/test/tattr.cpp
+++ b/c++/test/tattr.cpp
@@ -252,14 +252,19 @@ static void test_attr_rename()
int read_data1[ATTR1_DIM1]={0}; // Buffer for reading the attribute
int i;
- // Output message about test being performed
- SUBTEST("Rename Attribute Function");
+ // Output message about test being performed
+ SUBTEST("Checking for Existence and Renaming Attribute");
try {
// Open file
H5File fid1(FILE_BASIC, H5F_ACC_RDWR);
- // Check rename of attribute belonging to a file
+ // Check and rename attribute belonging to a file
+
+ // Check for existence of attribute
+ bool attr_exists = fid1.attrExists(FATTR1_NAME);
+ if (attr_exists == false)
+ throw InvalidActionException("H5File::attrExists", "Attribute should exist but does not");
// Change attribute name
fid1.renameAttr(FATTR1_NAME, FATTR_TMP_NAME);
@@ -280,7 +285,12 @@ static void test_attr_rename()
// Open the dataset
DataSet dataset = fid1.openDataSet(DSET1_NAME);
- // Check rename of attribute belonging to a dataset
+ // Check and rename attribute belonging to a dataset
+
+ // Check for existence of attribute
+ attr_exists = dataset.attrExists(ATTR1_NAME);
+ if (attr_exists == false)
+ throw InvalidActionException("H5File::attrExists", "Attribute should exist but does not");
// Change attribute name
dataset.renameAttr(ATTR1_NAME, ATTR_TMP_NAME);
@@ -303,6 +313,11 @@ static void test_attr_rename()
// Close attribute
attr1.close();
+ // Check for existence of second attribute
+ attr_exists = dataset.attrExists(ATTR2_NAME);
+ if (attr_exists == false)
+ throw InvalidActionException("H5File::attrExists", "Attribute should exist but does not");
+
// Open the second attribute
Attribute attr2(dataset.openAttribute(ATTR2_NAME));
@@ -324,6 +339,11 @@ static void test_attr_rename()
// Change first attribute back to the original name
dataset.renameAttr(ATTR_TMP_NAME, ATTR1_NAME);
+ // Check for existence of attribute after renaming
+ attr_exists = dataset.attrExists(ATTR1_NAME);
+ if (attr_exists == false)
+ throw InvalidActionException("H5File::attrExists", "Attribute should exist but does not");
+
PASSED();
} // end try block
@@ -964,7 +984,6 @@ static void test_attr_mult_read()
static void test_attr_delete()
{
H5std_string attr_name; // Buffer for attribute names
- int ii;
// Output message about test being performed
SUBTEST("Removing Attribute Function");
@@ -1355,6 +1374,53 @@ static void test_string_attr()
/****************************************************************
**
+** test_attr_exists(): Test checking for attribute existence.
+** (additional attrExists tests are in test_attr_rename())
+**
+****************************************************************/
+static void test_attr_exists()
+{
+ // Output message about test being performed
+ SUBTEST("Check Attribute Existence");
+
+ try {
+ // Open file.
+ H5File fid1(FILE_BASIC, H5F_ACC_RDWR);
+
+ // Open the root group.
+ Group root = fid1.openGroup("/");
+
+ // Check for existence of attribute
+ bool attr_exists = fid1.attrExists(ATTR1_FL_STR_NAME);
+ if (attr_exists == false)
+ throw InvalidActionException("H5File::attrExists", "fid1, ATTR1_FL_STR_NAMEAttribute should exist but does not");
+
+ // Check for existence of attribute
+ attr_exists = fid1.attrExists(FATTR1_NAME);
+ if (attr_exists == false)
+ throw InvalidActionException("H5File::attrExists", "fid1,FATTR2_NAMEAttribute should exist but does not");
+
+ // Open a group.
+ Group group = fid1.openGroup(GROUP1_NAME);
+
+ // Check for existence of attribute
+ attr_exists = group.attrExists(ATTR2_NAME);
+ if (attr_exists == false)
+ throw InvalidActionException("H5File::attrExists", "group, ATTR2_NAMEAttribute should exist but does not");
+
+ PASSED();
+ } // end try block
+
+ catch (InvalidActionException E) {
+ issue_fail_msg("test_attr_exists()", __LINE__, __FILE__, E.getCDetailMsg());
+ }
+ catch (Exception E) {
+ issue_fail_msg("test_attr_exists()", __LINE__, __FILE__, E.getCDetailMsg());
+ }
+} // test_attr_exists()
+
+/****************************************************************
+**
** test_attr(): Main attribute testing routine.
**
****************************************************************/
@@ -1364,7 +1430,6 @@ extern "C"
void test_attr()
{
// Output message about test being performed
- //MESSAGE("Testing Attributes\n");
MESSAGE(5, ("Testing Attributes\n"));
test_attr_basic_write(); // Test basic H5A writing code
@@ -1384,6 +1449,7 @@ void test_attr()
test_attr_dtype_shared(); // Test using shared datatypes in attributes
test_string_attr(); // Test read/write string attribute
+ test_attr_exists(); // Test H5Location::attrExists
} // test_attr()
diff --git a/c++/test/tcompound.cpp b/c++/test/tcompound.cpp
index fbb1219..28d8a1e 100644
--- a/c++/test/tcompound.cpp
+++ b/c++/test/tcompound.cpp
@@ -749,7 +749,6 @@ extern "C"
void test_compound()
{
// Output message about test being performed
- //MESSAGE("Testing Compound Data Type operations\n");
MESSAGE(5, ("Testing Compound Data Type operations\n"));
test_compound_1(); // various things about compound data types
diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp
index ba38d7a..65b8e57 100644
--- a/c++/test/tfile.cpp
+++ b/c++/test/tfile.cpp
@@ -117,16 +117,16 @@ static void test_file_create()
"terminate called without an active exception
Command terminated by signal 6"
Commenting it out until it's fixed LK 20120626.
-#ifndef H5_HAVE_FILE_VERSIONS
+*/
try {
H5File file2 (FILE1, H5F_ACC_TRUNC); // should throw E
+
// Should FAIL but didn't, so throw an invalid action exception
throw InvalidActionException("H5File constructor", "Attempted to create an existing file.");
}
catch( FileIException E ) // catch truncating existing file
{} // do nothing, FAIL expected
-#endif
// Close file1
delete file1;
file1 = NULL;
@@ -144,7 +144,6 @@ static void test_file_create()
// Test create with H5F_ACC_TRUNC. This will truncate the existing file.
file1 = new H5File (FILE1, H5F_ACC_TRUNC);
-#ifndef H5_HAVE_FILE_VERSIONS
// Try to truncate first file again. This should fail because file1
// is the same file and is currently open.
try {
@@ -155,19 +154,17 @@ static void test_file_create()
}
catch( FileIException E ) // catching truncating opened file
{} // do nothing, FAIL expected
-#endif
+
// Try with H5F_ACC_EXCL. This should fail too because the file already
// exists.
try {
-// H5File file3 (FILE1, H5F_ACC_EXCL); // should throw E
+ H5File file3 (FILE1, H5F_ACC_EXCL); // should throw E
// Should FAIL but didn't, so throw an invalid action exception
throw InvalidActionException("H5File constructor", "H5F_ACC_EXCL attempt on an existing file.");
}
catch( FileIException E ) // catching H5F_ACC_EXCL on existing file
{} // do nothing, FAIL expected
-*/
- std::cerr << "SKIPPED for HDFFV-8067" << std::endl;
// Get the file-creation template
FileCreatPropList tmpl1 = file1->getCreatePlist();
@@ -627,7 +624,6 @@ void test_file()
{
// Output message about test being performed
MESSAGE(5, ("Testing File I/O operations\n"));
- //MESSAGE("Testing File I/O operations\n");
test_file_create(); // Test file creation (also creation templates)
test_file_open(); // Test file opening
diff --git a/c++/test/tfilter.cpp b/c++/test/tfilter.cpp
index 0dbdf00..9e60655 100644
--- a/c++/test/tfilter.cpp
+++ b/c++/test/tfilter.cpp
@@ -47,12 +47,14 @@
#define FILTER_CHUNK_DIM2 25
// will do this function later or use it as guideline - BMR - 2007/01/26
+#if 0
static herr_t test_filter_internal(hid_t fid, const char *name, hid_t dcpl,
int if_fletcher32, int corrupted, hsize_t *dset_size)
{
cerr << "do nothing right now" << endl;
return(0);
}
+#endif
/* Temporary filter IDs used for testing */
#define H5Z_FILTER_BOGUS 305
@@ -254,13 +256,11 @@ extern "C"
void test_filters()
{
// Output message about test being performed
- //MESSAGE("Testing Various Filters\n");
MESSAGE(5, ("Testing Various Filters\n"));
hid_t fapl_id;
fapl_id = h5_fileaccess(); // in h5test.c, returns a file access template
- int nerrors=0; // keep track of number of failures occurr
try
{
// Use the file access template id to create a file access prop. list
diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp
index 32c40d5..7947a9b 100644
--- a/c++/test/th5s.cpp
+++ b/c++/test/th5s.cpp
@@ -569,7 +569,6 @@ extern "C"
void test_h5s()
{
// Output message about test being performed
- //MESSAGE("Testing Dataspaces\n");
MESSAGE(5, ("Testing Dataspaces\n"));
test_h5s_basic(); // Test basic H5S code
diff --git a/c++/test/tlinks.cpp b/c++/test/tlinks.cpp
index e4e691a..fca5918 100644
--- a/c++/test/tlinks.cpp
+++ b/c++/test/tlinks.cpp
@@ -226,6 +226,7 @@ typedef struct {
hbool_t *visited; /* Pointer to array of "visited link" flags */
} link_iter_info_t;
+#if 0
/* Link visit structs */
typedef struct {
const char *path; /* Path to link */
@@ -374,6 +375,7 @@ typedef struct {
unsigned idx; /* Index in object visit structure */
const obj_visit_t *info; /* Pointer to the object visit structure to use */
} ovisit_ud_t;
+#endif
static const char *FILENAME[] = {
"link0",
@@ -529,7 +531,6 @@ void test_links()
fapl_id = h5_fileaccess();
// Output message about test being performed
- //MESSAGE("Testing Various Links\n");
MESSAGE(5, ("Testing Various Links\n"));
try
{
diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp
index 4eb5b21..ce18e58 100644
--- a/c++/test/trefer.cpp
+++ b/c++/test/trefer.cpp
@@ -235,7 +235,6 @@ static void test_reference_obj(void)
verify_val(name_size, DSET1_LEN, "Group::getObjnameByIdx(index,(std::string)buf,buf_len)", __LINE__, __FILE__);
// Test getObjnameByIdx(hsize_t idx, char* name, size_t size)
- char name_C[DSET1_LEN+1];
group.getObjnameByIdx(0, name, name_size+1);
verify_val(name, DSET1_NAME, "Group::getObjnameByIdx(index,(char*)buf,buf_len)", __LINE__, __FILE__);
verify_val(name_size, DSET1_LEN, "Group::getObjnameByIdx(index,(char*)buf,buf_len)", __LINE__, __FILE__);
@@ -345,7 +344,6 @@ extern "C"
void test_reference(void)
{
// Output message about test being performed
- //MESSAGE("Testing References\n");
MESSAGE(5, ("Testing References\n"));
test_reference_obj(); // Test basic object reference functionality
diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp
index b1baa29..c10cf6d 100644
--- a/c++/test/ttypes.cpp
+++ b/c++/test/ttypes.cpp
@@ -52,6 +52,7 @@
* normally require alignment. When set, all native datatypes must be aligned
* on a byte boundary equal to the data size.
*/
+#if 0
#define TEST_ALIGNMENT
/* Alignment test stuff */
@@ -61,6 +62,9 @@
#endif
#define SET_ALIGNMENT(TYPE,VAL) \
H5T_NATIVE_##TYPE##_ALIGN_g=MAX(H5T_NATIVE_##TYPE##_ALIGN_g, VAL)
+#endif
+ /* #include "H5Tpkg.h"
+ */
const char *FILENAME[] = {
"dtypes1.h5",
diff --git a/c++/test/tvlstr.cpp b/c++/test/tvlstr.cpp
index 73e54e0..89f24f2 100644
--- a/c++/test/tvlstr.cpp
+++ b/c++/test/tvlstr.cpp
@@ -129,7 +129,7 @@ void test_vlstr_free_custom(void *_mem, void *info)
*-------------------------------------------------------------------------
*/
// String for testing datasets
-static char stastring_ds_write[1]={'A'};
+// static char stastring_ds_write[1]={'A'};
// Info for a string dataset
const H5std_string DSET1_NAME("String_ds");
@@ -687,6 +687,7 @@ static void test_vlstring_attribute()
}
} // test_vlstring_attribute()
+#if 0
/*-------------------------------------------------------------------------
* Function: test_read_vl_string_attribute
*
@@ -746,6 +747,7 @@ static void test_read_vl_string_attribute()
issue_fail_msg("test_read_vl_string_attribute()", __LINE__, __FILE__, E.getCDetailMsg());
}
} // test_read_vl_string_attribute
+#endif // 2013: need to verify before adding to test
/*-------------------------------------------------------------------------
* Function: test_vlstring_array_attribute
@@ -957,7 +959,6 @@ extern "C"
void test_vlstrings()
{
// Output message about test being performed
- //MESSAGE("Testing Variable-Length Strings");
MESSAGE(5, ("Testing Variable-Length Strings"));
// These tests use the same file
diff --git a/config/apple b/config/apple
index c5c0a19..ac93ea5 100644
--- a/config/apple
+++ b/config/apple
@@ -20,17 +20,25 @@
#
# See BlankForm in this directory for details.
-# The default compiler is `gcc'
+# The default compiler is `clang'.
+# No support for OS older than darwin 10.X.
if test "X-" = "X-$CC"; then
- CC=gcc
- CC_BASENAME=gcc
+ case "$host_os" in
+ darwin10.*) # Snow Leopard. Use gcc/g++ because clang++ is not available.
+ CC=gcc
+ CC_BASENAME=gcc
+ ;;
+ *)
+ CC=clang
+ CC_BASENAME=clang
+ ;;
+ esac
fi
# Figure out compiler flags
. $srcdir/config/gnu-flags
# temp patch: if GCC 4.2.1 is used in Lion or Mountain Lion systems, do not
# use -O option as it causes failures in test/dt_arith.
-#echo host_os=$host_os
case "$host_os" in
darwin1[12].*) # lion & mountain lion
#echo cc_vendor=$cc_vendor'-'cc_version=$cc_version
@@ -48,6 +56,11 @@ esac
. $srcdir/config/intel-flags
if test "X-" = "X-$FC"; then
case $CC_BASENAME in
+ clang)
+ # clang has no fortran compiler. Use gfortran.
+ FC=gfortran
+ FC_BASENAME=gfortran
+ ;;
gcc*)
FC=gfortran
FC_BASENAME=gfortran
@@ -59,8 +72,30 @@ if test "X-" = "X-$FC"; then
esac
fi
+if test "X-" = "X-$CXX"; then
+ case $CC_BASENAME in
+ clang)
+ CXX=clang++
+ CXX_BASENAME=clang++
+ ;;
+ gcc)
+ CXX=g++
+ CXX_BASENAME=g++
+ ;;
+ icc)
+ CXX=icpc
+ CXX_BASENAME=icpc
+ ;;
+ esac
+fi
+
# compiler version strings
case $CC in
+ clang)
+ cc_version_info=`$CC $CFLAGS $H5_CFLAGS --version 2>&1 |\
+ grep 'Apple' | sed 's/(.*//'`
+ ;;
+
*gcc*)
cc_version_info=`$CC $CFLAGS $H5_CFLAGS --version 2>&1 | grep -v 'PathScale' |\
grep 'GCC' | sed 's/.*\((GCC) [-a-z0-9\. ]*.*\)/\1/'`
@@ -97,6 +132,11 @@ esac
# get c++ version info
case $CXX in
+ clang++)
+ cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\
+ grep 'Apple' | sed 's/(.*//'`
+ ;;
+
*g++*)
cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\
grep 'GCC' | sed 's/.*\((GCC) [-a-z0-9\. ]*.*\)/\1/'`
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake
index ec7b10e..ec7b10e 100755..100644
--- a/config/cmake/CTestCustom.cmake
+++ b/config/cmake/CTestCustom.cmake
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 6db6d78..b2078e2 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -205,6 +205,7 @@ ENDIF (CYGWIN)
#-----------------------------------------------------------------------------
IF (NOT WINDOWS)
CHECK_LIBRARY_EXISTS_CONCAT ("m" ceil H5_HAVE_LIBM)
+ CHECK_LIBRARY_EXISTS_CONCAT ("dl" dlopen H5_HAVE_LIBDL)
CHECK_LIBRARY_EXISTS_CONCAT ("ws2_32" WSAStartup H5_HAVE_LIBWS2_32)
CHECK_LIBRARY_EXISTS_CONCAT ("wsock32" gethostbyname H5_HAVE_LIBWSOCK32)
ENDIF (NOT WINDOWS)
@@ -367,6 +368,7 @@ CHECK_INCLUDE_FILE_CONCAT ("sys/types.h" H5_HAVE_SYS_TYPES_H)
CHECK_INCLUDE_FILE_CONCAT ("stddef.h" H5_HAVE_STDDEF_H)
CHECK_INCLUDE_FILE_CONCAT ("setjmp.h" H5_HAVE_SETJMP_H)
CHECK_INCLUDE_FILE_CONCAT ("features.h" H5_HAVE_FEATURES_H)
+CHECK_INCLUDE_FILE_CONCAT ("dirent.h" H5_HAVE_DIRENT_H)
CHECK_INCLUDE_FILE_CONCAT ("stdint.h" H5_HAVE_STDINT_H)
# IF the c compiler found stdint, check the C++ as well. On some systems this
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index d9f0997..2736daf 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -124,6 +124,9 @@
/* Define if the direct I/O virtual file driver should be compiled */
#cmakedefine H5_HAVE_DIRECT @H5_HAVE_DIRECT@
+/* Define to 1 if you have the <dirent.h> header file. */
+#cmakedefine H5_HAVE_DIRENT_H @H5_HAVE_DIRENT_H@
+
/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine H5_HAVE_DLFCN_H @H5_HAVE_DLFCN_H@
@@ -230,6 +233,9 @@
/* Define to 1 if you have the <io.h> header file. */
#cmakedefine H5_HAVE_IO_H @H5_HAVE_IO_H@
+/* Define to 1 if you have the `dl' library (-ldl). */
+#cmakedefine H5_HAVE_LIBDL @H5_HAVE_LIBDL@
+
/* Define to 1 if you have the `dmalloc' library (-ldmalloc). */
#cmakedefine H5_HAVE_LIBDMALLOC @H5_HAVE_LIBDMALLOC@
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index d45ef9e..d45ef9e 100755..100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake
index 8ca3879..8ca3879 100755..100644
--- a/config/cmake/mccacheinit.cmake
+++ b/config/cmake/mccacheinit.cmake
diff --git a/config/gnu-flags b/config/gnu-flags
index 40aa1da..a79cc72 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -186,10 +186,10 @@ esac
# the information from the previous version and adding modifications to that.
case "$cc_vendor-$cc_version" in
-# Closer to the gcc 4.8 release, we should check for additional flags to
+# Closer to the gcc 4.9 release, we should check for additional flags to
# include and break it out into it's own section, like the other versions
# below. -QAK
- gcc-4.[78]*)
+ gcc-4.[89]*)
# Replace -ansi flag with -std=c99 flag
H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
@@ -252,7 +252,81 @@ case "$cc_vendor-$cc_version" in
H5_CFLAGS="$H5_CFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
# Append more extra warning flags that only gcc 4.7+ know about
- H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance"
+ H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn"
+
+ # Append more extra warning flags that only gcc 4.8+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wsuggest-attribute=format"
+
+ # Try out the new "stack protector" feature in gcc 4.1
+ # (Strictly speaking this isn't really a "warning" flag, so it's added to
+ # the debugging flags)
+ #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wstack-protector -fstack-protector-all"
+ ;;
+
+ gcc-4.7*)
+ # Replace -ansi flag with -std=c99 flag
+ H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
+
+ # Append warning flags
+ # Don't use the '-Wtraditional' flag, we're way past having K&R C code
+ # H5_CFLAGS="$H5_CFLAGS -Wtraditional"
+ # Don't use the '-Wtraditional-conversion' flag, there's too many warnings
+ # from GCC's assert macro
+ # H5_CFLAGS="$H5_CFLAGS -Wtraditional-conversion"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CFLAGS="$H5_CFLAGS -Wformat=2"
+
+ # The "unreachable code" warning appears to be reliable now...
+ # (this warning was removed in gcc 4.5+)
+ #H5_CFLAGS="$H5_CFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CFLAGS="$H5_CFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc4.0+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow"
+
+ # Append more extra warning flags that only gcc 4.3+ know about
+ #
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... -QAK
+ H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
+
+ # Append more extra warning flags that only gcc 4.4+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
+
+ # Append more extra warning flags that only gcc 4.5+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants"
+
+ # Append more extra warning flags that only gcc 4.6+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
+
+ # Append more extra warning flags that only gcc 4.7+ know about
+ H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn"
# Try out the new "stack protector" feature in gcc 4.1
# (Strictly speaking this isn't really a "warning" flag, so it's added to
@@ -260,9 +334,6 @@ case "$cc_vendor-$cc_version" in
#DEBUG_CFLAGS="$DEBUG_CFLAGS -Wstack-protector -fstack-protector-all"
;;
-# Closer to the gcc 4.7 release, we should check for additional flags to
-# include and break it out into it's own section, like the other versions
-# below. -QAK
gcc-4.6*)
# Replace -ansi flag with -std=c99 flag
H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`"
diff --git a/config/lt_vers.am b/config/lt_vers.am
index 37b5b68..8df77f3 100644
--- a/config/lt_vers.am
+++ b/config/lt_vers.am
@@ -17,7 +17,7 @@
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 138
+LT_VERS_REVISION = 139
LT_VERS_AGE = 0
## If the API changes *at all*, increment LT_VERS_INTERFACE and
diff --git a/configure b/configure
index e42b8b7..35ba8fb 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for HDF5 1.9.148-FA_a5.
+# Generated by GNU Autoconf 2.69 for HDF5 1.9.149-FA_a5.
#
# Report bugs to <help@hdfgroup.org>.
#
@@ -591,8 +591,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='HDF5'
PACKAGE_TARNAME='hdf5'
-PACKAGE_VERSION='1.9.148-FA_a5'
-PACKAGE_STRING='HDF5 1.9.148-FA_a5'
+PACKAGE_VERSION='1.9.149-FA_a5'
+PACKAGE_STRING='HDF5 1.9.149-FA_a5'
PACKAGE_BUGREPORT='help@hdfgroup.org'
PACKAGE_URL=''
@@ -638,6 +638,8 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+HAVE_SHARED_CONDITIONAL_FALSE
+HAVE_SHARED_CONDITIONAL_TRUE
SETX
SEARCH
BUILD_HDF5_HL_CONDITIONAL_FALSE
@@ -1484,7 +1486,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures HDF5 1.9.148-FA_a5 to adapt to many kinds of systems.
+\`configure' configures HDF5 1.9.149-FA_a5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1554,7 +1556,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of HDF5 1.9.148-FA_a5:";;
+ short | recursive ) echo "Configuration of HDF5 1.9.149-FA_a5:";;
esac
cat <<\_ACEOF
@@ -1750,7 +1752,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-HDF5 configure 1.9.148-FA_a5
+HDF5 configure 1.9.149-FA_a5
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2844,7 +2846,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by HDF5 $as_me 1.9.148-FA_a5, which was
+It was created by HDF5 $as_me 1.9.149-FA_a5, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3676,7 +3678,7 @@ fi
# Define the identity of the package.
PACKAGE='hdf5'
- VERSION='1.9.148-FA_a5'
+ VERSION='1.9.149-FA_a5'
cat >>confdefs.h <<_ACEOF
@@ -5242,9 +5244,11 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
## --------------------------------------------------------------------
## General Fortran flags
- ##
- AM_FCFLAGS="${AM_FCFLAGS} ${FFLAGS}"
- FCFLAGS="${FCFLAGS} ${FFLAGS}"
+ ## Only add FFLAGS to FCFLAGS if it's set.
+ if test "x$FFLAGS" != "x" ; then
+ AM_FCFLAGS="${AM_FCFLAGS} ${FFLAGS}"
+ FCFLAGS="${FCFLAGS} ${FFLAGS}"
+ fi
## --------------------------------------------------------------------
## Fortran source extention
@@ -22247,7 +22251,7 @@ $as_echo "user-defined" >&6; }
esac
## ----------------------------------------------------------------------
-## Check for system libraries.
+## Check for system libraries. "dl" stands for dynamically loaded library
##
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ceil in -lm" >&5
$as_echo_n "checking for ceil in -lm... " >&6; }
@@ -22302,6 +22306,59 @@ _ACEOF
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBDL 1
+_ACEOF
+
+ LIBS="-ldl $LIBS"
+
+fi
+
if test "`uname`" = "SunOS" -o "`uname -sr`" = "HP-UX B.11.00"; then
## ...for Solaris
@@ -22728,6 +22785,18 @@ fi
done
+for ac_header in dirent.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default"
+if test "x$ac_cv_header_dirent_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DIRENT_H 1
+_ACEOF
+
+fi
+
+done
+
for ac_header in stdint.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
@@ -25858,7 +25927,7 @@ if test "x$ac_cv_header_szlib_h" = xyes; then :
_ACEOF
HAVE_SZLIB_H="yes"
else
- CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS" unset HAVE_SZIP
+ CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS" unset HAVE_SZLIB
fi
done
@@ -31157,223 +31226,18 @@ if test -n "$TESTPARALLEL"; then
FORTRAN_PARALLEL_MAKE=fortran/$TESTPARALLEL/Makefile
fi
fi
-
-ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/testflushrefresh.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh testpar/Makefile testpar/testph5.sh perform/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/test/test_ld.sh hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/tools/h5watch/Makefile hl/tools/h5watch/testh5watch.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh"
-
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
- for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) { eval $ac_var=; unset $ac_var;} ;;
- esac ;;
- esac
- done
-
- (set) 2>&1 |
- case $as_nl`(ac_space=' '; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes: double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \.
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;; #(
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-) |
- sed '
- /^ac_cv_env_/b end
- t clear
- :clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
- if test -w "$cache_file"; then
- if test "x$cache_file" != "x/dev/null"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
- if test ! -f "$cache_file" || test -h "$cache_file"; then
- cat confcache >"$cache_file"
- else
- case $cache_file in #(
- */* | ?:*)
- mv -f confcache "$cache_file"$$ &&
- mv -f "$cache_file"$$ "$cache_file" ;; #(
- *)
- mv -f confcache "$cache_file" ;;
- esac
- fi
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-U=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
- # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
- # will be set to the directory where LIBOBJS objects are built.
- as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
-$as_echo_n "checking that generated files are newer than configure... " >&6; }
- if test -n "$am_sleep_pid"; then
- # Hide warnings about reused PIDs.
- wait $am_sleep_pid 2>/dev/null
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
-$as_echo "done" >&6; }
- if test -n "$EXEEXT"; then
- am__EXEEXT_TRUE=
- am__EXEEXT_FALSE='#'
-else
- am__EXEEXT_TRUE='#'
- am__EXEEXT_FALSE=
-fi
-
-if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
- as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- as_fn_error $? "conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${FORTRAN_HAVE_SIZEOF_TRUE}" && test -z "${FORTRAN_HAVE_SIZEOF_FALSE}"; then
- as_fn_error $? "conditional \"FORTRAN_HAVE_SIZEOF\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${FORTRAN_2003_CONDITIONAL_F_TRUE}" && test -z "${FORTRAN_2003_CONDITIONAL_F_FALSE}"; then
- as_fn_error $? "conditional \"FORTRAN_2003_CONDITIONAL_F\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${FORTRAN_DEFAULT_REALisDBLE_F_TRUE}" && test -z "${FORTRAN_DEFAULT_REALisDBLE_F_FALSE}"; then
- as_fn_error $? "conditional \"FORTRAN_DEFAULT_REALisDBLE_F\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
- as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${FORTRAN_SHARED_CONDITIONAL_TRUE}" && test -z "${FORTRAN_SHARED_CONDITIONAL_FALSE}"; then
- as_fn_error $? "conditional \"FORTRAN_SHARED_CONDITIONAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${CXX_SHARED_CONDITIONAL_TRUE}" && test -z "${CXX_SHARED_CONDITIONAL_FALSE}"; then
- as_fn_error $? "conditional \"CXX_SHARED_CONDITIONAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-
-if test -z "${BUILD_SHARED_SZIP_CONDITIONAL_TRUE}" && test -z "${BUILD_SHARED_SZIP_CONDITIONAL_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_SHARED_SZIP_CONDITIONAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${DIRECT_VFD_CONDITIONAL_TRUE}" && test -z "${DIRECT_VFD_CONDITIONAL_FALSE}"; then
- as_fn_error $? "conditional \"DIRECT_VFD_CONDITIONAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_ALL_CONDITIONAL_TRUE}" && test -z "${BUILD_ALL_CONDITIONAL_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_ALL_CONDITIONAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_CXX_CONDITIONAL_TRUE}" && test -z "${BUILD_CXX_CONDITIONAL_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_CXX_CONDITIONAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_PARALLEL_CONDITIONAL_TRUE}" && test -z "${BUILD_PARALLEL_CONDITIONAL_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_PARALLEL_CONDITIONAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_FORTRAN_CONDITIONAL_TRUE}" && test -z "${BUILD_FORTRAN_CONDITIONAL_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_FORTRAN_CONDITIONAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_HDF5_HL_CONDITIONAL_TRUE}" && test -z "${BUILD_HDF5_HL_CONDITIONAL_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_HDF5_HL_CONDITIONAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-
-: "${CONFIG_STATUS=./config.status}"
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+: ${CONFIG_LT=./config.lt}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_LT" >&5
+$as_echo "$as_me: creating $CONFIG_LT" >&6;}
as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+cat >"$CONFIG_LT" <<_ASEOF || as_write_fail=1
#! $SHELL
# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-
+# Run this file to recreate a libtool stub with the current configuration.
SHELL=\${CONFIG_SHELL-$SHELL}
export SHELL
_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+cat >>"$CONFIG_LT" <<\_ASEOF || as_write_fail=1
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##
@@ -31737,203 +31601,71 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
+## --------------------------------- ##
+## Main body of "$CONFIG_LT" script. ##
+## --------------------------------- ##
_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Save the log message, to keep $0 and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by HDF5 $as_me 1.9.148-FA_a5, which was
-generated by GNU Autoconf 2.69. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-case $ac_config_headers in *"
-"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
-esac
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration. Unless the files
-and actions are specified as TAGs, all are instantiated by default.
-
-Usage: $0 [OPTION]... [TAG]...
-
- -h, --help print this help, then exit
- -V, --version print version number and configuration settings, then exit
- --config print configuration, then exit
- -q, --quiet, --silent
- do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
- --header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
+test $as_write_fail = 0 && chmod +x "$CONFIG_LT"
-Configuration files:
-$config_files
+cat >>"$CONFIG_LT" <<\_LTEOF
+lt_cl_silent=false
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
-Configuration headers:
-$config_headers
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
-Configuration commands:
-$config_commands
+Usage: $0 [OPTIONS]
-Report bugs to <help@hdfgroup.org>."
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
-ac_cs_version="\\
-HDF5 config.status 1.9.148-FA_a5
-configured by $0, generated by GNU Autoconf 2.69,
- with options \\"\$ac_cs_config\\"
+Report bugs to <bug-libtool@gnu.org>."
-Copyright (C) 2012 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
+lt_cl_version="\
+HDF5 config.lt 1.9.149-FA_a5
+configured by $0, generated by GNU Autoconf 2.69.
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-MKDIR_P='$MKDIR_P'
-AWK='$AWK'
-test -n "\$AWK" || AWK=awk
-_ACEOF
+Copyright (C) 2011 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
while test $# != 0
do
case $1 in
- --*=?*)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- --*=)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=
- ac_shift=:
- ;;
- *)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- esac
-
- case $ac_option in
- # Handling of the options.
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
- --config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; exit ;;
- --debug | --debu | --deb | --de | --d | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- '') as_fn_error $? "missing file argument" ;;
- esac
- as_fn_append CONFIG_FILES " '$ac_optarg'"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- as_fn_append CONFIG_HEADERS " '$ac_optarg'"
- ac_need_defaults=false;;
- --he | --h)
- # Conflict between --help and --header
- as_fn_error $? "ambiguous option: \`$1'
-Try \`$0 --help' for more information.";;
- --help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) as_fn_error $? "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
- *) as_fn_append ac_config_targets " $1"
- ac_need_defaults=false ;;
+ -*) as_fn_error $? "unrecognized option: $1
+Try \`$0 --help' for more information." "$LINENO" 5 ;;
+ *) as_fn_error $? "unrecognized argument: $1
+Try \`$0 --help' for more information." "$LINENO" 5 ;;
esac
shift
done
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
+if $lt_cl_silent; then
exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
fi
+_LTEOF
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
- set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
- shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
- CONFIG_SHELL='$SHELL'
- export CONFIG_SHELL
- exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
- $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-#
-# INIT-COMMANDS
-#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+cat >>"$CONFIG_LT" <<_LTEOF
# The HP-UX ksh and POSIX shell print the target directory to stdout
@@ -32397,805 +32129,13 @@ fi
+_LTEOF
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
- case $ac_config_target in
- "src/H5config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/H5config.h" ;;
- "pubconf") CONFIG_COMMANDS="$CONFIG_COMMANDS pubconf" ;;
- "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
- "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
- "src/libhdf5.settings") CONFIG_FILES="$CONFIG_FILES src/libhdf5.settings" ;;
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
- "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
- "test/testcheck_version.sh") CONFIG_FILES="$CONFIG_FILES test/testcheck_version.sh" ;;
- "test/testerror.sh") CONFIG_FILES="$CONFIG_FILES test/testerror.sh" ;;
- "test/testflushrefresh.sh") CONFIG_FILES="$CONFIG_FILES test/testflushrefresh.sh" ;;
- "test/H5srcdir_str.h") CONFIG_FILES="$CONFIG_FILES test/H5srcdir_str.h" ;;
- "test/testlibinfo.sh") CONFIG_FILES="$CONFIG_FILES test/testlibinfo.sh" ;;
- "test/testlinks_env.sh") CONFIG_FILES="$CONFIG_FILES test/testlinks_env.sh" ;;
- "testpar/Makefile") CONFIG_FILES="$CONFIG_FILES testpar/Makefile" ;;
- "testpar/testph5.sh") CONFIG_FILES="$CONFIG_FILES testpar/testph5.sh" ;;
- "perform/Makefile") CONFIG_FILES="$CONFIG_FILES perform/Makefile" ;;
- "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
- "tools/h5dump/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5dump/Makefile" ;;
- "tools/h5dump/testh5dump.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dump.sh" ;;
- "tools/h5dump/testh5dumppbits.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dumppbits.sh" ;;
- "tools/h5dump/testh5dumpxml.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dumpxml.sh" ;;
- "tools/h5ls/testh5ls.sh") CONFIG_FILES="$CONFIG_FILES tools/h5ls/testh5ls.sh" ;;
- "tools/h5import/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5import/Makefile" ;;
- "tools/h5import/h5importtestutil.sh") CONFIG_FILES="$CONFIG_FILES tools/h5import/h5importtestutil.sh" ;;
- "tools/h5diff/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5diff/Makefile" ;;
- "tools/h5diff/testh5diff.sh") CONFIG_FILES="$CONFIG_FILES tools/h5diff/testh5diff.sh" ;;
- "tools/h5diff/testph5diff.sh") CONFIG_FILES="$CONFIG_FILES tools/h5diff/testph5diff.sh" ;;
- "tools/h5jam/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5jam/Makefile" ;;
- "tools/h5jam/testh5jam.sh") CONFIG_FILES="$CONFIG_FILES tools/h5jam/testh5jam.sh" ;;
- "tools/h5repack/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5repack/Makefile" ;;
- "tools/h5repack/h5repack.sh") CONFIG_FILES="$CONFIG_FILES tools/h5repack/h5repack.sh" ;;
- "tools/h5ls/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5ls/Makefile" ;;
- "tools/h5copy/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5copy/Makefile" ;;
- "tools/h5copy/testh5copy.sh") CONFIG_FILES="$CONFIG_FILES tools/h5copy/testh5copy.sh" ;;
- "tools/lib/Makefile") CONFIG_FILES="$CONFIG_FILES tools/lib/Makefile" ;;
- "tools/misc/Makefile") CONFIG_FILES="$CONFIG_FILES tools/misc/Makefile" ;;
- "tools/misc/h5cc") CONFIG_FILES="$CONFIG_FILES tools/misc/h5cc" ;;
- "tools/misc/testh5mkgrp.sh") CONFIG_FILES="$CONFIG_FILES tools/misc/testh5mkgrp.sh" ;;
- "tools/misc/testh5repart.sh") CONFIG_FILES="$CONFIG_FILES tools/misc/testh5repart.sh" ;;
- "tools/h5stat/testh5stat.sh") CONFIG_FILES="$CONFIG_FILES tools/h5stat/testh5stat.sh" ;;
- "tools/h5stat/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5stat/Makefile" ;;
- "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
- "examples/run-c-ex.sh") CONFIG_FILES="$CONFIG_FILES examples/run-c-ex.sh" ;;
- "examples/testh5cc.sh") CONFIG_FILES="$CONFIG_FILES examples/testh5cc.sh" ;;
- "c++/Makefile") CONFIG_FILES="$CONFIG_FILES c++/Makefile" ;;
- "c++/src/Makefile") CONFIG_FILES="$CONFIG_FILES c++/src/Makefile" ;;
- "c++/src/h5c++") CONFIG_FILES="$CONFIG_FILES c++/src/h5c++" ;;
- "c++/test/Makefile") CONFIG_FILES="$CONFIG_FILES c++/test/Makefile" ;;
- "c++/test/H5srcdir_str.h") CONFIG_FILES="$CONFIG_FILES c++/test/H5srcdir_str.h" ;;
- "c++/examples/Makefile") CONFIG_FILES="$CONFIG_FILES c++/examples/Makefile" ;;
- "c++/examples/run-c++-ex.sh") CONFIG_FILES="$CONFIG_FILES c++/examples/run-c++-ex.sh" ;;
- "c++/examples/testh5c++.sh") CONFIG_FILES="$CONFIG_FILES c++/examples/testh5c++.sh" ;;
- "fortran/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/Makefile" ;;
- "fortran/src/h5fc") CONFIG_FILES="$CONFIG_FILES fortran/src/h5fc" ;;
- "fortran/src/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/src/Makefile" ;;
- "fortran/test/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/test/Makefile" ;;
- "fortran/testpar/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/testpar/Makefile" ;;
- "fortran/examples/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/examples/Makefile" ;;
- "fortran/examples/run-fortran-ex.sh") CONFIG_FILES="$CONFIG_FILES fortran/examples/run-fortran-ex.sh" ;;
- "fortran/examples/testh5fc.sh") CONFIG_FILES="$CONFIG_FILES fortran/examples/testh5fc.sh" ;;
- "hl/Makefile") CONFIG_FILES="$CONFIG_FILES hl/Makefile" ;;
- "hl/src/Makefile") CONFIG_FILES="$CONFIG_FILES hl/src/Makefile" ;;
- "hl/test/Makefile") CONFIG_FILES="$CONFIG_FILES hl/test/Makefile" ;;
- "hl/test/H5srcdir_str.h") CONFIG_FILES="$CONFIG_FILES hl/test/H5srcdir_str.h" ;;
- "hl/test/test_ld.sh") CONFIG_FILES="$CONFIG_FILES hl/test/test_ld.sh" ;;
- "hl/tools/Makefile") CONFIG_FILES="$CONFIG_FILES hl/tools/Makefile" ;;
- "hl/tools/gif2h5/Makefile") CONFIG_FILES="$CONFIG_FILES hl/tools/gif2h5/Makefile" ;;
- "hl/tools/gif2h5/h52giftest.sh") CONFIG_FILES="$CONFIG_FILES hl/tools/gif2h5/h52giftest.sh" ;;
- "hl/tools/h5watch/Makefile") CONFIG_FILES="$CONFIG_FILES hl/tools/h5watch/Makefile" ;;
- "hl/tools/h5watch/testh5watch.sh") CONFIG_FILES="$CONFIG_FILES hl/tools/h5watch/testh5watch.sh" ;;
- "hl/examples/Makefile") CONFIG_FILES="$CONFIG_FILES hl/examples/Makefile" ;;
- "hl/examples/run-hlc-ex.sh") CONFIG_FILES="$CONFIG_FILES hl/examples/run-hlc-ex.sh" ;;
- "hl/c++/Makefile") CONFIG_FILES="$CONFIG_FILES hl/c++/Makefile" ;;
- "hl/c++/src/Makefile") CONFIG_FILES="$CONFIG_FILES hl/c++/src/Makefile" ;;
- "hl/c++/test/Makefile") CONFIG_FILES="$CONFIG_FILES hl/c++/test/Makefile" ;;
- "hl/c++/examples/Makefile") CONFIG_FILES="$CONFIG_FILES hl/c++/examples/Makefile" ;;
- "hl/c++/examples/run-hlc++-ex.sh") CONFIG_FILES="$CONFIG_FILES hl/c++/examples/run-hlc++-ex.sh" ;;
- "hl/fortran/Makefile") CONFIG_FILES="$CONFIG_FILES hl/fortran/Makefile" ;;
- "hl/fortran/src/Makefile") CONFIG_FILES="$CONFIG_FILES hl/fortran/src/Makefile" ;;
- "hl/fortran/test/Makefile") CONFIG_FILES="$CONFIG_FILES hl/fortran/test/Makefile" ;;
- "hl/fortran/examples/Makefile") CONFIG_FILES="$CONFIG_FILES hl/fortran/examples/Makefile" ;;
- "hl/fortran/examples/run-hlfortran-ex.sh") CONFIG_FILES="$CONFIG_FILES hl/fortran/examples/run-hlfortran-ex.sh" ;;
-
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
- esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
- test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
- tmp= ac_tmp=
- trap 'exit_status=$?
- : "${ac_tmp:=$tmp}"
- { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
-' 0
- trap 'as_fn_exit 1' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -d "$tmp"
-} ||
-{
- tmp=./conf$$-$RANDOM
- (umask 077 && mkdir "$tmp")
-} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
-ac_tmp=$tmp
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
- eval ac_cr=\$\'\\r\'
-fi
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\\r'
-else
- ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
-_ACEOF
-
-
-{
- echo "cat >conf$$subs.awk <<_ACEOF" &&
- echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
- echo "_ACEOF"
-} >conf$$subs.sh ||
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- . ./conf$$subs.sh ||
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-
- ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
- if test $ac_delim_n = $ac_delim_num; then
- break
- elif $ac_last_try; then
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\)..*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\)..*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
- N
- s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
- for (key in S) S_is_set[key] = 1
- FS = ""
-
-}
-{
- line = $ 0
- nfields = split(line, field, "@")
- substed = 0
- len = length(field[1])
- for (i = 2; i < nfields; i++) {
- key = field[i]
- keylen = length(key)
- if (S_is_set[key]) {
- value = S[key]
- line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
- len += length(value) + length(field[++i])
- substed = 1
- } else
- len += 1 + keylen
- }
-
- print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
- sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
- cat
-fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
- || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
-# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
-h
-s///
-s/^/:/
-s/[ ]*$/:/
-s/:\$(srcdir):/:/g
-s/:\${srcdir}:/:/g
-s/:@srcdir@:/:/g
-s/^:*//
-s/:*$//
-x
-s/\(=[ ]*\).*/\1/
-G
-s/\n//
-s/^[^=]*=[ ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-# Set up the scripts for CONFIG_HEADERS section.
-# No need to generate them if there are no CONFIG_HEADERS.
-# This happens for instance with `./config.status Makefile'.
-if test -n "$CONFIG_HEADERS"; then
-cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
-BEGIN {
-_ACEOF
-
-# Transform confdefs.h into an awk script `defines.awk', embedded as
-# here-document in config.status, that substitutes the proper values into
-# config.h.in to produce config.h.
-
-# Create a delimiter string that does not exist in confdefs.h, to ease
-# handling of long lines.
-ac_delim='%!_!# '
-for ac_last_try in false false :; do
- ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
- if test -z "$ac_tt"; then
- break
- elif $ac_last_try; then
- as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-
-# For the awk script, D is an array of macro values keyed by name,
-# likewise P contains macro parameters if any. Preserve backslash
-# newline sequences.
-
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-sed -n '
-s/.\{148\}/&'"$ac_delim"'/g
-t rset
-:rset
-s/^[ ]*#[ ]*define[ ][ ]*/ /
-t def
-d
-:def
-s/\\$//
-t bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3"/p
-s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
-d
-:bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3\\\\\\n"\\/p
-t cont
-s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
-t cont
-d
-:cont
-n
-s/.\{148\}/&'"$ac_delim"'/g
-t clear
-:clear
-s/\\$//
-t bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/"/p
-d
-:bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
-b cont
-' <confdefs.h | sed '
-s/'"$ac_delim"'/"\\\
-"/g' >>$CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- for (key in D) D_is_set[key] = 1
- FS = ""
-}
-/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
- line = \$ 0
- split(line, arg, " ")
- if (arg[1] == "#") {
- defundef = arg[2]
- mac1 = arg[3]
- } else {
- defundef = substr(arg[1], 2)
- mac1 = arg[2]
- }
- split(mac1, mac2, "(") #)
- macro = mac2[1]
- prefix = substr(line, 1, index(line, defundef) - 1)
- if (D_is_set[macro]) {
- # Preserve the white space surrounding the "#".
- print prefix "define", macro P[macro] D[macro]
- next
- } else {
- # Replace #undef with comments. This is necessary, for example,
- # in the case of _POSIX_SOURCE, which is predefined and required
- # on some systems where configure will not decide to define it.
- if (defundef == "undef") {
- print "/*", prefix defundef, macro, "*/"
- next
- }
- }
-}
-{ print }
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
- as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
-fi # test -n "$CONFIG_HEADERS"
-
-
-eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
-shift
-for ac_tag
-do
- case $ac_tag in
- :[FHLC]) ac_mode=$ac_tag; continue;;
- esac
- case $ac_mode$ac_tag in
- :[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
- :[FH]-) ac_tag=-:-;;
- :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
- esac
- ac_save_IFS=$IFS
- IFS=:
- set x $ac_tag
- IFS=$ac_save_IFS
- shift
- ac_file=$1
- shift
-
- case $ac_mode in
- :L) ac_source=$1;;
- :[FH])
- ac_file_inputs=
- for ac_f
- do
- case $ac_f in
- -) ac_f="$ac_tmp/stdin";;
- *) # Look for the file first in the build tree, then in the source tree
- # (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
- test -f "$ac_f" ||
- case $ac_f in
- [\\/$]*) false;;
- *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
- esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
- esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
- as_fn_append ac_file_inputs " '$ac_f'"
- done
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
- `' by configure.'
- if test x"$ac_file" != x-; then
- configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
- fi
- # Neutralize special characters interpreted by sed in replacement strings.
- case $configure_input in #(
- *\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
- sed 's/[\\\\&|]/\\\\&/g'`;; #(
- *) ac_sed_conf_input=$configure_input;;
- esac
-
- case $ac_tag in
- *:-:* | *:-) cat >"$ac_tmp/stdin" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
- esac
- ;;
- esac
-
- ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- as_dir="$ac_dir"; as_fn_mkdir_p
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- case $ac_mode in
- :F)
- #
- # CONFIG_FILE
- #
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
- esac
- ac_MKDIR_P=$MKDIR_P
- case $MKDIR_P in
- [\\/$]* | ?:[\\/]* ) ;;
- */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
- esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-ac_sed_dataroot='
-/datarootdir/ {
- p
- q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_datarootdir_hack='
- s&@datadir@&$datadir&g
- s&@docdir@&$docdir&g
- s&@infodir@&$infodir&g
- s&@localedir@&$localedir&g
- s&@mandir@&$mandir&g
- s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-s&@MKDIR_P@&$ac_MKDIR_P&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
- >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
- "$ac_tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&2;}
-
- rm -f "$ac_tmp/stdin"
- case $ac_file in
- -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
- *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
- esac \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- ;;
- :H)
- #
- # CONFIG_HEADER
- #
- if test x"$ac_file" != x-; then
- {
- $as_echo "/* $configure_input */" \
- && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
- } >"$ac_tmp/config.h" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
- else
- rm -f "$ac_file"
- mv "$ac_tmp/config.h" "$ac_file" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- fi
- else
- $as_echo "/* $configure_input */" \
- && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
- || as_fn_error $? "could not create -" "$LINENO" 5
- fi
-# Compute "$ac_file"'s index in $config_headers.
-_am_arg="$ac_file"
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $_am_arg | $_am_arg:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
-$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$_am_arg" : 'X\(//\)[^/]' \| \
- X"$_am_arg" : 'X\(//\)$' \| \
- X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$_am_arg" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`/stamp-h$_am_stamp_count
- ;;
-
- :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
-$as_echo "$as_me: executing $ac_file commands" >&6;}
- ;;
- esac
+cat >>"$CONFIG_LT" <<\_LTEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5
+$as_echo "$as_me: creating $ofile" >&6;}
- case $ac_file$ac_mode in
- "pubconf":C)
- echo "creating src/H5pubconf.h"
- sed 's/#define /#define H5_/' <src/H5config.h |\
- sed 's/#undef /#undef H5_/' >pubconf
- if test ! -f src/H5pubconf.h; then
- /bin/mv -f pubconf src/H5pubconf.h
- elif (diff pubconf src/H5pubconf.h >/dev/null); then
- rm -f pubconf
- echo "src/H5pubconf.h is unchanged"
- else
- /bin/mv -f pubconf src/H5pubconf.h
- fi
- echo "Post process src/libhdf5.settings"
- sed '/^#/d' < src/libhdf5.settings > libhdf5.settings.TMP
- cp libhdf5.settings.TMP src/libhdf5.settings
- rm -f libhdf5.settings.TMP
- ;;
- "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
- # are listed without --file. Let's play safe and only enable the eval
- # if we detect the quoting.
- case $CONFIG_FILES in
- *\'*) eval set x "$CONFIG_FILES" ;;
- *) set x $CONFIG_FILES ;;
- esac
- shift
- for mf
- do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named 'Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
- # limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$mf" : 'X\(//\)[^/]' \| \
- X"$mf" : 'X\(//\)$' \| \
- X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$mf" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running 'make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$file" : 'X\(//\)[^/]' \| \
- X"$file" : 'X\(//\)$' \| \
- X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- as_dir=$dirpart/$fdir; as_fn_mkdir_p
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
- done
-}
- ;;
- "libtool":C)
-
# See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes.
if test -n "${ZSH_VERSION+set}" ; then
@@ -34146,57 +33086,308 @@ compiler_lib_search_path=$lt_compiler_lib_search_path_FC
# ### END LIBTOOL TAG CONFIG: FC
_LT_EOF
- ;;
- esac
-done # for ac_tag
+as_fn_exit 0
+_LTEOF
+chmod +x "$CONFIG_LT"
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure. Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+lt_cl_success=:
+test "$silent" = yes &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+exec 5>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec 5>>config.log
+$lt_cl_success || as_fn_exit 1
+
+no_create=$saved_no_create
+
+## Then the stamp2 file for H5config.h
+touch ./config/stamp2
+
+## Finally the makefiles
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
+## Post processing to patch up some deficiencies in libtool
+case $host_os in
+ linux* | freebsd* )
+ ## If gcc is not used, need to set $wl to use "-Wl,"
+ if $CC -v 2>&1 | grep '^gcc' > /dev/null ; then
+ : using gcc
+ else
+ echo 'fixing $wl in' $ofile
+ed - $ofile <<EOF 2> /dev/null
+g/^wl=""/s//wl="-Wl,"/
+w
+q
+EOF
+ fi
+ ;;
+esac
+
+## Are we compiling static libraries, shared libraries, or both? This
+## is only used for the libhdf5.settings file. We can't just look at
+## $enable_static and $enable_shared because if they're yes the ltconfig
+## might have decided that one or the other is simply not possible.
+## Therefore we have to ask the generated `libtool' shell script
+## which 'features' it has enabled.
+if (./libtool --features | grep '^enable shared libraries' > /dev/null); then
+ enable_shared=yes
+else
+ enable_shared=no
+fi
+
+if (./libtool --features | grep '^enable static libraries' > /dev/null); then
+ enable_static=yes
+else
+ enable_static=no
+fi
+
+if test "X$enable_static" = "Xyes" && test "X$enable_shared" = "Xyes"; then
+ STATIC_SHARED="static, shared"
+elif test "X$enable_static" = "Xyes"; then
+ STATIC_SHARED="static"
+elif test "X$enable_shared" = "Xyes"; then
+ STATIC_SHARED="shared"
+else
+ STATIC_SHARED="none"
+fi
+
+## ----------------------------------------------------------------------
+## Set a macro if shared library is enabled.
+##
+ if test "X$enable_shared" = "Xyes"; then
+ HAVE_SHARED_CONDITIONAL_TRUE=
+ HAVE_SHARED_CONDITIONAL_FALSE='#'
+else
+ HAVE_SHARED_CONDITIONAL_TRUE='#'
+ HAVE_SHARED_CONDITIONAL_FALSE=
+fi
+
+
+ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/testflushrefresh.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile testpar/testph5.sh perform/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/test/test_ld.sh hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/tools/h5watch/Makefile hl/tools/h5watch/testh5watch.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh"
+
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
-as_fn_exit 0
_ACEOF
-ac_clean_files=$ac_clean_files_save
-test $ac_write_fail = 0 ||
- as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit 1
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${FORTRAN_HAVE_SIZEOF_TRUE}" && test -z "${FORTRAN_HAVE_SIZEOF_FALSE}"; then
+ as_fn_error $? "conditional \"FORTRAN_HAVE_SIZEOF\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${FORTRAN_2003_CONDITIONAL_F_TRUE}" && test -z "${FORTRAN_2003_CONDITIONAL_F_FALSE}"; then
+ as_fn_error $? "conditional \"FORTRAN_2003_CONDITIONAL_F\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${FORTRAN_DEFAULT_REALisDBLE_F_TRUE}" && test -z "${FORTRAN_DEFAULT_REALisDBLE_F_FALSE}"; then
+ as_fn_error $? "conditional \"FORTRAN_DEFAULT_REALisDBLE_F\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${FORTRAN_SHARED_CONDITIONAL_TRUE}" && test -z "${FORTRAN_SHARED_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"FORTRAN_SHARED_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${CXX_SHARED_CONDITIONAL_TRUE}" && test -z "${CXX_SHARED_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"CXX_SHARED_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-: ${CONFIG_LT=./config.lt}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_LT" >&5
-$as_echo "$as_me: creating $CONFIG_LT" >&6;}
+if test -z "${BUILD_SHARED_SZIP_CONDITIONAL_TRUE}" && test -z "${BUILD_SHARED_SZIP_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_SHARED_SZIP_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${DIRECT_VFD_CONDITIONAL_TRUE}" && test -z "${DIRECT_VFD_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"DIRECT_VFD_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_ALL_CONDITIONAL_TRUE}" && test -z "${BUILD_ALL_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_ALL_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_CXX_CONDITIONAL_TRUE}" && test -z "${BUILD_CXX_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_CXX_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_PARALLEL_CONDITIONAL_TRUE}" && test -z "${BUILD_PARALLEL_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_PARALLEL_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_FORTRAN_CONDITIONAL_TRUE}" && test -z "${BUILD_FORTRAN_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_FORTRAN_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_HDF5_HL_CONDITIONAL_TRUE}" && test -z "${BUILD_HDF5_HL_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_HDF5_HL_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_SHARED_CONDITIONAL_TRUE}" && test -z "${HAVE_SHARED_CONDITIONAL_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_SHARED_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
as_write_fail=0
-cat >"$CONFIG_LT" <<_ASEOF || as_write_fail=1
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
# Generated by $as_me.
-# Run this file to recreate a libtool stub with the current configuration.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
SHELL=\${CONFIG_SHELL-$SHELL}
export SHELL
_ASEOF
-cat >>"$CONFIG_LT" <<\_ASEOF || as_write_fail=1
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##
@@ -34560,71 +33751,203 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
exec 6>&1
-## --------------------------------- ##
-## Main body of "$CONFIG_LT" script. ##
-## --------------------------------- ##
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
_ASEOF
-test $as_write_fail = 0 && chmod +x "$CONFIG_LT"
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-cat >>"$CONFIG_LT" <<\_LTEOF
-lt_cl_silent=false
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by HDF5 $as_me 1.9.149-FA_a5, which was
+generated by GNU Autoconf 2.69. Invocation command line was
-lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
-for use in further configure time tests before the real libtool is
-generated.
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
-Usage: $0 [OPTIONS]
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
+_ACEOF
-Report bugs to <bug-libtool@gnu.org>."
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
-lt_cl_version="\
-HDF5 config.lt 1.9.148-FA_a5
-configured by $0, generated by GNU Autoconf 2.69.
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
-Copyright (C) 2011 Free Software Foundation, Inc.
-This config.lt script is free software; the Free Software Foundation
-gives unlimited permision to copy, distribute and modify it."
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <help@hdfgroup.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+HDF5 config.status 1.9.149-FA_a5
+configured by $0, generated by GNU Autoconf 2.69,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
while test $# != 0
do
case $1 in
- --version | --v* | -V )
- echo "$lt_cl_version"; exit 0 ;;
- --help | --h* | -h )
- echo "$lt_cl_help"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --quiet | --q* | --silent | --s* | -q )
- lt_cl_silent=: ;;
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
- -*) as_fn_error $? "unrecognized option: $1
-Try \`$0 --help' for more information." "$LINENO" 5 ;;
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
- *) as_fn_error $? "unrecognized argument: $1
-Try \`$0 --help' for more information." "$LINENO" 5 ;;
esac
shift
done
-if $lt_cl_silent; then
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
fi
-_LTEOF
-cat >>"$CONFIG_LT" <<_LTEOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
# The HP-UX ksh and POSIX shell print the target directory to stdout
@@ -35089,13 +34412,806 @@ fi
ac_aux_dir='$ac_aux_dir'
-_LTEOF
-cat >>"$CONFIG_LT" <<\_LTEOF
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5
-$as_echo "$as_me: creating $ofile" >&6;}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "src/H5config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/H5config.h" ;;
+ "pubconf") CONFIG_COMMANDS="$CONFIG_COMMANDS pubconf" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "src/libhdf5.settings") CONFIG_FILES="$CONFIG_FILES src/libhdf5.settings" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
+ "test/testcheck_version.sh") CONFIG_FILES="$CONFIG_FILES test/testcheck_version.sh" ;;
+ "test/testerror.sh") CONFIG_FILES="$CONFIG_FILES test/testerror.sh" ;;
+ "test/testflushrefresh.sh") CONFIG_FILES="$CONFIG_FILES test/testflushrefresh.sh" ;;
+ "test/H5srcdir_str.h") CONFIG_FILES="$CONFIG_FILES test/H5srcdir_str.h" ;;
+ "test/testlibinfo.sh") CONFIG_FILES="$CONFIG_FILES test/testlibinfo.sh" ;;
+ "test/testlinks_env.sh") CONFIG_FILES="$CONFIG_FILES test/testlinks_env.sh" ;;
+ "test/test_plugin.sh") CONFIG_FILES="$CONFIG_FILES test/test_plugin.sh" ;;
+ "testpar/Makefile") CONFIG_FILES="$CONFIG_FILES testpar/Makefile" ;;
+ "testpar/testph5.sh") CONFIG_FILES="$CONFIG_FILES testpar/testph5.sh" ;;
+ "perform/Makefile") CONFIG_FILES="$CONFIG_FILES perform/Makefile" ;;
+ "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
+ "tools/h5dump/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5dump/Makefile" ;;
+ "tools/h5dump/testh5dump.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dump.sh" ;;
+ "tools/h5dump/testh5dumppbits.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dumppbits.sh" ;;
+ "tools/h5dump/testh5dumpxml.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dumpxml.sh" ;;
+ "tools/h5ls/testh5ls.sh") CONFIG_FILES="$CONFIG_FILES tools/h5ls/testh5ls.sh" ;;
+ "tools/h5import/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5import/Makefile" ;;
+ "tools/h5import/h5importtestutil.sh") CONFIG_FILES="$CONFIG_FILES tools/h5import/h5importtestutil.sh" ;;
+ "tools/h5diff/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5diff/Makefile" ;;
+ "tools/h5diff/testh5diff.sh") CONFIG_FILES="$CONFIG_FILES tools/h5diff/testh5diff.sh" ;;
+ "tools/h5diff/testph5diff.sh") CONFIG_FILES="$CONFIG_FILES tools/h5diff/testph5diff.sh" ;;
+ "tools/h5jam/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5jam/Makefile" ;;
+ "tools/h5jam/testh5jam.sh") CONFIG_FILES="$CONFIG_FILES tools/h5jam/testh5jam.sh" ;;
+ "tools/h5repack/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5repack/Makefile" ;;
+ "tools/h5repack/h5repack.sh") CONFIG_FILES="$CONFIG_FILES tools/h5repack/h5repack.sh" ;;
+ "tools/h5ls/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5ls/Makefile" ;;
+ "tools/h5copy/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5copy/Makefile" ;;
+ "tools/h5copy/testh5copy.sh") CONFIG_FILES="$CONFIG_FILES tools/h5copy/testh5copy.sh" ;;
+ "tools/lib/Makefile") CONFIG_FILES="$CONFIG_FILES tools/lib/Makefile" ;;
+ "tools/misc/Makefile") CONFIG_FILES="$CONFIG_FILES tools/misc/Makefile" ;;
+ "tools/misc/h5cc") CONFIG_FILES="$CONFIG_FILES tools/misc/h5cc" ;;
+ "tools/misc/testh5mkgrp.sh") CONFIG_FILES="$CONFIG_FILES tools/misc/testh5mkgrp.sh" ;;
+ "tools/misc/testh5repart.sh") CONFIG_FILES="$CONFIG_FILES tools/misc/testh5repart.sh" ;;
+ "tools/h5stat/testh5stat.sh") CONFIG_FILES="$CONFIG_FILES tools/h5stat/testh5stat.sh" ;;
+ "tools/h5stat/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5stat/Makefile" ;;
+ "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
+ "examples/run-c-ex.sh") CONFIG_FILES="$CONFIG_FILES examples/run-c-ex.sh" ;;
+ "examples/testh5cc.sh") CONFIG_FILES="$CONFIG_FILES examples/testh5cc.sh" ;;
+ "c++/Makefile") CONFIG_FILES="$CONFIG_FILES c++/Makefile" ;;
+ "c++/src/Makefile") CONFIG_FILES="$CONFIG_FILES c++/src/Makefile" ;;
+ "c++/src/h5c++") CONFIG_FILES="$CONFIG_FILES c++/src/h5c++" ;;
+ "c++/test/Makefile") CONFIG_FILES="$CONFIG_FILES c++/test/Makefile" ;;
+ "c++/test/H5srcdir_str.h") CONFIG_FILES="$CONFIG_FILES c++/test/H5srcdir_str.h" ;;
+ "c++/examples/Makefile") CONFIG_FILES="$CONFIG_FILES c++/examples/Makefile" ;;
+ "c++/examples/run-c++-ex.sh") CONFIG_FILES="$CONFIG_FILES c++/examples/run-c++-ex.sh" ;;
+ "c++/examples/testh5c++.sh") CONFIG_FILES="$CONFIG_FILES c++/examples/testh5c++.sh" ;;
+ "fortran/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/Makefile" ;;
+ "fortran/src/h5fc") CONFIG_FILES="$CONFIG_FILES fortran/src/h5fc" ;;
+ "fortran/src/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/src/Makefile" ;;
+ "fortran/test/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/test/Makefile" ;;
+ "fortran/testpar/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/testpar/Makefile" ;;
+ "fortran/examples/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/examples/Makefile" ;;
+ "fortran/examples/run-fortran-ex.sh") CONFIG_FILES="$CONFIG_FILES fortran/examples/run-fortran-ex.sh" ;;
+ "fortran/examples/testh5fc.sh") CONFIG_FILES="$CONFIG_FILES fortran/examples/testh5fc.sh" ;;
+ "hl/Makefile") CONFIG_FILES="$CONFIG_FILES hl/Makefile" ;;
+ "hl/src/Makefile") CONFIG_FILES="$CONFIG_FILES hl/src/Makefile" ;;
+ "hl/test/Makefile") CONFIG_FILES="$CONFIG_FILES hl/test/Makefile" ;;
+ "hl/test/H5srcdir_str.h") CONFIG_FILES="$CONFIG_FILES hl/test/H5srcdir_str.h" ;;
+ "hl/test/test_ld.sh") CONFIG_FILES="$CONFIG_FILES hl/test/test_ld.sh" ;;
+ "hl/tools/Makefile") CONFIG_FILES="$CONFIG_FILES hl/tools/Makefile" ;;
+ "hl/tools/gif2h5/Makefile") CONFIG_FILES="$CONFIG_FILES hl/tools/gif2h5/Makefile" ;;
+ "hl/tools/gif2h5/h52giftest.sh") CONFIG_FILES="$CONFIG_FILES hl/tools/gif2h5/h52giftest.sh" ;;
+ "hl/tools/h5watch/Makefile") CONFIG_FILES="$CONFIG_FILES hl/tools/h5watch/Makefile" ;;
+ "hl/tools/h5watch/testh5watch.sh") CONFIG_FILES="$CONFIG_FILES hl/tools/h5watch/testh5watch.sh" ;;
+ "hl/examples/Makefile") CONFIG_FILES="$CONFIG_FILES hl/examples/Makefile" ;;
+ "hl/examples/run-hlc-ex.sh") CONFIG_FILES="$CONFIG_FILES hl/examples/run-hlc-ex.sh" ;;
+ "hl/c++/Makefile") CONFIG_FILES="$CONFIG_FILES hl/c++/Makefile" ;;
+ "hl/c++/src/Makefile") CONFIG_FILES="$CONFIG_FILES hl/c++/src/Makefile" ;;
+ "hl/c++/test/Makefile") CONFIG_FILES="$CONFIG_FILES hl/c++/test/Makefile" ;;
+ "hl/c++/examples/Makefile") CONFIG_FILES="$CONFIG_FILES hl/c++/examples/Makefile" ;;
+ "hl/c++/examples/run-hlc++-ex.sh") CONFIG_FILES="$CONFIG_FILES hl/c++/examples/run-hlc++-ex.sh" ;;
+ "hl/fortran/Makefile") CONFIG_FILES="$CONFIG_FILES hl/fortran/Makefile" ;;
+ "hl/fortran/src/Makefile") CONFIG_FILES="$CONFIG_FILES hl/fortran/src/Makefile" ;;
+ "hl/fortran/test/Makefile") CONFIG_FILES="$CONFIG_FILES hl/fortran/test/Makefile" ;;
+ "hl/fortran/examples/Makefile") CONFIG_FILES="$CONFIG_FILES hl/fortran/examples/Makefile" ;;
+ "hl/fortran/examples/run-hlfortran-ex.sh") CONFIG_FILES="$CONFIG_FILES hl/fortran/examples/run-hlfortran-ex.sh" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$ac_tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+ case $ac_file$ac_mode in
+ "pubconf":C)
+ echo "creating src/H5pubconf.h"
+ sed 's/#define /#define H5_/' <src/H5config.h |\
+ sed 's/#undef /#undef H5_/' >pubconf
+ if test ! -f src/H5pubconf.h; then
+ /bin/mv -f pubconf src/H5pubconf.h
+ elif (diff pubconf src/H5pubconf.h >/dev/null); then
+ rm -f pubconf
+ echo "src/H5pubconf.h is unchanged"
+ else
+ /bin/mv -f pubconf src/H5pubconf.h
+ fi
+ echo "Post process src/libhdf5.settings"
+ sed '/^#/d' < src/libhdf5.settings > libhdf5.settings.TMP
+ cp libhdf5.settings.TMP src/libhdf5.settings
+ rm -f libhdf5.settings.TMP
+ ;;
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named 'Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running 'make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+ "libtool":C)
+
# See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes.
if test -n "${ZSH_VERSION+set}" ; then
@@ -36046,75 +36162,45 @@ compiler_lib_search_path=$lt_compiler_lib_search_path_FC
# ### END LIBTOOL TAG CONFIG: FC
_LT_EOF
+ ;;
-as_fn_exit 0
-_LTEOF
-chmod +x "$CONFIG_LT"
-
-# configure is writing to config.log, but config.lt does its own redirection,
-# appending to config.log, which fails on DOS, as config.log is still kept
-# open by configure. Here we exec the FD to /dev/null, effectively closing
-# config.log, so it can be properly (re)opened and appended to by config.lt.
-lt_cl_success=:
-test "$silent" = yes &&
- lt_config_lt_args="$lt_config_lt_args --quiet"
-exec 5>/dev/null
-$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
-exec 5>>config.log
-$lt_cl_success || as_fn_exit 1
+ esac
+done # for ac_tag
-no_create=$saved_no_create
-## Then the stamp2 file for H5config.h
-touch ./config/stamp2
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
-## Finally the makefiles
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
-## Post processing to patch up some deficiencies in libtool
-case $host_os in
- linux* | freebsd* )
- ## If gcc is not used, need to set $wl to use "-Wl,"
- if $CC -v 2>&1 | grep '^gcc' > /dev/null ; then
- : using gcc
- else
- echo 'fixing $wl in' $ofile
-ed - $ofile <<EOF 2> /dev/null
-g/^wl=""/s//wl="-Wl,"/
-w
-q
-EOF
- fi
- ;;
-esac
-## Are we compiling static libraries, shared libraries, or both? This
-## is only used for the libhdf5.settings file. We can't just look at
-## $enable_static and $enable_shared because if they're yes the ltconfig
-## might have decided that one or the other is simply not possible.
-## Therefore we have to ask the generated `libtool' shell script
-## which 'features' it has enabled.
-if (./libtool --features | grep '^enable shared libraries' > /dev/null); then
- enable_shared=yes
-else
- enable_shared=no
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
fi
-
-if (./libtool --features | grep '^enable static libraries' > /dev/null); then
- enable_static=yes
-else
- enable_static=no
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
-if test "X$enable_static" = "Xyes" && test "X$enable_shared" = "Xyes"; then
- STATIC_SHARED="static, shared"
-elif test "X$enable_static" = "Xyes"; then
- STATIC_SHARED="static"
-elif test "X$enable_shared" = "Xyes"; then
- STATIC_SHARED="shared"
-else
- STATIC_SHARED="none"
-fi
chmod 755 tools/misc/h5cc
diff --git a/configure.ac b/configure.ac
index ac8a72f..bb6f1de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ AC_PREREQ([2.69])
## NOTE: Do not forget to change the version number here when we do a
## release!!!
##
-AC_INIT([HDF5], [1.9.148-FA_a5], [help@hdfgroup.org])
+AC_INIT([HDF5], [1.9.149-FA_a5], [help@hdfgroup.org])
AC_CONFIG_SRCDIR([src/H5.c])
AC_CONFIG_HEADER([src/H5config.h])
@@ -434,9 +434,11 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
## --------------------------------------------------------------------
## General Fortran flags
- ##
- AM_FCFLAGS="${AM_FCFLAGS} ${FFLAGS}"
- FCFLAGS="${FCFLAGS} ${FFLAGS}"
+ ## Only add FFLAGS to FCFLAGS if it's set.
+ if test "x$FFLAGS" != "x" ; then
+ AM_FCFLAGS="${AM_FCFLAGS} ${FFLAGS}"
+ FCFLAGS="${FCFLAGS} ${FFLAGS}"
+ fi
## --------------------------------------------------------------------
## Fortran source extention
@@ -1242,9 +1244,10 @@ case "X-$enable_production" in
esac
## ----------------------------------------------------------------------
-## Check for system libraries.
+## Check for system libraries. "dl" stands for dynamically loaded library
##
AC_CHECK_LIB([m], [ceil])
+AC_CHECK_LIB([dl], [dlopen])
if test "`uname`" = "SunOS" -o "`uname -sr`" = "HP-UX B.11.00"; then
## ...for Solaris
@@ -1274,6 +1277,7 @@ AC_CHECK_FUNCS([clock_gettime],[have_clock_gettime="yes"],[have_clock_gettime="n
AC_CHECK_HEADERS([sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h])
AC_CHECK_HEADERS([sys/socket.h sys/types.h])
AC_CHECK_HEADERS([stddef.h setjmp.h features.h])
+AC_CHECK_HEADERS([dirent.h])
AC_CHECK_HEADERS([stdint.h], [C9x=yes])
## Darwin
@@ -1847,7 +1851,7 @@ case $withval in
AC_CHECK_HEADERS([szlib.h],
[HAVE_SZLIB_H="yes"],
- [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_SZIP])
+ [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_SZLIB])
if test -n "$szlib_lib"; then
LDFLAGS="$LDFLAGS -L$szlib_lib"
@@ -4432,6 +4436,64 @@ if test -n "$TESTPARALLEL"; then
FORTRAN_PARALLEL_MAKE=fortran/$TESTPARALLEL/Makefile
fi
fi
+LT_OUTPUT
+no_create=$saved_no_create
+
+## Then the stamp2 file for H5config.h
+touch ./config/stamp2
+
+## Finally the makefiles
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
+## Post processing to patch up some deficiencies in libtool
+case $host_os in
+ linux* | freebsd* )
+ ## If gcc is not used, need to set $wl to use "-Wl,"
+ if $CC -v 2>&1 | grep '^gcc' > /dev/null ; then
+ : using gcc
+ else
+ echo 'fixing $wl in' $ofile
+ed - $ofile <<EOF 2> /dev/null
+g/^wl=""/s//wl="-Wl,"/
+w
+q
+EOF
+ fi
+ ;;
+esac
+
+## Are we compiling static libraries, shared libraries, or both? This
+## is only used for the libhdf5.settings file. We can't just look at
+## $enable_static and $enable_shared because if they're yes the ltconfig
+## might have decided that one or the other is simply not possible.
+## Therefore we have to ask the generated `libtool' shell script
+## which 'features' it has enabled.
+if (./libtool --features | grep '^enable shared libraries' > /dev/null); then
+ enable_shared=yes
+else
+ enable_shared=no
+fi
+
+if (./libtool --features | grep '^enable static libraries' > /dev/null); then
+ enable_static=yes
+else
+ enable_static=no
+fi
+
+if test "X$enable_static" = "Xyes" && test "X$enable_shared" = "Xyes"; then
+ STATIC_SHARED="static, shared"
+elif test "X$enable_static" = "Xyes"; then
+ STATIC_SHARED="static"
+elif test "X$enable_shared" = "Xyes"; then
+ STATIC_SHARED="shared"
+else
+ STATIC_SHARED="none"
+fi
+
+## ----------------------------------------------------------------------
+## Set a macro if shared library is enabled.
+##
+AM_CONDITIONAL([HAVE_SHARED_CONDITIONAL], [test "X$enable_shared" = "Xyes"])
AC_CONFIG_FILES([src/libhdf5.settings
Makefile
@@ -4443,6 +4505,7 @@ AC_CONFIG_FILES([src/libhdf5.settings
test/H5srcdir_str.h
test/testlibinfo.sh
test/testlinks_env.sh
+ test/test_plugin.sh
testpar/Makefile
testpar/testph5.sh
perform/Makefile
@@ -4514,59 +4577,6 @@ AC_CONFIG_FILES([src/libhdf5.settings
hl/fortran/examples/run-hlfortran-ex.sh])
AC_OUTPUT
-LT_OUTPUT
-no_create=$saved_no_create
-
-## Then the stamp2 file for H5config.h
-touch ./config/stamp2
-
-## Finally the makefiles
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-## Post processing to patch up some deficiencies in libtool
-case $host_os in
- linux* | freebsd* )
- ## If gcc is not used, need to set $wl to use "-Wl,"
- if $CC -v 2>&1 | grep '^gcc' > /dev/null ; then
- : using gcc
- else
- echo 'fixing $wl in' $ofile
-ed - $ofile <<EOF 2> /dev/null
-g/^wl=""/s//wl="-Wl,"/
-w
-q
-EOF
- fi
- ;;
-esac
-
-## Are we compiling static libraries, shared libraries, or both? This
-## is only used for the libhdf5.settings file. We can't just look at
-## $enable_static and $enable_shared because if they're yes the ltconfig
-## might have decided that one or the other is simply not possible.
-## Therefore we have to ask the generated `libtool' shell script
-## which 'features' it has enabled.
-if (./libtool --features | grep '^enable shared libraries' > /dev/null); then
- enable_shared=yes
-else
- enable_shared=no
-fi
-
-if (./libtool --features | grep '^enable static libraries' > /dev/null); then
- enable_static=yes
-else
- enable_static=no
-fi
-
-if test "X$enable_static" = "Xyes" && test "X$enable_shared" = "Xyes"; then
- STATIC_SHARED="static, shared"
-elif test "X$enable_static" = "Xyes"; then
- STATIC_SHARED="static"
-elif test "X$enable_shared" = "Xyes"; then
- STATIC_SHARED="shared"
-else
- STATIC_SHARED="none"
-fi
chmod 755 tools/misc/h5cc
diff --git a/fortran/src/H5Off.f90 b/fortran/src/H5Off.f90
index 1437e9f..8a40079 100644
--- a/fortran/src/H5Off.f90
+++ b/fortran/src/H5Off.f90
@@ -191,7 +191,7 @@ CONTAINS
SUBROUTINE h5oclose_f(object_id, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: object_id
- INTEGER , INTENT(OUT) :: hdferr
+ INTEGER , INTENT(OUT) :: hdferr
!*****
INTERFACE
INTEGER FUNCTION h5oclose_c(object_id)
@@ -565,7 +565,7 @@ CONTAINS
! obj_id - Object identifier.
!
! Outputs:
-! hdferr - Returns 0 if successful and -1 if fails.
+! hdferr - Returns 0 if successful and -1 if fails.
!
! AUTHOR
! M. Scot Breitenfeld
@@ -717,16 +717,16 @@ CONTAINS
! Sets comment for specified object.
!
! Inputs:
-! loc_id - Identifier of a file, group, dataset, or named datatype.
-! name - Name of the object whose comment is to be set or reset,
+! loc_id - Identifier of a file, group, dataset, or named datatype.
+! name - Name of the object whose comment is to be set or reset,
! specified as a path relative to loc_id.
-! comment - The new comment.
+! comment - The new comment.
!
! Outputs:
-! hdferr - Returns 0 if successful and -1 if fails.
+! hdferr - Returns 0 if successful and -1 if fails.
!
! Optional parameters:
-! lapl_id - Link access property list identifier.
+! lapl_id - Link access property list identifier.
!
! AUTHOR
! M. Scot Breitenfeld
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index c41653f..7379980 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -518,7 +518,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 138
+LT_VERS_REVISION = 139
LT_VERS_AGE = 0
# Include src directory in both Fortran and C flags (C compiler is used
diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in
index 2d7b5b4..d052046 100644
--- a/fortran/src/h5fc.in
+++ b/fortran/src/h5fc.in
@@ -80,12 +80,11 @@ FLINKERBASE="@FC@"
# FFLAGS and LDFLAGS are reserved for use by the script user.
# FLAGS brought from the hdf5 build are put in H5BLD_*FLAGS.
-# User's FFLAGS come after their H5BLD counterparts to override
-# them. User's LDFLAGS come just before clibpath, user's LIBS come after
-# $link_objs and before the hdf5 libraries in $link_args, followed by any
-# external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
-# or LIBS carried in from the hdf5 build.
-
+# User's FFLAGS come after their H5BLD counterparts. User's LDFLAGS come just
+# before clibpath, user's LIBS come after $link_objs and before the hdf5
+# libraries in $link_args, followed by any external library paths and libraries
+# from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build.
+# The order of the flags is intended to give precedence to the user's flags.
H5BLD_FFLAGS="@AM_FCFLAGS@ @FCFLAGS@"
F9XMODFLAG="@F9XMODFLAG@"
F9XSUFFIXFLAG="@F9XSUFFIXFLAG@"
@@ -98,7 +97,16 @@ FFLAGS="${HDF5_FFLAGS:-$FFLAGSBASE}"
LDFLAGS="${HDF5_LDFLAGS:-$LDFLAGSBASE}"
LIBS="${HDF5_LIBS:-$LIBSBASE}"
-USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}"
+# If a static library is available, the default will be to use it. If the only
+# available library is shared, it will be used by default. The user can
+# override either default, although choosing an unavailable library will result
+# in link errors.
+STATIC_AVAILABLE="@enable_static@"
+if test "${STATIC_AVAILABLE}" = "yes"; then
+ USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}"
+else
+ USE_SHARED_LIB="${HDF5_USE_SHLIB:-yes}"
+fi
usage() {
# A wonderfully informative "usage" message.
@@ -110,8 +118,9 @@ usage() {
echo " subdirectories [default: $prefix]"
echo " -show Show the commands without executing them"
echo " -showconfig Show the HDF5 library configuration summary"
- echo " -shlib Compile with shared HDF5 libraries"
- echo " -noshlib Compile with static HDF5 libraries [default]"
+ echo " -shlib Compile with shared HDF5 libraries [default when built with"
+ echo " disable-static]"
+ echo " -noshlib Compile with static HDF5 libraries [default when static available]"
echo " "
echo " <compile line> - the normal compile line options for your compiler."
echo " $prog_name uses the same compiler you used to compile"
@@ -233,8 +242,13 @@ for arg in $@ ; do
*) allargs="$allargs $arg"
if [ -s "$arg" ] ; then
ext=`expr "$arg" : '.*\(\..*\)'`
- if [ "$ext" = ".f" -o "$ext" = ".F" -o "$ext" = ".f90" -o \
- "$ext" = ".for" -o "$ext" = ".FOR" -o "$ext" = ".F90" ] ; then
+ if [ "$ext" = ".f" -o "$ext" = ".F" -o \
+ "$ext" = ".for" -o "$ext" = ".FOR" -o \
+ "$ext" = ".ftn" -o "$ext" = ".FTN" -o \
+ "$ext" = ".f90" -o "$ext" = ".F90" -o \
+ "$ext" = ".f95" -o "$ext" = ".F95" -o \
+ "$ext" = ".f03" -o "$ext" = ".F03" -o \
+ "$ext" = ".f08" -o "$ext" = ".F08" ] ; then
do_compile="yes"
compile_args="$compile_args $arg"
fname=`basename $arg $ext`
@@ -344,11 +358,11 @@ if test "x$do_link" = "xyes"; then
# module. It's okay if they're included twice in the compile line.
link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS"
- # User's FFLAGS come after their H5BLD counterparts to override
- # them. User's LDFLAGS come just before clibpath, user's LIBS come after
- # $link_objs and before the hdf5 libraries in $link_args, followed by any
- # external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
- # or LIBS carried in from the hdf5 build.
+ # User's FFLAGS come after their H5BLD counterparts. User's LDFLAGS come just
+ # before clibpath, user's LIBS come after $link_objs and before the hdf5
+ # libraries in $link_args, followed by any external library paths and libraries
+ # from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build.
+ # The order of the flags is intended to give precedence to the user's flags.
$SHOW $FLINKER $FFLAGS $H5BLD_FFLAGS $F9XSUFFIXFLAG $LDFLAGS $fmodules $link_objs $LIBS $link_args $shared_link
status=$?
fi
diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in
index 4ce185b..62030f0 100644
--- a/fortran/src/hdf5_fortrandll.def.in
+++ b/fortran/src/hdf5_fortrandll.def.in
@@ -6,6 +6,7 @@ H5LIB_mp_H5GET_LIBVERSION_F
H5LIB_mp_H5CHECK_VERSION_F
H5LIB_mp_H5GARBAGE_COLLECT_F
H5LIB_mp_H5DONT_ATEXIT_F
+H5LIB_mp_H5KIND_TO_TYPE
@H5_NOF03EXP@H5LIB_PROVISIONAL_mp_H5OFFSETOF
; H5_DBLE_INTERFACE
H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_SCALAR
diff --git a/fortran/test/tH5O.f90 b/fortran/test/tH5O.f90
index b68e7ca..ea91631 100644
--- a/fortran/test/tH5O.f90
+++ b/fortran/test/tH5O.f90
@@ -535,7 +535,7 @@ SUBROUTINE test_h5o_link(total_error)
! close the datatype
CALL h5tclose_f(tid, error)
- CALL check("h5tclose_f",error)
+ CALL check("h5tclose_f",error, total_error)
CALL h5ocopy_f(file_id, NAME_DATATYPE_SIMPLE, file_id, NAME_DATATYPE_SIMPLE2, error)
CALL check("h5ocopy_f",error,total_error)
diff --git a/fortran/test/tH5T_F03.f90 b/fortran/test/tH5T_F03.f90
index f7efcc4..a9a6487 100644
--- a/fortran/test/tH5T_F03.f90
+++ b/fortran/test/tH5T_F03.f90
@@ -3137,10 +3137,15 @@ SUBROUTINE t_enum_conv(total_error)
! Enumerated data array
! Some values are out of range for testing. The library should accept them
- INTEGER(KIND(E1_RED)), DIMENSION(1:20), TARGET :: data1 = (/E1_RED, E1_GREEN, E1_BLUE, E1_GREEN, E1_WHITE,&
- E1_WHITE, E1_BLACK, E1_GREEN, E1_BLUE, E1_RED,&
- E1_RED, E1_BLUE, E1_GREEN, E1_BLACK, E1_WHITE,&
- E1_RED, E1_WHITE, INT(0,KIND(E1_RED)), INT(-1,KIND(E1_RED)), INT(-2,KIND(E1_RED))/)
+ INTEGER(KIND(E1_RED)), DIMENSION(1:20), TARGET :: data1 = (/INT(E1_RED,KIND(E1_RED)), &
+ INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), &
+ INT(E1_GREEN,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)), &
+ INT(E1_WHITE,KIND(E1_RED)), INT(E1_BLACK,KIND(E1_RED)), &
+ INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), &
+ INT(E1_RED,KIND(E1_RED)), INT(E1_RED,KIND(E1_RED)), INT(E1_BLUE,KIND(E1_RED)), &
+ INT(E1_GREEN,KIND(E1_RED)), INT(E1_BLACK,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)),&
+ INT(E1_RED,KIND(E1_RED)), INT(E1_WHITE,KIND(E1_RED)), &
+ INT(0,KIND(E1_RED)), INT(-1,KIND(E1_RED)), INT(-2,KIND(E1_RED))/)
! Reading array for enum data
INTEGER(KIND(E1_RED)), DIMENSION(1:20), TARGET :: data2
diff --git a/fortran/test/tf.f90 b/fortran/test/tf.f90
index d5c32c8..4f73fda 100644
--- a/fortran/test/tf.f90
+++ b/fortran/test/tf.f90
@@ -30,7 +30,7 @@
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
-!DEC$attributes dllexport :: verify_real
+!DEC$attributes dllexport :: verify_real_kind_7
!DEC$endif
SUBROUTINE verify_real_kind_7(string,value,correct_value,total_error)
USE HDF5
@@ -115,7 +115,7 @@ END SUBROUTINE verify
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
-!DEC$attributes dllexport :: verify
+!DEC$attributes dllexport :: verify_Fortran_INTEGER_4
!DEC$endif
SUBROUTINE verify_Fortran_INTEGER_4(string,value,correct_value,total_error)
USE HDF5
@@ -129,9 +129,6 @@ SUBROUTINE verify_Fortran_INTEGER_4(string,value,correct_value,total_error)
RETURN
END SUBROUTINE verify_Fortran_INTEGER_4
-
-
-
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$attributes dllexport :: verifyLogical
@@ -151,7 +148,7 @@ END SUBROUTINE verifyLogical
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$attributes dllexport :: verifyString
!DEC$endif
-SUBROUTINE verifystring(string, value,correct_value,total_error)
+SUBROUTINE verifyString(string, value,correct_value,total_error)
CHARACTER*(*) :: string
CHARACTER*(*) :: value, correct_value
INTEGER :: total_error
@@ -160,7 +157,7 @@ SUBROUTINE verifystring(string, value,correct_value,total_error)
WRITE(*,*) "ERROR: INCORRECT VALIDATION ", string
ENDIF
RETURN
-END SUBROUTINE verifystring
+END SUBROUTINE verifyString
!----------------------------------------------------------------------
diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in
index 89aee46..b360bf3 100644
--- a/hl/c++/src/Makefile.in
+++ b/hl/c++/src/Makefile.in
@@ -458,7 +458,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 138
+LT_VERS_REVISION = 139
LT_VERS_AGE = 0
# Include src directory
diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in
index fc734df..fb54a54 100644
--- a/hl/fortran/src/Makefile.in
+++ b/hl/fortran/src/Makefile.in
@@ -474,7 +474,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 138
+LT_VERS_REVISION = 139
LT_VERS_AGE = 0
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \
-I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src
diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in
index 34db4c0..bbb788d 100644
--- a/hl/src/Makefile.in
+++ b/hl/src/Makefile.in
@@ -457,7 +457,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 138
+LT_VERS_REVISION = 139
LT_VERS_AGE = 0
# This library is our main target.
diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt
index 39a3811..c5b6f6e 100644
--- a/hl/test/CMakeLists.txt
+++ b/hl/test/CMakeLists.txt
@@ -31,6 +31,9 @@ MACRO (HL_ADD_TEST hl_name files)
SET_TARGET_PROPERTIES (hl_${hl_name} PROPERTIES FOLDER test/hl)
ADD_TEST (NAME hl_${hl_name} COMMAND $<TARGET_FILE:hl_${hl_name}>)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (hl_${hl_name} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
# --------------------------------------------------------------------
#-- Copy the necessary files.
@@ -75,6 +78,10 @@ ADD_TEST (
test_packet_table.h5
test_table.h5
)
+IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (hl_test-clear-objects PROPERTIES DEPENDS ${last_test})
+ENDIF (NOT "${last_test}" STREQUAL "")
+SET (last_test "hl_test-clear-objects")
HL_ADD_TEST (test_ds "dsdata.txt;dslat.txt;dslon.txt;test_ds_be.h5;test_ds_le.h5")
HL_ADD_TEST (test_dset_opt "")
diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c
index b81f8d4..1bfa23f 100644
--- a/hl/test/test_ds.c
+++ b/hl/test/test_ds.c
@@ -219,9 +219,8 @@ static hid_t create_test_file(const char *fileext)
{
char filename[65];
- HDstrcpy(filename, FILENAME);
- HDstrcat(filename, fileext);
- HDstrcat(filename, FILEEXT);
+ HDsnprintf(filename, sizeof(filename), "%s%s%s", FILENAME, fileext, FILEEXT);
+
return H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
}
@@ -229,9 +228,7 @@ static hid_t open_test_file(const char *fileext)
{
char filename[65];
- HDstrcpy(filename, FILENAME);
- HDstrcat(filename, fileext);
- HDstrcat(filename, FILEEXT);
+ HDsnprintf(filename, sizeof(filename), "%s%s%s", FILENAME, fileext, FILEEXT);
return H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT);
}
@@ -258,10 +255,10 @@ herr_t create_char_dataset(hid_t fid, const char *dsidx, int fulldims)
char s31_wbuf[DIM3_SIZE] = {1,1,1,2,2,2,3,3,3,4,4,4};
char s32_wbuf[DIM3_SIZE] = {5,5,5,10,10,10,50,50,50,100,100,100};
char s33_wbuf[DIM3_SIZE] = {6,6,6,12,12,12,53,53,53,120,120,120};
- char name[32];
+ char name[64];
+
+ HDsnprintf(name, sizeof(name), "%s%s", DATASET_NAME, dsidx);
- HDstrcpy(name, DATASET_NAME);
- HDstrcat(name, dsidx);
/* make a dataset */
if(H5LTmake_dataset_char(fid, name, rank, dims, buf) >= 0) {
if(fulldims==0) {
@@ -307,14 +304,13 @@ herr_t create_short_dataset(hid_t fid, const char *dsidx, int fulldims)
short s2_wbuf[DIM2_SIZE] = {100,200,300,400};
short s21_wbuf[DIM2_SIZE] = {10,20,30,40};
short s22_wbuf[DIM2_SIZE] = {5,10,50,300};
- short s3_wbuf[DIM3_SIZE] = {10,10,10,20,20,20,30,30,30,40,40,40};
- short s31_wbuf[DIM3_SIZE] = {1,1,1,2,2,2,3,3,3,4,4,4};
- short s32_wbuf[DIM3_SIZE] = {5,5,5,10,10,10,50,50,50,100,100,100};
- short s33_wbuf[DIM3_SIZE] = {6,6,6,12,12,12,53,53,53,140,140,140};
- char name[32];
+ short s3_wbuf[DIM3_SIZE] = {10,10,10,20,20,20,30,30,30,40,40,40};
+ short s31_wbuf[DIM3_SIZE] = {1,1,1,2,2,2,3,3,3,4,4,4};
+ short s32_wbuf[DIM3_SIZE] = {5,5,5,10,10,10,50,50,50,100,100,100};
+ short s33_wbuf[DIM3_SIZE] = {6,6,6,12,12,12,53,53,53,140,140,140};
+ char name[64];
- HDstrcpy(name, DATASET_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DATASET_NAME, dsidx);
/* make a dataset */
if(H5LTmake_dataset_short(fid, name, rank, dims, buf) >= 0) {
@@ -360,10 +356,9 @@ herr_t create_int_dataset(hid_t fid, const char *dsidx, int fulldims)
int s2_wbuf[DIM2_SIZE] = {100,200,300,400};
int s21_wbuf[DIM2_SIZE] = {10,20,30,40};
int s22_wbuf[DIM2_SIZE] = {5,10,50,300};
- char name[32];
+ char name[64];
- HDstrcpy(name, DATASET_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DATASET_NAME, dsidx);
/* make a dataset */
if(H5LTmake_dataset_int(fid, name, rank, dims, buf) >= 0) {
@@ -413,12 +408,9 @@ herr_t create_long_dataset(hid_t fid, const char *dsname, const char *dsidx, int
long s42_wbuf[DIM4_SIZE] = {80,80};
long s43_wbuf[DIM4_SIZE] = {180,180};
long s44_wbuf[DIM4_SIZE] = {280,280};
- char name[32];
-
- HDstrcpy(name, dsname);
/* make a dataset */
- if(H5LTmake_dataset_long(fid, name, rank, dims, buf) >= 0) {
+ if(H5LTmake_dataset_long(fid, dsname, rank, dims, buf) >= 0) {
if(fulldims==0) {
/* make a DS dataset for the first dimension */
if(create_DS1_long_datasets(fid, dsidx, rankds, s1_dim, s1_wbuf, NULL) < 0)
@@ -468,10 +460,9 @@ herr_t create_float_dataset(hid_t fid, const char *dsidx, int fulldims)
float s2_wbuf[DIM2_SIZE] = {100,200,300,400};
float s21_wbuf[DIM2_SIZE] = {10,20,30,40};
float s22_wbuf[DIM2_SIZE] = {5,10,50,300};
- char name[32];
+ char name[64];
- HDstrcpy(name, DATASET_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DATASET_NAME, dsidx);
/* make a dataset */
if(H5LTmake_dataset_float(fid, name, rank, dims, buf) >= 0) {
@@ -503,17 +494,17 @@ herr_t create_float_dataset(hid_t fid, const char *dsidx, int fulldims)
*/
herr_t create_DS1_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf)
{
- char name[32];
+ char name[64];
+
+ HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
- HDstrcpy(name, DS_1_NAME);
- HDstrcat(name, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_11_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the first dimension */
if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
@@ -528,25 +519,25 @@ herr_t create_DS1_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
*/
herr_t create_DS2_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf, char *s2_wbuf)
{
- char name[32];
+ char name[64];
+
+ HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
- HDstrcpy(name, DS_2_NAME);
- HDstrcat(name, dsidx);
/* make a DS dataset for the second dimension */
if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_21_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_22_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
@@ -561,33 +552,33 @@ herr_t create_DS2_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
*/
herr_t create_DS3_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, char *s_wbuf, char *s1_wbuf, char *s2_wbuf, char *s3_wbuf)
{
- char name[32];
+ char name[64];
+
+ HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
- HDstrcpy(name, DS_3_NAME);
- HDstrcat(name, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_31_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_32_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
- if(s3_wbuf!=NULL) {
- HDstrcpy(name, DS_33_NAME);
- HDstrcat(name, dsidx);
+ if(s3_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_char(fid, name, rankds, s_dim, s3_wbuf) < 0)
return FAIL;
@@ -602,17 +593,17 @@ herr_t create_DS3_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
*/
herr_t create_DS1_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf, short *s1_wbuf)
{
- char name[32];
+ char name[64];
+
+ HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
- HDstrcpy(name, DS_1_NAME);
- HDstrcat(name, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_11_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the first dimension */
if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
@@ -627,26 +618,25 @@ herr_t create_DS1_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize
*/
herr_t create_DS2_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf, short *s1_wbuf, short *s2_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_2_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
/* make a DS dataset for the second dimension */
if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_21_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_22_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
@@ -661,34 +651,33 @@ herr_t create_DS2_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize
*/
herr_t create_DS3_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, short *s_wbuf, short *s1_wbuf, short *s2_wbuf, short *s3_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_3_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_31_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
+
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_32_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
+
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
- if(s3_wbuf!=NULL) {
- HDstrcpy(name, DS_33_NAME);
- HDstrcat(name, dsidx);
+ if(s3_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
+
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_short(fid, name, rankds, s_dim, s3_wbuf) < 0)
return FAIL;
@@ -703,18 +692,17 @@ herr_t create_DS3_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize
*/
herr_t create_DS1_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_1_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_11_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the first dimension */
if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
@@ -729,26 +717,25 @@ herr_t create_DS1_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t
*/
herr_t create_DS2_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf, int *s2_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_2_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
/* make a DS dataset for the second dimension */
if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_21_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_22_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
@@ -763,34 +750,33 @@ herr_t create_DS2_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t
*/
herr_t create_DS3_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, int *s_wbuf, int *s1_wbuf, int *s2_wbuf, int *s3_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_3_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_31_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the first dimension */
if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_32_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the first dimension */
if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
- if(s3_wbuf!=NULL) {
- HDstrcpy(name, DS_33_NAME);
- HDstrcat(name, dsidx);
+ if(s3_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the first dimension */
if(H5LTmake_dataset_int(fid, name, rankds, s_dim, s3_wbuf) < 0)
return FAIL;
@@ -805,18 +791,17 @@ herr_t create_DS3_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t
*/
herr_t create_DS1_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_1_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_11_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the first dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
@@ -831,26 +816,25 @@ herr_t create_DS1_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
*/
herr_t create_DS2_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf, long *s2_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_2_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
/* make a DS dataset for the second dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_21_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_22_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
@@ -865,34 +849,33 @@ herr_t create_DS2_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
*/
herr_t create_DS3_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf, long *s2_wbuf, long *s3_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_3_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_31_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_32_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
- if(s3_wbuf!=NULL) {
- HDstrcpy(name, DS_33_NAME);
- HDstrcat(name, dsidx);
+ if(s3_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s3_wbuf) < 0)
return FAIL;
@@ -907,42 +890,41 @@ herr_t create_DS3_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
*/
herr_t create_DS4_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, long *s_wbuf, long *s1_wbuf, long *s2_wbuf, long *s3_wbuf, long *s4_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_4_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_4_NAME, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_41_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_41_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_42_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_42_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
- if(s3_wbuf!=NULL) {
- HDstrcpy(name, DS_43_NAME);
- HDstrcat(name, dsidx);
+ if(s3_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_43_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s3_wbuf) < 0)
return FAIL;
}
- if(s4_wbuf!=NULL) {
- HDstrcpy(name, DS_44_NAME);
- HDstrcat(name, dsidx);
+ if(s4_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_44_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_long(fid, name, rankds, s_dim, s4_wbuf) < 0)
return FAIL;
@@ -957,18 +939,17 @@ herr_t create_DS4_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_
*/
herr_t create_DS1_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf, float *s1_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_1_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_11_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the first dimension */
if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
@@ -983,26 +964,25 @@ herr_t create_DS1_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize
*/
herr_t create_DS2_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf, float *s1_wbuf, float *s2_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_2_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
/* make a DS dataset for the second dimension */
if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_21_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_22_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
@@ -1017,34 +997,33 @@ herr_t create_DS2_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize
*/
herr_t create_DS3_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim, float *s_wbuf, float *s1_wbuf, float *s2_wbuf, float *s3_wbuf)
{
- char name[32];
+ char name[64];
- HDstrcpy(name, DS_3_NAME);
- HDstrcat(name, dsidx);
+ HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
/* make a DS dataset for the first dimension */
if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
- if(s1_wbuf!=NULL) {
- HDstrcpy(name, DS_31_NAME);
- HDstrcat(name, dsidx);
+ if(s1_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s1_wbuf) < 0)
return FAIL;
}
- if(s2_wbuf!=NULL) {
- HDstrcpy(name, DS_32_NAME);
- HDstrcat(name, dsidx);
+ if(s2_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s2_wbuf) < 0)
return FAIL;
}
- if(s3_wbuf!=NULL) {
- HDstrcpy(name, DS_33_NAME);
- HDstrcat(name, dsidx);
+ if(s3_wbuf != NULL) {
+ HDsnprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
+
/* make a DS dataset with an alternate scale for the second dimension */
if(H5LTmake_dataset_float(fid, name, rankds, s_dim, s3_wbuf) < 0)
return FAIL;
@@ -1062,7 +1041,6 @@ herr_t test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int id
if(H5DSis_attached(did, dsid, idx) == 0) {
if(H5DSattach_scale(did, dsid, idx) >= 0) {
if(H5DSis_attached(did, dsid, idx) > 0) {
- /* printf(" scale attached "); */
ret_value = SUCCEED;
}
else if(H5DSis_attached(did, dsid, idx) == 0) {
@@ -1127,10 +1105,10 @@ herr_t test_cmp_scalename(hid_t fid, hid_t did, const char *name, const char *sc
if((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
if(H5DSis_attached(did, dsid, idx) == 1) {
if((name_len=H5DSget_scale_name(dsid,NULL,(size_t)0)) > 0) {
- name_out = (char*)HDmalloc((name_len+1) * sizeof (char));
+ name_out = (char*)HDmalloc(((size_t)name_len+1) * sizeof (char));
if(name_out != NULL) {
if(H5DSget_scale_name(dsid, name_out, (size_t)name_len+1) >= 0) {
- if(HDstrcmp(scalename,name_out)==0) {
+ if(HDstrncmp(scalename, name_out, (size_t)name_len)==0) {
ret_value = SUCCEED;
}
HDfree(name_out);
@@ -1294,8 +1272,8 @@ static int test_char_attachscales(const char *fileext)
hid_t did = -1;
char dsname[32];
char scalename[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "ac");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "ac");
TESTING2("test_char_attachscales");
@@ -1307,18 +1285,15 @@ static int test_char_attachscales(const char *fileext)
goto out;
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "ac");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "ac");
if(test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "ac");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "ac");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_3_NAME);
- HDstrcat(scalename, "ac");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "ac");
if(test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
@@ -1350,8 +1325,8 @@ static int test_short_attachscales(const char *fileext)
hid_t did = -1;
char dsname[32];
char scalename[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "as");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "as");
TESTING2("test_short_attachscales");
@@ -1363,48 +1338,39 @@ static int test_short_attachscales(const char *fileext)
goto out;
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "as");
if(test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_11_NAME);
- HDstrcat(scalename, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "as");
if(test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "as");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_21_NAME);
- HDstrcat(scalename, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "as");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_22_NAME);
- HDstrcat(scalename, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "as");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_3_NAME);
- HDstrcat(scalename, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "as");
if(test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
- HDstrcpy(scalename, DS_31_NAME);
- HDstrcat(scalename, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_31_NAME, "as");
if(test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
- HDstrcpy(scalename, DS_32_NAME);
- HDstrcat(scalename, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_32_NAME, "as");
if(test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
- HDstrcpy(scalename, DS_33_NAME);
- HDstrcat(scalename, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_33_NAME, "as");
if(test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
@@ -1436,8 +1402,8 @@ static int test_int_attachscales(const char *fileext)
hid_t did = -1;
char dsname[32];
char scalename[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "a");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "a");
TESTING2("test_int_attachscales");
@@ -1449,28 +1415,23 @@ static int test_int_attachscales(const char *fileext)
goto out;
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "a");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "a");
if(test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_11_NAME);
- HDstrcat(scalename, "a");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "a");
if(test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "a");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "a");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_21_NAME);
- HDstrcat(scalename, "a");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "a");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_22_NAME);
- HDstrcat(scalename, "a");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "a");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
@@ -1502,8 +1463,8 @@ static int test_long_attachscales(const char *fileext)
hid_t did = -1;
char dsname[32];
char scalename[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "al");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "al");
TESTING2("test_long_attachscales");
@@ -1515,23 +1476,19 @@ static int test_long_attachscales(const char *fileext)
goto out;
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "al");
if(test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "al");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_3_NAME);
- HDstrcat(scalename, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "al");
if(test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
- HDstrcpy(scalename, DS_4_NAME);
- HDstrcat(scalename, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_4_NAME, "al");
if(test_attach_scale(fid, did, scalename, DIM3) < 0)
goto out;
@@ -1563,8 +1520,8 @@ static int test_duplicatelong_attachscales(const char *fileext)
hid_t did = -1;
char dsname[32];
char scalename[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "al2");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "al2");
TESTING2("test_duplicatelong_attachscales");
@@ -1576,23 +1533,19 @@ static int test_duplicatelong_attachscales(const char *fileext)
goto out;
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "al");
if(test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "al");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_3_NAME);
- HDstrcat(scalename, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "al");
if(test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
- HDstrcpy(scalename, DS_4_NAME);
- HDstrcat(scalename, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_4_NAME, "al");
if(test_attach_scale(fid, did, scalename, DIM3) < 0)
goto out;
@@ -1624,8 +1577,8 @@ static int test_float_attachscales(const char *fileext)
hid_t did = -1;
char dsname[32];
char scalename[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "af");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "af");
TESTING2("test_float_attachscales");
@@ -1637,28 +1590,23 @@ static int test_float_attachscales(const char *fileext)
goto out;
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "af");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "af");
if(test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_11_NAME);
- HDstrcat(scalename, "af");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "af");
if(test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "af");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "af");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_21_NAME);
- HDstrcat(scalename, "af");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "af");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_22_NAME);
- HDstrcat(scalename, "af");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "af");
if(test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
@@ -1691,8 +1639,8 @@ static int test_numberofscales(const char *fileext)
int nscales; /* number of scales in DIM */
char dsname[32];
char scalename[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "a");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "a");
TESTING2("test_numberofscales");
@@ -1718,8 +1666,7 @@ static int test_numberofscales(const char *fileext)
else
goto out;
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "b");
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "b");
/* make a dataset */
if(create_int_dataset(fid, "b", 1) < 0)
@@ -1727,8 +1674,7 @@ static int test_numberofscales(const char *fileext)
/* make a DS dataset for the first dimension */
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "b");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "b");
if(test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
@@ -1772,38 +1718,32 @@ static int test_char_scalenames(const char *fileext) {
char dsname[32];
char scalename[32];
char name[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "ac");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "ac");
if((fid = open_test_file(fileext)) < 0)
goto out;
TESTING2("set char scale/cmp scale name");
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "ac");
- HDstrcpy(name, SCALE_1_NAME);
- HDstrcat(name, "ac");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "ac");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "ac");
if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "ac");
- HDstrcpy(name, SCALE_2_NAME);
- HDstrcat(name, "ac");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "ac");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "ac");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_3_NAME);
- HDstrcat(scalename, "ac");
- HDstrcpy(name, SCALE_3_NAME);
- HDstrcat(name, "ac");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "ac");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_3_NAME, "ac");
if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
@@ -1838,98 +1778,80 @@ static int test_short_scalenames(const char *fileext) {
char dsname[32];
char scalename[32];
char name[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "as");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "as");
if((fid = open_test_file(fileext)) < 0)
goto out;
TESTING2("set short scale/cmp scale name");
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "as");
- HDstrcpy(name, SCALE_1_NAME);
- HDstrcat(name, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "as");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "as");
if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_11_NAME);
- HDstrcat(scalename, "as");
- HDstrcpy(name, SCALE_11_NAME);
- HDstrcat(name, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "as");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_11_NAME, "as");
if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "as");
- HDstrcpy(name, SCALE_2_NAME);
- HDstrcat(name, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "as");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "as");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_21_NAME);
- HDstrcat(scalename, "as");
- HDstrcpy(name, SCALE_21_NAME);
- HDstrcat(name, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "as");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_21_NAME, "as");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_22_NAME);
- HDstrcat(scalename, "as");
- HDstrcpy(name, SCALE_22_NAME);
- HDstrcat(name, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "as");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_22_NAME, "as");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_3_NAME);
- HDstrcat(scalename, "as");
- HDstrcpy(name, SCALE_3_NAME);
- HDstrcat(name, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "as");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_3_NAME, "as");
if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- HDstrcpy(scalename, DS_31_NAME);
- HDstrcat(scalename, "as");
- HDstrcpy(name, SCALE_31_NAME);
- HDstrcat(name, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_31_NAME, "as");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_31_NAME, "as");
if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- HDstrcpy(scalename, DS_32_NAME);
- HDstrcat(scalename, "as");
- HDstrcpy(name, SCALE_32_NAME);
- HDstrcat(name, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_32_NAME, "as");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_32_NAME, "as");
if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- HDstrcpy(scalename, DS_33_NAME);
- HDstrcat(scalename, "as");
- HDstrcpy(name, SCALE_33_NAME);
- HDstrcat(name, "as");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_33_NAME, "as");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_33_NAME, "as");
if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
@@ -1964,58 +1886,48 @@ static int test_int_scalenames(const char *fileext) {
char dsname[32];
char scalename[32];
char name[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "a");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "a");
if((fid = open_test_file(fileext)) < 0)
goto out;
TESTING2("set int scale/cmp scale name");
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "a");
- HDstrcpy(name, SCALE_1_NAME);
- HDstrcat(name, "a");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "a");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "a");
if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_11_NAME);
- HDstrcat(scalename, "a");
- HDstrcpy(name, SCALE_11_NAME);
- HDstrcat(name, "a");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "a");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_11_NAME, "a");
if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "a");
- HDstrcpy(name, SCALE_2_NAME);
- HDstrcat(name, "a");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "a");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "a");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_21_NAME);
- HDstrcat(scalename, "a");
- HDstrcpy(name, SCALE_21_NAME);
- HDstrcat(name, "a");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "a");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_21_NAME, "a");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_22_NAME);
- HDstrcat(scalename, "a");
- HDstrcpy(name, SCALE_22_NAME);
- HDstrcat(name, "a");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "a");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_22_NAME, "a");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
@@ -2050,48 +1962,40 @@ static int test_long_scalenames(const char *fileext) {
char dsname[32];
char scalename[32];
char name[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "al");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "al");
if((fid = open_test_file(fileext)) < 0)
goto out;
TESTING2("set long scale/cmp scale name");
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "al");
- HDstrcpy(name, SCALE_1_NAME);
- HDstrcat(name, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "al");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "al");
if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "al");
- HDstrcpy(name, SCALE_2_NAME);
- HDstrcat(name, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "al");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "al");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_3_NAME);
- HDstrcat(scalename, "al");
- HDstrcpy(name, SCALE_3_NAME);
- HDstrcat(name, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "al");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_3_NAME, "al");
if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- HDstrcpy(scalename, DS_4_NAME);
- HDstrcat(scalename, "al");
- HDstrcpy(name, SCALE_4_NAME);
- HDstrcat(name, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_4_NAME, "al");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_4_NAME, "al");
if(test_set_scalename(fid, did, scalename, name, DIM3) < 0)
goto out;
@@ -2126,48 +2030,40 @@ static int test_samelong_scalenames(const char *fileext) {
char dsname[32];
char scalename[32];
char name[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "al2");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "al2");
if((fid = open_test_file(fileext)) < 0)
goto out;
TESTING2("set same long scale/cmp scale name");
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "al");
- HDstrcpy(name, DS_1_NAME);
- HDstrcat(name, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "al");
+ HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, "al");
if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "al");
- HDstrcpy(name, DS_2_NAME);
- HDstrcat(name, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "al");
+ HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, "al");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_3_NAME);
- HDstrcat(scalename, "al");
- HDstrcpy(name, DS_3_NAME);
- HDstrcat(name, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "al");
+ HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, "al");
if(test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- HDstrcpy(scalename, DS_4_NAME);
- HDstrcat(scalename, "al");
- HDstrcpy(name, DS_4_NAME);
- HDstrcat(name, "al");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_4_NAME, "al");
+ HDsnprintf(name, sizeof(name), "%s%s", DS_4_NAME, "al");
if(test_set_scalename(fid, did, scalename, name, DIM3) < 0)
goto out;
@@ -2202,58 +2098,48 @@ static int test_float_scalenames(const char *fileext) {
char dsname[32];
char scalename[32];
char name[32];
- HDstrcpy(dsname, DATASET_NAME);
- HDstrcat(dsname, "af");
+
+ HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "af");
if((fid = open_test_file(fileext)) < 0)
goto out;
TESTING2("set float scale/cmp scale name");
if((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDstrcpy(scalename, DS_1_NAME);
- HDstrcat(scalename, "af");
- HDstrcpy(name, SCALE_1_NAME);
- HDstrcat(name, "af");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "af");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "af");
if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_11_NAME);
- HDstrcat(scalename, "af");
- HDstrcpy(name, SCALE_11_NAME);
- HDstrcat(name, "af");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "af");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_11_NAME, "af");
if(test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDstrcpy(scalename, DS_2_NAME);
- HDstrcat(scalename, "af");
- HDstrcpy(name, SCALE_2_NAME);
- HDstrcat(name, "af");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "af");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "af");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_21_NAME);
- HDstrcat(scalename, "af");
- HDstrcpy(name, SCALE_21_NAME);
- HDstrcat(name, "af");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "af");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_21_NAME, "af");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if(test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDstrcpy(scalename, DS_22_NAME);
- HDstrcat(scalename, "af");
- HDstrcpy(name, SCALE_22_NAME);
- HDstrcat(name, "af");
+ HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "af");
+ HDsnprintf(name, sizeof(name), "%s%s", SCALE_22_NAME, "af");
if(test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
@@ -3150,9 +3036,9 @@ static int test_simple(void)
goto out;
if(H5DSget_label(did,DIM1,dim1_label,sizeof(dim1_label)) < 0)
goto out;
- if(HDstrcmp(DIM0_LABEL,dim0_label)!=0)
+ if(HDstrncmp(DIM0_LABEL,dim0_label,sizeof(dim0_label))!=0)
goto out;
- if(HDstrcmp(DIM1_LABEL,dim1_label)!=0)
+ if(HDstrncmp(DIM1_LABEL,dim1_label,sizeof(dim1_label))!=0)
goto out;
/*-------------------------------------------------------------------------
@@ -3166,8 +3052,8 @@ static int test_simple(void)
goto out;
/* allocate */
- dim0_labeld = (char*)HDmalloc(dim0_label_size * sizeof (char));
- dim1_labeld = (char*)HDmalloc(dim1_label_size * sizeof (char));
+ dim0_labeld = (char*)HDmalloc((size_t)dim0_label_size * sizeof (char));
+ dim1_labeld = (char*)HDmalloc((size_t)dim1_label_size * sizeof (char));
if( dim0_labeld==NULL || dim1_labeld==NULL)
goto out;
if(H5DSget_label(did,DIM0,dim0_labeld,(size_t)dim0_label_size) < 0)
@@ -3197,9 +3083,9 @@ static int test_simple(void)
goto out;
if(H5DSget_label(did,DIM1,dim1_labels,sizeof(dim1_labels)) < 0)
goto out;
- if(HDstrncmp(DIM0_LABEL,dim0_label,sizeof(dim0_labels)-1)!=0)
+ if(HDstrncmp(DIM0_LABEL,dim0_labels,sizeof(dim0_labels)-1)!=0)
goto out;
- if(HDstrncmp(DIM1_LABEL,dim1_label,sizeof(dim1_labels)-1)!=0)
+ if(HDstrncmp(DIM1_LABEL,dim1_labels,sizeof(dim1_labels)-1)!=0)
goto out;
if(H5Dclose(did))
goto out;
@@ -3232,7 +3118,7 @@ static int test_simple(void)
goto out;
/* allocate a buffer */
- name_out = (char*)HDmalloc((name_len+1) * sizeof (char));
+ name_out = (char*)HDmalloc(((size_t)name_len+1) * sizeof (char));
if(name_out == NULL)
goto out;
@@ -3240,7 +3126,7 @@ static int test_simple(void)
if(H5DSget_scale_name(dsid, name_out, (size_t)name_len+1) < 0)
goto out;
- if(HDstrcmp("Latitude set 0",name_out)!=0)
+ if(HDstrncmp("Latitude set 0",name_out, sizeof(name_out))!=0)
goto out;
if(name_out) {
HDfree(name_out);
@@ -3253,10 +3139,10 @@ static int test_simple(void)
*/
/* get the scale name using this buffer */
- if(H5DSget_scale_name(dsid, sname, sizeof (sname)) < 0)
+ if(H5DSget_scale_name(dsid, sname, sizeof(sname)) < 0)
goto out;
- if(HDstrcmp("Latitude set 0",sname)!=0)
+ if(HDstrncmp("Latitude set 0", sname, sizeof(sname))!=0)
goto out;
/*-------------------------------------------------------------------------
@@ -3642,7 +3528,7 @@ static herr_t read_scale(hid_t dset, unsigned dim, hid_t scale_id, void *visitor
goto out;
if(nelmts) {
- buf=(char *)HDmalloc((size_t)(nelmts*size));
+ buf=(char *)HDmalloc(((size_t)nelmts*size));
if(buf==NULL)
goto out;
if(H5Dread(scale_id,mtid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf) < 0)
@@ -4529,9 +4415,9 @@ static int test_rank(void)
goto out;
if(H5DSget_label(did,(unsigned)i,namel,sizeof(namel)) < 0)
goto out;
- if(HDstrcmp(name,names)!=0)
+ if(HDstrncmp(name, names, sizeof(names))!=0)
goto out;
- if(HDstrcmp(name,namel)!=0)
+ if(HDstrncmp(name, namel, sizeof(namel))!=0)
goto out;
}
@@ -4986,8 +4872,8 @@ static int read_data( const char* fname,
for(i=0, nelms=1; i < ndims; i++) {
fscanf( f, "%s %u", str, &j);
fscanf( f, "%d",&n );
- dims[i] = n;
- nelms *= n;
+ dims[i] = (hsize_t)n;
+ nelms *= (size_t)n;
}
*buf = (float*) HDmalloc (nelms * sizeof( float ));
diff --git a/release_docs/INSTALL_parallel b/release_docs/INSTALL_parallel
index eacaf68..03b3ecf 100644
--- a/release_docs/INSTALL_parallel
+++ b/release_docs/INSTALL_parallel
@@ -186,6 +186,73 @@ TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5
echo SKIP TOOLTEST tgroup-1.ls 1 -w80 -r -g tgroup.h5
======== end of bypass ========
+2.5. Hopper (Cray XE6) (for v1.8 and later)
+-------------------------
+
+2.5.1 Building HDF5 for Hopper
+------------------------------------------
+The following steps are for building HDF5 for the Hopper compute
+nodes. They would probably work for other Cray XE6 systems but have
+not been verified.
+
+Obtain a copy from the HDF ftp server:
+http://www.hdfgroup.org/ftp/HDF5/current/src/
+(link might change, so always double check the HDF group website).
+
+$ wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-x.x.x.tar.gz
+
+unpack the tarball
+
+$ cd hdf5-x.x.x/
+$ CC=cc FC=ftn ./configure \
+--prefix=/project/hdf5/hdf5 --enable-parallel --enable-fortran \
+--disable-shared --disable-production
+$ make
+
+Run make check. make check should be run on the compute nodes, not the
+front end nodes. So using a PBS batch script, allocate 4 or more
+cores. Always consult with the machine's website on how to create PBS
+scripts and allocate nodes for your job. For Hopper, all the
+information can be found on:
+http://www.nersc.gov/systems/hopper-cray-xe6/
+
+save the PBS script into your HDF5 build directory. The PBS script
+should contain (besides the PBS node allocation requests)the
+following:
+
+--------------------------------------------------------------
+cd $PBS_O_WORKDIR
+
+##set RUNSERIAL and RUNPARALLEL like this in the PBS script:
+export RUNPARALLEL="aprun -n 6"
+export RUNSERIAL="aprun -n 1"
+
+##execute make check:
+make check
+--------------------------------------------------------------
+
+Once the job runs and all is well, install the binary:
+$ make install
+
+2.5.2 Hopper known issues
+------------------------------
+Sometimes when building the library with make, you might get this problem:
+
+LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo | \
+sed -e 's/-L/:/g' -e 's/
+//g'`" \
+./H5make_libsettings > H5lib_settings.c
+|| \
+(test $HDF5_Make_Ignore && echo "*** Error ignored")
+|| \
+(rm -f H5lib_settings.c ; exit 1)
+/bin/sh: line 4: 9644 Segmentation fault
+LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo | sed -e 's/-L/:/g' -e 's/
+//g'`" ./H5make_libsettings > H5lib_settings.c
+
+If that happens, you are probable running with make -j <x>. In that
+case, you need to cleanup everything and start again as detailed above
+but use serial make (do not use -j <x>).
3. Detail explanation
---------------------
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index d2901ab..08420d0 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -1,4 +1,4 @@
-HDF5 version 1.9.148-FA_a5 currently under development
+HDF5 version 1.9.149-FA_a5 currently under development
INTRODUCTION
@@ -105,6 +105,9 @@ New Features
Library:
--------
+ - The library can load filter libraries dynamically during runtime. Users
+ can set the search path through environment variable HDF5_PLUGIN_PATH
+ and call H5Pset_filter to enable a dynamic filter. (SLU - 2013/04/08)
- Added new API functions H5Dscatter and H5Dgather to scatter data to and
and gather data from a selection within a memory buffer.
(NAF - 2013/02/05)
@@ -275,6 +278,10 @@ New Features
Tools:
------
+ - h5dump: Fixed displaying comporession ratio for unknown or user-defined
+ filters. HDFFV-8344 (XCAO 2013/03/19)
+ - h5dump: Changed UNKNOWN_FILTER to USER_DEFINED_FILTER for user defined filter.
+ HDFFV-8346 (XCAO 2013/03/19)
- h5dump: Added capability for "-a" option to show attributes containing "/"
by using an escape character. For example, for a dataset "/dset"
containing attribute "speed(m/h)", use "h5dump -a "/dset/speed(\/h)"
@@ -402,6 +409,8 @@ Support for new platforms, languages and compilers.
- Intel V11.1 uses now -O3 optimization in production mode (EIP - 2010/10/08)
- PathScale compilers are recognized and can build the HDF5 library
properly. AKC - 2009/7/28 -
+ - SunOS 5.11 (emu) 32-bit and 64-bit with Sun C/C++ 5.12 compiler and
+ Sun Fortran 95 8.6 compiler. (SLU - 2013/04/15)
Bug Fixes since HDF5-1.8.0 release
==================================
@@ -750,6 +759,8 @@ Bug Fixes since HDF5-1.8.0 release
Tools
-----
+ - h5repack: Fixed failure for converting a layout of small chunked dataset
+ (size < 1K) to contiguous layout. HDFFV-8214 (JKM 2013/03/18)
- h5diff: Fixed to return correct exit code 1 when detect unique extra
attribute. Prior to this fix, h5diff returned exit code 0 indicating
two files are identical. HDFFV-7643 (JKM 2013/02/15)
@@ -1119,10 +1130,11 @@ Supported Platforms
MPICH mpich2-1.4.1p1 compiled with
gcc 4.1.2 and gfortran 4.1.2
- Linux 2.6.32-220.7.1.el6.ppc64 gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
- #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
- (ostrich) GNU Fortran (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
-
+ Linux 2.6.32-358.2.1.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
+ #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
+ (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
+ IBM XL C/C++ V11.1
+ IBM XL Fortran V13.1
Linux 2.6.32-220.23.1.1chaos Intel C, C++, Fortran Compilers
ch5.x86_64 GNU/Linux Version 12.1.5.339
(LLNL Aztec)
@@ -1131,12 +1143,9 @@ Supported Platforms
(LLNL uDawn) XL C++ for Blue Gene/P, bgxlC V9.0
XL Fortran for Blue Gene/P, bgxlf90 V11.1
- SunOS 5.10 32- and 64-bit Sun C 5.9 Sun OS_sparc Patch 124867-16
- (linew) Sun Fortran 95 8.3 Sun OS_sparc Patch 127000-13
- Sun C++ 5.9 Sun OS_sparc Patch 124863-26
- Sun C 5.11 SunOS_sparc
- Sun Fortran 95 8.5 SunOS_sparc
- Sun C++ 5.11 SunOS_sparc
+ SunOS 5.11 32- and 64-bit Sun C 5.12 SunOS_sparc
+ (emu) Sun Fortran 95 8.6 SunOS_sparc
+ Sun C++ 5.12 SunOS_sparc
Windows XP Visual Studio 2008 w/ Intel Fortran 10.1 (project files)
@@ -1154,15 +1163,9 @@ Supported Platforms
Mac OS X Snow Leopard 10.6.8 gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 3.2.6
Darwin Kernel Version 10.8.0 g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 3.2.6
- (fred) gfortran GNU Fortran (GCC) 4.6.2
- Intel C (icc), Fortran (ifort), C++ (icpc)
- 12.1.0.038 Build 20110811
-
- Mac OS X Snow Leopard 10.6.8 gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 3.2.6
- Darwin Kernel Version 10.8.0 g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 3.2.6
- Intel 32-bit gfortran GNU Fortran (GCC) 4.6.1
- (tejeda) Intel C (icc), Fortran (ifort), C++ (icpc)
- 12.1.0.038 Build 20110811
+ 64-bit gfortran GNU Fortran (GCC) 4.6.2
+ (fred) Intel C (icc), Fortran (ifort), C++ (icpc)
+ 12.1 Build 20120928
Mac OS X Lion 10.7.3 gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 4.2.1
32- and 64-bit g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 4.2.1
@@ -1190,11 +1193,10 @@ Tested Configuration Features Summary
Platform C F90/ F90 C++ zlib SZIP
parallel F2003 parallel
-Solaris2.10 32-bit n y/y n y y y
-Solaris2.10 64-bit n y/n n y y y
+Solaris2.11 32-bit n y/y n y y y
+Solaris2.11 64-bit n y/n n y y y
Windows 7 y y/n n y y y
Windows 7 x64 y y/n n y y y
-Mac OS X Snow Leopard 10.6.8 32-bit n y/y n y y n
Mac OS X Snow Leopard 10.6.8 64-bit n y/y n y y y
Mac OS X Lion 10.7.3 32-bit n y/y n y y n
Mac OS X Lion 10.7.3 64-bit n y/y n y y y
@@ -1206,16 +1208,15 @@ CentOS 5.5 Linux 2.6.18-308 i686 PGI n y/y n y y y
CentOS 5.5 Linux 2.6.18 x86_64 GNU y y/y y y y y
CentOS 5.5 Linux 2.6.18 x86_64 Intel n y/y n y y y
CentOS 5.5 Linux 2.6.18 x86_64 PGI n y/y n y y y
-Linux 2.6.32-220.7.1.el6.ppc64 n y/n n y y y
+Linux 2.6.32-358.2.1.el6.ppc64 n y/n n y y y
Platform Shared Shared Shared Thread-
C libs F90 libs C++ libs safe
-Solaris2.10 32-bit y y y y
-Solaris2.10 64-bit n n n n
+Solaris2.11 32-bit y y y y
+Solaris2.11 64-bit y y y y
Windows 7 y y y y
Windows 7 x64 y y y y
-Mac OS X Snow Leopard 10.6.8 32-bit y n y n
Mac OS X Snow Leopard 10.6.8 64-bit y n y n
Mac OS X Lion 10.7.3 32-bit y n y y
Mac OS X Lion 10.7.3 64-bit y n y y
@@ -1227,7 +1228,7 @@ CentOS 5.5 Linux 2.6.18-308 i686 PGI y y y n
CentOS 5.5 Linux 2.6.18 x86_64 GNU y y y y
CentOS 5.5 Linux 2.6.18 x86_64 Intel y y y n
CentOS 5.5 Linux 2.6.18 x86_64 PGI y y y n
-Linux 2.6.32-220.7.1.el6.ppc64 y y y n
+Linux 2.6.32-358.2.1.el6.ppc64 y y y n
Compiler versions for each platform are listed in the preceding
"Supported Platforms" table.
@@ -1296,6 +1297,14 @@ The following platforms are not supported but have been tested for this release.
Known Problems
==============
+* The h5dump and h5diff utilities occasionally produce different output
+ between Linux and Windows systems. This is caused by lower-level library
+ routines that fail to write fill values to the user's buffer when reading
+ unallocated chunks from datasets that have a fill value set to
+ H5D_FILL_VALUE_DEFAULT. Due to platform differences the return of
+ spurious data values have only been encountered on Windows 32-bit systems.
+ (Issue HDFFV-8247; JP - 2013/03/27)
+
* The 5.9 C++ compiler on Sun failed to compile a C++ test ttypes.cpp. It
complains with this message:
"/home/hdf5/src/H5Vprivate.h", line 130: Error: __func__ is not defined.
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 31b7f3d..828d2f0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -490,6 +490,15 @@ SET (H5P_HDRS
)
IDE_GENERATED_PROPERTIES ("H5P" "${H5P_HDRS}" "${H5P_SRCS}" )
+SET (H5PL_SRCS
+ ${HDF5_SRC_DIR}/H5PL.c
+)
+
+SET (H5PL_HDRS
+ ${HDF5_SRC_DIR}/H5PLextern.h
+)
+IDE_GENERATED_PROPERTIES ("H5PL" "${H5PL_HDRS}" "${H5PL_SRCS}" )
+
SET (H5R_SRCS
${HDF5_SRC_DIR}/H5R.c
@@ -675,6 +684,7 @@ SET (common_SRCS
${H5MP_SRCS}
${H5O_SRCS}
${H5P_SRCS}
+ ${H5PL_SRCS}
${H5R_SRCS}
${H5RC_SRCS}
${H5RS_SRCS}
@@ -714,6 +724,7 @@ SET (H5_PUBLIC_HEADERS
${H5MP_HDRS}
${H5O_HDRS}
${H5P_HDRS}
+ ${H5PL_HDRS}
${H5R_HDRS}
${H5S_HDRS}
${H5SM_HDRS}
@@ -752,6 +763,7 @@ SET (H5_PRIVATE_HEADERS
${HDF5_SRC_DIR}/H5MPprivate.h
${HDF5_SRC_DIR}/H5Oprivate.h
${HDF5_SRC_DIR}/H5Pprivate.h
+ ${HDF5_SRC_DIR}/H5PLprivate.h
${HDF5_SRC_DIR}/H5RCprivate.h
${HDF5_SRC_DIR}/H5Rprivate.h
${HDF5_SRC_DIR}/H5RSprivate.h
@@ -838,6 +850,9 @@ SET_SOURCE_FILES_PROPERTIES (${HDF5_BINARY_DIR}/H5overflow.h GENERATED)
ADD_LIBRARY (${HDF5_LIB_TARGET} ${LIB_TYPE} ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS})
TARGET_LINK_LIBRARIES (${HDF5_LIB_TARGET} ${LINK_LIBS})
+IF (NOT WIN32)
+ TARGET_LINK_LIBRARIES (${HDF5_LIB_TARGET} dl)
+ENDIF (NOT WIN32)
SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} ${LIB_TYPE})
SET_TARGET_PROPERTIES (${HDF5_LIB_TARGET} PROPERTIES FOLDER libraries)
diff --git a/src/H5.c b/src/H5.c
index 14ec7ca..25525a4 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -271,6 +271,7 @@ H5_term_library(void)
pending += DOWN(Z);
pending += DOWN(FD);
pending += DOWN(P);
+ pending += DOWN(PL);
/* Don't shut down the error code until other APIs which use it are shut down */
if(pending == 0)
pending += DOWN(E);
diff --git a/src/H5AC.c b/src/H5AC.c
index 18289e7..c075069 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -263,6 +263,7 @@ H5AC_init_interface(void)
H5P_genclass_t *xfer_pclass; /* Dataset transfer property list class object */
H5P_genplist_t *xfer_plist; /* Dataset transfer property list object */
unsigned block_before_meta_write; /* "block before meta write" property value */
+ unsigned coll_meta_write; /* "collective metadata write" property value */
unsigned library_internal=1; /* "library internal" property value */
H5FD_mpio_xfer_t xfer_mode; /* I/O transfer mode property value */
herr_t ret_value=SUCCEED; /* Return value */
@@ -276,6 +277,7 @@ H5AC_init_interface(void)
if (NULL == (xfer_pclass = H5I_object(H5P_CLS_DATASET_XFER_g)))
HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get property list class")
+
/* Get an ID for the blocking, collective H5AC dxpl */
if ((H5AC_dxpl_id=H5P_create_id(xfer_pclass,FALSE)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "unable to register property list")
@@ -295,10 +297,12 @@ H5AC_init_interface(void)
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
- /* Set the transfer mode */
- xfer_mode=H5FD_MPIO_COLLECTIVE;
- if (H5P_set(xfer_plist,H5D_XFER_IO_XFER_MODE_NAME,&xfer_mode)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value")
+ /* Insert 'collective metadata write' property */
+ coll_meta_write = 1;
+ if(H5P_insert(xfer_plist, H5AC_COLLECTIVE_META_WRITE_NAME, H5AC_COLLECTIVE_META_WRITE_SIZE, &coll_meta_write,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
+
/* Get an ID for the non-blocking, collective H5AC dxpl */
if ((H5AC_noblock_dxpl_id=H5P_create_id(xfer_pclass,FALSE)) < 0)
@@ -319,10 +323,12 @@ H5AC_init_interface(void)
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
- /* Set the transfer mode */
- xfer_mode=H5FD_MPIO_COLLECTIVE;
- if (H5P_set(xfer_plist,H5D_XFER_IO_XFER_MODE_NAME,&xfer_mode)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value")
+ /* Insert 'collective metadata write' property */
+ coll_meta_write = 1;
+ if(H5P_insert(xfer_plist, H5AC_COLLECTIVE_META_WRITE_NAME, H5AC_COLLECTIVE_META_WRITE_SIZE, &coll_meta_write,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
+
/* Get an ID for the non-blocking, independent H5AC dxpl */
if ((H5AC_ind_dxpl_id=H5P_create_id(xfer_pclass,FALSE)) < 0)
@@ -343,10 +349,11 @@ H5AC_init_interface(void)
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
- /* Set the transfer mode */
- xfer_mode=H5FD_MPIO_INDEPENDENT;
- if (H5P_set(xfer_plist,H5D_XFER_IO_XFER_MODE_NAME,&xfer_mode)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value")
+ /* Insert 'collective metadata write' property */
+ coll_meta_write = 0;
+ if(H5P_insert(xfer_plist, H5AC_COLLECTIVE_META_WRITE_NAME, H5AC_COLLECTIVE_META_WRITE_SIZE, &coll_meta_write,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -3014,7 +3021,7 @@ done:
*-------------------------------------------------------------------------
*/
#ifdef H5_HAVE_PARALLEL
-herr_t
+static herr_t
H5AC_construct_candidate_list(H5AC_t * cache_ptr,
H5AC_aux_t * aux_ptr,
int sync_point_op)
@@ -3228,7 +3235,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
H5AC_ext_config_2_int_config(H5AC_cache_config_t * ext_conf_ptr,
H5C_auto_size_ctl_t * int_conf_ptr)
{
@@ -4173,7 +4180,7 @@ done:
*-------------------------------------------------------------------------
*/
#ifdef H5_HAVE_PARALLEL
-herr_t
+static herr_t
H5AC_propagate_flushed_and_still_clean_entries_list(H5F_t * f,
hid_t dxpl_id,
H5AC_t * cache_ptr)
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index 16a28f9..2f26094 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -208,6 +208,11 @@ typedef H5C_t H5AC_t;
#define H5AC_BLOCK_BEFORE_META_WRITE_SIZE sizeof(unsigned)
#define H5AC_BLOCK_BEFORE_META_WRITE_DEF 0
+/* Definitions for "collective metadata write" property */
+#define H5AC_COLLECTIVE_META_WRITE_NAME "H5AC_collective_metadata_write"
+#define H5AC_COLLECTIVE_META_WRITE_SIZE sizeof(unsigned)
+#define H5AC_COLLECTIVE_META_WRITE_DEF 0
+
/* Definitions for "library internal" property */
#define H5AC_LIBRARY_INTERNAL_NAME "H5AC_library_internal"
#define H5AC_LIBRARY_INTERNAL_SIZE sizeof(unsigned)
diff --git a/src/H5C.c b/src/H5C.c
index 4d7788f..a653a17 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -75,6 +75,9 @@
#include "H5private.h" /* Generic Functions */
+#ifdef H5_HAVE_PARALLEL
+#include "H5ACprivate.h" /* Metadata cache */
+#endif /* H5_HAVE_PARALLEL */
#include "H5Cpkg.h" /* Cache */
#include "H5Dprivate.h" /* Dataset functions */
#include "H5Eprivate.h" /* Error handling */
@@ -8124,37 +8127,27 @@ H5C_flush_single_entry(H5F_t * f,
#ifdef H5_HAVE_PARALLEL
#ifndef NDEBUG
-
/* If MPI based VFD is used, do special parallel I/O sanity checks.
* Note that we only do these sanity checks when the clear_only flag
* is not set, and the entry to be flushed is dirty. Don't bother
* otherwise as no file I/O can result.
*/
- if ( ( ! clear_only ) &&
- ( entry_ptr->is_dirty ) &&
- (H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI) ) ) {
-
- H5P_genplist_t *dxpl; /* Dataset transfer property list */
- H5FD_mpio_xfer_t xfer_mode; /* I/O xfer mode property value */
+ if(!clear_only && entry_ptr->is_dirty &&
+ H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) {
+ H5P_genplist_t *dxpl; /* Dataset transfer property list */
+ unsigned coll_meta; /* Collective metadata write flag */
/* Get the dataset transfer property list */
- if ( NULL == (dxpl = H5I_object(primary_dxpl_id)) ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, \
- "not a dataset transfer property list")
- }
+ if(NULL == (dxpl = H5I_object(primary_dxpl_id)))
+ HGOTO_ERROR(H5E_CACHE, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
- /* Get the transfer mode property */
- if( H5P_get(dxpl, H5D_XFER_IO_XFER_MODE_NAME, &xfer_mode) < 0 ) {
-
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, \
- "can't retrieve xfer mode")
- }
-
- /* Sanity check transfer mode */
- HDassert( xfer_mode == H5FD_MPIO_COLLECTIVE );
- }
+ /* Get the collective metadata write property */
+ if(H5P_get(dxpl, H5AC_COLLECTIVE_META_WRITE_NAME, &coll_meta) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't retrieve xfer mode")
+ /* Sanity check collective metadata write flag */
+ HDassert(coll_meta);
+ } /* end if */
#endif /* NDEBUG */
#endif /* H5_HAVE_PARALLEL */
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index fb4f35f..0678eba 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -2237,7 +2237,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
H5D__chunk_cinfo_cache_reset(H5D_chunk_cached_t *last)
{
FUNC_ENTER_PACKAGE_NOERR
diff --git a/src/H5Edefin.h b/src/H5Edefin.h
index 2ae79e5..183f72c 100644
--- a/src/H5Edefin.h
+++ b/src/H5Edefin.h
@@ -25,6 +25,7 @@ hid_t H5E_FUNC_g = FAIL; /* Function entry/exit */
hid_t H5E_FILE_g = FAIL; /* File accessibilty */
hid_t H5E_SOHM_g = FAIL; /* Shared Object Header Messages */
hid_t H5E_SYM_g = FAIL; /* Symbol table */
+hid_t H5E_PLUGIN_g = FAIL; /* Plugin for dynamically loaded library */
hid_t H5E_VFL_g = FAIL; /* Virtual File Layer */
hid_t H5E_INTERNAL_g = FAIL; /* Internal error (too specific to document in detail) */
hid_t H5E_BTREE_g = FAIL; /* B-Tree node */
@@ -131,6 +132,9 @@ hid_t H5E_PATH_g = FAIL; /* Problem with path to object */
/* No error */
hid_t H5E_NONE_MINOR_g = FAIL; /* No error */
+/* Plugin errors */
+hid_t H5E_OPENERROR_g = FAIL; /* Can't open directory or file */
+
/* File accessibilty errors */
hid_t H5E_FILEEXISTS_g = FAIL; /* File already exists */
hid_t H5E_FILEOPEN_g = FAIL; /* File already open */
diff --git a/src/H5Einit.h b/src/H5Einit.h
index a2eb02f..9724748 100644
--- a/src/H5Einit.h
+++ b/src/H5Einit.h
@@ -44,6 +44,11 @@ if((msg = H5E_create_msg(cls, H5E_MAJOR, "Symbol table"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_SYM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_PLUGIN_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Plugin for dynamically loaded library"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_PLUGIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
assert(H5E_VFL_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Virtual File Layer"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
@@ -477,6 +482,13 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "No error"))==NULL)
if((H5E_NONE_MINOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+/* Plugin errors */
+assert(H5E_OPENERROR_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open directory or file"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_OPENERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+
/* File accessibilty errors */
assert(H5E_FILEEXISTS_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "File already exists"))==NULL)
diff --git a/src/H5Epubgen.h b/src/H5Epubgen.h
index ddfb1d3..e79106f 100644
--- a/src/H5Epubgen.h
+++ b/src/H5Epubgen.h
@@ -28,6 +28,7 @@
#define H5E_FILE (H5OPEN H5E_FILE_g)
#define H5E_SOHM (H5OPEN H5E_SOHM_g)
#define H5E_SYM (H5OPEN H5E_SYM_g)
+#define H5E_PLUGIN (H5OPEN H5E_PLUGIN_g)
#define H5E_VFL (H5OPEN H5E_VFL_g)
#define H5E_INTERNAL (H5OPEN H5E_INTERNAL_g)
#define H5E_BTREE (H5OPEN H5E_BTREE_g)
@@ -60,6 +61,7 @@ H5_DLLVAR hid_t H5E_FUNC_g; /* Function entry/exit */
H5_DLLVAR hid_t H5E_FILE_g; /* File accessibilty */
H5_DLLVAR hid_t H5E_SOHM_g; /* Shared Object Header Messages */
H5_DLLVAR hid_t H5E_SYM_g; /* Symbol table */
+H5_DLLVAR hid_t H5E_PLUGIN_g; /* Plugin for dynamically loaded library */
H5_DLLVAR hid_t H5E_VFL_g; /* Virtual File Layer */
H5_DLLVAR hid_t H5E_INTERNAL_g; /* Internal error (too specific to document in detail) */
H5_DLLVAR hid_t H5E_BTREE_g; /* B-Tree node */
@@ -221,6 +223,10 @@ H5_DLLVAR hid_t H5E_PATH_g; /* Problem with path to object */
#define H5E_NONE_MINOR (H5OPEN H5E_NONE_MINOR_g)
H5_DLLVAR hid_t H5E_NONE_MINOR_g; /* No error */
+/* Plugin errors */
+#define H5E_OPENERROR (H5OPEN H5E_OPENERROR_g)
+H5_DLLVAR hid_t H5E_OPENERROR_g; /* Can't open directory or file */
+
/* File accessibilty errors */
#define H5E_FILEEXISTS (H5OPEN H5E_FILEEXISTS_g)
#define H5E_FILEOPEN (H5OPEN H5E_FILEOPEN_g)
diff --git a/src/H5Eterm.h b/src/H5Eterm.h
index 6c621bc..5db503c 100644
--- a/src/H5Eterm.h
+++ b/src/H5Eterm.h
@@ -26,6 +26,7 @@ H5E_FUNC_g=
H5E_FILE_g=
H5E_SOHM_g=
H5E_SYM_g=
+H5E_PLUGIN_g=
H5E_VFL_g=
H5E_INTERNAL_g=
H5E_BTREE_g=
@@ -133,6 +134,9 @@ H5E_PATH_g=
/* No error */
H5E_NONE_MINOR_g=
+/* Plugin errors */
+H5E_OPENERROR_g=
+
/* File accessibilty errors */
H5E_FILEEXISTS_g=
H5E_FILEOPEN_g=
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index 5bdfbbe..a3ce7f8 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -73,10 +73,6 @@
#define END_MEMBERS }}
-
-#define H5FD_MULTI_DXPL_PROP_NAME "H5FD_MULTI_DXPL"
-#define H5FD_MULTI_DXPL_PROP_SIZE sizeof(H5FD_multi_dxpl_t)
-
#define H5FD_MULT_MAX_FILE_NAME_LEN 1024
/* The driver identification number, initialized at runtime */
@@ -726,150 +722,6 @@ H5FD_multi_dxpl_cls_cb(const char *name, size_t size, void *_dx)
return 0;
} /* end H5FD_multi_dxpl_cls_cb() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5Pset_dxpl_multi
- *
- * Purpose: Set the data transfer property list DXPL_ID to use the multi
- * driver with the specified data transfer properties for each
- * memory usage type MEMB_DXPL[] (after the usage map is
- * applied).
- *
- * Return: Success: 0
- *
- * Failure: -1
- *
- * Programmer: Robb Matzke
- * Tuesday, August 10, 1999
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pset_dxpl_multi(hid_t dxpl_id, const hid_t *memb_dxpl)
-{
- H5FD_multi_dxpl_t dx;
- H5FD_mem_t mt;
- htri_t prop_exists; /* Whether the multi VFD DXPL property already exists */
- static const char *func = "H5FDset_dxpl_multi"; /* Function Name for error reporting */
-
- /*NO TRACE*/
-
- /* Clear the error stack */
- H5Eclear2(H5E_DEFAULT);
-
- /* Check arguments */
- if(TRUE != H5Pisa_class(dxpl_id, H5P_DATASET_XFER))
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not a data transfer property list", -1)
- if(!memb_dxpl)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "invalid pointer", -1)
- for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
- if(memb_dxpl[mt] != H5P_DEFAULT && TRUE != H5Pisa_class(memb_dxpl[mt], H5P_DATASET_XFER))
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not a data transfer property list", -1)
- } /* end for */
-
- /* Check for existence of multi VFD DXPL property in DXPL */
- if((prop_exists = H5Pexist(dxpl_id, H5FD_MULTI_DXPL_PROP_NAME)) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't check for multi VFD property", -1)
-
- /* Copy the DXPLs to internal property, converting "generic" default
- * property lists into default dataset transfer property lists */
- for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
- if(memb_dxpl[mt] == H5P_DEFAULT)
- dx.memb_dxpl[mt] = H5P_DATASET_XFER_DEFAULT;
- else {
- if((dx.memb_dxpl[mt] = H5Pcopy(memb_dxpl[mt])) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTCOPY, "can't copy dataset transfer property list", -1)
- } /* end else */
- } /* end for */
-
- /* Clear previous property, if it exists */
- if(prop_exists) {
- H5FD_multi_dxpl_t old_dx;
-
- /* Get the old DXPL value */
- if(H5Pget(dxpl_id, H5FD_MULTI_DXPL_PROP_NAME, &old_dx) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't get previous property value", -1)
-
- ALL_MEMBERS(mt) {
- if(old_dx.memb_dxpl[mt] >= 0)
- if(H5Pclose(old_dx.memb_dxpl[mt]) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTCLOSEOBJ, "can't close property list", -1)
- } END_MEMBERS;
-
- /* Set the new value */
- if(H5Pset(dxpl_id, H5FD_MULTI_DXPL_PROP_NAME, &dx) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't get previous property value", -1)
- } /* end if */
- else {
- /* Insert multi VFD DXPL property into property list */
- if(H5Pinsert2(dxpl_id, H5FD_MULTI_DXPL_PROP_NAME, H5FD_MULTI_DXPL_PROP_SIZE, &dx, NULL, NULL, NULL, H5FD_multi_dxpl_copy_cb, H5FD_multi_dxpl_cmp_cb, H5FD_multi_dxpl_cls_cb) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTINSERT, "can't insert multi VFD DXPL property", -1)
- } /* end else */
-
- return 0;
-} /* end H5Pset_dxpl_multi() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5Pget_dxpl_multi
- *
- * Purpose: Returns information which was set with H5Pset_dxpl_multi()
- * above.
- *
- * Return: Success: 0
- *
- * Failure: -1
- *
- * Programmer: Robb Matzke
- * Tuesday, August 10, 1999
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pget_dxpl_multi(hid_t dxpl_id, hid_t *memb_dxpl/*out*/)
-{
- H5FD_multi_dxpl_t dx;
- H5FD_mem_t mt;
- htri_t prop_exists; /* Whether the multi VFD DXPL property already exists */
- static const char *func = "H5FDget_dxpl_multi"; /* Function Name for error reporting */
-
- /*NO TRACE*/
-
- /* Clear the error stack */
- H5Eclear2(H5E_DEFAULT);
-
- /* Argument checking */
- if(TRUE != H5Pisa_class(dxpl_id, H5P_DATASET_XFER))
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not a file access property list", -1)
-
- if(memb_dxpl) {
- /* Check for existence of multi VFD DXPL property in DXPL */
- if((prop_exists = H5Pexist(dxpl_id, H5FD_MULTI_DXPL_PROP_NAME)) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't check for multi VFD property", -1)
- if(!prop_exists)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "multi VFD DXPL property not set", -1)
-
- /* Get the DXPL value */
- if(H5Pget(dxpl_id, H5FD_MULTI_DXPL_PROP_NAME, &dx) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't get property value", -1)
-
- /* Deep copy the multi VFD DXPL value */
- for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
- if(dx.memb_dxpl[mt] >= 0)
- memb_dxpl[mt] = H5Pcopy(dx.memb_dxpl[mt]);
- else
- memb_dxpl[mt] = dx.memb_dxpl[mt]; /*default or bad ID */
- } /* end for */
- } /* end if */
-
- return 0;
-} /* end H5Pget_dxpl_multi() */
-
/*-------------------------------------------------------------------------
* Function: H5FD_multi_sb_size
@@ -1936,18 +1788,6 @@ H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
- /* Get the data transfer properties */
- if(H5P_FILE_ACCESS_DEFAULT != dxpl_id) {
- /* Check for existence of multi VFD DXPL property in DXPL */
- if((prop_exists = H5Pexist(dxpl_id, H5FD_MULTI_DXPL_PROP_NAME)) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't check for multi VFD property", -1)
-
- /* Get the DXPL value, if it exists */
- if(prop_exists)
- if(H5Pget(dxpl_id, H5FD_MULTI_DXPL_PROP_NAME, &dx) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't get property value", -1)
- } /* end if */
-
/* Find the file to which this address belongs */
for(mt = H5FD_MEM_SUPER; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
mmt = file->fa.memb_map[mt];
@@ -2000,18 +1840,6 @@ H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
- /* Get the data transfer properties */
- if(H5P_FILE_ACCESS_DEFAULT != dxpl_id) {
- /* Check for existence of multi VFD DXPL property in DXPL */
- if((prop_exists = H5Pexist(dxpl_id, H5FD_MULTI_DXPL_PROP_NAME)) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't check for multi VFD property", -1)
-
- /* Get the DXPL value, if it exists */
- if(prop_exists)
- if(H5Pget(dxpl_id, H5FD_MULTI_DXPL_PROP_NAME, &dx) < 0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't get property value", -1)
- } /* end if */
-
/* Find the file to which this address belongs */
for(mt = H5FD_MEM_SUPER; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
mmt = file->fa.memb_map[mt];
diff --git a/src/H5FDmulti.h b/src/H5FDmulti.h
index da16b0c..e819e74 100644
--- a/src/H5FDmulti.h
+++ b/src/H5FDmulti.h
@@ -34,9 +34,6 @@ H5_DLL herr_t H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map,
H5_DLL herr_t H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/,
hid_t *memb_fapl/*out*/, char **memb_name/*out*/,
haddr_t *memb_addr/*out*/, hbool_t *relax/*out*/);
-H5_DLL herr_t H5Pset_dxpl_multi(hid_t dxpl_id, const hid_t *memb_dxpl);
-H5_DLL herr_t H5Pget_dxpl_multi(hid_t dxpl_id, hid_t *memb_dxpl/*out*/);
-
H5_DLL herr_t H5Pset_fapl_split(hid_t fapl, const char *meta_ext,
hid_t meta_plist_id, const char *raw_ext,
hid_t raw_plist_id);
diff --git a/src/H5HFsection.c b/src/H5HFsection.c
index 7f5f233..7f8efbd 100644
--- a/src/H5HFsection.c
+++ b/src/H5HFsection.c
@@ -449,7 +449,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
H5HF_sect_node_free(H5HF_free_section_t *sect, H5HF_indirect_t *iblock)
{
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5PL.c b/src/H5PL.c
new file mode 100644
index 0000000..07e90af
--- /dev/null
+++ b/src/H5PL.c
@@ -0,0 +1,661 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic document set and is *
+ * linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
+ * to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/****************/
+/* Module Setup */
+/****************/
+
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5PL__init_interface
+
+
+/***********/
+/* Headers */
+/***********/
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5PLprivate.h" /* Plugin */
+#include "H5Zprivate.h" /* Filter pipeline */
+
+
+/****************/
+/* Local Macros */
+/****************/
+
+#define H5PL_MAX_PATH_NUM 16
+
+/****************************/
+/* Macros for supporting
+ * both Windows and Unix */
+/****************************/
+/* Windows support */
+#ifdef H5_HAVE_WIN32_API
+
+#define H5PL_DEFAULT_PATH "%ALLUSERSPROFILE%/hdf5/lib/plugin"
+#define H5PL_PATH_SEPARATOR ";"
+
+/* Handle for dynamic library */
+#define H5PL_HANDLE HINSTANCE
+
+/* Get a handle to a plugin library. Windows: TEXT macro handles Unicode strings */
+#define H5PL_OPEN_DLIB(S) LoadLibraryEx(TEXT(S), NULL, LOAD_WITH_ALTERED_SEARCH_PATH)
+
+/* Get the address of a symbol in dynamic library */
+#define H5PL_GET_LIB_FUNC(H,N) GetProcAddress(H,N)
+
+/* Close dynamic library */
+#define H5PL_CLOSE_LIB(H) FreeLibrary(H)
+
+/* Clear error - nothing to do */
+#define H5PL_CLR_ERROR
+
+typedef const void *(__cdecl *H5PL_get_plugin_info_t)(void);
+
+/* Unix support */
+#else /* H5_HAVE_WIN32_API */
+
+#define H5PL_DEFAULT_PATH "/usr/local/hdf5/lib/plugin"
+#define H5PL_PATH_SEPARATOR ":"
+
+/* Handle for dynamic library */
+#define H5PL_HANDLE void *
+
+/* Get a handle to a plugin library. Windows: TEXT macro handles Unicode strings */
+#define H5PL_OPEN_DLIB(S) dlopen(S, RTLD_NOW)
+
+/* Get the address of a symbol in dynamic library */
+#define H5PL_GET_LIB_FUNC(H,N) dlsym(H,N)
+
+/* Close dynamic library */
+#define H5PL_CLOSE_LIB(H) dlclose(H)
+
+/* Clear error */
+#define H5PL_CLR_ERROR dlerror()
+
+typedef const void *(*H5PL_get_plugin_info_t)(void);
+#endif /* H5_HAVE_WIN32_API */
+
+/* Special symbol to indicate no plugin loading */
+#define H5PL_NO_PLUGIN "::"
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+/* Type for the list of info for opened plugin libraries */
+typedef struct H5PL_table_t {
+ H5PL_type_t pl_type; /* plugin type */
+ int pl_id; /* ID for the plugin */
+ H5PL_HANDLE handle; /* plugin handle */
+} H5PL_table_t;
+
+
+/********************/
+/* Local Prototypes */
+/********************/
+
+static herr_t H5PL__init_path_table(void);
+static htri_t H5PL__find(H5PL_type_t plugin_type, int type_id, char *dir, const void **info);
+static htri_t H5PL__open(H5PL_type_t pl_type, char *libname, int plugin_id, const void **pl_info);
+static htri_t H5PL__search_table(H5PL_type_t plugin_type, int type_id, const void **info);
+static herr_t H5PL__close(H5PL_HANDLE handle);
+
+
+/*********************/
+/* Package Variables */
+/*********************/
+
+
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+
+/*******************/
+/* Local Variables */
+/*******************/
+
+/* Table for opened plugin libraries */
+static size_t H5PL_table_alloc_g = 0;
+static size_t H5PL_table_used_g = 0;
+static H5PL_table_t *H5PL_table_g = NULL;
+
+/* Table of location paths for plugin libraries */
+static char *H5PL_path_table_g[H5PL_MAX_PATH_NUM];
+static size_t H5PL_num_paths_g = 0;
+static hbool_t H5PL_path_found_g = FALSE;
+
+/* Whether to preload pathnames for plugin libraries */
+static hbool_t H5PL_no_plugin_g = FALSE;
+
+
+/*--------------------------------------------------------------------------
+NAME
+ H5PL__init_interface -- Initialize interface-specific information
+USAGE
+ herr_t H5PL__init_interface()
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Initializes any interface-specific data or routines.
+
+--------------------------------------------------------------------------*/
+static herr_t
+H5PL__init_interface(void)
+{
+ char *preload_path;
+
+ FUNC_ENTER_STATIC_NOERR
+
+ /* Retrieve pathnames from HDF5_PLUGIN_PRELOAD if the user sets it
+ * to tell the library to load plugin libraries without search.
+ */
+ if(NULL != (preload_path = HDgetenv("HDF5_PLUGIN_PRELOAD"))) {
+ /* Special symbal "::" means no plugin during data reading. */
+ if(!HDstrcmp(preload_path, H5PL_NO_PLUGIN))
+ H5PL_no_plugin_g = TRUE;
+ } /* end if */
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5PL__init_interface() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5PL_no_plugin
+ *
+ * Purpose: Quick way for filter module to query whether to load plugin
+ *
+ * Return: TRUE: No plugin loading during data reading
+ *
+ * FALSE: Load plugin during data reading
+ *
+ * Programmer: Raymond Lu
+ * 20 February 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+htri_t
+H5PL_no_plugin(void)
+{
+ htri_t ret_value;
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ ret_value = (htri_t)H5PL_no_plugin_g;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5PL_no_plugin() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5PL_term_interface
+ *
+ * Purpose: Terminate the H5PL interface: release all memory, reset all
+ * global variables to initial values. This only happens if all
+ * types have been destroyed from other interfaces.
+ *
+ * Return: Success: Positive if any action was taken that might
+ * affect some other interface; zero otherwise.
+ *
+ * Failure: Negative.
+ *
+ * Programmer: Raymond Lu
+ * 20 February 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+H5PL_term_interface(void)
+{
+ int i = 0;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ if(H5_interface_initialize_g) {
+ size_t u; /* Local index variable */
+
+ /* Close opened dynamic libraries */
+ for(u = 0; u < H5PL_table_used_g; u++)
+ H5PL__close((H5PL_table_g[u]).handle);
+
+ /* Free the table of dynamic libraries */
+ H5PL_table_g = (H5PL_table_t *)H5MM_xfree(H5PL_table_g);
+ H5PL_table_used_g = H5PL_table_alloc_g = 0;
+
+ /* Free the table of search paths */
+ for(u = 0; u < H5PL_num_paths_g; u++)
+ if(H5PL_path_table_g[u])
+ H5PL_path_table_g[u] = (char *)H5MM_xfree(H5PL_path_table_g[u]);
+ H5PL_num_paths_g = 0;
+ H5PL_path_found_g = FALSE;
+
+ H5_interface_initialize_g = 0;
+ i = 1;
+ } /* end if */
+
+ FUNC_LEAVE_NOAPI(i)
+} /* end H5PL_term_interface() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5PL_load
+ *
+ * Purpose: Given the plugin type and identifier, this function searches
+ * and/or loads a dynamic plugin library first among the already
+ * opened libraries then in the designated location paths.
+ *
+ * Return: Non-NULL on success/NULL on failure
+ *
+ * Programmer: Raymond Lu
+ * 13 February 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+const void *
+H5PL_load(H5PL_type_t type, int id)
+{
+ htri_t found; /* Whether the plugin was found */
+ const void *plugin_info = NULL;
+ const void *ret_value = NULL;
+
+ FUNC_ENTER_NOAPI(NULL)
+
+ /* Initialize the location paths for dynamic libraries, if they aren't
+ * already set up.
+ */
+ if(FALSE == H5PL_path_found_g)
+ if(H5PL__init_path_table() < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINIT, NULL, "can't initialize search path table")
+
+ /* Search in the table of already loaded plugin libraries */
+ if((found = H5PL__search_table(type, id, &plugin_info)) < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, NULL, "search in table failed")
+
+ /* If not found, iterate through the path table to find the right dynamic library */
+ if(!found) {
+ size_t i; /* Local index variable */
+
+ for(i = 0; i < H5PL_num_paths_g; i++) {
+ if((found = H5PL__find(type, id, H5PL_path_table_g[i], &plugin_info)) < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, NULL, "search in paths failed")
+
+ /* Break out if found */
+ if(found) {
+ HDassert(plugin_info);
+ break;
+ } /* end if */
+ } /* end for */
+ } /* end if */
+
+ /* Check if we found the plugin */
+ if(found)
+ ret_value = plugin_info;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5PL_load() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5PL__init_path_table
+ *
+ * Purpose: Initialize the path table.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * 18 March 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5PL__init_path_table(void)
+{
+ char *dl_path = NULL;
+ char *origin_dl_path;
+ char *dir;
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_STATIC
+
+ /* Retrieve paths from HDF5_PLUGIN_PATH if the user sets it
+ * or from the default paths if it isn't set.
+ */
+ origin_dl_path = HDgetenv("HDF5_PLUGIN_PATH");
+ if(NULL == origin_dl_path)
+ dl_path = HDstrdup(H5PL_DEFAULT_PATH);
+ else
+ dl_path = HDstrdup(origin_dl_path);
+ if(NULL == dl_path)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path")
+
+ /* Put paths in the path table. They are separated by ":" */
+ dir = HDstrtok(dl_path, H5PL_PATH_SEPARATOR);
+ while(dir) {
+ /* Check for too many directories in path */
+ if(H5PL_num_paths_g == H5PL_MAX_PATH_NUM)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table")
+ if(NULL == (H5PL_path_table_g[H5PL_num_paths_g] = HDstrdup(dir)))
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path")
+ H5PL_num_paths_g++;
+ dir = HDstrtok(NULL, H5PL_PATH_SEPARATOR);
+ } /* end while */
+
+ H5PL_path_found_g = TRUE;
+
+done:
+ if(dl_path)
+ dl_path = (char *)H5MM_xfree(dl_path);
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5PL__init_path_table() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5PL__find
+ *
+ * Purpose: Given a path, this function opens the directory and envokes
+ * another function to go through all files to find the right
+ * plugin library. Two function definitions are for Unix and
+ * Windows.
+ *
+ * Return: TRUE on success,
+ * FALSE on not found,
+ * negative on failure
+ *
+ * Programmer: Raymond Lu
+ * 13 February 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef H5_HAVE_WIN32_API
+static htri_t
+H5PL__find(H5PL_type_t plugin_type, int type_id, char *dir, const void **info)
+{
+ char *pathname = NULL;
+ DIR *dirp = NULL;
+ struct dirent *dp;
+ htri_t ret_value = FALSE;
+
+ FUNC_ENTER_STATIC
+
+ /* Open the directory */
+ if(!(dirp = HDopendir(dir)))
+ HGOTO_ERROR(H5E_PLUGIN, H5E_OPENERROR, FAIL, "can't open directory")
+
+ /* Iterates through all entries in the directory to find the right plugin library */
+ while(NULL != (dp = HDreaddir(dirp))) {
+ /* The library we are looking for should be called libxxx.so... on Unix
+ * or libxxx.xxx.dylib on Mac.
+ */
+ if(!HDstrncmp(dp->d_name, "lib", (size_t)3) &&
+ (HDstrstr(dp->d_name, ".so") || HDstrstr(dp->d_name, ".dylib"))) {
+ h5_stat_t my_stat;
+ size_t pathname_len;
+ htri_t found_in_dir;
+
+ /* Allocate & initialize the path name */
+ pathname_len = HDstrlen(dir) + HDstrlen(dp->d_name) + 2;
+ if(NULL == (pathname = (char *)H5MM_malloc(pathname_len)))
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path")
+ HDsnprintf(pathname, pathname_len, "%s/%s", dir, dp->d_name);
+
+ /* Get info for directory entry */
+ if(HDstat(pathname, &my_stat) == -1)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't stat file: %s", strerror(errno))
+
+ /* If it is a directory, skip it */
+ if(S_ISDIR(my_stat.st_mode))
+ continue;
+
+ /* Attempt to open the dynamic library as a filter library */
+ if((found_in_dir = H5PL__open(plugin_type, pathname, type_id, info)) < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "search in directory failed")
+ if(found_in_dir) {
+ /* Indicate success */
+ HGOTO_DONE(TRUE)
+ } /* end if */
+ else
+ HDassert(pathname);
+ pathname = (char *)H5MM_xfree(pathname);
+ } /* end if */
+ } /* end while */
+
+done:
+ if(dirp)
+ if(HDclosedir(dirp) < 0)
+ HDONE_ERROR(H5E_FILE, H5E_CLOSEERROR, FAIL, "can't close directory: %s", strerror(errno))
+ if(pathname)
+ pathname = (char *)H5MM_xfree(pathname);
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5PL__find() */
+#else /* H5_HAVE_WIN32_API */
+static htri_t
+H5PL__find(H5PL_type_t plugin_type, int type_id, char *dir, const void **info)
+{
+ WIN32_FIND_DATA fdFile;
+ HANDLE hFind;
+ char *pathname = NULL;
+ char service[2048];
+ htri_t ret_value = FALSE;
+
+ FUNC_ENTER_STATIC
+
+ /* Specify a file mask. *.* = We want everything! */
+ sprintf(service, "%s\/*.dll", dir);
+ if((hFind = FindFirstFile(service, &fdFile)) == INVALID_HANDLE_VALUE)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_OPENERROR, FAIL, "can't open directory")
+
+ do {
+ /* Find first file will always return "."
+ * and ".." as the first two directories.
+ */
+ if(HDstrcmp(fdFile.cFileName, ".") != 0 && HDstrcmp(fdFile.cFileName, "..") != 0) {
+ size_t pathname_len;
+ htri_t found_in_dir;
+
+ /* Allocate & initialize the path name */
+ pathname_len = HDstrlen(dir) + HDstrlen(fdFile.cFileName) + 2;
+ if(NULL == (pathname = (char *)H5MM_malloc(pathname_len)))
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path")
+ HDsnprintf(pathname, pathname_len, "%s\\%s", dir, fdFile.cFileName);
+
+ /* Is the entity a File or Folder? */
+ if(fdFile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+ continue;
+
+ if((found_in_dir = H5PL__open(plugin_type, pathname, type_id, info)) < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "search in directory failed")
+ if(found_in_dir) {
+ /* Indicate success */
+ HGOTO_DONE(TRUE)
+ } /* end if */
+ else
+ HDassert(pathname);
+ pathname = (char *)H5MM_xfree(pathname);
+ } /* end if */
+ } while(FindNextFile(hFind, &fdFile)); /* Find the next file. */
+
+done:
+ if(hFind)
+ FindClose(hFind);
+ if(pathname)
+ pathname = (char *)H5MM_xfree(pathname);
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5PL__find() */
+#endif /* H5_HAVE_WIN32_API */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5PL__open
+ *
+ * Purpose: Iterates through all files to find the right plugin library.
+ * It loads the dynamic plugin library and keeps it on the list
+ * of loaded libraries.
+ *
+ * Return: TRUE on success,
+ * FALSE on not found,
+ * negative on failure
+ *
+ * Programmer: Raymond Lu
+ * 13 February 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static htri_t
+H5PL__open(H5PL_type_t pl_type, char *libname, int pl_id, const void **pl_info)
+{
+ H5PL_HANDLE handle = NULL;
+ htri_t ret_value = FALSE;
+
+ FUNC_ENTER_STATIC
+
+ /* There are different reasons why a library can't be open, e.g. wrong architecture.
+ * simply continue if we can't open it.
+ */
+ if(NULL == (handle = H5PL_OPEN_DLIB(libname))) {
+ H5PL_CLR_ERROR; /* clear error */
+ } /* end if */
+ else {
+ H5PL_get_plugin_info_t get_plugin_info = NULL;
+
+ /* Return a handle for the function H5PLget_plugin_info in the dynamic library.
+ * The plugin library is suppose to define this function.
+ */
+ if(NULL == (get_plugin_info = (H5PL_get_plugin_info_t)H5PL_GET_LIB_FUNC(handle, "H5PLget_plugin_info"))) {
+ if(H5PL__close(handle) < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CLOSEERROR, FAIL, "can't close dynamic library")
+ } /* end if */
+ else {
+ const H5Z_class2_t *plugin_info;
+
+ /* Invoke H5PLget_plugin_info to verify this is the right library we are looking for.
+ * Move on if it isn't.
+ */
+ if(NULL == (plugin_info = (const H5Z_class2_t *)(*get_plugin_info)())) {
+ if(H5PL__close(handle) < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CLOSEERROR, FAIL, "can't close dynamic library")
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get plugin info")
+ } /* end if */
+
+ /* Successfully found plugin library, check if it's the right one */
+ if(plugin_info->id == pl_id) {
+ /* Expand the table if it is too small */
+ if(H5PL_table_used_g >= H5PL_table_alloc_g) {
+ size_t n = MAX(H5Z_MAX_NFILTERS, 2 * H5PL_table_alloc_g);
+ H5PL_table_t *table = (H5PL_table_t *)H5MM_realloc(H5PL_table_g, n * sizeof(H5PL_table_t));
+
+ if(!table)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to extend dynamic library table")
+
+ H5PL_table_g = table;
+ H5PL_table_alloc_g = n;
+ } /* end if */
+
+ (H5PL_table_g[H5PL_table_used_g]).handle = handle;
+ (H5PL_table_g[H5PL_table_used_g]).pl_type = pl_type;
+ (H5PL_table_g[H5PL_table_used_g]).pl_id = plugin_info->id;
+ H5PL_table_used_g++;
+
+ /* Set the plugin info to return */
+ *pl_info = (const void *)plugin_info;
+
+ /* Indicate success */
+ ret_value = TRUE;
+ } /* end if */
+ else
+ if(H5PL__close(handle) < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CLOSEERROR, FAIL, "can't close dynamic library")
+ } /* end if */
+ } /* end else */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5PL__open() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5PL__search_table
+ *
+ * Purpose: Search in the list of already opened dynamic libraries
+ * to see if the one we are looking for is already opened.
+ *
+ * Return: TRUE on success,
+ * FALSE on not found,
+ * Negative on failure
+ *
+ * Programmer: Raymond Lu
+ * 13 February 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static htri_t
+H5PL__search_table(H5PL_type_t plugin_type, int type_id, const void **info)
+{
+ htri_t ret_value = FALSE;
+
+ FUNC_ENTER_STATIC
+
+ /* Search in the table of already opened dynamic libraries */
+ if(H5PL_table_used_g > 0) {
+ size_t i;
+
+ for(i = 0; i < H5PL_table_used_g; i++) {
+ if((plugin_type == (H5PL_table_g[i]).pl_type) && (type_id == (H5PL_table_g[i]).pl_id)) {
+ H5PL_get_plugin_info_t get_plugin_info;
+ const H5Z_class2_t *plugin_info;
+
+ if(NULL == (get_plugin_info = (H5PL_get_plugin_info_t)H5PL_GET_LIB_FUNC((H5PL_table_g[i]).handle, "H5PLget_plugin_info")))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't get function for H5PLget_plugin_info")
+
+ if(NULL == (plugin_info = (const H5Z_class2_t *)(*get_plugin_info)()))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't get plugin info")
+
+ *info = plugin_info;
+ HGOTO_DONE(TRUE)
+ } /* end if */
+ } /* end for */
+ } /* end if */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5PL__search_table() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5PL__close
+ *
+ * Purpose: Closes the handle for dynamic library
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Raymond Lu
+ * 13 February 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5PL__close(H5PL_HANDLE handle)
+{
+ FUNC_ENTER_STATIC_NOERR
+
+ H5PL_CLOSE_LIB(handle);
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5PL__close() */
+
diff --git a/src/H5PLextern.h b/src/H5PLextern.h
new file mode 100644
index 0000000..943e3aa
--- /dev/null
+++ b/src/H5PLextern.h
@@ -0,0 +1,84 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic document set and is *
+ * linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
+ * to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Programmer: Raymond Lu <songyulu@hdfgroup.org>
+ * 13 February 2013
+ */
+#ifndef _H5PLextern_H
+#define _H5PLextern_H
+
+/* Include HDF5 header */
+#include "hdf5.h"
+
+/*******************/
+/* Public Typedefs */
+/*******************/
+
+/* Plugin type */
+typedef enum H5PL_type_t {
+ H5PL_TYPE_ERROR = -1, /*error */
+ H5PL_TYPE_FILTER = 0, /*filter */
+ H5PL_TYPE_NONE = 1 /*this must be last! */
+} H5PL_type_t;
+
+
+#ifdef H5_BUILT_AS_DYNAMIC_LIB
+
+ #if defined (hdf5_EXPORTS)
+ /* hdf5 library imports from plugin */
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5PLUGIN_DLL __declspec(dllimport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5PLUGIN_DLL __attribute__ ((visibility("default")))
+ #endif
+ #else
+ /* plugins always export */
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5PLUGIN_DLL __declspec(dllexport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5PLUGIN_DLL __attribute__ ((visibility("default")))
+ #endif
+ #endif
+
+#elif defined(H5_BUILT_AS_STATIC_LIB)
+ #define H5PLUGIN_DLL
+#else
+
+ #if defined(H5_HAVE_WIN32_API)
+ #if defined(_HDF5DLL_)
+ #pragma warning(disable: 4273) /* Disable the dll linkage warnings */
+ #define H5PLUGIN_DLL __declspec(dllimport)
+ #elif defined(_HDF5USEDLL_)
+ #define H5PLUGIN_DLL __declspec(dllexport)
+ #endif /* _HDF5DLL_ */
+ #else /*H5_HAVE_WIN32_API*/
+ #define H5PLUGIN_DLL
+ #endif /*H5_HAVE_WIN32_API*/
+
+#endif /* H5_BUILT_AS_xxx_LIB */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+H5PLUGIN_DLL H5PL_type_t H5PLget_plugin_type(void);
+H5PLUGIN_DLL const void *H5PLget_plugin_info(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _H5PLextern_H */
+
diff --git a/src/H5PLprivate.h b/src/H5PLprivate.h
new file mode 100644
index 0000000..b117613
--- /dev/null
+++ b/src/H5PLprivate.h
@@ -0,0 +1,53 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic document set and is *
+ * linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
+ * to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/* Programmer: Raymond Lu <songyulu@hdfgroup.org>
+ * 13 February 2013
+ */
+
+#ifndef _H5PLprivate_H
+#define _H5PLprivate_H
+
+/* Include package's "external" header */
+#include "H5PLextern.h"
+
+/* Private headers needed by this file */
+#include "H5private.h" /* Generic Functions */
+
+
+/**************************/
+/* Library Private Macros */
+/**************************/
+
+
+/****************************/
+/* Library Private Typedefs */
+/****************************/
+
+
+/*****************************/
+/* Library-private Variables */
+/*****************************/
+
+
+/***************************************/
+/* Library-private Function Prototypes */
+/***************************************/
+
+/* Internal API routines */
+H5_DLL const void *H5PL_load(H5PL_type_t plugin_type, int type_id);
+H5_DLL htri_t H5PL_no_plugin(void);
+
+#endif /* _H5PLprivate_H */
+
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index 4faed4f..befec84 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -2267,7 +2267,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
H5P_file_image_info_del(hid_t UNUSED prop_id, const char UNUSED *name, size_t UNUSED size, void *value)
{
H5FD_file_image_info_t info; /* Image info struct */
@@ -2321,7 +2321,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
H5P_file_image_info_copy(const char UNUSED *name, size_t UNUSED size, void *value)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -2396,7 +2396,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
H5P_file_image_info_close(const char UNUSED *name, size_t UNUSED size, void *value)
{
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c
index d8ddfee..880b46a 100644
--- a/src/H5Pocpl.c
+++ b/src/H5Pocpl.c
@@ -40,6 +40,8 @@
#include "H5MMprivate.h" /* Memory management */
#include "H5Opkg.h" /* Object headers */
#include "H5Ppkg.h" /* Property lists */
+#include "H5PLprivate.h" /* Dynamic plugin */
+#include "H5Zprivate.h" /* Filter pipeline */
/****************/
@@ -90,6 +92,9 @@ static herr_t H5P__ocrt_pipeline_enc(const void *value, void **_pp, size_t *size
static herr_t H5P__ocrt_pipeline_dec(const void **_pp, void *value);
static int H5P__ocrt_pipeline_cmp(const void *value1, const void *value2, size_t size);
+/* Local routines */
+static herr_t H5P__set_filter(H5P_genplist_t *plist, H5Z_filter_t filter,
+ unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[/*cd_nelmts*/]);
/*********************/
/* Package Variables */
@@ -747,7 +752,6 @@ H5Pset_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags,
size_t cd_nelmts, const unsigned int cd_values[/*cd_nelmts*/])
{
H5P_genplist_t *plist; /* Property list */
- H5O_pline_t pline; /* Filter pipeline */
herr_t ret_value=SUCCEED; /* return value */
FUNC_ENTER_API(FAIL)
@@ -765,6 +769,74 @@ H5Pset_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags,
if(NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
+ /* Call the private function */
+ if(H5P__set_filter(plist, filter, flags, cd_nelmts, cd_values) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "failed to call private function")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Pset_filter() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5P__set_filter
+ *
+ * Purpose: Adds the specified FILTER and corresponding properties to the
+ * end of the data or link output filter pipeline
+ * depending on whether PLIST is a dataset creation or group
+ * creation property list. The FLAGS argument specifies certain
+ * general properties of the filter and is documented below.
+ * The CD_VALUES is an array of CD_NELMTS integers which are
+ * auxiliary data for the filter. The integer vlues will be
+ * stored in the dataset object header as part of the filter
+ * information.
+ *
+ * The FLAGS argument is a bit vector of the following fields:
+ *
+ * H5Z_FLAG_OPTIONAL(0x0001)
+ * If this bit is set then the filter is optional. If the
+ * filter fails during an H5Dwrite() operation then the filter
+ * is just excluded from the pipeline for the chunk for which it
+ * failed; the filter will not participate in the pipeline
+ * during an H5Dread() of the chunk. If this bit is clear and
+ * the filter fails then the entire I/O operation fails.
+ * If this bit is set but encoding is disabled for a filter,
+ * attempting to write will generate an error.
+ *
+ * If the filter is not registered, this function tries to load
+ * it dynamically during run time.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Robb Matzke
+ * Wednesday, April 15, 1998
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5P__set_filter(H5P_genplist_t *plist, H5Z_filter_t filter, unsigned int flags,
+ size_t cd_nelmts, const unsigned int cd_values[/*cd_nelmts*/])
+{
+ H5O_pline_t pline; /* Filter pipeline */
+ htri_t filter_avail; /* Filter availability */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_STATIC
+
+ /* Check if filter is already available */
+ if((filter_avail = H5Z_filter_avail(filter)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't check filter availability")
+
+ /* If filter is not available, try to dynamically load it */
+ if(!filter_avail) {
+ const H5Z_class2_t *filter_info;
+
+ if(NULL == (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, (int)filter)))
+ HGOTO_ERROR(H5E_PLINE, H5E_CANTLOAD, FAIL, "failed to load dynamically loaded plugin")
+ if(H5Z_register(filter_info) < 0)
+ HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter")
+ } /* end if */
+
/* Get the pipeline property to append to */
if(H5P_get(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline")
@@ -778,8 +850,8 @@ H5Pset_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags,
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set pipeline")
done:
- FUNC_LEAVE_API(ret_value)
-} /* end H5Pset_filter() */
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5P__set_filter() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 5ecf864..b732817 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -3014,17 +3014,17 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
{
H5T_vlen_alloc_info_t _vl_alloc_info; /* VL allocation info buffer */
H5T_vlen_alloc_info_t *vl_alloc_info = &_vl_alloc_info; /* VL allocation info */
- H5T_path_t *tpath; /* Type conversion path */
+ H5T_path_t *tpath = NULL; /* Type conversion path */
hbool_t noop_conv = FALSE; /* Flag to indicate a noop conversion */
hbool_t write_to_file = FALSE; /* Flag to indicate writing to file */
hbool_t parent_is_vlen; /* Flag to indicate parent is vlen datatyp */
hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */
- H5T_t *src; /*source datatype */
- H5T_t *dst; /*destination datatype */
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
H5HG_t bg_hobjid, parent_hobjid;
- uint8_t *s; /*source buffer */
- uint8_t *d; /*destination buffer */
- uint8_t *b; /*background buffer */
+ uint8_t *s = NULL; /*source buffer */
+ uint8_t *d = NULL; /*destination buffer */
+ uint8_t *b = NULL; /*background buffer */
ssize_t s_stride, d_stride; /*src and dst strides */
ssize_t b_stride; /*bkg stride */
size_t safe; /*how many elements are safe to process in each pass */
@@ -3120,7 +3120,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(tpath->cdata.need_bkg || parent_is_vlen) {
/* Set up initial background buffer */
tmp_buf_size = MAX(src_base_size, dst_base_size);
- if(NULL == (tmp_buf = H5FL_BLK_MALLOC(vlen_seq,tmp_buf_size)))
+ if(NULL == (tmp_buf = H5FL_BLK_CALLOC(vlen_seq,tmp_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
} /* end if */
@@ -3200,7 +3200,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
*/
if(!seq_len && !conv_buf) {
conv_buf_size = ((1 / H5T_VLEN_MIN_CONF_BUF_SIZE) + 1) * H5T_VLEN_MIN_CONF_BUF_SIZE;
- if(NULL == (conv_buf = H5FL_BLK_MALLOC(vlen_seq, conv_buf_size)))
+ if(NULL == (conv_buf = H5FL_BLK_CALLOC(vlen_seq, conv_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
}
else if(conv_buf_size < MAX(src_size, dst_size)) {
@@ -3208,6 +3208,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
conv_buf_size = ((MAX(src_size, dst_size) / H5T_VLEN_MIN_CONF_BUF_SIZE) + 1) * H5T_VLEN_MIN_CONF_BUF_SIZE;
if(NULL == (conv_buf = H5FL_BLK_REALLOC(vlen_seq, conv_buf, conv_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
+ HDmemset(conv_buf, 0, conv_buf_size);
} /* end if */
/* Read in VL sequence */
@@ -3223,6 +3224,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
tmp_buf_size = conv_buf_size;
if(NULL == (tmp_buf = H5FL_BLK_REALLOC(vlen_seq, tmp_buf, tmp_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
+ HDmemset(tmp_buf, 0, tmp_buf_size);
} /* end if */
/* If we are writing and there is a nested VL type, read
@@ -3236,6 +3238,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
tmp_buf_size = (bg_seq_len * MAX(src_base_size, dst_base_size));
if(NULL == (tmp_buf = H5FL_BLK_REALLOC(vlen_seq, tmp_buf, tmp_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
+ HDmemset(tmp_buf, 0, tmp_buf_size);
} /* end if */
H5F_addr_decode(dst->shared->u.vlen.f, (const uint8_t **)&tmp, &(bg_hobjid.addr));
INT32DECODE(tmp, bg_hobjid.idx);
diff --git a/src/H5Z.c b/src/H5Z.c
index 3bb3a44..9f8b59d 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -26,6 +26,7 @@
#include "H5MMprivate.h" /* Memory management */
#include "H5Oprivate.h" /* Object headers */
#include "H5Pprivate.h" /* Property lists */
+#include "H5PLprivate.h" /* Plugins */
#include "H5Sprivate.h" /* Dataspace functions */
#include "H5Zpkg.h" /* Data filters */
@@ -450,7 +451,6 @@ done:
htri_t
H5Zfilter_avail(H5Z_filter_t id)
{
- size_t i; /* Local index variable */
htri_t ret_value=FALSE; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -459,13 +459,9 @@ H5Zfilter_avail(H5Z_filter_t id)
/* Check args */
if(id<0 || id>H5Z_FILTER_MAX)
HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number")
-
- /* Is the filter already registered? */
- for(i=0; i<H5Z_table_used_g; i++)
- if(H5Z_table_g[i].id==id) {
- ret_value=TRUE;
- break;
- } /* end if */
+
+ if((ret_value = H5Z_filter_avail(id)) < 0)
+ HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "unable to check the availability of the filter")
done:
FUNC_LEAVE_API(ret_value)
@@ -473,6 +469,36 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5Z_filter_avail
+ *
+ * Purpose: Private function to check if a filter is available
+ *
+ * Return: Non-negative (TRUE/FALSE) on success/Negative on failure
+ *
+ * Programmer: Raymond Lu
+ * 13 February 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+htri_t
+H5Z_filter_avail(H5Z_filter_t id)
+{
+ size_t i; /* Local index variable */
+ htri_t ret_value = FALSE; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ /* Is the filter already registered? */
+ for(i = 0; i < H5Z_table_used_g; i++)
+ if(H5Z_table_g[i].id == id)
+ HGOTO_DONE(TRUE)
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5Z_filter_avail() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5Z_prelude_callback
*
* Purpose: Makes a dataset creation "prelude" callback for the "can_apply"
@@ -1088,16 +1114,45 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
failed |= (unsigned)1 << idx;
continue;/*filter excluded*/
}
- if ((fclass_idx=H5Z_find_idx(pline->filter[idx].id))<0) {
- /* Print out the filter name to give more info. But the name is optional for
- * the filter */
- if(pline->filter[idx].name)
- HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter '%s' is not registered",
- pline->filter[idx].name)
- else
- HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter (name unavailable) is not registered")
- }
+ /* If the filter isn't registered and the application doesn't
+ * indicate no plugin through HDF5_PRELOAD_PLUG (using the symbol "::"),
+ * try to load it dynamically and register it. Otherwise, return failure
+ */
+ if((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0) {
+ hbool_t issue_error = FALSE;
+
+ /* Check for "no plugins" indicated" */
+ if(H5PL_no_plugin())
+ issue_error = TRUE;
+ else {
+ const H5Z_class2_t *filter_info;
+
+ /* Try loading the filter */
+ if(NULL != (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, (int)(pline->filter[idx].id)))) {
+ /* Register the filter we loaded */
+ if(H5Z_register(filter_info) < 0)
+ HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter")
+
+ /* Search in the table of registered filters again to find the dynamic filter just loaded and registered */
+ if((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0)
+ issue_error = TRUE;
+ } /* end if */
+ else
+ issue_error = TRUE;
+ } /* end else */
+
+ /* Check for error */
+ if(issue_error) {
+ /* Print out the filter name to give more info. But the name is optional for
+ * the filter */
+ if(pline->filter[idx].name)
+ HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter '%s' is not registered", pline->filter[idx].name)
+ else
+ HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter (name unavailable) is not registered")
+ } /* end if */
+ } /* end if */
+
fclass=&H5Z_table_g[fclass_idx];
#ifdef H5Z_DEBUG
fstats=&H5Z_stat_table_g[fclass_idx];
diff --git a/src/H5Zprivate.h b/src/H5Zprivate.h
index c1528b3..f53b50c 100644
--- a/src/H5Zprivate.h
+++ b/src/H5Zprivate.h
@@ -92,6 +92,7 @@ H5_DLL herr_t H5Z_set_local_direct(const struct H5O_pline_t *pline);
H5_DLL H5Z_filter_info_t *H5Z_filter_info(const struct H5O_pline_t *pline,
H5Z_filter_t filter);
H5_DLL htri_t H5Z_all_filters_avail(const struct H5O_pline_t *pline);
+H5_DLL htri_t H5Z_filter_avail(H5Z_filter_t id);
H5_DLL herr_t H5Z_delete(struct H5O_pline_t *pline, H5Z_filter_t filter);
/* Data Transform Functions */
diff --git a/src/H5Zpublic.h b/src/H5Zpublic.h
index 5d9b5ed..8daa5f4 100644
--- a/src/H5Zpublic.h
+++ b/src/H5Zpublic.h
@@ -42,6 +42,7 @@ typedef int H5Z_filter_t;
#define H5Z_FILTER_NBIT 5 /*nbit compression */
#define H5Z_FILTER_SCALEOFFSET 6 /*scale+offset compression */
#define H5Z_FILTER_RESERVED 256 /*filter ids below this value are reserved for library use */
+
#define H5Z_FILTER_MAX 65535 /*maximum filter id */
/* General macros */
diff --git a/src/H5config.h.in b/src/H5config.h.in
index 0308b38..fc41c5a 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -87,6 +87,9 @@
/* Define if the direct I/O virtual file driver should be compiled */
#undef HAVE_DIRECT
+/* Define to 1 if you have the <dirent.h> header file. */
+#undef HAVE_DIRENT_H
+
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
@@ -187,6 +190,9 @@
/* Define to 1 if you have the <io.h> header file. */
#undef HAVE_IO_H
+/* Define to 1 if you have the `dl' library (-ldl). */
+#undef HAVE_LIBDL
+
/* Define to 1 if you have the `dmalloc' library (-ldmalloc). */
#undef HAVE_LIBDMALLOC
diff --git a/src/H5err.txt b/src/H5err.txt
index ab3277f..5a38cdf 100644
--- a/src/H5err.txt
+++ b/src/H5err.txt
@@ -76,6 +76,7 @@ MAJOR, H5E_FSPACE, Free Space Manager
MAJOR, H5E_SOHM, Shared Object Header Messages
MAJOR, H5E_EARRAY, Extensible Array
MAJOR, H5E_FARRAY, Fixed Array
+MAJOR, H5E_PLUGIN, Plugin for dynamically loaded library
MAJOR, H5E_NONE_MAJOR, No error
# Sections (for grouping minor errors)
@@ -98,6 +99,7 @@ SECTION, HEAP, Heap errors
SECTION, FSPACE, Free space errors
SECTION, PIPELINE, I/O pipeline errors
SECTION, SYSTEM, System level errors
+SECTION, PLUGIN, Plugin errors
SECTION, NONE, No error
# Minor errors
@@ -258,5 +260,8 @@ MINOR, PIPELINE, H5E_CANTFILTER, Filter operation failed
# System level errors
MINOR, SYSTEM, H5E_SYSERRSTR, System error message
+# Plugin errors
+MINOR, PLUGIN, H5E_OPENERROR, Can't open directory or file
+
# No error, for backward compatibility */
MINOR, NONE, H5E_NONE_MINOR, No error
diff --git a/src/H5private.h b/src/H5private.h
index 711cea8..c2ef54a 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -149,6 +149,17 @@
# include <io.h>
#endif
+/*
+ * Dynamic library handling. These are needed for dynamically loading I/O
+ * filters and VFDs.
+ */
+#ifdef H5_HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+#ifdef H5_HAVE_DIRENT_H
+#include <dirent.h>
+#endif
+
#ifdef H5_HAVE_WIN32_API
/* The following two defines must be before any windows headers are included */
@@ -2375,6 +2386,7 @@ H5_DLL int H5G_term_interface(void);
H5_DLL int H5I_term_interface(void);
H5_DLL int H5L_term_interface(void);
H5_DLL int H5P_term_interface(void);
+H5_DLL int H5PL_term_interface(void);
H5_DLL int H5R_term_interface(void);
H5_DLL int H5S_term_interface(void);
H5_DLL int H5T_term_interface(void);
diff --git a/src/H5public.h b/src/H5public.h
index 0a4e9c0..7eb291f 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -75,10 +75,10 @@ extern "C" {
/* Version numbers */
#define H5_VERS_MAJOR 1 /* For major interface/format changes */
#define H5_VERS_MINOR 9 /* For minor interface/format changes */
-#define H5_VERS_RELEASE 148 /* For tweaks, bug-fixes, or development */
+#define H5_VERS_RELEASE 149 /* For tweaks, bug-fixes, or development */
#define H5_VERS_SUBRELEASE "FA_a5" /* For pre-releases like snap0 */
/* Empty string for real releases. */
-#define H5_VERS_INFO "HDF5 library version: 1.9.148-FA_a5" /* Full version string */
+#define H5_VERS_INFO "HDF5 library version: 1.9.149-FA_a5" /* Full version string */
#define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \
H5_VERS_RELEASE)
diff --git a/src/Makefile.am b/src/Makefile.am
index 4ec1015..c910714 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -94,6 +94,7 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
H5Pfapl.c H5Pfcpl.c H5Pfmpl.c \
H5Pgcpl.c H5Pint.c \
H5Plapl.c H5Plcpl.c H5Pocpl.c H5Pocpypl.c H5Pstrcpl.c H5Ptest.c \
+ H5PL.c \
H5R.c H5Rdeprec.c \
H5RC.c \
H5RS.c \
@@ -121,7 +122,9 @@ include_HEADERS = hdf5.h H5api_adpt.h H5overflow.h H5pubconf.h H5public.h H5vers
H5FDfamily.h H5FDlog.h H5FDmpi.h H5FDmpio.h H5FDmpiposix.h \
H5FDmulti.h H5FDsec2.h H5FDstdio.h \
H5Gpublic.h H5Ipublic.h H5Lpublic.h \
- H5MMpublic.h H5Opublic.h H5Ppublic.h H5Rpublic.h H5Spublic.h \
+ H5MMpublic.h H5Opublic.h H5Ppublic.h \
+ H5PLextern.h \
+ H5Rpublic.h H5Spublic.h \
H5Tpublic.h H5Zpublic.h
# install libhdf5.settings in lib directory
diff --git a/src/Makefile.in b/src/Makefile.in
index db1d143..c2d29f9 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -163,9 +163,9 @@ am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \
H5Pacpl.lo H5Pdapl.lo H5Pdcpl.lo H5Pdeprec.lo H5Pdxpl.lo \
H5Pencdec.lo H5Pfapl.lo H5Pfcpl.lo H5Pfmpl.lo H5Pgcpl.lo \
H5Pint.lo H5Plapl.lo H5Plcpl.lo H5Pocpl.lo H5Pocpypl.lo \
- H5Pstrcpl.lo H5Ptest.lo H5R.lo H5Rdeprec.lo H5RC.lo H5RS.lo \
- H5S.lo H5Sall.lo H5Sdbg.lo H5Shyper.lo H5Smpio.lo H5Snone.lo \
- H5Spoint.lo H5Sselect.lo H5Stest.lo H5SL.lo H5SM.lo \
+ H5Pstrcpl.lo H5Ptest.lo H5PL.lo H5R.lo H5Rdeprec.lo H5RC.lo \
+ H5RS.lo H5S.lo H5Sall.lo H5Sdbg.lo H5Shyper.lo H5Smpio.lo \
+ H5Snone.lo H5Spoint.lo H5Sselect.lo H5Stest.lo H5SL.lo H5SM.lo \
H5SMbtree2.lo H5SMcache.lo H5SMmessage.lo H5SMtest.lo H5ST.lo \
H5T.lo H5Tarray.lo H5Tbit.lo H5Tcommit.lo H5Tcompound.lo \
H5Tconv.lo H5Tcset.lo H5Tdbg.lo H5Tdeprec.lo H5Tenum.lo \
@@ -525,7 +525,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 138
+LT_VERS_REVISION = 139
LT_VERS_AGE = 0
H5detect_CFLAGS = -g $(AM_CFLAGS)
@@ -594,6 +594,7 @@ libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
H5Pfapl.c H5Pfcpl.c H5Pfmpl.c \
H5Pgcpl.c H5Pint.c \
H5Plapl.c H5Plcpl.c H5Pocpl.c H5Pocpypl.c H5Pstrcpl.c H5Ptest.c \
+ H5PL.c \
H5R.c H5Rdeprec.c \
H5RC.c \
H5RS.c \
@@ -621,7 +622,9 @@ include_HEADERS = hdf5.h H5api_adpt.h H5overflow.h H5pubconf.h H5public.h H5vers
H5FDfamily.h H5FDlog.h H5FDmpi.h H5FDmpio.h H5FDmpiposix.h \
H5FDmulti.h H5FDsec2.h H5FDstdio.h \
H5Gpublic.h H5Ipublic.h H5Lpublic.h \
- H5MMpublic.h H5Opublic.h H5Ppublic.h H5Rpublic.h H5Spublic.h \
+ H5MMpublic.h H5Opublic.h H5Ppublic.h \
+ H5PLextern.h \
+ H5Rpublic.h H5Spublic.h \
H5Tpublic.h H5Zpublic.h
@@ -955,6 +958,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Otest.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ounknown.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5P.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5PL.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pacpl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pdapl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pdcpl.Plo@am__quote@
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 6af1e94..8904fee 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -7,7 +7,14 @@ PROJECT (HDF5_TEST)
ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
-# Define Sources
+# Generate the H5srcdir_str.h file containing user settings needed by compilation
+#-----------------------------------------------------------------------------
+SET (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
+CONFIGURE_FILE (${HDF5_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
+INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
+
+#-----------------------------------------------------------------------------
+# Define Test Library Sources
#-----------------------------------------------------------------------------
SET (TEST_LIB_SRCS
${HDF5_TEST_SOURCE_DIR}/h5test.c
@@ -19,13 +26,6 @@ SET (TEST_LIB_HEADERS
${HDF5_TEST_SOURCE_DIR}/h5test.h
)
-#-----------------------------------------------------------------------------
-# Generate the H5srcdir_str.h file containing user settings needed by compilation
-#-----------------------------------------------------------------------------
-SET (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
-CONFIGURE_FILE (${HDF5_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
-INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
-
ADD_LIBRARY (${HDF5_TEST_LIB_TARGET} ${LIB_TYPE} ${TEST_LIB_SRCS} ${TEST_LIB_HEADERS})
IF (MSVC)
TARGET_LINK_LIBRARIES (${HDF5_TEST_LIB_TARGET} "ws2_32.lib")
@@ -37,6 +37,86 @@ TARGET_LINK_LIBRARIES (${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} ${LIB_TYPE})
SET_TARGET_PROPERTIES (${HDF5_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test)
+#-----------------------------------------------------------------------------
+# If plugin library tests can be tested
+#-----------------------------------------------------------------------------
+IF (BUILD_SHARED_LIBS)
+ # make plugins dir
+ FILE (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir1")
+ FILE (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir2")
+
+ #-----------------------------------------------------------------------------
+ # Define Test Library Sources
+ #-----------------------------------------------------------------------------
+ SET (TEST_PLUGIN_LIBS
+ dynlib1
+ dynlib3
+ )
+ SET (TEST2_PLUGIN_LIBS
+ dynlib2
+ )
+
+ FOREACH (test_lib ${TEST_PLUGIN_LIBS})
+ SET (HDF5_TEST_PLUGIN_LIB_CORENAME "${test_lib}")
+ SET (HDF5_TEST_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_LIB_CORENAME}")
+ SET (HDF5_TEST_PLUGIN_LIB_TARGET ${HDF5_TEST_PLUGIN_LIB_CORENAME})
+ ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+ INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
+
+ ADD_LIBRARY (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c)
+ TARGET_LINK_LIBRARIES (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ H5_SET_LIB_OPTIONS (
+ ${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME}
+ ${LIB_TYPE}
+ HDF5_TEST_PLUGIN_LIB_NAME_RELEASE
+ HDF5_TEST_PLUGIN_LIB_NAME_DEBUG
+ )
+ SET_TARGET_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
+
+ #-----------------------------------------------------------------------------
+ # Copy plugin library to a plugins folder
+ #-----------------------------------------------------------------------------
+ ADD_CUSTOM_COMMAND (
+ TARGET ${HDF5_TEST_PLUGIN_LIB_TARGET}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different
+ "$<TARGET_FILE:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
+ "${CMAKE_BINARY_DIR}/testdir1/$<TARGET_FILE_NAME:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
+ )
+ ENDFOREACH (test_lib ${TEST_PLUGIN_LIBS})
+
+ FOREACH (test_lib ${TEST2_PLUGIN_LIBS})
+ SET (HDF5_TEST_PLUGIN_LIB_CORENAME "${test_lib}")
+ SET (HDF5_TEST_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_LIB_CORENAME}")
+ SET (HDF5_TEST_PLUGIN_LIB_TARGET ${HDF5_TEST_PLUGIN_LIB_CORENAME})
+ ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+ INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
+
+ ADD_LIBRARY (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c)
+ TARGET_LINK_LIBRARIES (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ H5_SET_LIB_OPTIONS (
+ ${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME}
+ ${LIB_TYPE}
+ HDF5_TEST_PLUGIN_LIB_NAME_RELEASE
+ HDF5_TEST_PLUGIN_LIB_NAME_DEBUG
+ )
+ SET_TARGET_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
+
+ #-----------------------------------------------------------------------------
+ # Copy plugin library to a plugins folder
+ #-----------------------------------------------------------------------------
+ ADD_CUSTOM_COMMAND (
+ TARGET ${HDF5_TEST_PLUGIN_LIB_TARGET}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different
+ "$<TARGET_FILE:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
+ "${CMAKE_BINARY_DIR}/testdir2/$<TARGET_FILE_NAME:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
+ )
+ ENDFOREACH (test_lib ${TEST2_PLUGIN_LIBS})
+ENDIF (BUILD_SHARED_LIBS)
+
# --------------------------------------------------------------------
# Copy all the HDF5 files from the test directory into the source directory
# --------------------------------------------------------------------
@@ -508,6 +588,7 @@ ADD_TEST (NAME error_test COMMAND "${CMAKE_COMMAND}"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES(error_test PROPERTIES DEPENDS h5test-clear-error_test-objects)
+SET_TESTS_PROPERTIES (error_test PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PRELOAD=::")
#-- Adding test for links_env
ADD_EXECUTABLE (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c)
@@ -553,6 +634,32 @@ ENDIF (\${TEST_RESULT} STREQUAL \"0\")
ADD_TEST (NAME testlibinfo COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$<TARGET_FILE:${HDF5_LIB_TARGET}>" -P "${GREP_RUNNER}")
##############################################################################
+### P L U G I N T E S T S
+##############################################################################
+IF (BUILD_SHARED_LIBS)
+
+ IF (WIN32 AND NOT CYGWIN)
+ SET(CMAKE_SEP "\;")
+ ELSE (WIN32 AND NOT CYGWIN)
+ SET(CMAKE_SEP ":")
+ ENDIF(WIN32 AND NOT CYGWIN)
+
+ ADD_EXECUTABLE (plugin ${HDF5_TEST_SOURCE_DIR}/plugin.c)
+ TARGET_NAMING (plugin ${LIB_TYPE})
+ TARGET_LINK_LIBRARIES (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET})
+ SET_TARGET_PROPERTIES (plugin PROPERTIES FOLDER test)
+
+ ADD_TEST (NAME H5PLUGIN-plugin COMMAND $<TARGET_FILE:plugin>)
+ SET_TESTS_PROPERTIES (H5PLUGIN-plugin PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/testdir2")
+ELSE (BUILD_SHARED_LIBS)
+ MESSAGE (STATUS " **** Plugins libraries must be built as shared libraries **** ")
+ ADD_TEST (
+ NAME H5PLUGIN-SKIPPED
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP H5PLUGIN TESTING"
+ )
+ENDIF (BUILD_SHARED_LIBS)
+
+##############################################################################
##############################################################################
### V F D T E S T S ###
##############################################################################
diff --git a/test/Makefile.am b/test/Makefile.am
index a522f9d..f1a46e5 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -26,9 +26,13 @@ INCLUDES=-I$(top_srcdir)/src -I$(top_builddir)/src
# Test script for error_test and err_compat
TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh \
$(srcdir)/testswmr.sh testflushrefresh.sh
-check_SCRIPTS = $(TEST_SCRIPT)
SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT)
+if HAVE_SHARED_CONDITIONAL
+ TEST_SCRIPT += test_plugin.sh
+ SCRIPT_DEPEND += plugin$(EXEEXT)
+endif
+check_SCRIPTS = $(TEST_SCRIPT)
# These are our main targets. They should be listed in the order to be
# executed, generally most specific tests to least specific tests.
@@ -56,7 +60,9 @@ bin_PROGRAMS=swmr_generator swmr_reader swmr_writer swmr_remove_reader \
# and this lets automake keep all its test programs in one place.
check_PROGRAMS=$(TEST_PROG) error_test err_compat tcheck_version testmeta links_env \
flushrefresh
-
+if HAVE_SHARED_CONDITIONAL
+ check_PROGRAMS+= plugin
+endif
# These programs generate test files for the tests. They don't need to be
# compiled every time we want to test the library. However, putting
@@ -74,8 +80,25 @@ if BUILD_ALL_CONDITIONAL
noinst_PROGRAMS=$(BUILD_ALL_PROGS)
endif
-# The libh5test library provides common support code for the tests.
-noinst_LTLIBRARIES=libh5test.la
+if HAVE_SHARED_CONDITIONAL
+ # The libh5test library provides common support code for the tests.
+ noinst_LTLIBRARIES=libh5test.la
+
+ # The libdynlib1 and libdynlib2 library for testing plugin module plugin.c.
+ # Build it as shared library if configure is enabled for shared library.
+ lib_LTLIBRARIES=libdynlib1.la libdynlib2.la libdynlib3.la
+ libdynlib1_la_SOURCES=dynlib1.c
+ libdynlib2_la_SOURCES=dynlib2.c
+ libdynlib3_la_SOURCES=dynlib3.c
+
+install-exec-hook:
+ $(RM) $(DESTDIR)$(libdir)/*dynlib*
+
+else
+ # The libh5test library provides common support code for the tests.
+ noinst_LTLIBRARIES=libh5test.la
+endif
+
libh5test_la_SOURCES=h5test.c testframe.c cache_common.c swmr_common.c
# Use libhd5test.la to compile all of the tests
@@ -85,10 +108,9 @@ LDADD=libh5test.la $(LIBHDF5)
ttsafe_SOURCES=ttsafe.c ttsafe_dcreate.c ttsafe_error.c ttsafe_cancel.c \
ttsafe_acreate.c
+VFD_LIST = sec2 stdio core split multi family
if DIRECT_VFD_CONDITIONAL
- VFD_LIST = sec2 stdio core split multi family direct
-else
- VFD_LIST = sec2 stdio core split multi family
+ VFD_LIST += direct
endif
# Additional target for running timing test
@@ -127,7 +149,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 \
tmisc[0-9]*.h5 set_extent[1-5].h5 ext[12].bin \
getname.h5 getname[1-3].h5 sec2_file.h5 direct_file.h5 \
family_file000[0-3][0-9].h5 new_family_v16_000[0-3][0-9].h5 \
- multi_file-[rs].h5 core_file \
+ multi_file-[rs].h5 core_file plugin.h5 \
new_move_[ab].h5 ntypes.h5 dangle.h5 error_test.h5 err_compat.h5 \
dtransform.h5 test_filters.h5 get_file_name.h5 tstint[1-2].h5 \
unlink_chunked.h5 btree2.h5 objcopy_src.h5 objcopy_dst.h5 \
@@ -148,7 +170,7 @@ testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \
tvlstr.c tvltypes.c
# Temporary files.
-DISTCLEANFILES=testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh \
+DISTCLEANFILES=testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh test_plugin.sh \
testflushrefresh.sh
include $(top_srcdir)/config/conclude.am
diff --git a/test/Makefile.in b/test/Makefile.in
index 346750f..5dbcfa4 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -69,20 +69,25 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/H5srcdir_str.h.in $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/testcheck_version.sh.in \
- $(srcdir)/testerror.sh.in $(srcdir)/testflushrefresh.sh.in \
- $(srcdir)/testlibinfo.sh.in $(srcdir)/testlinks_env.sh.in \
- $(top_srcdir)/bin/depcomp $(top_srcdir)/bin/mkinstalldirs \
+ $(srcdir)/Makefile.in $(srcdir)/test_plugin.sh.in \
+ $(srcdir)/testcheck_version.sh.in $(srcdir)/testerror.sh.in \
+ $(srcdir)/testflushrefresh.sh.in $(srcdir)/testlibinfo.sh.in \
+ $(srcdir)/testlinks_env.sh.in $(top_srcdir)/bin/depcomp \
+ $(top_srcdir)/bin/mkinstalldirs \
$(top_srcdir)/config/commence.am \
$(top_srcdir)/config/conclude.am COPYING
+@HAVE_SHARED_CONDITIONAL_TRUE@am__append_1 = test_plugin.sh
+@HAVE_SHARED_CONDITIONAL_TRUE@am__append_2 = plugin$(EXEEXT)
bin_PROGRAMS = swmr_generator$(EXEEXT) swmr_reader$(EXEEXT) \
swmr_writer$(EXEEXT) swmr_remove_reader$(EXEEXT) \
swmr_remove_writer$(EXEEXT) swmr_addrem_writer$(EXEEXT) \
swmr_sparse_reader$(EXEEXT) swmr_sparse_writer$(EXEEXT)
check_PROGRAMS = $(am__EXEEXT_1) error_test$(EXEEXT) \
err_compat$(EXEEXT) tcheck_version$(EXEEXT) testmeta$(EXEEXT) \
- links_env$(EXEEXT) flushrefresh$(EXEEXT)
-@BUILD_ALL_CONDITIONAL_TRUE@noinst_PROGRAMS = $(am__EXEEXT_2)
+ links_env$(EXEEXT) flushrefresh$(EXEEXT) $(am__EXEEXT_2)
+@HAVE_SHARED_CONDITIONAL_TRUE@am__append_3 = plugin
+@BUILD_ALL_CONDITIONAL_TRUE@noinst_PROGRAMS = $(am__EXEEXT_3)
+@DIRECT_VFD_CONDITIONAL_TRUE@am__append_4 = direct
TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT)
subdir = test
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -93,18 +98,65 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/src/H5config.h
CONFIG_CLEAN_FILES = testcheck_version.sh testerror.sh \
testflushrefresh.sh H5srcdir_str.h testlibinfo.sh \
- testlinks_env.sh
+ testlinks_env.sh test_plugin.sh
CONFIG_CLEAN_VPATH_FILES =
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-libh5test_la_LIBADD =
-am_libh5test_la_OBJECTS = h5test.lo testframe.lo cache_common.lo \
- swmr_common.lo
-libh5test_la_OBJECTS = $(am_libh5test_la_OBJECTS)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"
+LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
+libdynlib1_la_LIBADD =
+am__libdynlib1_la_SOURCES_DIST = dynlib1.c
+@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib1_la_OBJECTS = dynlib1.lo
+libdynlib1_la_OBJECTS = $(am_libdynlib1_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
-am__installdirs = "$(DESTDIR)$(bindir)"
+@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib1_la_rpath = -rpath \
+@HAVE_SHARED_CONDITIONAL_TRUE@ $(libdir)
+libdynlib2_la_LIBADD =
+am__libdynlib2_la_SOURCES_DIST = dynlib2.c
+@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib2_la_OBJECTS = dynlib2.lo
+libdynlib2_la_OBJECTS = $(am_libdynlib2_la_OBJECTS)
+@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib2_la_rpath = -rpath \
+@HAVE_SHARED_CONDITIONAL_TRUE@ $(libdir)
+libdynlib3_la_LIBADD =
+am__libdynlib3_la_SOURCES_DIST = dynlib3.c
+@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib3_la_OBJECTS = dynlib3.lo
+libdynlib3_la_OBJECTS = $(am_libdynlib3_la_OBJECTS)
+@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib3_la_rpath = -rpath \
+@HAVE_SHARED_CONDITIONAL_TRUE@ $(libdir)
+libh5test_la_LIBADD =
+am_libh5test_la_OBJECTS = h5test.lo testframe.lo cache_common.lo \
+ swmr_common.lo
+libh5test_la_OBJECTS = $(am_libh5test_la_OBJECTS)
+@HAVE_SHARED_CONDITIONAL_FALSE@am_libh5test_la_rpath =
+@HAVE_SHARED_CONDITIONAL_TRUE@am_libh5test_la_rpath =
am__EXEEXT_1 = testhdf5$(EXEEXT) lheap$(EXEEXT) ohdr$(EXEEXT) \
stab$(EXEEXT) gheap$(EXEEXT) cache$(EXEEXT) cache_api$(EXEEXT) \
cache_tagging$(EXEEXT) pool$(EXEEXT) accum$(EXEEXT) \
@@ -121,7 +173,8 @@ am__EXEEXT_1 = testhdf5$(EXEEXT) lheap$(EXEEXT) ohdr$(EXEEXT) \
dtransform$(EXEEXT) reserved$(EXEEXT) cross_read$(EXEEXT) \
freespace$(EXEEXT) mf$(EXEEXT) farray$(EXEEXT) earray$(EXEEXT) \
btree2$(EXEEXT) fheap$(EXEEXT) file_image$(EXEEXT)
-am__EXEEXT_2 = gen_bad_ohdr$(EXEEXT) gen_bogus$(EXEEXT) \
+@HAVE_SHARED_CONDITIONAL_TRUE@am__EXEEXT_2 = plugin$(EXEEXT)
+am__EXEEXT_3 = gen_bad_ohdr$(EXEEXT) gen_bogus$(EXEEXT) \
gen_cross$(EXEEXT) gen_deflate$(EXEEXT) gen_filters$(EXEEXT) \
gen_idx$(EXEEXT) gen_new_array$(EXEEXT) gen_new_fill$(EXEEXT) \
gen_new_group$(EXEEXT) gen_new_mtime$(EXEEXT) \
@@ -392,6 +445,10 @@ ohdr_SOURCES = ohdr.c
ohdr_OBJECTS = ohdr.$(OBJEXT)
ohdr_LDADD = $(LDADD)
ohdr_DEPENDENCIES = libh5test.la $(LIBHDF5)
+plugin_SOURCES = plugin.c
+plugin_OBJECTS = plugin.$(OBJEXT)
+plugin_LDADD = $(LDADD)
+plugin_DEPENDENCIES = libh5test.la $(LIBHDF5)
pool_SOURCES = pool.c
pool_OBJECTS = pool.$(OBJEXT)
pool_LDADD = $(LDADD)
@@ -512,12 +569,14 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
-SOURCES = $(libh5test_la_SOURCES) accum.c app_ref.c big.c bittests.c \
- btree2.c cache.c cache_api.c cache_tagging.c cmpd_dset.c \
- cross_read.c dangle.c dsets.c dt_arith.c dtransform.c dtypes.c \
- earray.c efc.c enc_dec_plist.c enc_dec_plist_with_endianess.c \
- enum.c err_compat.c error_test.c extend.c external.c farray.c \
- fheap.c file_image.c fillval.c filter_fail.c flush1.c flush2.c \
+SOURCES = $(libdynlib1_la_SOURCES) $(libdynlib2_la_SOURCES) \
+ $(libdynlib3_la_SOURCES) $(libh5test_la_SOURCES) accum.c \
+ app_ref.c big.c bittests.c btree2.c cache.c cache_api.c \
+ cache_tagging.c cmpd_dset.c cross_read.c dangle.c dsets.c \
+ dt_arith.c dtransform.c dtypes.c earray.c efc.c \
+ enc_dec_plist.c enc_dec_plist_with_endianess.c enum.c \
+ err_compat.c error_test.c extend.c external.c farray.c fheap.c \
+ file_image.c fillval.c filter_fail.c flush1.c flush2.c \
flushrefresh.c freespace.c gen_bad_ohdr.c gen_bogus.c \
gen_cross.c gen_deflate.c gen_file_image.c gen_filespace.c \
gen_filters.c gen_idx.c gen_new_array.c gen_new_fill.c \
@@ -525,31 +584,33 @@ SOURCES = $(libh5test_la_SOURCES) accum.c app_ref.c big.c bittests.c \
gen_noencoder.c gen_nullspace.c gen_plist.c gen_sizes_lheap.c \
gen_specmetaread.c gen_udlinks.c getname.c gheap.c hyperslab.c \
istore.c lheap.c links.c links_env.c mf.c mount.c mtime.c \
- ntypes.c objcopy.c ohdr.c pool.c reserved.c set_extent.c \
- space_overflow.c stab.c swmr_addrem_writer.c swmr_generator.c \
- swmr_reader.c swmr_remove_reader.c swmr_remove_writer.c \
- swmr_sparse_reader.c swmr_sparse_writer.c swmr_writer.c \
- tcheck_version.c $(testhdf5_SOURCES) testmeta.c \
+ ntypes.c objcopy.c ohdr.c plugin.c pool.c reserved.c \
+ set_extent.c space_overflow.c stab.c swmr_addrem_writer.c \
+ swmr_generator.c swmr_reader.c swmr_remove_reader.c \
+ swmr_remove_writer.c swmr_sparse_reader.c swmr_sparse_writer.c \
+ swmr_writer.c tcheck_version.c $(testhdf5_SOURCES) testmeta.c \
$(ttsafe_SOURCES) unlink.c vfd.c
-DIST_SOURCES = $(libh5test_la_SOURCES) accum.c app_ref.c big.c \
- bittests.c btree2.c cache.c cache_api.c cache_tagging.c \
- cmpd_dset.c cross_read.c dangle.c dsets.c dt_arith.c \
- dtransform.c dtypes.c earray.c efc.c enc_dec_plist.c \
- enc_dec_plist_with_endianess.c enum.c err_compat.c \
- error_test.c extend.c external.c farray.c fheap.c file_image.c \
- fillval.c filter_fail.c flush1.c flush2.c flushrefresh.c \
- freespace.c gen_bad_ohdr.c gen_bogus.c gen_cross.c \
- gen_deflate.c gen_file_image.c gen_filespace.c gen_filters.c \
- gen_idx.c gen_new_array.c gen_new_fill.c gen_new_group.c \
- gen_new_mtime.c gen_new_super.c gen_noencoder.c \
- gen_nullspace.c gen_plist.c gen_sizes_lheap.c \
+DIST_SOURCES = $(am__libdynlib1_la_SOURCES_DIST) \
+ $(am__libdynlib2_la_SOURCES_DIST) \
+ $(am__libdynlib3_la_SOURCES_DIST) $(libh5test_la_SOURCES) \
+ accum.c app_ref.c big.c bittests.c btree2.c cache.c \
+ cache_api.c cache_tagging.c cmpd_dset.c cross_read.c dangle.c \
+ dsets.c dt_arith.c dtransform.c dtypes.c earray.c efc.c \
+ enc_dec_plist.c enc_dec_plist_with_endianess.c enum.c \
+ err_compat.c error_test.c extend.c external.c farray.c fheap.c \
+ file_image.c fillval.c filter_fail.c flush1.c flush2.c \
+ flushrefresh.c freespace.c gen_bad_ohdr.c gen_bogus.c \
+ gen_cross.c gen_deflate.c gen_file_image.c gen_filespace.c \
+ gen_filters.c gen_idx.c gen_new_array.c gen_new_fill.c \
+ gen_new_group.c gen_new_mtime.c gen_new_super.c \
+ gen_noencoder.c gen_nullspace.c gen_plist.c gen_sizes_lheap.c \
gen_specmetaread.c gen_udlinks.c getname.c gheap.c hyperslab.c \
istore.c lheap.c links.c links_env.c mf.c mount.c mtime.c \
- ntypes.c objcopy.c ohdr.c pool.c reserved.c set_extent.c \
- space_overflow.c stab.c swmr_addrem_writer.c swmr_generator.c \
- swmr_reader.c swmr_remove_reader.c swmr_remove_writer.c \
- swmr_sparse_reader.c swmr_sparse_writer.c swmr_writer.c \
- tcheck_version.c $(testhdf5_SOURCES) testmeta.c \
+ ntypes.c objcopy.c ohdr.c plugin.c pool.c reserved.c \
+ set_extent.c space_overflow.c stab.c swmr_addrem_writer.c \
+ swmr_generator.c swmr_reader.c swmr_remove_reader.c \
+ swmr_remove_writer.c swmr_sparse_reader.c swmr_sparse_writer.c \
+ swmr_writer.c tcheck_version.c $(testhdf5_SOURCES) testmeta.c \
$(ttsafe_SOURCES) unlink.c vfd.c
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
@@ -864,8 +925,8 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog accum.h5 cmpd_dset.h5 \
tmisc[0-9]*.h5 set_extent[1-5].h5 ext[12].bin getname.h5 \
getname[1-3].h5 sec2_file.h5 direct_file.h5 \
family_file000[0-3][0-9].h5 new_family_v16_000[0-3][0-9].h5 \
- multi_file-[rs].h5 core_file new_move_[ab].h5 ntypes.h5 \
- dangle.h5 error_test.h5 err_compat.h5 dtransform.h5 \
+ multi_file-[rs].h5 core_file plugin.h5 new_move_[ab].h5 \
+ ntypes.h5 dangle.h5 error_test.h5 err_compat.h5 dtransform.h5 \
test_filters.h5 get_file_name.h5 tstint[1-2].h5 \
unlink_chunked.h5 btree2.h5 objcopy_src.h5 objcopy_dst.h5 \
objcopy_ext.dat trefer1.h5 trefer2.h5 app_ref.h5 farray.h5 \
@@ -879,11 +940,12 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog accum.h5 cmpd_dset.h5 \
INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/src
# Test script for error_test and err_compat
-TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh \
- $(srcdir)/testswmr.sh testflushrefresh.sh
-
+TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh \
+ testlinks_env.sh $(srcdir)/testswmr.sh testflushrefresh.sh \
+ $(am__append_1)
+SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) \
+ links_env$(EXEEXT) $(am__append_2)
check_SCRIPTS = $(TEST_SCRIPT)
-SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT)
# These are our main targets. They should be listed in the order to be
# executed, generally most specific tests to least specific tests.
@@ -913,9 +975,12 @@ BUILD_ALL_PROGS = gen_bad_ohdr gen_bogus gen_cross gen_deflate gen_filters gen_i
gen_nullspace gen_udlinks space_overflow gen_filespace gen_specmetaread \
gen_sizes_lheap gen_file_image gen_plist
-
-# The libh5test library provides common support code for the tests.
-noinst_LTLIBRARIES = libh5test.la
+@HAVE_SHARED_CONDITIONAL_FALSE@noinst_LTLIBRARIES = libh5test.la
+@HAVE_SHARED_CONDITIONAL_TRUE@noinst_LTLIBRARIES = libh5test.la
+@HAVE_SHARED_CONDITIONAL_TRUE@lib_LTLIBRARIES = libdynlib1.la libdynlib2.la libdynlib3.la
+@HAVE_SHARED_CONDITIONAL_TRUE@libdynlib1_la_SOURCES = dynlib1.c
+@HAVE_SHARED_CONDITIONAL_TRUE@libdynlib2_la_SOURCES = dynlib2.c
+@HAVE_SHARED_CONDITIONAL_TRUE@libdynlib3_la_SOURCES = dynlib3.c
libh5test_la_SOURCES = h5test.c testframe.c cache_common.c swmr_common.c
# Use libhd5test.la to compile all of the tests
@@ -925,8 +990,7 @@ LDADD = libh5test.la $(LIBHDF5)
ttsafe_SOURCES = ttsafe.c ttsafe_dcreate.c ttsafe_error.c ttsafe_cancel.c \
ttsafe_acreate.c
-@DIRECT_VFD_CONDITIONAL_FALSE@VFD_LIST = sec2 stdio core split multi family
-@DIRECT_VFD_CONDITIONAL_TRUE@VFD_LIST = sec2 stdio core split multi family direct
+VFD_LIST = sec2 stdio core split multi family $(am__append_4)
# Sources for testhdf5 executable
testhdf5_SOURCES = testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \
@@ -936,7 +1000,7 @@ testhdf5_SOURCES = testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \
# Temporary files.
-DISTCLEANFILES = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh \
+DISTCLEANFILES = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh test_plugin.sh \
testflushrefresh.sh
@@ -1006,6 +1070,42 @@ testlibinfo.sh: $(top_builddir)/config.status $(srcdir)/testlibinfo.sh.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
testlinks_env.sh: $(top_builddir)/config.status $(srcdir)/testlinks_env.sh.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+test_plugin.sh: $(top_builddir)/config.status $(srcdir)/test_plugin.sh.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
@@ -1017,8 +1117,14 @@ clean-noinstLTLIBRARIES:
echo rm -f $${locs}; \
rm -f $${locs}; \
}
+libdynlib1.la: $(libdynlib1_la_OBJECTS) $(libdynlib1_la_DEPENDENCIES) $(EXTRA_libdynlib1_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(am_libdynlib1_la_rpath) $(libdynlib1_la_OBJECTS) $(libdynlib1_la_LIBADD) $(LIBS)
+libdynlib2.la: $(libdynlib2_la_OBJECTS) $(libdynlib2_la_DEPENDENCIES) $(EXTRA_libdynlib2_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(am_libdynlib2_la_rpath) $(libdynlib2_la_OBJECTS) $(libdynlib2_la_LIBADD) $(LIBS)
+libdynlib3.la: $(libdynlib3_la_OBJECTS) $(libdynlib3_la_DEPENDENCIES) $(EXTRA_libdynlib3_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(am_libdynlib3_la_rpath) $(libdynlib3_la_OBJECTS) $(libdynlib3_la_LIBADD) $(LIBS)
libh5test.la: $(libh5test_la_OBJECTS) $(libh5test_la_DEPENDENCIES) $(EXTRA_libh5test_la_DEPENDENCIES)
- $(AM_V_CCLD)$(LINK) $(libh5test_la_OBJECTS) $(libh5test_la_LIBADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(am_libh5test_la_rpath) $(libh5test_la_OBJECTS) $(libh5test_la_LIBADD) $(LIBS)
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
@@ -1278,6 +1384,9 @@ objcopy$(EXEEXT): $(objcopy_OBJECTS) $(objcopy_DEPENDENCIES) $(EXTRA_objcopy_DEP
ohdr$(EXEEXT): $(ohdr_OBJECTS) $(ohdr_DEPENDENCIES) $(EXTRA_ohdr_DEPENDENCIES)
@rm -f ohdr$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(ohdr_OBJECTS) $(ohdr_LDADD) $(LIBS)
+plugin$(EXEEXT): $(plugin_OBJECTS) $(plugin_DEPENDENCIES) $(EXTRA_plugin_DEPENDENCIES)
+ @rm -f plugin$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(plugin_OBJECTS) $(plugin_LDADD) $(LIBS)
pool$(EXEEXT): $(pool_OBJECTS) $(pool_DEPENDENCIES) $(EXTRA_pool_DEPENDENCIES)
@rm -f pool$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(pool_OBJECTS) $(pool_LDADD) $(LIBS)
@@ -1358,6 +1467,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dt_arith.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtransform.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtypes.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynlib1.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynlib2.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynlib3.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earray.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/efc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enc_dec_plist.Po@am__quote@
@@ -1409,6 +1521,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntypes.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/objcopy.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ohdr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pool.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reserved.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_extent.Po@am__quote@
@@ -1587,8 +1700,10 @@ check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local
+install-binPROGRAMS: install-libLTLIBRARIES
+
installdirs:
- for dir in "$(DESTDIR)$(bindir)"; do \
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -1622,11 +1737,12 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
+@HAVE_SHARED_CONDITIONAL_FALSE@install-exec-hook:
clean: clean-am
clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
- clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS \
- mostlyclean-am
+ clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
+ clean-noinstPROGRAMS mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
@@ -1652,8 +1768,9 @@ install-dvi: install-dvi-am
install-dvi-am:
-install-exec-am: install-binPROGRAMS
-
+install-exec-am: install-binPROGRAMS install-libLTLIBRARIES
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
install-html-am:
@@ -1692,25 +1809,27 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-binPROGRAMS
+uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES
-.MAKE: check-am install-am install-strip
+.MAKE: check-am install-am install-exec-am install-strip
.PHONY: CTAGS GTAGS all all-am all-local check check-TESTS check-am \
clean clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
- clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS \
- cscopelist ctags distclean distclean-compile distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-binPROGRAMS \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
- pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-binPROGRAMS
+ clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
+ clean-noinstPROGRAMS cscopelist ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-binPROGRAMS install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-exec-hook install-html install-html-am \
+ install-info install-info-am install-libLTLIBRARIES \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am tags \
+ uninstall uninstall-am uninstall-binPROGRAMS \
+ uninstall-libLTLIBRARIES
# List all build rules defined by HDF5 Makefiles as "PHONY" targets here.
@@ -1724,6 +1843,16 @@ uninstall-am: uninstall-binPROGRAMS
help:
@$(top_srcdir)/bin/makehelp
+@HAVE_SHARED_CONDITIONAL_TRUE@ # The libh5test library provides common support code for the tests.
+
+@HAVE_SHARED_CONDITIONAL_TRUE@ # The libdynlib1 and libdynlib2 library for testing plugin module plugin.c.
+@HAVE_SHARED_CONDITIONAL_TRUE@ # Build it as shared library if configure is enabled for shared library.
+
+@HAVE_SHARED_CONDITIONAL_TRUE@install-exec-hook:
+@HAVE_SHARED_CONDITIONAL_TRUE@ $(RM) $(DESTDIR)$(libdir)/*dynlib*
+
+@HAVE_SHARED_CONDITIONAL_FALSE@ # The libh5test library provides common support code for the tests.
+
# Additional target for running timing test
timings _timings: testmeta
@for timing in $(TIMINGS) dummy; do \
diff --git a/test/dynlib1.c b/test/dynlib1.c
new file mode 100644
index 0000000..1ccc33a
--- /dev/null
+++ b/test/dynlib1.c
@@ -0,0 +1,97 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic document set and is *
+ * linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
+ * to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * Programmer: Raymond Lu
+ * 13 February 2013
+ *
+ * Purpose: Tests the plugin module (H5PL)
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "H5PLextern.h"
+
+#define H5Z_FILTER_DYNLIB1 257
+
+static size_t H5Z_filter_dynlib1(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+
+/* This message derives from H5Z */
+const H5Z_class2_t H5Z_DYNLIB1[1] = {{
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_DYNLIB1, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "dynlib1", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ (H5Z_func_t)H5Z_filter_dynlib1, /* The actual filter function */
+}};
+
+H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;}
+const void *H5PLget_plugin_info(void) {return H5Z_DYNLIB1;}
+
+/*-------------------------------------------------------------------------
+ * Function: H5Z_filter_dynlib1
+ *
+ * Purpose: A dynlib1 filter method that adds on and subtract from
+ * the original value with another value. It will be built
+ * as a shared library. plugin.c test will load and use
+ * this filter library.
+ *
+ * Return: Success: Data chunk size
+ *
+ * Failure: 0
+ *
+ * Programmer: Raymond Lu
+ * 29 March 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static size_t
+H5Z_filter_dynlib1(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes,
+ size_t *buf_size, void **buf)
+{
+ int *int_ptr = (int *)*buf; /* Pointer to the data values */
+ size_t buf_left = *buf_size; /* Amount of data buffer left to process */
+ int add_on = 0;
+
+ /* Check for the correct number of parameters */
+ if(cd_nelmts == 0)
+ return(0);
+
+ /* Check that permanent parameters are set correctly */
+ if(cd_values[0] > 9)
+ return(0);
+
+ add_on = (int)cd_values[0];
+
+ if(flags & H5Z_FLAG_REVERSE) { /*read*/
+ /* Substract the "add on" value to all the data values */
+ while(buf_left > 0) {
+ *int_ptr++ -= add_on;
+ buf_left -= sizeof(int);
+ } /* end while */
+ } /* end if */
+ else { /*write*/
+ /* Add the "add on" value to all the data values */
+ while(buf_left > 0) {
+ *int_ptr++ += add_on;
+ buf_left -= sizeof(int);
+ } /* end while */
+ } /* end else */
+
+ return nbytes;
+} /* end H5Z_filter_dynlib1() */
+
diff --git a/test/dynlib2.c b/test/dynlib2.c
new file mode 100644
index 0000000..a853ed0
--- /dev/null
+++ b/test/dynlib2.c
@@ -0,0 +1,91 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic document set and is *
+ * linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
+ * to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * Programmer: Raymond Lu
+ * 13 February 2013
+ *
+ * Purpose: Tests the plugin module (H5PL)
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "H5PLextern.h"
+
+#define H5Z_FILTER_DYNLIB2 258
+#define MULTIPLIER 3
+
+static size_t H5Z_filter_dynlib2(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+
+/* This message derives from H5Z */
+const H5Z_class2_t H5Z_DYNLIB2[1] = {{
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_DYNLIB2, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "dynlib2", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ (H5Z_func_t)H5Z_filter_dynlib2, /* The actual filter function */
+}};
+
+H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;}
+const void *H5PLget_plugin_info(void) {return H5Z_DYNLIB2;}
+
+/*-------------------------------------------------------------------------
+ * Function: H5Z_filter_dynlib2
+ *
+ * Purpose: A dynlib2 filter method that multiplies the original value
+ * during write and divide the original value during read. It
+ * will be built as a shared library. plugin.c test will load
+ * and use this filter library.
+ *
+ * Return: Success: Data chunk size
+ *
+ * Failure: 0
+ *
+ * Programmer: Raymond Lu
+ * 29 March 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static size_t
+H5Z_filter_dynlib2(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes,
+ size_t *buf_size, void **buf)
+{
+ int *int_ptr = (int *)*buf; /* Pointer to the data values */
+ size_t buf_left = *buf_size; /* Amount of data buffer left to process */
+
+ /* Check for the correct number of parameters */
+ if(cd_nelmts > 0)
+ return(0);
+
+ if(flags & H5Z_FLAG_REVERSE) { /*read*/
+ /* Divide the original value with MULTIPLIER */
+ while(buf_left > 0) {
+ *int_ptr++ /= MULTIPLIER;
+ buf_left -= sizeof(int);
+ } /* end while */
+ } /* end if */
+ else { /*write*/
+ /* Multiply the original value with MULTIPLIER */
+ while(buf_left > 0) {
+ *int_ptr++ *= MULTIPLIER;
+ buf_left -= sizeof(int);
+ } /* end while */
+ } /* end else */
+
+ return nbytes;
+} /* end H5Z_filter_dynlib2() */
+
diff --git a/test/dynlib3.c b/test/dynlib3.c
new file mode 100644
index 0000000..9560b86
--- /dev/null
+++ b/test/dynlib3.c
@@ -0,0 +1,102 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic document set and is *
+ * linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
+ * to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * Programmer: Raymond Lu
+ * 1 April 2013
+ *
+ * Purpose: Tests the plugin module (H5PL)
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "H5PLextern.h"
+
+#define H5Z_FILTER_DYNLIB3 259
+#define SUFFIX_LEN 8
+#define GROUP_SUFFIX ".h5group"
+
+static size_t H5Z_filter_dynlib3(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+
+/* This message derives from H5Z */
+const H5Z_class2_t H5Z_DYNLIB3[1] = {{
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_DYNLIB3, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "dynlib3", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ (H5Z_func_t)H5Z_filter_dynlib3, /* The actual filter function */
+}};
+
+H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;}
+const void *H5PLget_plugin_info(void) {return H5Z_DYNLIB3;}
+
+/*-------------------------------------------------------------------------
+ * Function: H5Z_filter_dynlib3
+ *
+ * Purpose: A dynlib3 filter method that is used to test groups. It
+ * appends the suffix ".h5group" to each group name during
+ * write and takes it out during read.
+ *
+ * Return: Success: Data chunk size
+ *
+ * Failure: 0
+ *
+ * Programmer: Raymond Lu
+ * 1 April 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static size_t
+H5Z_filter_dynlib3(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes,
+ size_t *buf_size, void **buf)
+{
+ size_t ret_value; /* Return value */
+
+ /* Check for the correct number of parameters */
+ if(cd_nelmts > 0)
+ return(0);
+
+ if(flags & H5Z_FLAG_REVERSE) { /*read*/
+ ret_value = *buf_size = nbytes - SUFFIX_LEN;
+ } /* end if */
+ else { /*write*/
+ void *outbuf = NULL; /* Pointer to new buffer */
+ unsigned char *dst; /* Temporary pointer to destination buffer */
+
+ dst = (unsigned char *)(outbuf = malloc(nbytes + SUFFIX_LEN));
+
+ /* Copy raw data */
+ memcpy((void*)dst, (void*)(*buf), nbytes);
+
+ /* Append suffix to raw data for storage */
+ dst += nbytes;
+ memcpy(dst, (void*)GROUP_SUFFIX, SUFFIX_LEN);
+
+ /* Free input buffer */
+ free(*buf);
+
+ /* Set return values */
+ *buf_size = nbytes + SUFFIX_LEN;
+ *buf = outbuf;
+ outbuf = NULL;
+ ret_value = *buf_size;
+ } /* end else */
+
+ return ret_value;
+} /* H5Z_filter_dynlib3() */
+
diff --git a/test/plugin.c b/test/plugin.c
new file mode 100644
index 0000000..86bc952
--- /dev/null
+++ b/test/plugin.c
@@ -0,0 +1,732 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic document set and is *
+ * linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
+ * to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * Programmer: Raymond Lu
+ * 13 February 2013
+ *
+ * Purpose: Tests the plugin module (H5PL)
+ */
+#include <stdlib.h>
+#include <time.h>
+
+#include "h5test.h"
+#include "H5srcdir.h"
+
+/*
+ * This file needs to access private datatypes from the H5Z package.
+ */
+#define H5Z_PACKAGE
+#include "H5Zpkg.h"
+
+/* Filters for HDF5 internal test */
+#define H5Z_FILTER_DYNLIB1 257
+#define H5Z_FILTER_DYNLIB2 258
+#define H5Z_FILTER_DYNLIB3 259
+
+const char *FILENAME[] = {
+ "plugin",
+ NULL
+};
+#define FILENAME_BUF_SIZE 1024
+
+/* Dataset names for testing filters */
+#define DSET_DEFLATE_NAME "deflate"
+#define DSET_DYNLIB1_NAME "dynlib1"
+#define DSET_DYNLIB2_NAME "dynlib2"
+
+/* Parameters for internal filter test */
+#define FILTER_CHUNK_DIM1 2
+#define FILTER_CHUNK_DIM2 25
+#define FILTER_HS_OFFSET1 7
+#define FILTER_HS_OFFSET2 30
+#define FILTER_HS_SIZE1 4
+#define FILTER_HS_SIZE2 50
+
+/* Shared global arrays */
+#define DSET_DIM1 100
+#define DSET_DIM2 200
+
+/* Limit random number within 20000 */
+#define RANDOM_LIMIT 20000
+
+#define GROUP_ITERATION 1000
+
+int points_deflate[DSET_DIM1][DSET_DIM2],
+ points_dynlib1[DSET_DIM1][DSET_DIM2],
+ points_dynlib2[DSET_DIM1][DSET_DIM2],
+ points_bzip2[DSET_DIM1][DSET_DIM2];
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_filter_internal
+ *
+ * Purpose: Tests writing entire data and partial data with filters
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Raymond Lu
+ * 27 February 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_filter_internal(hid_t fid, const char *name, hid_t dcpl)
+{
+ hid_t dataset; /* Dataset ID */
+ hid_t dxpl; /* Dataset xfer property list ID */
+ hid_t write_dxpl; /* Dataset xfer property list ID for writing */
+ hid_t sid; /* Dataspace ID */
+ const hsize_t size[2] = {DSET_DIM1, DSET_DIM2}; /* Dataspace dimensions */
+ const hsize_t hs_offset[2] = {FILTER_HS_OFFSET1, FILTER_HS_OFFSET2}; /* Hyperslab offset */
+ const hsize_t hs_size[2] = {FILTER_HS_SIZE1, FILTER_HS_SIZE2}; /* Hyperslab size */
+ void *tconv_buf = NULL; /* Temporary conversion buffer */
+ int points[DSET_DIM1][DSET_DIM2], check[DSET_DIM1][DSET_DIM2];
+ size_t i, j; /* Local index variables */
+ int n = 0;
+
+ /* Create the data space */
+ if((sid = H5Screate_simple(2, size, NULL)) < 0) goto error;
+
+ /*
+ * Create a small conversion buffer to test strip mining. We
+ * might as well test all we can!
+ */
+ if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) goto error;
+ tconv_buf = HDmalloc((size_t)1000);
+ if(H5Pset_buffer(dxpl, (size_t)1000, tconv_buf, NULL) < 0) goto error;
+ if((write_dxpl = H5Pcopy(dxpl)) < 0) TEST_ERROR;
+
+ TESTING(" filters (setup)");
+
+ /* Check if all the filters are available */
+ if(H5Pall_filters_avail(dcpl)!=TRUE) {
+ H5_FAILED();
+ printf(" Line %d: Incorrect filter availability\n",__LINE__);
+ goto error;
+ } /* end if */
+
+ /* Create the dataset */
+ if((dataset = H5Dcreate2(fid, name, H5T_NATIVE_INT, sid, H5P_DEFAULT,
+ dcpl, H5P_DEFAULT)) < 0) goto error;
+
+ PASSED();
+
+ /*----------------------------------------------------------------------
+ * STEP 1: Read uninitialized data. It should be zero.
+ *----------------------------------------------------------------------
+ */
+ TESTING(" filters (uninitialized read)");
+
+ if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0)
+ TEST_ERROR;
+
+ for(i=0; i<(size_t)size[0]; i++) {
+ for(j=0; j<(size_t)size[1]; j++) {
+ if(0!=check[i][j]) {
+ H5_FAILED();
+ printf(" Read a non-zero value.\n");
+ printf(" At index %lu,%lu\n",
+ (unsigned long)i, (unsigned long)j);
+ goto error;
+ }
+ }
+ }
+ PASSED();
+
+ /*----------------------------------------------------------------------
+ * STEP 2: Test filters by setting up a chunked dataset and writing
+ * to it.
+ *----------------------------------------------------------------------
+ */
+ TESTING(" filters (write)");
+
+ n = 0;
+ for(i=0; i<size[0]; i++) {
+ for(j=0; j<size[1]; j++) {
+ points[i][j] = (int)(n++);
+ }
+ }
+
+ if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, points) < 0)
+ TEST_ERROR;
+
+ PASSED();
+
+ /*----------------------------------------------------------------------
+ * STEP 3: Try to read the data we just wrote.
+ *----------------------------------------------------------------------
+ */
+ TESTING(" filters (read)");
+
+ /* Read the dataset back */
+ if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0)
+ TEST_ERROR;
+
+ /* Check that the values read are the same as the values written */
+ for(i=0; i<size[0]; i++) {
+ for(j=0; j<size[1]; j++) {
+ if(points[i][j] != check[i][j]) {
+ H5_FAILED();
+ fprintf(stderr," Read different values than written.\n");
+ fprintf(stderr," At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ fprintf(stderr," At original: %d\n", (int)points[i][j]);
+ fprintf(stderr," At returned: %d\n", (int)check[i][j]);
+ goto error;
+ }
+ }
+ }
+
+ PASSED();
+
+ /*----------------------------------------------------------------------
+ * STEP 4: Write new data over the top of the old data. The new data is
+ * random thus not very compressible, and will cause the chunks to move
+ * around as they grow. We only change values for the left half of the
+ * dataset although we rewrite the whole thing.
+ *----------------------------------------------------------------------
+ */
+ TESTING(" filters (modify)");
+
+ for(i=0; i<size[0]; i++) {
+ for(j=0; j<size[1]/2; j++) {
+ points[i][j] = (int)HDrandom () % RANDOM_LIMIT;
+ }
+ }
+ if(H5Dwrite (dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, points) < 0)
+ TEST_ERROR;
+
+ /* Read the dataset back and check it */
+ if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0)
+ TEST_ERROR;
+
+ /* Check that the values read are the same as the values written */
+ for(i=0; i<size[0]; i++) {
+ for(j=0; j<size[1]; j++) {
+ if(points[i][j] != check[i][j]) {
+ H5_FAILED();
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n",
+ (unsigned long)i, (unsigned long)j);
+ goto error;
+ }
+ }
+ }
+
+ PASSED();
+
+ /*----------------------------------------------------------------------
+ * STEP 5: Close the dataset and then open it and read it again. This
+ * insures that the filters message is picked up properly from the
+ * object header.
+ *----------------------------------------------------------------------
+ */
+ TESTING(" filters (re-open)");
+
+ if(H5Dclose(dataset) < 0) TEST_ERROR;
+ if((dataset = H5Dopen2(fid, name, H5P_DEFAULT)) < 0) TEST_ERROR;
+
+ if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0)
+ TEST_ERROR;
+
+ /* Check that the values read are the same as the values written */
+ for(i = 0; i < size[0]; i++)
+ for(j = 0; j < size[1]; j++)
+ if(points[i][j] != check[i][j]) {
+ H5_FAILED();
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n",
+ (unsigned long)i, (unsigned long)j);
+ goto error;
+ } /* end if */
+
+ PASSED();
+
+ /*----------------------------------------------------------------------
+ * STEP 6: Test partial I/O by writing to and then reading from a
+ * hyperslab of the dataset. The hyperslab does not line up on chunk
+ * boundaries (we know that case already works from above tests).
+ *----------------------------------------------------------------------
+ */
+ TESTING(" filters (partial I/O)");
+
+ for(i=0; i<(size_t)hs_size[0]; i++) {
+ for(j=0; j<(size_t)hs_size[1]; j++) {
+ points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j] = (int)HDrandom() % RANDOM_LIMIT;
+ }
+ }
+ if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, hs_offset, NULL, hs_size,
+ NULL) < 0) TEST_ERROR;
+ /* (Use the "read" DXPL because partial I/O on corrupted data test needs to ignore errors during writing) */
+ if(H5Dwrite (dataset, H5T_NATIVE_INT, sid, sid, dxpl, points) < 0)
+ TEST_ERROR;
+
+ if(H5Dread (dataset, H5T_NATIVE_INT, sid, sid, dxpl, check) < 0)
+ TEST_ERROR;
+
+ /* Check that the values read are the same as the values written */
+ for(i=0; i<(size_t)hs_size[0]; i++) {
+ for(j=0; j<(size_t)hs_size[1]; j++) {
+ if(points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j] !=
+ check[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]) {
+ H5_FAILED();
+ fprintf(stderr," Read different values than written.\n");
+ fprintf(stderr," At index %lu,%lu\n",
+ (unsigned long)((size_t)hs_offset[0]+i),
+ (unsigned long)((size_t)hs_offset[1]+j));
+ fprintf(stderr," At original: %d\n",
+ (int)points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]);
+ fprintf(stderr," At returned: %d\n",
+ (int)check[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]);
+ goto error;
+ }
+ }
+ }
+
+ PASSED();
+
+ /* Save the data written to the file for later comparison when the file
+ * is reopened for read test */
+ for(i=0; i<size[0]; i++) {
+ for(j=0; j<size[1]; j++) {
+ if(!HDstrcmp(name, DSET_DEFLATE_NAME)) {
+ points_deflate[i][j] = points[i][j];
+ } else if(!HDstrcmp(name, DSET_DYNLIB1_NAME)) {
+ points_dynlib1[i][j] = points[i][j];
+ } else if(!HDstrcmp(name, DSET_DYNLIB2_NAME)) {
+ points_dynlib2[i][j] = points[i][j];
+ }
+ }
+ }
+
+ /* Clean up objects used for this test */
+ if(H5Dclose (dataset) < 0) goto error;
+ if(H5Sclose (sid) < 0) goto error;
+ if(H5Pclose (dxpl) < 0) goto error;
+ free (tconv_buf);
+
+ return(0);
+
+error:
+ if(tconv_buf)
+ free (tconv_buf);
+ return -1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: test_filters_for_datasets
+ *
+ * Purpose: Tests creating datasets and writing data with dynamically
+ * loaded filters
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Raymond Lu
+ * 14 March 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_filters_for_datasets(hid_t file)
+{
+ hid_t dc; /* Dataset creation property list ID */
+ const hsize_t chunk_size[2] = {FILTER_CHUNK_DIM1, FILTER_CHUNK_DIM2}; /* Chunk dimensions */
+ unsigned int compress_level = 9;
+
+ /*----------------------------------------------------------
+ * STEP 1: Test deflation by itself.
+ *----------------------------------------------------------
+ */
+#ifdef H5_HAVE_FILTER_DEFLATE
+ puts("Testing deflate filter");
+ if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
+ if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
+ if(H5Pset_deflate (dc, 6) < 0) goto error;
+
+ if(test_filter_internal(file,DSET_DEFLATE_NAME,dc) < 0) goto error;
+ /* Clean up objects used for this test */
+ if(H5Pclose (dc) < 0) goto error;
+#else /* H5_HAVE_FILTER_DEFLATE */
+ TESTING("deflate filter");
+ SKIPPED();
+ puts(" Deflate filter not enabled");
+#endif /* H5_HAVE_FILTER_DEFLATE */
+
+ /*----------------------------------------------------------
+ * STEP 2: Test DYNLIB1 by itself.
+ *----------------------------------------------------------
+ */
+ puts("Testing DYNLIB1 filter");
+ if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
+ if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
+ if(H5Pset_filter (dc, H5Z_FILTER_DYNLIB1, H5Z_FLAG_MANDATORY, (size_t)1, &compress_level) < 0) goto error;
+
+ if(test_filter_internal(file,DSET_DYNLIB1_NAME,dc) < 0) goto error;
+
+ /* Clean up objects used for this test */
+ if(H5Pclose (dc) < 0) goto error;
+
+ /* Unregister the dynamic filter DYNLIB1 for testing purpose. The next time when this test is run for
+ * the new file format, the library's H5PL code has to search in the table of loaded plugin libraries
+ * for this filter. */
+ if(H5Zunregister(H5Z_FILTER_DYNLIB1) < 0) goto error;
+
+ /*----------------------------------------------------------
+ * STEP 3: Test DYNLIB2 by itself.
+ *----------------------------------------------------------
+ */
+ puts("Testing DYNLIB2 filter");
+ if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
+ if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
+ if(H5Pset_filter (dc, H5Z_FILTER_DYNLIB2, H5Z_FLAG_MANDATORY, 0, NULL) < 0) goto error;
+
+ if(test_filter_internal(file,DSET_DYNLIB2_NAME,dc) < 0) goto error;
+
+ /* Clean up objects used for this test */
+ if(H5Pclose (dc) < 0) goto error;
+
+ /* Unregister the dynamic filter DYNLIB2 for testing purpose. The next time when this test is run for
+ * the new file format, the library's H5PL code has to search in the table of loaded plugin libraries
+ * for this filter. */
+ if(H5Zunregister(H5Z_FILTER_DYNLIB2) < 0) goto error;
+
+ return 0;
+
+error:
+ return -1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: test_read_data
+ *
+ * Purpose: Tests reading data and compares values
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Raymond Lu
+ * 14 March 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_read_data(hid_t dataset, int *origin_data)
+{
+ int check[DSET_DIM1][DSET_DIM2];
+ const hsize_t size[2] = {DSET_DIM1, DSET_DIM2}; /* Dataspace dimensions */
+ int *data_p = origin_data;
+ size_t i, j; /* Local index variables */
+
+ /* Read the dataset back */
+ if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check) < 0)
+ TEST_ERROR;
+
+ /* Check that the values read are the same as the values written */
+ for(i=0; i<size[0]; i++) {
+ for(j=0; j<size[1]; j++) {
+ if(*data_p != check[i][j]) {
+ H5_FAILED();
+ fprintf(stderr," Read different values than written.\n");
+ fprintf(stderr," At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ fprintf(stderr," At original: %d\n", *data_p);
+ fprintf(stderr," At returned: %d\n", (int)check[i][j]);
+ goto error;
+ }
+ data_p++;
+ }
+ }
+
+ PASSED();
+ return 0;
+
+error:
+ return -1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: test_read_with_filters
+ *
+ * Purpose: Tests reading dataset created with dynamically loaded filters
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Raymond Lu
+ * 14 March 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_read_with_filters(hid_t file)
+{
+ hid_t dset; /* Dataset ID */
+
+ /*----------------------------------------------------------
+ * STEP 1: Test deflation by itself.
+ *----------------------------------------------------------
+ */
+#ifdef H5_HAVE_FILTER_DEFLATE
+ TESTING("Testing deflate filter");
+
+ if(H5Zfilter_avail(H5Z_FILTER_DEFLATE) != TRUE) TEST_ERROR
+
+ if((dset = H5Dopen2(file,DSET_DEFLATE_NAME,H5P_DEFAULT)) < 0) TEST_ERROR
+
+ if(test_read_data(dset, (int *)points_deflate) < 0) TEST_ERROR
+
+ if(H5Dclose(dset) < 0) TEST_ERROR
+
+ /* Clean up objects used for this test */
+#else /* H5_HAVE_FILTER_DEFLATE */
+ TESTING("deflate filter");
+ SKIPPED();
+ puts(" Deflate filter not enabled");
+#endif /* H5_HAVE_FILTER_DEFLATE */
+
+ /*----------------------------------------------------------
+ * STEP 2: Test DYNLIB1 by itself.
+ *----------------------------------------------------------
+ */
+ TESTING("Testing DYNLIB1 filter");
+
+ if((dset = H5Dopen2(file,DSET_DYNLIB1_NAME,H5P_DEFAULT)) < 0) TEST_ERROR
+
+ if(test_read_data(dset, (int *)points_dynlib1) < 0) TEST_ERROR
+
+ if(H5Dclose(dset) < 0) TEST_ERROR
+
+ /*----------------------------------------------------------
+ * STEP 3: Test Bogus2 by itself.
+ *----------------------------------------------------------
+ */
+ TESTING("Testing DYNLIB2 filter");
+
+ if((dset = H5Dopen2(file,DSET_DYNLIB2_NAME,H5P_DEFAULT)) < 0) TEST_ERROR
+
+ if(test_read_data(dset, (int *)points_dynlib2) < 0) TEST_ERROR
+
+ if(H5Dclose(dset) < 0) TEST_ERROR
+
+ return 0;
+
+error:
+ return -1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: test_filters_for_groups
+ *
+ * Purpose: Tests creating group with dynamically loaded filters
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Raymond Lu
+ * 1 April 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_filters_for_groups(hid_t file)
+{
+ hid_t gcpl, gid, group;
+ int i;
+ char gname[256];
+
+ TESTING("Testing DYNLIB3 filter for group");
+
+ if((gcpl = H5Pcreate(H5P_GROUP_CREATE)) < 0) goto error;
+
+ /* Use DYNLIB3 for creating groups */
+ if(H5Pset_filter (gcpl, H5Z_FILTER_DYNLIB3, H5Z_FLAG_MANDATORY, (size_t)0, NULL) < 0) goto error;
+
+ /* Create a group using this filter */
+ if((gid = H5Gcreate2(file, "group1", H5P_DEFAULT, gcpl, H5P_DEFAULT)) < 0) goto error;
+
+ /* Create multiple groups under "group1" */
+ for (i=0; i < GROUP_ITERATION; i++) {
+ sprintf(gname, "group_%d", i);
+ if((group = H5Gcreate2(gid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
+ if(H5Gclose(group) < 0) goto error;
+ }
+
+ /* Close the group */
+ if(H5Gclose(gid) < 0) goto error;
+
+ /* Clean up objects used for this test */
+ if(H5Pclose (gcpl) < 0) goto error;
+
+ PASSED();
+
+ return 0;
+
+error:
+ return -1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: test_groups_with_filters
+ *
+ * Purpose: Tests opening group with dynamically loaded filters
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Raymond Lu
+ * 1 April 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_groups_with_filters(hid_t file)
+{
+ hid_t gid, group;
+ int i;
+ char gname[256];
+
+ TESTING("Testing opening groups with DYNLIB3 filter");
+
+ /* Open the top group */
+ if((gid = H5Gopen2(file, "group1", H5P_DEFAULT)) < 0) goto error;
+
+ /* Create multiple groups under "group1" */
+ for (i=0; i < GROUP_ITERATION; i++) {
+ sprintf(gname, "group_%d", i);
+ if((group = H5Gopen2(gid, gname, H5P_DEFAULT)) < 0) goto error;
+ if(H5Gclose(group) < 0) goto error;
+ }
+
+ /* Close the group */
+ if(H5Gclose(gid) < 0) goto error;
+
+ PASSED();
+
+ return 0;
+
+error:
+ return -1;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: main
+ *
+ * Purpose: Tests the plugin module (H5PL)
+ *
+ * Return: Success: exit(0)
+ *
+ * Failure: exit(1)
+ *
+ * Programmer: Raymond Lu
+ * 14 March 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(void)
+{
+ char filename[FILENAME_BUF_SIZE];
+ hid_t file, fapl, fapl2;
+ hbool_t new_format;
+ int mdc_nelmts;
+ size_t rdcc_nelmts;
+ size_t rdcc_nbytes;
+ double rdcc_w0;
+ int nerrors = 0;
+
+ /* Testing setup */
+ h5_reset();
+ fapl = h5_fileaccess();
+
+ /* Turn off the chunk cache, so all the chunks are immediately written to disk */
+ if(H5Pget_cache(fapl, &mdc_nelmts, &rdcc_nelmts, &rdcc_nbytes, &rdcc_w0) < 0)
+ TEST_ERROR
+ rdcc_nbytes = 0;
+ if(H5Pset_cache(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0) < 0)
+ TEST_ERROR
+
+ /* Copy the file access property list */
+ if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR
+
+ /* Set the "use the latest version of the format" bounds for creating objects in the file */
+ if(H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) TEST_ERROR
+
+ h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
+
+ /* Test with old & new format groups */
+ for(new_format = FALSE; new_format <= TRUE; new_format++) {
+ hid_t my_fapl;
+
+ /* Set the FAPL for the type of format */
+ if(new_format) {
+ puts("\nTesting with new file format:");
+ my_fapl = fapl2;
+ } /* end if */
+ else {
+ puts("Testing with old file format:");
+ my_fapl = fapl;
+ } /* end else */
+
+ /* Create the file for this test */
+ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, my_fapl)) < 0)
+ TEST_ERROR
+
+ /* Test dynamically loaded filters for chunked dataset */
+ nerrors += (test_filters_for_datasets(file) < 0 ? 1 : 0);
+
+ /* Test dynamically loaded filters for groups */
+ nerrors += (test_filters_for_groups(file) < 0 ? 1 : 0);
+
+ if(H5Fclose(file) < 0)
+ TEST_ERROR
+ } /* end for */
+
+ /* Close FAPL */
+ if(H5Pclose(fapl2) < 0) TEST_ERROR
+ if(H5Pclose(fapl) < 0) TEST_ERROR
+
+ puts("\nTesting reading data with with dynamic plugin filters:");
+
+ /* Close the library so that all loaded plugin libraries are unloaded */
+ h5_reset();
+ fapl = h5_fileaccess();
+
+ /* Reopen the file for testing data reading */
+ if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
+ TEST_ERROR
+
+ /* Read the data with filters */
+ nerrors += (test_read_with_filters(file) < 0 ? 1 : 0);
+
+ /* Open the groups with filters */
+ nerrors += (test_groups_with_filters(file) < 0 ? 1 : 0);
+
+ if(H5Fclose(file) < 0)
+ TEST_ERROR
+
+ if(nerrors)
+ TEST_ERROR
+ printf("All plugin tests passed.\n");
+ h5_cleanup(FILENAME, fapl);
+
+ return 0;
+
+error:
+ nerrors = MAX(1, nerrors);
+ printf("***** %d PLUGIN TEST%s FAILED! *****\n",
+ nerrors, 1 == nerrors ? "" : "S");
+ return 1;
+}
+
diff --git a/test/test_plugin.sh.in b/test/test_plugin.sh.in
new file mode 100644
index 0000000..569e938
--- /dev/null
+++ b/test/test_plugin.sh.in
@@ -0,0 +1,93 @@
+#! /bin/sh
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the files COPYING and Copyright.html. COPYING can be found at the root
+# of the source code distribution tree; Copyright.html can be found at the
+# root level of an installed copy of the electronic document set and is
+# linked from the top-level documents page. It can also be found at
+# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access
+# to either file, you may request a copy from help@hdfgroup.org.
+#
+srcdir=@srcdir@
+TOP_BUILDDIR=@top_builddir@
+
+# Determine backward compatibility options enabled
+DEPRECATED_SYMBOLS="@DEPRECATED_SYMBOLS@"
+
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+nerrors=0
+verbose=yes
+exit_code=$EXIT_SUCCESS
+
+TEST_NAME=plugin
+TEST_BIN=`pwd`/$TEST_NAME
+FROM_DIR=`pwd`/.libs
+PLUGIN_LIB1="$FROM_DIR/libdynlib1.* $FROM_DIR/libdynlib3.*"
+PLUGIN_LIB2="$FROM_DIR/libdynlib2.*"
+PLUGIN_LIBDIR1=testdir1
+PLUGIN_LIBDIR2=testdir2
+CP="cp -p" # Use -p to preserve mode,ownership,timestamps
+RM="rm -rf"
+
+# Print a line-line message left justified in a field of 70 characters
+# beginning with the word "Testing".
+#
+TESTING() {
+ SPACES=" "
+ echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
+}
+
+# Main Body
+# Create test directories if not exists yet.
+test -d $PLUGIN_LIBDIR1 || mkdir -p $PLUGIN_LIBDIR1
+if [ $? != 0 ]; then
+ echo "Failed to create test directory($PLUGIN_LIBDIR1)"
+ exit $EXIT_FAILURE
+fi
+
+test -d $PLUGIN_LIBDIR2 || mkdir -p $PLUGIN_LIBDIR2
+if [ $? != 0 ]; then
+ echo "Failed to create test directory($PLUGIN_LIBDIR2)"
+ exit $EXIT_FAILURE
+fi
+
+# copy plugin library for test
+$CP $PLUGIN_LIB1 $PLUGIN_LIBDIR1
+if [ $? != 0 ]; then
+ echo "Failed to copy plugin library ($PLUGIN_LIB1) for test."
+ exit $EXIT_FAILURE
+fi
+
+$CP $PLUGIN_LIB2 $PLUGIN_LIBDIR2
+if [ $? != 0 ]; then
+ echo "Failed to copy plugin library ($PLUGIN_LIB2) for test."
+ exit $EXIT_FAILURE
+fi
+
+# setup plugin path
+ENVCMD="env HDF5_PLUGIN_PATH=${PLUGIN_LIBDIR1}:${PLUGIN_LIBDIR2}"
+
+# Run the test
+$ENVCMD $TEST_BIN
+if [ $? != 0 ]; then
+ nerrors=`expr $nerrors + 1`
+fi
+
+# print results
+if test $nerrors -ne 0 ; then
+ echo "$nerrors errors encountered"
+ exit_code=$EXIT_FAILURE
+else
+ echo "All Plugin API tests passed."
+ exit_code=$EXIT_SUCCESS
+fi
+
+# Clean up temporary files/directories and leave
+$RM $PLUGIN_LIBDIR2
+exit $exit_code
diff --git a/test/testerror.sh.in b/test/testerror.sh.in
index b68fa7e..eb01fb1 100644
--- a/test/testerror.sh.in
+++ b/test/testerror.sh.in
@@ -23,6 +23,9 @@ DEPRECATED_SYMBOLS="@DEPRECATED_SYMBOLS@"
CMP='cmp -s'
DIFF='diff -c'
+# Skip plugin module to test missing filter
+ENVCMD="env HDF5_PLUGIN_PRELOAD=::"
+
nerrors=0
verbose=yes
@@ -61,7 +64,9 @@ TEST() {
echo "#############################"
echo "Expected output for $TEST_ERR"
echo "#############################"
- $RUNSERIAL $TEST_ERR_BIN
+
+ # Skip the plugin for testing missing filter.
+ $ENVCMD $RUNSERIAL $TEST_ERR_BIN
) >$actual 2>$actual_err
# Extract file name, line number, version and thread IDs because they may be different
sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \
@@ -109,7 +114,7 @@ else
TEST err_compat
fi
-# test for error_test
+# test for error_test. Skip the plugin for testing missing filter.
TEST error_test
if test $nerrors -eq 0 ; then
diff --git a/test/testframe.c b/test/testframe.c
index 8ab7a5b..af6e975 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -26,7 +26,7 @@
/*
* Definitions for the testing structure.
*/
-#define MAXNUMOFTESTS 50
+#define MAXNUMOFTESTS 60
#define MAXTESTNAME 16
#define MAXTESTDESC 64
@@ -73,7 +73,7 @@ AddTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), con
{
/* Sanity checking */
if (Index >= MAXNUMOFTESTS) {
- printf("Too many tests added, increase MAXNUMOFTEST(%d).\n",
+ printf("Too many tests added, increase MAXNUMOFTESTS(%d).\n",
MAXNUMOFTESTS);
exit(-1);
} /* end if */
diff --git a/test/tfile.c b/test/tfile.c
index 0ce6e0b..07e6ab1 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -3084,7 +3084,7 @@ test_filespace_compatible(void)
VERIFY(free_space, (hssize_t)0, "H5Fget_freespace");
/* Get the file's file creation property list */
- /* Retrieve the file space handling stretegy and threshold */
+ /* Retrieve the file space handling strategy and threshold */
fcpl = H5Fget_create_plist(fid);
CHECK(fcpl, FAIL, "H5Fget_create_plist");
ret = H5Pget_file_space(fcpl, &strategy, &threshold);
@@ -3117,9 +3117,13 @@ test_filespace_compatible(void)
ret = H5Ldelete(fid, DSETNAME, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
- /* Close the file */
- ret = H5Fclose(fid);
- CHECK(ret, FAIL, "H5Fclose");
+ /* Close the plist */
+ ret = H5Pclose(fcpl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
/* Re-Open the file */
fid = H5Fopen(FILE5, H5F_ACC_RDONLY, H5P_DEFAULT);
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 14e03c0..77ef1b1 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -4218,125 +4218,6 @@ verify_writes(int num_writes,
/*****************************************************************************
*
- * Function: setup_noblock_dxpl_id()
- *
- * Purpose: Setup the noblock_dxpl_id global. Increment nerrors if
- * errors are detected. Do nothing if nerrors is non-zero
- * on entry.
- *
- * Return: void.
- *
- * Programmer: JRM -- 1/5/06
- *
- * Modifications:
- *
- * None.
- *
- *****************************************************************************/
-/* So far we haven't needed this, but that may change.
- * Keep it around for now
- */
-#if 0
-void
-setup_noblock_dxpl_id(void)
-{
- const char * fcn_name = "setup_noblock_dxpl_id()";
- H5P_genclass_t *xfer_pclass; /* Dataset transfer property list
- * class object
- */
- H5P_genplist_t *xfer_plist; /* Dataset transfer property list object */
- unsigned block_before_meta_write; /* "block before meta write"
- * property value
- */
- unsigned library_internal = 1; /* "library internal" property value */
- H5FD_mpio_xfer_t xfer_mode; /* I/O transfer mode property value */
-
- /* Sanity check */
- HDassert(H5P_CLS_DATASET_XFER_g!=(-1));
-
- /* Get the dataset transfer property list class object */
- if ( ( nerrors == 0 ) &&
- ( NULL == (xfer_pclass = H5I_object(H5P_CLS_DATASET_XFER_g)) ) ) {
-
- nerrors++;
- if ( verbose ) {
- HDfprintf(stdout, "%d:%s: can't get property list class.\n",
- world_mpi_rank, fcn_name);
- }
- }
-
- /* Get an ID for the non-blocking, collective H5AC dxpl */
- if ( ( nerrors == 0 ) &&
- ( (noblock_dxpl_id = H5P_create_id(xfer_pclass)) < 0 ) ) {
-
- nerrors++;
- if ( verbose ) {
- HDfprintf(stdout, "%d:%s: can't register property list.\n",
- world_mpi_rank, fcn_name);
- }
- }
-
- /* Get the property list object */
- if ( ( nerrors == 0 ) &&
- ( NULL == (xfer_plist = H5I_object(H5AC_noblock_dxpl_id)) ) ) {
-
- nerrors++;
- if ( verbose ) {
- HDfprintf(stdout, "%d:%s: can't get new property list object.\n",
- world_mpi_rank, fcn_name);
- }
- }
-
- /* Insert 'block before metadata write' property */
- block_before_meta_write=0;
- if ( ( nerrors == 0 ) &&
- ( H5P_insert(xfer_plist, H5AC_BLOCK_BEFORE_META_WRITE_NAME,
- H5AC_BLOCK_BEFORE_META_WRITE_SIZE,
- &block_before_meta_write,
- NULL, NULL, NULL, NULL, NULL, NULL) < 0 ) ) {
-
- nerrors++;
- if ( verbose ) {
- HDfprintf(stdout,
- "%d:%s: can't insert metadata cache dxpl property 1.\n",
- world_mpi_rank, fcn_name);
- }
- }
-
- /* Insert 'library internal' property */
- if ( ( nerrors == 0 ) &&
- ( H5P_insert(xfer_plist, H5AC_LIBRARY_INTERNAL_NAME,
- H5AC_LIBRARY_INTERNAL_SIZE, &library_internal,
- NULL, NULL, NULL, NULL, NULL, NULL ) < 0 ) ) {
-
- nerrors++;
- if ( verbose ) {
- HDfprintf(stdout,
- "%d:%s: can't insert metadata cache dxpl property 2.\n",
- world_mpi_rank, fcn_name);
- }
- }
-
- /* Set the transfer mode */
- xfer_mode = H5FD_MPIO_COLLECTIVE;
- if ( ( nerrors == 0 ) &&
- ( H5P_set(xfer_plist, H5D_XFER_IO_XFER_MODE_NAME, &xfer_mode) < 0 ) ) {
-
- nerrors++;
- if ( verbose ) {
- HDfprintf(stdout, "%d:%s: unable to set value.\n", world_mpi_rank,
- fcn_name);
- }
- }
-
- return(success);
-
-} /* setup_noblock_dxpl_id() */
-#endif
-
-
-/*****************************************************************************
- *
* Function: setup_rand()
*
* Purpose: Use gettimeofday() to obtain a seed for rand(), print the
diff --git a/testpar/t_dset.c b/testpar/t_dset.c
index 1410824..610739c 100644
--- a/testpar/t_dset.c
+++ b/testpar/t_dset.c
@@ -4056,3 +4056,63 @@ dataset_atomicity(void)
VRFY((ret >= 0), "H5Fclose succeeded");
}
+
+/* Function: dense_attr_test
+ *
+ * Purpose: Test cases for writing dense attributes in parallel
+ *
+ * Programmer: Quincey Koziol
+ * Date: April, 2013
+ */
+void
+test_dense_attr(void)
+{
+ int mpi_size, mpi_rank;
+ hid_t fpid, fid;
+ hid_t gid, gpid;
+ hid_t atFileSpace, atid;
+ hsize_t atDims[1] = {10000};
+ herr_t status;
+
+ /* set up MPI parameters */
+ MPI_Comm_size(MPI_COMM_WORLD,&mpi_size);
+ MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank);
+
+ fpid = H5Pcreate(H5P_FILE_ACCESS);
+ VRFY((fpid > 0), "H5Pcreate succeeded");
+ status = H5Pset_libver_bounds(fpid, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
+ VRFY((status >= 0), "H5Pset_libver_bounds succeeded");
+ status = H5Pset_fapl_mpio(fpid, MPI_COMM_WORLD, MPI_INFO_NULL);
+ VRFY((status >= 0), "H5Pset_fapl_mpio succeeded");
+ fid = H5Fcreate("ph5Dense.h5", H5F_ACC_TRUNC, H5P_DEFAULT, fpid);
+ VRFY((fid > 0), "H5Fcreate succeeded");
+ status = H5Pclose(fpid);
+ VRFY((status >= 0), "H5Pclose succeeded");
+
+ gpid = H5Pcreate(H5P_GROUP_CREATE);
+ VRFY((gpid > 0), "H5Pcreate succeeded");
+ status = H5Pset_attr_phase_change(gpid, 0, 0);
+ VRFY((status >= 0), "H5Pset_attr_phase_change succeeded");
+ gid = H5Gcreate2(fid, "foo", H5P_DEFAULT, gpid, H5P_DEFAULT);
+ VRFY((gid > 0), "H5Gcreate2 succeeded");
+ status = H5Pclose(gpid);
+ VRFY((status >= 0), "H5Pclose succeeded");
+
+ atFileSpace = H5Screate_simple(1, atDims, NULL);
+ VRFY((atFileSpace > 0), "H5Screate_simple succeeded");
+ atid = H5Acreate2(gid, "bar", H5T_STD_U64LE, atFileSpace, H5P_DEFAULT, H5P_DEFAULT);
+ VRFY((atid > 0), "H5Acreate succeeded");
+ status = H5Sclose(atFileSpace);
+ VRFY((status >= 0), "H5Sclose succeeded");
+
+ status = H5Aclose(atid);
+ VRFY((status >= 0), "H5Aclose succeeded");
+
+ status = H5Gclose(gid);
+ VRFY((status >= 0), "H5Gclose succeeded");
+ status = H5Fclose(fid);
+ VRFY((status >= 0), "H5Fclose succeeded");
+
+ return;
+}
+
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c
index 784892a..89230f1 100644
--- a/testpar/testphdf5.c
+++ b/testpar/testphdf5.c
@@ -532,6 +532,10 @@ int main(int argc, char **argv)
"dataset atomic updates", PARATESTFILE);
}
+ AddTest("denseattr", test_dense_attr, NULL,
+ "Store Dense Attributes", NULL);
+
+
/* Display testing information */
TestInfo(argv[0]);
diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h
index fa83697..15ff884 100644
--- a/testpar/testphdf5.h
+++ b/testpar/testphdf5.h
@@ -289,6 +289,7 @@ void file_image_daisy_chain_test(void);
#ifdef H5_HAVE_FILTER_DEFLATE
void compress_readAll(void);
#endif /* H5_HAVE_FILTER_DEFLATE */
+void test_dense_attr(void);
/* commonly used prototypes */
hid_t create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type, hbool_t use_gpfs);
diff --git a/tools/h5copy/h5copy.c b/tools/h5copy/h5copy.c
index 574ba94..3fb5701 100644
--- a/tools/h5copy/h5copy.c
+++ b/tools/h5copy/h5copy.c
@@ -36,6 +36,11 @@ static struct long_options l_opts[] = {
{ "version", no_arg, 'V' },
{ NULL, 0, '\0' }
};
+char *fname_src = NULL;
+char *fname_dst = NULL;
+char *oname_src = NULL;
+char *oname_dst = NULL;
+char *str_flag = NULL;
/*-------------------------------------------------------------------------
* Function: leave
@@ -54,6 +59,17 @@ static struct long_options l_opts[] = {
static void
leave(int ret)
{
+ if (fname_src)
+ HDfree(fname_src);
+ if (fname_dst)
+ HDfree(fname_dst);
+ if (oname_dst)
+ HDfree(oname_dst);
+ if (oname_src)
+ HDfree(oname_src);
+ if (str_flag)
+ HDfree(str_flag);
+
h5tools_close();
HDexit(ret);
}
@@ -199,23 +215,16 @@ static int parse_flag(const char* str_flag, unsigned *flag)
int
main (int argc, const char *argv[])
{
- hid_t fid_src=-1;
- hid_t fid_dst=-1;
- char *fname_src=NULL;
- char *fname_dst=NULL;
- char *oname_src=NULL;
- char *oname_dst=NULL;
- unsigned flag=0;
- unsigned verbose=0;
- unsigned parents=0;
+ hid_t fid_src = -1;
+ hid_t fid_dst = -1;
+ unsigned flag = 0;
+ unsigned verbose = 0;
+ unsigned parents = 0;
hid_t ocpl_id = (-1); /* Object copy property list */
hid_t lcpl_id = (-1); /* Link creation property list */
- char str_flag[20];
int opt;
int li_ret;
h5tool_link_info_t linkinfo;
- int i, len;
- char *str_ptr=NULL;
h5tools_setprogname(PROGRAMNAME);
h5tools_setstatus(EXIT_SUCCESS);
@@ -249,7 +258,7 @@ main (int argc, const char *argv[])
usage();
leave(EXIT_FAILURE);
}
- HDstrcpy(str_flag,opt_arg);
+ str_flag = HDstrdup(opt_arg);
break;
case 'h':
@@ -341,8 +350,6 @@ main (int argc, const char *argv[])
if (fid_src==-1)
{
error_msg("Could not open input file <%s>...Exiting\n", fname_src);
- if (fname_src)
- HDfree(fname_src);
leave(EXIT_FAILURE);
}
@@ -362,10 +369,6 @@ main (int argc, const char *argv[])
if (fid_dst==-1)
{
error_msg("Could not open output file <%s>...Exiting\n", fname_dst);
- if (fname_src)
- HDfree(fname_src);
- if (fname_dst)
- HDfree(fname_dst);
leave(EXIT_FAILURE);
}
@@ -377,8 +380,10 @@ main (int argc, const char *argv[])
{
printf("Copying file <%s> and object <%s> to file <%s> and object <%s>\n",
fname_src, oname_src, fname_dst, oname_dst);
- if (flag)
+ if (flag) {
+ HDassert(str_flag);
printf("Using %s flag\n", str_flag);
+ }
}
@@ -417,14 +422,19 @@ main (int argc, const char *argv[])
} /* end if */
else /* error, if parent groups doesn't already exist in destination file */
{
+ size_t i, len;
+
len = HDstrlen(oname_dst);
+
/* check if all the parents groups exist. skip root group */
for (i = 1; i < len; i++)
{
if ('/'==oname_dst[i])
{
- str_ptr = (char*)HDcalloc((size_t)i+1, sizeof(char));
- HDstrncpy (str_ptr, oname_dst, (size_t)i);
+ char *str_ptr;
+
+ str_ptr = (char *)HDcalloc(i + 1, sizeof(char));
+ HDstrncpy(str_ptr, oname_dst, i);
str_ptr[i]='\0';
if (H5Lexists(fid_dst, str_ptr, H5P_DEFAULT) <= 0)
{
@@ -479,18 +489,7 @@ main (int argc, const char *argv[])
if (H5Fclose(fid_dst)<0)
goto error;
- if (fname_src)
- HDfree(fname_src);
- if (fname_dst)
- HDfree(fname_dst);
- if (oname_dst)
- HDfree(oname_dst);
- if (oname_src)
- HDfree(oname_src);
-
- h5tools_close();
-
- return EXIT_SUCCESS;
+ leave(EXIT_SUCCESS);
error:
printf("Error in copy...Exiting\n");
@@ -505,17 +504,7 @@ error:
H5Fclose(fid_src);
H5Fclose(fid_dst);
} H5E_END_TRY;
- if (fname_src)
- HDfree(fname_src);
- if (fname_dst)
- HDfree(fname_dst);
- if (oname_dst)
- HDfree(oname_dst);
- if (oname_src)
- HDfree(oname_src);
-
- h5tools_close();
- return EXIT_FAILURE;
+ leave(EXIT_FAILURE);
}
diff --git a/tools/h5copy/testh5copy.sh.in b/tools/h5copy/testh5copy.sh.in
index d30d8d8..bec3bfc 100644
--- a/tools/h5copy/testh5copy.sh.in
+++ b/tools/h5copy/testh5copy.sh.in
@@ -513,7 +513,7 @@ COPY_REFERENCES()
TESTFILE="$TESTDIR/h5copy_ref.h5"
echo "Test copying object and region references"
- TOOLTEST_F -f ref -i $TESTFILE -o $TESTDIR/region_ref.out.h5 -v -s / -d /COPY
+ TOOLTEST -f ref -i $TESTFILE -o $TESTDIR/region_ref.out.h5 -v -s / -d /COPY
}
# Copy external links.
@@ -529,25 +529,25 @@ COPY_EXT_LINKS()
TOOLTEST -v -i $TESTFILE -o $TESTDIR/ext_link.out.h5 -s /group_ext/extlink_dset -d /copy1_dset
echo "Test copying external link directly with -f ext"
- TOOLTEST_F -f ext -i $TESTFILE -o $TESTDIR/ext_link_f.out.h5 -v -s /group_ext/extlink_dset -d /copy2_dset
+ TOOLTEST -f ext -i $TESTFILE -o $TESTDIR/ext_link_f.out.h5 -v -s /group_ext/extlink_dset -d /copy2_dset
echo "Test copying dangling external link (no obj) directly without -f ext"
TOOLTEST -v -i $TESTFILE -o $TESTDIR/ext_dangle_noobj.out.h5 -s /group_ext/extlink_notyet1 -d /copy_dangle1_1
echo "Test copying dangling external link (no obj) directly with -f ext"
- TOOLTEST_F -f ext -i $TESTFILE -o $TESTDIR/ext_dangle_noobj_f.out.h5 -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_2
+ TOOLTEST -f ext -i $TESTFILE -o $TESTDIR/ext_dangle_noobj_f.out.h5 -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_2
echo "Test copying dangling external link (no file) directly without -f ext"
TOOLTEST -v -i $TESTFILE -o $TESTDIR/ext_dangle_nofile.out.h5 -s /group_ext/extlink_notyet2 -d /copy_dangle2_1
echo "Test copying dangling external link (no file) directly with -f ext"
- TOOLTEST_F -f ext -i $TESTFILE -o $TESTDIR/ext_dangle_nofile_f.out.h5 -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_2
+ TOOLTEST -f ext -i $TESTFILE -o $TESTDIR/ext_dangle_nofile_f.out.h5 -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_2
echo "Test copying a group contains external links without -f ext"
TOOLTEST -v -i $TESTFILE -o $TESTDIR/ext_link_group.out.h5 -s /group_ext -d /copy1_group
echo "Test copying a group contains external links with -f ext"
- TOOLTEST_F -f ext -i $TESTFILE -o $TESTDIR/ext_link_group_f.out.h5 -v -s /group_ext -d /copy2_group
+ TOOLTEST -f ext -i $TESTFILE -o $TESTDIR/ext_link_group_f.out.h5 -v -s /group_ext -d /copy2_group
}
# Test misc.
diff --git a/tools/h5diff/ph5diff_main.c b/tools/h5diff/ph5diff_main.c
index 1fc563b..b9bd404 100644
--- a/tools/h5diff/ph5diff_main.c
+++ b/tools/h5diff/ph5diff_main.c
@@ -275,6 +275,9 @@ void h5diff_exit(int status)
if(g_Parallel)
MPI_Finalize();
- exit(status);
+ /* Always exit(0), since MPI implementations do weird stuff when they
+ * receive a non-zero exit value. - QAK
+ */
+ exit(0);
}
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index f5837d4..356b41c 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -905,6 +905,33 @@ IF (BUILD_TESTING)
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5ERR_MASK_TEST file)
+ MACRO (ADD_H5ERR_MASK_ENV_TEST resultfile resultcode envvar envval)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${resultfile}.out ${resultfile}.out.err
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -D "TEST_ERRREF=${resultfile}.err"
+ -D "TEST_MASK_ERROR=true"
+ -D "TEST_ENV_VAR:STRING=${envvar}"
+ -D "TEST_ENV_VALUE:STRING=${envval}"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5ERR_MASK_ENV_TEST)
+
MACRO (ADD_H5_TEST_IMPORT conffile resultfile testfile resultcode)
# If using memchecker add tests without using scripts
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -1654,7 +1681,7 @@ IF (BUILD_TESTING)
ADD_H5ERR_MASK_TEST (textlink 0 --enable-error-stack textlink.h5)
# test for error stack display (BZ2048)
- ADD_H5ERR_MASK_TEST (filter_fail 1 --enable-error-stack filter_fail.h5)
+ ADD_H5ERR_MASK_ENV_TEST (filter_fail 1 "HDF5_PLUGIN_PRELOAD" "::" --enable-error-stack filter_fail.h5)
# test for -o -y for dataset with attributes
ADD_H5_TEST_EXPORT (tall-6 tall.h5 0 --enable-error-stack -d /g1/g1.1/dset1.1.1 -y -o)
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index 238eee9..ceefc08 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -38,6 +38,9 @@ DIRNAME='dirname'
LS='ls'
AWK='awk'
+# Skip plugin module to test missing filter
+ENVCMD="env HDF5_PLUGIN_PRELOAD=::"
+
nerrors=0
verbose=yes
@@ -721,6 +724,70 @@ TOOLTEST4() {
}
+# same as TOOLTEST4 but disables plugin filter loading
+# silences extra error output on some platforms
+# ADD_H5ERR_MASK_TEST
+TOOLTEST5() {
+
+ expect="$TESTDIR/$1"
+ expect_err="$TESTDIR/`basename $1 .ddl`.err"
+ actual="$TESTDIR/`basename $1 .ddl`.out"
+ actual_err="$TESTDIR/`basename $1 .ddl`.oerr"
+ actual_ext="$TESTDIR/`basename $1 .ddl`.ext"
+ actual_sav=${actual}-sav
+ actual_err_sav=${actual_err}-sav
+ shift
+
+ # Run test.
+ TESTING $DUMPER $@
+ (
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN "$@"
+ ) >$actual 2>$actual_err
+
+ # save actual and actual_err in case they are needed later.
+ cp $actual $actual_sav
+ STDOUT_FILTER $actual
+ cp $actual_err $actual_err_sav
+ STDERR_FILTER $actual_err
+
+ # Extract file name, line number, version and thread IDs because they may be different
+ sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \
+ -e 's/line [0-9]*/line (number)/' \
+ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \
+ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \
+ -e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \
+ -e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \
+ $actual_err > $actual_ext
+ #cat $actual_ext >> $actual
+
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ elif $CMP $expect $actual; then
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
+ fi
+
+}
+
# Print a "SKIP" message
SKIP() {
TESTING $DUMPER $@
@@ -1128,7 +1195,7 @@ TOOLTEST4 textlinkfar.ddl --enable-error-stack textlinkfar.h5
TOOLTEST4 textlink.ddl --enable-error-stack textlink.h5
# test for error stack display (BZ2048)
-TOOLTEST4 filter_fail.ddl --enable-error-stack filter_fail.h5
+TOOLTEST5 filter_fail.ddl --enable-error-stack filter_fail.h5
# test for -o -y for dataset with attributes
TOOLTEST2 tall-6.exp --enable-error-stack -y -o tall-6.txt -d /g1/g1.1/dset1.1.1 tall.h5
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index f14a667..d4e1cb3 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -116,8 +116,8 @@ typedef struct {
hid_t gid; /* Group ID */
hbool_t symlink_target; /* Whether this is the target of an symbolic link */
symlink_trav_t *symlink_list; /* List of visited symbolic links */
- int base_len; /* Length of base path name, if not root */
- int name_start; /* # of leading characters to strip off path names on output */
+ size_t base_len; /* Length of base path name, if not root */
+ size_t name_start; /* # of leading characters to strip off path names on output */
}iter_t;
/* Command-line switches */
@@ -155,7 +155,6 @@ static struct dispatch_t {
dispatch_g[TYPE].list2 = (LIST2); \
}
-static void display_type(hid_t type, int ind);
static void print_type(h5tools_str_t *buffer, hid_t type, int ind);
static herr_t visit_obj(hid_t file, const char *oname, iter_t *iter);
@@ -343,7 +342,7 @@ print_obj_name(h5tools_str_t *buffer, const iter_t *iter, const char *oname,
int n;
if(show_file_name_g)
- sprintf(fullname, "%s/%s", iter->fname, oname + iter->name_start);
+ HDsnprintf(fullname, sizeof(fullname), "%s/%s", iter->fname, oname + iter->name_start);
else
name = oname + iter->name_start;
@@ -554,14 +553,14 @@ print_precision(h5tools_str_t *buffer, hid_t type, int ind)
/* If the precision is less than the total size then show the precision
* and offset on the following line. Also display the padding
* information. */
- if (8*H5Tget_size(type)!=(prec=H5Tget_precision(type))) {
+ if(8 * H5Tget_size(type) != (prec = H5Tget_precision(type))) {
h5tools_str_append(buffer, "\n%*s(%lu bit%s of precision beginning at bit %lu)",
- ind, "", (unsigned long)prec, 1==prec?"":"s",
+ ind, "", (unsigned long)prec, 1 == prec ? "" : "s",
(unsigned long)H5Tget_offset(type));
H5Tget_pad(type, &plsb, &pmsb);
- if (H5Tget_offset(type)>0) {
- switch (plsb) {
+ if(H5Tget_offset(type) > 0) {
+ switch(plsb) {
case H5T_PAD_ZERO:
plsb_s = "zero";
break;
@@ -576,12 +575,11 @@ print_precision(h5tools_str_t *buffer, hid_t type, int ind)
plsb_s = "unknown";
break;
default:
- ;
break;
}
}
- if (H5Tget_offset(type)+prec<8*H5Tget_size(type)) {
- switch (pmsb) {
+ if((unsigned)H5Tget_offset(type) + prec < 8 * H5Tget_size(type)) {
+ switch(pmsb) {
case H5T_PAD_ZERO:
pmsb_s = "zero";
break;
@@ -596,23 +594,22 @@ print_precision(h5tools_str_t *buffer, hid_t type, int ind)
pmsb_s = "unknown";
break;
default:
- ;
break;
}
}
if (plsb_s || pmsb_s) {
h5tools_str_append(buffer, "\n%*s(", ind, "");
if (plsb_s) {
- nbits = H5Tget_offset(type);
+ nbits = (unsigned)H5Tget_offset(type);
h5tools_str_append(buffer, "%lu %s bit%s at bit 0",
- (unsigned long)nbits, plsb_s, 1==nbits?"":"s");
+ (unsigned long)nbits, plsb_s, 1 == nbits ? "" : "s");
}
if (plsb_s && pmsb_s) h5tools_str_append(buffer, ", ");
if (pmsb_s) {
- nbits = 8*H5Tget_size(type)-(H5Tget_offset(type)+prec);
+ nbits = (8 * H5Tget_size(type)) - ((unsigned)H5Tget_offset(type) + prec);
h5tools_str_append(buffer, "%lu %s bit%s at bit %lu",
- (unsigned long)nbits, pmsb_s, 1==nbits?"":"s",
- (unsigned long)(8*H5Tget_size(type)-nbits));
+ (unsigned long)nbits, pmsb_s, 1 == nbits ? "" : "s",
+ (unsigned long)(8 * H5Tget_size(type) - nbits));
}
h5tools_str_append(buffer, ")");
}
@@ -830,14 +827,18 @@ print_cmpd_type(h5tools_str_t *buffer, hid_t type, int ind)
char *name=NULL; /* member name */
size_t size; /* total size of type in bytes */
hid_t subtype; /* member data type */
- unsigned nmembs; /* number of members */
+ int nmembs; /* number of members */
int n; /* miscellaneous counters */
unsigned i; /* miscellaneous counters */
- if (H5T_COMPOUND!=H5Tget_class(type)) return FALSE;
+ if(H5T_COMPOUND != H5Tget_class(type))
+ return FALSE;
+ nmembs = H5Tget_nmembers(type);
+ if(nmembs <= 0)
+ return FALSE;
+
h5tools_str_append(buffer, "struct {");
- nmembs=H5Tget_nmembers(type);
- for (i=0; i<nmembs; i++) {
+ for(i = 0; i < (unsigned)nmembs; i++) {
/* Name and offset */
name = H5Tget_member_name(type, i);
@@ -878,89 +879,109 @@ print_cmpd_type(h5tools_str_t *buffer, hid_t type, int ind)
static hbool_t
print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
{
- char **name=NULL; /* member names */
- unsigned char *value=NULL; /* value array */
- unsigned char *copy = NULL; /* a pointer to value array */
- unsigned nmembs; /* number of members */
- int nchars; /* number of output characters */
+ int nmembs; /* number of members */
hid_t super; /* enum base integer type */
- hid_t native=-1; /* native integer data type */
- size_t dst_size; /* destination value type size */
- unsigned i; /* miscellaneous counters */
- size_t j;
- if (H5T_ENUM!=H5Tget_class(type)) return FALSE;
+ if(H5T_ENUM != H5Tget_class(type))
+ return FALSE;
nmembs = H5Tget_nmembers(type);
- HDassert(nmembs>0);
+ if(nmembs < 0)
+ return FALSE;
+
super = H5Tget_super(type);
h5tools_str_append(buffer, "enum ");
- print_type(buffer, super, ind+4);
+ print_type(buffer, super, ind + 4);
h5tools_str_append(buffer, " {");
- /* Determine what data type to use for the native values. To simplify
- * things we entertain three possibilities:
- * 1. long long -- the largest native signed integer
- * 2. unsigned long long -- the largest native unsigned integer
- * 3. raw format */
- if (H5Tget_size(type)<=sizeof(long long)) {
- dst_size = sizeof(long long);
- if (H5T_SGN_NONE==H5Tget_sign(type)) {
- native = H5T_NATIVE_ULLONG;
- } else {
- native = H5T_NATIVE_LLONG;
+ if(nmembs > 0) {
+ char **name; /* member names */
+ unsigned char *value; /* value array */
+ hid_t native = -1; /* native integer data type */
+ size_t dst_size; /* destination value type size */
+ unsigned i; /* miscellaneous counters */
+
+ /* Determine what data type to use for the native values. To simplify
+ * things we entertain three possibilities:
+ * 1. long long -- the largest native signed integer
+ * 2. unsigned long long -- the largest native unsigned integer
+ * 3. raw format */
+ if(H5Tget_size(type) <= sizeof(long long)) {
+ dst_size = sizeof(long long);
+ if(H5T_SGN_NONE == H5Tget_sign(type))
+ native = H5T_NATIVE_ULLONG;
+ else
+ native = H5T_NATIVE_LLONG;
+ } /* end if */
+ else
+ dst_size = H5Tget_size(type);
+
+ /* Get the names and raw values of all members */
+ name = (char **)HDcalloc((size_t)nmembs, sizeof(char *));
+ value = (unsigned char *)HDcalloc((size_t)nmembs, MAX(H5Tget_size(type), dst_size));
+ for(i = 0; i < (unsigned)nmembs; i++) {
+ name[i] = H5Tget_member_name(type, i);
+ H5Tget_member_value(type, i, value + i * H5Tget_size(type));
}
- } else {
- dst_size = H5Tget_size(type);
- }
-
- /* Get the names and raw values of all members */
- name = HDcalloc(nmembs, sizeof(char*));
- value = (unsigned char *)HDcalloc(nmembs, MAX(H5Tget_size(type), dst_size));
- for (i=0; i<nmembs; i++) {
- name[i] = H5Tget_member_name(type, i);
- H5Tget_member_value(type, i, value+i*H5Tget_size(type));
- }
- /* Convert values to native data type */
- if (native>0) H5Tconvert(super, native, nmembs, value, NULL, H5P_DEFAULT);
+ /* Convert values to native data type */
+ if(native > 0)
+ if(H5Tconvert(super, native, (size_t)nmembs, value, NULL, H5P_DEFAULT) < 0) {
+ /* Release resources */
+ for(i = 0; i < (unsigned)nmembs; i++)
+ HDfree(name[i]);
+ HDfree(name);
+ HDfree(value);
- /* Sort members by increasing value */
- /*not implemented yet*/
-
- /* Print members */
- for (i=0; i<nmembs; i++) {
- h5tools_str_append(buffer, "\n%*s", ind+4, "");
- nchars = print_string(buffer, name[i], TRUE);
- h5tools_str_append(buffer, "%*s = ", MAX(0, 16-nchars), "");
+ return FALSE;
+ }
- if (native<0) {
- h5tools_str_append(buffer, "0x");
- for (j=0; j<dst_size; j++)
- h5tools_str_append(buffer, "%02x", value[i*dst_size+j]);
- }
- else if (H5T_SGN_NONE==H5Tget_sign(native)) {
- /*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size"
- *strangely, unless use another pointer "copy".*/
- copy = value+i*dst_size;
- h5tools_str_append(buffer, HSIZE_T_FORMAT, *((unsigned long long*)((void*)copy)));
- }
- else {
- /*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size"
- *strangely, unless use another pointer "copy".*/
- copy = value+i*dst_size;
- h5tools_str_append(buffer, "%"H5_PRINTF_LL_WIDTH"d",
- *((long long*)((void*)copy)));
+ /* Sort members by increasing value */
+ /*not implemented yet*/
+
+ /* Print members */
+ for(i = 0; i < (unsigned)nmembs; i++) {
+ unsigned char *copy; /* a pointer to value array */
+ int nchars; /* number of output characters */
+
+ h5tools_str_append(buffer, "\n%*s", ind+4, "");
+ nchars = print_string(buffer, name[i], TRUE);
+ h5tools_str_append(buffer, "%*s = ", MAX(0, 16 - nchars), "");
+
+ if(native < 0) {
+ size_t j;
+
+ h5tools_str_append(buffer, "0x");
+ for(j = 0; j < dst_size; j++)
+ h5tools_str_append(buffer, "%02x", value[i*dst_size+j]);
+ }
+ else if(H5T_SGN_NONE == H5Tget_sign(native)) {
+ /*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size"
+ *strangely, unless use another pointer "copy".*/
+ copy = value + i * dst_size;
+ h5tools_str_append(buffer, HSIZE_T_FORMAT, *((unsigned long long*)((void*)copy)));
+ }
+ else {
+ /*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size"
+ *strangely, unless use another pointer "copy".*/
+ copy = value + i * dst_size;
+ h5tools_str_append(buffer, "%"H5_PRINTF_LL_WIDTH"d",
+ *((long long*)((void*)copy)));
+ }
}
+
+ /* Release resources */
+ for(i = 0; i < (unsigned)nmembs; i++)
+ HDfree(name[i]);
+ HDfree(name);
+ HDfree(value);
}
+ else
+ h5tools_str_append(buffer, "\n%*s <empty>", ind+4, "");
+
+ h5tools_str_append(buffer, "\n%*s}", ind, "");
- /* Release resources */
- for (i=0; i<nmembs; i++) HDfree(name[i]);
- HDfree(name);
- HDfree(value);
H5Tclose(super);
- if (0==nmembs) h5tools_str_append(buffer, "\n%*s <empty>", ind+4, "");
- h5tools_str_append(buffer, "\n%*s}", ind, "");
return TRUE;
}
@@ -1190,10 +1211,11 @@ print_array_type(h5tools_str_t *buffer, hid_t type, int ind)
int ndims, i;
hsize_t *dims=NULL;
- if (H5T_ARRAY!=H5Tget_class(type)) return FALSE;
+ if (H5T_ARRAY!=H5Tget_class(type))
+ return FALSE;
ndims = H5Tget_array_ndims(type);
if (ndims) {
- dims = (hsize_t *)HDmalloc(ndims*sizeof(dims[0]));
+ dims = (hsize_t *)HDmalloc((unsigned)ndims * sizeof(dims[0]));
H5Tget_array_dims2(type, dims);
/* Print dimensions */
@@ -1203,9 +1225,8 @@ print_array_type(h5tools_str_t *buffer, hid_t type, int ind)
HDfree(dims);
}
- else {
+ else
h5tools_str_append(buffer, " [SCALAR]\n", rawoutstream);
- }
/* Print parent type */
@@ -1391,7 +1412,7 @@ dump_dataset_values(hid_t dset)
outputformat.line_per_line = 1;
}
else {
- outputformat.line_ncols = width_g;
+ outputformat.line_ncols = (unsigned)width_g;
}
if (label_g) outputformat.cmpd_name = "%s=";
outputformat.line_pre = " %s ";
@@ -1413,9 +1434,9 @@ dump_dataset_values(hid_t dset)
}
outputformat.arr_linebreak = 0;
/* Floating point types should display full precision */
- sprintf(fmt_float, "%%1.%dg", FLT_DIG);
+ HDsnprintf(fmt_float, sizeof(fmt_float), "%%1.%dg", FLT_DIG);
outputformat.fmt_float = fmt_float;
- sprintf(fmt_double, "%%1.%dg", DBL_DIG);
+ HDsnprintf(fmt_double, sizeof(fmt_double), "%%1.%dg", DBL_DIG);
outputformat.fmt_double = fmt_double;
if (hexdump_g) {
@@ -1429,8 +1450,7 @@ dump_dataset_values(hid_t dset)
outputformat.ascii = TRUE;
outputformat.elmt_suf1 = "";
outputformat.elmt_suf2 = "";
- strcpy(string_prefix, outputformat.line_pre);
- strcat(string_prefix, "\"");
+ HDsnprintf(string_prefix, sizeof(string_prefix), "%s\"", outputformat.line_pre);
outputformat.line_pre = string_prefix;
outputformat.line_suf = "\"";
}
@@ -1488,7 +1508,6 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t UNUSED *ainfo,
size_t need;
int ndims;
int i;
- int n;
void *buf;
H5S_class_t space_type;
hsize_t curr_pos = 0; /* total data element position */
@@ -1503,7 +1522,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t UNUSED *ainfo,
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " Attribute: ");
- n = print_string(&buffer, attr_name, TRUE);
+ print_string(&buffer, attr_name, TRUE);
if((attr = H5Aopen(obj, attr_name, H5P_DEFAULT))) {
space = H5Aget_space(attr);
@@ -1536,6 +1555,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t UNUSED *ainfo,
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, info->line_ncols, 0, 0);
break;
+ case H5S_NO_CLASS:
default:
/* Unknown dataspace type */
h5tools_str_append(&buffer, " unknown\n");
@@ -1571,7 +1591,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t UNUSED *ainfo,
outputformat.str_repeat = 8;
}
- outputformat.line_ncols = width_g;
+ outputformat.line_ncols = (unsigned)width_g;
if(label_g)
outputformat.cmpd_name = "%s=";
if(string_g && 1==H5Tget_size(type) &&
@@ -1778,7 +1798,7 @@ dataset_list2(hid_t dset, const char UNUSED *name)
}
/* Print total raw storage size */
- total = H5Sget_simple_extent_npoints(space) * H5Tget_size(type);
+ total = (hsize_t)H5Sget_simple_extent_npoints(space) * H5Tget_size(type);
used = H5Dget_storage_size(dset);
tclass = H5Tget_class(type);
h5tools_str_append(&buffer, " %-10s ", "Storage:");
@@ -1796,13 +1816,24 @@ dataset_list2(hid_t dset, const char UNUSED *name)
}
break;
+ case H5T_NO_CLASS:
+ case H5T_INTEGER:
+ case H5T_FLOAT:
+ case H5T_TIME:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_COMPOUND:
+ case H5T_ENUM:
+ case H5T_ARRAY:
+ case H5T_NCLASSES:
default:
h5tools_str_append(&buffer, HSIZE_T_FORMAT" logical byte%s, "HSIZE_T_FORMAT" allocated byte%s",
total, 1==total?"":"s",
used, 1==used?"":"s");
if (used>0)
{
- utilization = (total*100.0)/used;
+ utilization = ((double)total * (double)100.0f) / (double)used;
h5tools_str_append(&buffer, ", %1.2f%% utilization", utilization);
}
}
@@ -1812,7 +1843,8 @@ dataset_list2(hid_t dset, const char UNUSED *name)
/* Print information about external strorage */
if((nf = H5Pget_external_count(dcpl)) > 0) {
for(i = 0, max_len = 0; i < nf; i++) {
- H5Pget_external(dcpl, (unsigned)i, sizeof(f_name), f_name, NULL, NULL);
+ if(H5Pget_external(dcpl, (unsigned)i, sizeof(f_name), f_name, NULL, NULL) < 0)
+ continue;
n = print_string(NULL, f_name, TRUE);
max_len = MAX(max_len, n);
} /* end for */
@@ -1858,7 +1890,7 @@ dataset_list2(hid_t dset, const char UNUSED *name)
filt_id = H5Pget_filter2(dcpl, (unsigned)i, &filt_flags, &cd_nelmts,
cd_values, sizeof(f_name), f_name, NULL);
f_name[sizeof(f_name) - 1] = '\0';
- sprintf(s, "Filter-%d:", i);
+ HDsnprintf(s, sizeof(s), "Filter-%d:", i);
h5tools_str_append(&buffer, " %-10s %s-%u %s {", s,
(f_name[0] ? f_name : "method"),
(unsigned)filt_id,
@@ -2055,7 +2087,7 @@ list_obj(const char *name, const H5O_info_t *oinfo, const char *first_seen, void
if (cmt_bufsize > 0) {
comment = (char *)HDmalloc((size_t)cmt_bufsize + 1); /* new_size including null terminator */
if(comment) {
- cmt_bufsize = H5Oget_comment(obj, comment, cmt_bufsize);
+ cmt_bufsize = H5Oget_comment(obj, comment, (size_t)cmt_bufsize);
if(cmt_bufsize > 0) {
comment[cmt_bufsize] = 0;
h5tools_str_reset(&buffer);
@@ -2268,6 +2300,9 @@ list_lnk(const char *name, const H5L_info_t *linfo, void *_iter)
}
break;
+ case H5L_TYPE_ERROR:
+ case H5L_TYPE_HARD:
+ case H5L_TYPE_MAX:
default:
h5tools_str_append(&buffer, "UD Link {cannot follow UD links}\n");
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, info->line_ncols, 0, 0);
@@ -2458,7 +2493,7 @@ get_width(void)
static hbool_t
is_valid_args(void)
{
- herr_t ret = TRUE;
+ hbool_t ret = TRUE;
if(recursive_g && grp_literal_g)
{
diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt
index 156f6d8..06c6b71 100644
--- a/tools/h5repack/CMakeLists.txt
+++ b/tools/h5repack/CMakeLists.txt
@@ -881,6 +881,18 @@ ADD_H5_VERIFY_TEST (error3 "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIM
# file input - should not fail
ADD_H5_TEST (error4 "TEST" h5repack_layout3.h5 -f NONE)
+#--------------------------------------------------------------------------
+# Test base: Convert CHUNK to CONTI for a chunked dataset with small dataset
+# (dset size < 64K) and with unlimited max dims on a condition as follow.
+# (HDFFV-8214)
+#--------------------------------------------------------------------------
+# chunk dim is bigger than dataset dim. should succeed.
+ADD_H5_VERIFY_TEST (ckdim_biger "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI)
+# chunk dim is smaller than dataset dim. should succeed.
+ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 CONTI -l chunk_unlimit3:CONTI)
+
+
+
# Native option
# Do not use FILE1, as the named dtype will be converted to native, and h5diff will
# report a difference.
diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in
index dc90426..ca25183 100644
--- a/tools/h5repack/h5repack.sh.in
+++ b/tools/h5repack/h5repack.sh.in
@@ -244,8 +244,11 @@ VERIFY_LAYOUT_DSET()
shift
shift
shift
-
- $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+
+ TESTING $H5REPACK $@
+ (
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ )
RET=$?
if [ $RET != 0 ] ; then
echo "*FAILED*"
@@ -266,6 +269,7 @@ VERIFY_LAYOUT_DSET()
echo " PASSED"
else
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
fi
# clean up tmp files
@@ -277,6 +281,7 @@ VERIFY_LAYOUT_DSET()
# Verifying layouts from entire file
VERIFY_LAYOUT_ALL()
{
+ infile=$2
outfile=$TESTDIR/out-$1.$2
layoutfile=$TESTDIR/layout-$1.$2
expectlayout=$3
@@ -284,7 +289,10 @@ VERIFY_LAYOUT_ALL()
shift
shift
- $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ TESTING $H5REPACK $@
+ (
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ )
RET=$?
if [ $RET != 0 ] ; then
echo "*FAILED*"
@@ -300,6 +308,7 @@ VERIFY_LAYOUT_ALL()
# check if the other layouts still exsit
VERIFY "layouts"
(
+ echo
# if CONTIGUOUS
if [ $expectlayout = "CONTIGUOUS" ]; then
TESTING $H5DUMP_BIN -pH $outfile
@@ -309,10 +318,12 @@ VERIFY_LAYOUT_ALL()
$GREP "COMPACT" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
else
$GREP "CHUNKED" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
@@ -327,10 +338,12 @@ VERIFY_LAYOUT_ALL()
$GREP "CHUNKED" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
else
$GREP "CONTIGUOUS" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
@@ -345,10 +358,12 @@ VERIFY_LAYOUT_ALL()
$GREP "CONTIGUOUS" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
else
$GREP "COMPACT" $layoutfile > /dev/null
if [ $? -eq 0 ]; then
echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
@@ -523,6 +538,7 @@ TOOLTEST_META()
else
#fail
echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
fi
rm -f $outfile
@@ -891,6 +907,18 @@ VERIFY_LAYOUT_DSET error3 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED -f ch
# file input - should not fail
TOOLTEST error4 h5repack_layout3.h5 -f NONE
+#--------------------------------------------------------------------------
+# Test base: Convert CHUNK to CONTI for a chunked dataset with small dataset
+# (dset size < 64K) and with unlimited max dims on a condition as follow.
+# (HDFFV-8214)
+#--------------------------------------------------------------------------
+
+# chunk dim is bigger than dataset dim. should succeed.
+VERIFY_LAYOUT_DSET ckdim_biger h5repack_layout3.h5 chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI
+# chunk dim is smaller than dataset dim. should succeed.
+VERIFY_LAYOUT_DSET ckdim_smaller h5repack_layout3.h5 chunk_unlimit3 CONTI -l chunk_unlimit3:CONTI
+
+
# Native option
# Do not use FILE1, as the named dtype will be converted to native, and h5diff will
# report a difference.
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index 02337fd..f9dd334 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -1017,16 +1017,6 @@ int do_copy_objects(hid_t fidin,
/* get the storage size of the input dataset */
dsize_in=H5Dget_storage_size(dset_in);
- /* check for small size datasets (less than 1k) except
- * changing to COMPACT. For the reference, COMPACT is limited
- * by size 64K by library.
- */
- if (options->layout_g != H5D_COMPACT)
- {
- if ( size_dset < options->min_comp )
- apply_s=0;
- }
-
/* apply the filter */
if (apply_s)
{
diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt
index f0d0d01..ac86e8a 100644
--- a/tools/lib/CMakeLists.txt
+++ b/tools/lib/CMakeLists.txt
@@ -38,15 +38,15 @@ SET (H5_TOOLS_LIB_HDRS
ADD_LIBRARY (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS})
TARGET_LINK_LIBRARIES (${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_GLOBAL_VARIABLE( HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}")
+SET_GLOBAL_VARIABLE(HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}")
H5_SET_LIB_OPTIONS (
${HDF5_TOOLS_LIB_TARGET} ${HDF5_TOOLS_LIB_NAME}
${LIB_TYPE}
HDF5_TOOLS_LIB_NAME_RELEASE
HDF5_TOOLS_LIB_NAME_DEBUG
)
-#SET_TARGET_PROPERTIES (hdf5_tools PROPERTIES COMPILE_DEFINITIONS H5DIFF_DEBUG)
-SET_TARGET_PROPERTIES (hdf5_tools PROPERTIES FOLDER libraries/tools)
+#SET_TARGET_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} PROPERTIES COMPILE_DEFINITIONS H5DIFF_DEBUG)
+SET_TARGET_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} PROPERTIES FOLDER libraries/tools)
##############################################################################
##############################################################################
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 2b4fa29..1752155 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -241,7 +241,6 @@ static int is_exclude_path (char * path, h5trav_type_t type, diff_opt_t *options
struct exclude_path_list * exclude_path_ptr;
int ret_cmp;
int ret = 0;
- int len_grp;
/* check if exclude path option is given */
if (!options->exclude_path)
@@ -260,6 +259,8 @@ static int is_exclude_path (char * path, h5trav_type_t type, diff_opt_t *options
HDstrlen(exclude_path_ptr->obj_path));
if (ret_cmp == 0) /* found matching members */
{
+ size_t len_grp;
+
/* check if given path belong to an excluding group, if so
* exclude it as well.
* This verifies if “/grp1/dset1” is only under “/grp1”, but
@@ -338,7 +339,6 @@ static void free_exclude_path_list(diff_opt_t *options)
*------------------------------------------------------------------------*/
static void build_match_list (const char *objname1, trav_info_t *info1, const char *objname2, trav_info_t *info2, trav_table_t ** table_out, diff_opt_t *options)
{
- unsigned i;
size_t curr1 = 0;
size_t curr2 = 0;
unsigned infile[2];
@@ -346,8 +346,8 @@ static void build_match_list (const char *objname1, trav_info_t *info1, const ch
char * path2_lp;
h5trav_type_t type1_l;
h5trav_type_t type2_l;
- int path1_offset = 0;
- int path2_offset = 0;
+ size_t path1_offset = 0;
+ size_t path2_offset = 0;
int cmp;
trav_table_t *table;
size_t idx;
@@ -616,8 +616,8 @@ hsize_t h5diff(const char *fname1,
int i;
int l_ret1 = -1;
int l_ret2 = -1;
- const char * obj1fullname = NULL;
- const char * obj2fullname = NULL;
+ char * obj1fullname = NULL;
+ char * obj2fullname = NULL;
int both_objs_grp = 0;
/* init to group type */
h5trav_type_t obj1type = H5TRAV_TYPE_GROUP;
@@ -701,26 +701,26 @@ hsize_t h5diff(const char *fname1,
/* make the given object1 fullpath, start with "/" */
if (HDstrncmp(objname1, "/", 1))
{
- HDstrcpy((char *)obj1fullname, "/");
- HDstrcat((char *)obj1fullname, objname1);
+ HDstrcpy(obj1fullname, "/");
+ HDstrcat(obj1fullname, objname1);
}
else
- HDstrcpy((char *)obj1fullname, objname1);
+ HDstrcpy(obj1fullname, objname1);
/* make the given object2 fullpath, start with "/" */
if (HDstrncmp(objname2, "/", 1))
{
- HDstrcpy((char *)obj2fullname, "/");
- HDstrcat((char *)obj2fullname, objname2);
+ HDstrcpy(obj2fullname, "/");
+ HDstrcat(obj2fullname, objname2);
}
else
- HDstrcpy((char *)obj2fullname, objname2);
+ HDstrcpy(obj2fullname, objname2);
/*----------------------------------------------------------
* check if obj1 is root, group, single object or symlink
*/
h5difftrace("h5diff check if obj1 is root, group, single object or symlink\n");
- if(!HDstrcmp((char *)obj1fullname, "/"))
+ if(!HDstrcmp(obj1fullname, "/"))
{
obj1type = H5TRAV_TYPE_GROUP;
}
@@ -840,10 +840,10 @@ hsize_t h5diff(const char *fname1,
h5difftrace("h5diff no object specified\n");
/* set root group */
obj1fullname = (char*)HDcalloc(2, sizeof(char));
- HDstrcat((char *)obj1fullname, "/");
+ HDstrcat(obj1fullname, "/");
obj1type = H5TRAV_TYPE_GROUP;
obj2fullname = (char*)HDcalloc(2, sizeof(char));
- HDstrcat((char *)obj2fullname, "/");
+ HDstrcat(obj2fullname, "/");
obj2type = H5TRAV_TYPE_GROUP;
}
@@ -1078,9 +1078,9 @@ out:
/* free buffers */
if (obj1fullname)
- HDfree((char *)obj1fullname);
+ HDfree(obj1fullname);
if (obj2fullname)
- HDfree((char *)obj2fullname);
+ HDfree(obj2fullname);
/* free link info buffer */
if (trg_linfo1.trg_path)
diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h
index 2530805..9e1c8bb 100644
--- a/tools/lib/h5diff.h
+++ b/tools/lib/h5diff.h
@@ -196,210 +196,5 @@ int print_objname(diff_opt_t *options, hsize_t nfound);
void do_print_objname (const char *OBJ, const char *path1, const char *path2, diff_opt_t * opts);
void do_print_attrname (const char *attr, const char *path1, const char *path2);
-
-/*-------------------------------------------------------------------------
- * XCAO, 11/10/2010
- * added to improve performance for compound datasets
- */
-typedef struct mcomp_t
-{
- int n; /* number of members */
- hid_t *ids; /* member type id */
- unsigned char *flags;
- size_t *offsets;
- struct mcomp_t **m; /* members */
-}mcomp_t;
-
-hsize_t diff_datum(void *_mem1,
- void *_mem2,
- hid_t m_type,
- hsize_t i,
- int rank,
- hsize_t *dims,
- hsize_t *acc,
- hsize_t *pos,
- diff_opt_t *options,
- const char *obj1,
- const char *obj2,
- hid_t container1_id,
- hid_t container2_id, /*where the reference came from*/
- int *ph, /*print header */
- mcomp_t *members); /*compound members */
-
-
-
-hsize_t diff_float(unsigned char *mem1,
- unsigned char *mem2,
- hsize_t nelmts,
- hsize_t hyper_start,
- int rank,
- hsize_t *dims,
- hsize_t *acc,
- hsize_t *pos,
- diff_opt_t *options,
- const char *obj1,
- const char *obj2,
- int *ph);
-
-hsize_t diff_double(unsigned char *mem1,
- unsigned char *mem2,
- hsize_t nelmts,
- hsize_t hyper_start,
- int rank,
- hsize_t *dims,
- hsize_t *acc,
- hsize_t *pos,
- diff_opt_t *options,
- const char *obj1,
- const char *obj2,
- int *ph);
-
-#if H5_SIZEOF_LONG_DOUBLE !=0
-
-hsize_t diff_ldouble(unsigned char *mem1,
- unsigned char *mem2,
- hsize_t nelmts,
- hsize_t hyper_start,
- int rank,
- hsize_t *dims,
- hsize_t *acc,
- hsize_t *pos,
- diff_opt_t *options,
- const char *obj1,
- const char *obj2,
- int *ph);
-
-#endif
-
-hsize_t diff_schar(unsigned char *mem1,
- unsigned char *mem2,
- hsize_t nelmts,
- hsize_t hyper_start,
- int rank,
- hsize_t *dims,
- hsize_t *acc,
- hsize_t *pos,
- diff_opt_t *options,
- const char *obj1,
- const char *obj2,
- int *ph);
-
-hsize_t diff_uchar(unsigned char *mem1,
- unsigned char *mem2,
- hsize_t nelmts,
- hsize_t hyper_start,
- int rank,
- hsize_t *dims,
- hsize_t *acc,
- hsize_t *pos,
- diff_opt_t *options,
- const char *obj1,
- const char *obj2,
- int *ph);
-
-hsize_t diff_short(unsigned char *mem1,
- unsigned char *mem2,
- hsize_t nelmts,
- hsize_t hyper_start,
- int rank,
- hsize_t *dims,
- hsize_t *acc,
- hsize_t *pos,
- diff_opt_t *options,
- const char *obj1,
- const char *obj2,
- int *ph);
-
-hsize_t diff_ushort(unsigned char *mem1,
- unsigned char *mem2,
- hsize_t nelmts,
- hsize_t hyper_start,
- int rank,
- hsize_t *dims,
- hsize_t *acc,
- hsize_t *pos,
- diff_opt_t *options,
- const char *obj1,
- const char *obj2,
- int *ph);
-
-hsize_t diff_int(unsigned char *mem1,
- unsigned char *mem2,
- hsize_t nelmts,
- hsize_t hyper_start,
- int rank,
- hsize_t *dims,
- hsize_t *acc,
- hsize_t *pos,
- diff_opt_t *options,
- const char *obj1,
- const char *obj2,
- int *ph);
-
-hsize_t diff_uint(unsigned char *mem1,
- unsigned char *mem2,
- hsize_t nelmts,
- hsize_t hyper_start,
- int rank,
- hsize_t *dims,
- hsize_t *acc,
- hsize_t *pos,
- diff_opt_t *options,
- const char *obj1,
- const char *obj2,
- int *ph);
-
-hsize_t diff_long(unsigned char *mem1,
- unsigned char *mem2,
- hsize_t nelmts,
- hsize_t hyper_start,
- int rank,
- hsize_t *dims,
- hsize_t *acc,
- hsize_t *pos,
- diff_opt_t *options,
- const char *obj1,
- const char *obj2,
- int *ph);
-
-hsize_t diff_ulong(unsigned char *mem1,
- unsigned char *mem2,
- hsize_t nelmts,
- hsize_t hyper_start,
- int rank,
- hsize_t *dims,
- hsize_t *acc,
- hsize_t *pos,
- diff_opt_t *options,
- const char *obj1,
- const char *obj2,
- int *ph);
-
-hsize_t diff_llong(unsigned char *mem1,
- unsigned char *mem2,
- hsize_t nelmts,
- hsize_t hyper_start,
- int rank,
- hsize_t *dims,
- hsize_t *acc,
- hsize_t *pos,
- diff_opt_t *options,
- const char *obj1,
- const char *obj2,
- int *ph);
-
-hsize_t diff_ullong(unsigned char *mem1,
- unsigned char *mem2,
- hsize_t nelmts,
- hsize_t hyper_start,
- int rank,
- hsize_t *dims,
- hsize_t *acc,
- hsize_t *pos,
- diff_opt_t *options,
- const char *obj1,
- const char *obj2,
- int *ph);
-
#endif /* H5DIFF_H__ */
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 1e7f88b..528fc40 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -36,7 +36,6 @@
#endif
#define I_FORMAT "%-15d %-15d %-15d\n"
-#define C_FORMAT "%-16c %-17c\n"
#define S_FORMAT "%-16s %-17s\n"
#define UI_FORMAT "%-15u %-15u %-15u\n"
#define LI_FORMAT "%-15ld %-15ld %-15ld\n"
@@ -101,43 +100,44 @@
*-------------------------------------------------------------------------
*/
-static int not_comparable;
+static hbool_t not_comparable;
-#define PER(A,B) { per=-1; \
- not_comparable=0; \
- both_zero=0; \
- if (A==0 && B==0) \
- both_zero=1; \
- if (A!=0) \
- per = (double)ABS( ( double)(B-A) / (double)A ); \
+#define PER(A,B) { \
+ per = -1; \
+ not_comparable = FALSE; \
+ both_zero = FALSE; \
+ if(0 == (A) && 0 == (B)) \
+ both_zero = TRUE; \
+ if(0 != (A)) \
+ per = (double)ABS((double)(B - A) / (double)A); \
else \
- not_comparable=1; \
+ not_comparable = TRUE; \
}
-#define PER_UNSIGN(TYPE,A,B) { per=-1; \
- not_comparable=0; \
- both_zero=0; \
- if (A==0 && B==0) \
- both_zero=1; \
- if (A!=0) \
- per = ABS((double)((TYPE)(B-A)) / (double)A) ; \
+#define PER_UNSIGN(TYPE,A,B) { \
+ per = -1; \
+ not_comparable = FALSE; \
+ both_zero = FALSE; \
+ if(A == 0 && B == 0) \
+ both_zero = TRUE; \
+ if(A != 0) \
+ per = ABS((double)((TYPE)(B - A)) / (double)A) ; \
else \
- not_comparable=1; \
+ not_comparable = TRUE; \
}
-#define BOTH_ZERO(A,B) { both_zero=0; \
- if (A==0 && B==0) \
- both_zero=1; \
-}
+# define PDIFF(a,b) ( (b>a) ? (b-a) : (a-b))
-#define IS_ZERO(A) { is_zero=0; \
- if (A==0) \
- is_zero=1; \
-}
+typedef struct mcomp_t
+{
+ unsigned n; /* number of members */
+ hid_t *ids; /* member type id */
+ size_t *offsets;
+ struct mcomp_t **m; /* members */
+}mcomp_t;
-# define PDIFF(a,b) ( (b>a) ? (b-a) : (a-b))
/*-------------------------------------------------------------------------
* local prototypes
@@ -146,7 +146,7 @@ static int not_comparable;
static hsize_t diff_region(hid_t obj1_id, hid_t obj2_id,hid_t region1_id, hid_t region2_id, diff_opt_t *options);
static hbool_t all_zero(const void *_mem, size_t size);
static int ull2float(unsigned long long ull_value, float *f_value);
-static hsize_t character_compare(unsigned char *mem1,unsigned char *mem2,hsize_t i,unsigned u,int rank,hsize_t *dims,hsize_t *acc,hsize_t *pos,diff_opt_t *options,const char *obj1,const char *obj2,int *ph);
+static hsize_t character_compare(char *mem1,char *mem2,hsize_t i,unsigned u,int rank,hsize_t *dims,hsize_t *acc,hsize_t *pos,diff_opt_t *options,const char *obj1,const char *obj2,int *ph);
static hsize_t character_compare_opt(unsigned char *mem1,unsigned char *mem2,hsize_t i,int rank,hsize_t *dims,hsize_t *acc,hsize_t *pos,diff_opt_t *options,const char *obj1,const char *obj2,int *ph);
static hbool_t equal_float(float value, float expected, diff_opt_t *options);
static hbool_t equal_double(double value, double expected, diff_opt_t *options);
@@ -157,6 +157,179 @@ static int print_data(diff_opt_t *options);
static void print_pos(int *ph,int pp,hsize_t curr_pos,hsize_t *acc,hsize_t *pos,int rank,hsize_t *dims,const char *obj1,const char *obj2 );
static void print_char_pos(int *ph,int pp,hsize_t curr_pos,unsigned u,hsize_t *acc,hsize_t *pos,int rank,hsize_t *dims,const char *obj1,const char *obj2 );
static void h5diff_print_char(char ch);
+static hsize_t diff_datum(void *_mem1,
+ void *_mem2,
+ hid_t m_type,
+ hsize_t i,
+ int rank,
+ hsize_t *dims,
+ hsize_t *acc,
+ hsize_t *pos,
+ diff_opt_t *options,
+ const char *obj1,
+ const char *obj2,
+ hid_t container1_id,
+ hid_t container2_id, /*where the reference came from*/
+ int *ph, /*print header */
+ mcomp_t *members); /*compound members */
+static hsize_t diff_float(unsigned char *mem1,
+ unsigned char *mem2,
+ hsize_t nelmts,
+ hsize_t hyper_start,
+ int rank,
+ hsize_t *dims,
+ hsize_t *acc,
+ hsize_t *pos,
+ diff_opt_t *options,
+ const char *obj1,
+ const char *obj2,
+ int *ph);
+static hsize_t diff_double(unsigned char *mem1,
+ unsigned char *mem2,
+ hsize_t nelmts,
+ hsize_t hyper_start,
+ int rank,
+ hsize_t *dims,
+ hsize_t *acc,
+ hsize_t *pos,
+ diff_opt_t *options,
+ const char *obj1,
+ const char *obj2,
+ int *ph);
+#if H5_SIZEOF_LONG_DOUBLE !=0
+static hsize_t diff_ldouble(unsigned char *mem1,
+ unsigned char *mem2,
+ hsize_t nelmts,
+ hsize_t hyper_start,
+ int rank,
+ hsize_t *dims,
+ hsize_t *acc,
+ hsize_t *pos,
+ diff_opt_t *options,
+ const char *obj1,
+ const char *obj2,
+ int *ph);
+#endif
+static hsize_t diff_schar(unsigned char *mem1,
+ unsigned char *mem2,
+ hsize_t nelmts,
+ hsize_t hyper_start,
+ int rank,
+ hsize_t *dims,
+ hsize_t *acc,
+ hsize_t *pos,
+ diff_opt_t *options,
+ const char *obj1,
+ const char *obj2,
+ int *ph);
+static hsize_t diff_uchar(unsigned char *mem1,
+ unsigned char *mem2,
+ hsize_t nelmts,
+ hsize_t hyper_start,
+ int rank,
+ hsize_t *dims,
+ hsize_t *acc,
+ hsize_t *pos,
+ diff_opt_t *options,
+ const char *obj1,
+ const char *obj2,
+ int *ph);
+static hsize_t diff_short(unsigned char *mem1,
+ unsigned char *mem2,
+ hsize_t nelmts,
+ hsize_t hyper_start,
+ int rank,
+ hsize_t *dims,
+ hsize_t *acc,
+ hsize_t *pos,
+ diff_opt_t *options,
+ const char *obj1,
+ const char *obj2,
+ int *ph);
+static hsize_t diff_ushort(unsigned char *mem1,
+ unsigned char *mem2,
+ hsize_t nelmts,
+ hsize_t hyper_start,
+ int rank,
+ hsize_t *dims,
+ hsize_t *acc,
+ hsize_t *pos,
+ diff_opt_t *options,
+ const char *obj1,
+ const char *obj2,
+ int *ph);
+static hsize_t diff_int(unsigned char *mem1,
+ unsigned char *mem2,
+ hsize_t nelmts,
+ hsize_t hyper_start,
+ int rank,
+ hsize_t *dims,
+ hsize_t *acc,
+ hsize_t *pos,
+ diff_opt_t *options,
+ const char *obj1,
+ const char *obj2,
+ int *ph);
+static hsize_t diff_uint(unsigned char *mem1,
+ unsigned char *mem2,
+ hsize_t nelmts,
+ hsize_t hyper_start,
+ int rank,
+ hsize_t *dims,
+ hsize_t *acc,
+ hsize_t *pos,
+ diff_opt_t *options,
+ const char *obj1,
+ const char *obj2,
+ int *ph);
+static hsize_t diff_long(unsigned char *mem1,
+ unsigned char *mem2,
+ hsize_t nelmts,
+ hsize_t hyper_start,
+ int rank,
+ hsize_t *dims,
+ hsize_t *acc,
+ hsize_t *pos,
+ diff_opt_t *options,
+ const char *obj1,
+ const char *obj2,
+ int *ph);
+static hsize_t diff_ulong(unsigned char *mem1,
+ unsigned char *mem2,
+ hsize_t nelmts,
+ hsize_t hyper_start,
+ int rank,
+ hsize_t *dims,
+ hsize_t *acc,
+ hsize_t *pos,
+ diff_opt_t *options,
+ const char *obj1,
+ const char *obj2,
+ int *ph);
+static hsize_t diff_llong(unsigned char *mem1,
+ unsigned char *mem2,
+ hsize_t nelmts,
+ hsize_t hyper_start,
+ int rank,
+ hsize_t *dims,
+ hsize_t *acc,
+ hsize_t *pos,
+ diff_opt_t *options,
+ const char *obj1,
+ const char *obj2,
+ int *ph);
+static hsize_t diff_ullong(unsigned char *mem1,
+ unsigned char *mem2,
+ hsize_t nelmts,
+ hsize_t hyper_start,
+ int rank,
+ hsize_t *dims,
+ hsize_t *acc,
+ hsize_t *pos,
+ diff_opt_t *options,
+ const char *obj1,
+ const char *obj2,
+ int *ph);
/*-------------------------------------------------------------------------
@@ -180,7 +353,7 @@ typedef enum dtype_t
} dtype_t;
#endif
-static int my_isnan(dtype_t type, void *val);
+static hbool_t my_isnan(dtype_t type, void *val);
/*-------------------------------------------------------------------------
* XCAO, 11/10/2010
@@ -260,6 +433,9 @@ hsize_t diff_array( void *_mem1,
switch (type_class)
{
+ case H5T_NO_CLASS:
+ case H5T_TIME:
+ case H5T_NCLASSES:
default:
HDassert(0);
break;
@@ -387,21 +563,21 @@ hsize_t diff_array( void *_mem1,
* Dereference the object and compare the type (basic object type).
*-------------------------------------------------------------------------
*/
-hsize_t diff_datum(void *_mem1,
- void *_mem2,
- hid_t m_type,
- hsize_t i,
- int rank,
- hsize_t *dims,
- hsize_t *acc,
- hsize_t *pos,
- diff_opt_t *options,
- const char *obj1,
- const char *obj2,
- hid_t container1_id,
- hid_t container2_id, /*where the reference came from*/
- int *ph, /*print header */
- mcomp_t *members) /*compound members */
+static hsize_t diff_datum(void *_mem1,
+ void *_mem2,
+ hid_t m_type,
+ hsize_t i,
+ int rank,
+ hsize_t *dims,
+ hsize_t *acc,
+ hsize_t *pos,
+ diff_opt_t *options,
+ const char *obj1,
+ const char *obj2,
+ hid_t container1_id,
+ hid_t container2_id, /*where the reference came from*/
+ int *ph, /*print header */
+ mcomp_t *members) /*compound members */
{
unsigned char *mem1 = (unsigned char*)_mem1;
unsigned char *mem2 = (unsigned char*)_mem2;
@@ -411,19 +587,19 @@ hsize_t diff_datum(void *_mem1,
H5T_sign_t type_sign;
H5T_class_t type_class;
size_t offset;
- int nmembs;
- int j;
+ unsigned nmembs;
+ unsigned j;
hsize_t nelmts;
size_t size=0;
- int iszero1;
- int iszero2;
+ hbool_t iszero1;
+ hbool_t iszero2;
hid_t obj1_id;
hid_t obj2_id;
hsize_t nfound=0; /* differences found */
int ret=0; /* check return error */
float f1, f2;
double per;
- int both_zero;
+ hbool_t both_zero;
h5difftrace("diff_datum start\n");
type_size = H5Tget_size( m_type );
@@ -442,10 +618,10 @@ hsize_t diff_datum(void *_mem1,
switch (H5Tget_class(m_type))
{
- default:
- HDassert(0);
- break;
+ case H5T_NO_CLASS:
case H5T_TIME:
+ case H5T_NCLASSES:
+ default:
HDassert(0);
break;
@@ -464,8 +640,8 @@ hsize_t diff_datum(void *_mem1,
memb_type = members->ids[j];
nfound+=diff_datum(
- mem1+offset,
- mem2+offset,
+ mem1 + offset,
+ mem2 + offset,
memb_type,
i,
rank,
@@ -508,10 +684,10 @@ hsize_t diff_datum(void *_mem1,
else
{
/* Get pointer to first string */
- s1 = mem1;
+ s1 = (char *)mem1;
size1 = H5Tget_size(m_type);
/* Get pointer to second string */
- s2 = mem2;
+ s2 = (char *)mem2;
size2 = H5Tget_size(m_type);
}
@@ -634,11 +810,11 @@ hsize_t diff_datum(void *_mem1,
*/
err1 = H5Tenum_nameof(m_type, mem1, enum_name1, sizeof enum_name1);
if(err1 < 0)
- strcpy(enum_name1, "**INVALID VALUE**");
+ HDsnprintf(enum_name1, sizeof(enum_name1), "**INVALID VALUE**");
err2 = H5Tenum_nameof(m_type, mem2, enum_name2, sizeof enum_name2);
if(err2 < 0)
- strcpy(enum_name2, "**INVALID VALUE**");
+ HDsnprintf(enum_name2, sizeof(enum_name2), "**INVALID VALUE**");
if(err1 < 0 || err2 < 0)
{
@@ -702,7 +878,8 @@ hsize_t diff_datum(void *_mem1,
{
hsize_t adims[H5S_MAX_RANK];
- hsize_t ndims;
+ int ndims;
+
/* get the array's base datatype for each element */
memb_type = H5Tget_super(m_type);
size = H5Tget_size(memb_type);
@@ -711,7 +888,7 @@ hsize_t diff_datum(void *_mem1,
HDassert(ndims >= 1 && ndims <= H5S_MAX_RANK);
/* calculate the number of array elements */
- for (u = 0, nelmts = 1; u <ndims; u++)
+ for (u = 0, nelmts = 1; u < (unsigned)ndims; u++)
nelmts *= adims[u];
for (u = 0; u < nelmts; u++)
{
@@ -861,22 +1038,22 @@ hsize_t diff_datum(void *_mem1,
/* get the number of sequence elements */
nelmts = ((hvl_t *)mem1)->len;
- for (j = 0; j < (int)nelmts; j++)
- nfound+=diff_datum(
- ((char *)(((hvl_t *)mem1)->p)) + j * size,
- ((char *)(((hvl_t *)mem2)->p)) + j * size, /* offset */
- memb_type,
- i, /* index position */
- rank,
- dims,
- acc,
- pos,
- options,
- obj1,
- obj2,
- container1_id,
- container2_id,
- ph, members);
+ for (j = 0; j < nelmts; j++)
+ nfound += diff_datum(
+ ((char *)(((hvl_t *)mem1)->p)) + j * size,
+ ((char *)(((hvl_t *)mem2)->p)) + j * size, /* offset */
+ memb_type,
+ i, /* index position */
+ rank,
+ dims,
+ acc,
+ pos,
+ options,
+ obj1,
+ obj2,
+ container1_id,
+ container2_id,
+ ph, members);
H5Tclose(memb_type);
@@ -1421,7 +1598,7 @@ hsize_t diff_datum(void *_mem1,
{
print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(I_FORMAT_P_NOTCOMP,temp1_uint,temp2_uint,PDIFF(temp1_uint,temp2_uint));
+ parallel_print(UI_FORMAT_P_NOTCOMP,temp1_uint,temp2_uint,PDIFF(temp1_uint,temp2_uint));
}
nfound++;
}
@@ -1434,7 +1611,7 @@ hsize_t diff_datum(void *_mem1,
{
print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(I_FORMAT_P,temp1_uint,temp2_uint,PDIFF(temp1_uint,temp2_uint),per);
+ parallel_print(UI_FORMAT_P,temp1_uint,temp2_uint,PDIFF(temp1_uint,temp2_uint),per);
}
nfound++;
}
@@ -1450,7 +1627,7 @@ hsize_t diff_datum(void *_mem1,
{
print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(I_FORMAT_P_NOTCOMP,temp1_uint,temp2_uint,PDIFF(temp1_uint,temp2_uint));
+ parallel_print(UI_FORMAT_P_NOTCOMP,temp1_uint,temp2_uint,PDIFF(temp1_uint,temp2_uint));
}
nfound++;
}
@@ -1463,7 +1640,7 @@ hsize_t diff_datum(void *_mem1,
{
print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(I_FORMAT_P,temp1_uint,temp2_uint,PDIFF(temp1_uint,temp2_uint),per);
+ parallel_print(UI_FORMAT_P,temp1_uint,temp2_uint,PDIFF(temp1_uint,temp2_uint),per);
}
nfound++;
}
@@ -1904,8 +2081,8 @@ hsize_t diff_datum(void *_mem1,
{
float temp1_float;
float temp2_float;
- int isnan1=0;
- int isnan2=0;
+ hbool_t isnan1 = FALSE;
+ hbool_t isnan2 = FALSE;
HDassert(type_size==sizeof(float));
@@ -1933,29 +2110,29 @@ hsize_t diff_datum(void *_mem1,
}
/* both not NaN, do the comparison */
- if ( isnan1==0 && isnan2==0)
+ if ( !isnan1 && !isnan2)
{
- if (ABS(temp1_float-temp2_float) > options->delta)
+ if (ABS(temp1_float-temp2_float) > (float)options->delta)
{
if ( print_data(options) )
{
print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(F_FORMAT,temp1_float,temp2_float,ABS(temp1_float-temp2_float));
+ parallel_print(F_FORMAT,(double)temp1_float,(double)temp2_float, (double)ABS(temp1_float - temp2_float));
}
nfound++;
}
}
/* only one is NaN, assume difference */
- else if (isnan1==1 && isnan2==0 || isnan1==0 && isnan2==1)
+ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
{
if ( print_data(options) )
{
print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(F_FORMAT,temp1_float,temp2_float,ABS(temp1_float-temp2_float));
+ parallel_print(F_FORMAT, (double)temp1_float, (double)temp2_float, (double)ABS(temp1_float - temp2_float));
}
nfound++;
@@ -1979,7 +2156,7 @@ hsize_t diff_datum(void *_mem1,
}
/* both not NaN, do the comparison */
- if ( isnan1==0 && isnan2==0)
+ if ( !isnan1 && !isnan2)
{
PER(temp1_float,temp2_float);
@@ -1990,35 +2167,35 @@ hsize_t diff_datum(void *_mem1,
{
print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(F_FORMAT_P_NOTCOMP,temp1_float,temp2_float,ABS(temp1_float-temp2_float));
+ parallel_print(F_FORMAT_P_NOTCOMP, (double)temp1_float, (double)temp2_float, (double)ABS(temp1_float - temp2_float));
}
nfound++;
}
else
- if ( per > options->percent && ABS(temp1_float-temp2_float) > options->delta )
+ if ( per > options->percent && (double)ABS(temp1_float-temp2_float) > options->delta )
{
if ( print_data(options) )
{
print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(F_FORMAT_P,temp1_float,temp2_float,
- ABS(temp1_float-temp2_float),
- ABS(1-temp2_float/temp1_float));
+ parallel_print(F_FORMAT_P, (double)temp1_float, (double)temp2_float,
+ (double)ABS(temp1_float - temp2_float),
+ (double)ABS(1 - temp2_float / temp1_float));
}
nfound++;
}
}
/* only one is NaN, assume difference */
- else if (isnan1==1 && isnan2==0 || isnan1==0 && isnan2==1)
+ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
{
if ( print_data(options) )
{
print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(F_FORMAT,temp1_float,temp2_float,ABS(temp1_float-temp2_float));
+ parallel_print(F_FORMAT, (double)temp1_float, (double)temp2_float, (double)ABS(temp1_float - temp2_float));
}
nfound++;
@@ -2044,7 +2221,7 @@ hsize_t diff_datum(void *_mem1,
}
/* both not NaN, do the comparison */
- if ( isnan1==0 && isnan2==0)
+ if ( !isnan1 && !isnan2)
{
PER(temp1_float,temp2_float);
@@ -2055,8 +2232,8 @@ hsize_t diff_datum(void *_mem1,
{
print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(F_FORMAT_P_NOTCOMP,temp1_float,temp2_float,
- ABS(temp1_float-temp2_float));
+ parallel_print(F_FORMAT_P_NOTCOMP, (double)temp1_float, (double)temp2_float,
+ (double)ABS(temp1_float - temp2_float));
}
nfound++;
}
@@ -2069,22 +2246,22 @@ hsize_t diff_datum(void *_mem1,
{
print_pos(ph,1,i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(F_FORMAT_P,temp1_float,temp2_float,
- ABS(temp1_float-temp2_float),
- ABS(1-temp2_float/temp1_float));
+ parallel_print(F_FORMAT_P, (double)temp1_float, (double)temp2_float,
+ (double)ABS(temp1_float - temp2_float),
+ (double)ABS(1 - temp2_float / temp1_float));
}
nfound++;
}
}
/* only one is NaN, assume difference */
- else if (isnan1==1 && isnan2==0 || isnan1==0 && isnan2==1)
+ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
{
if ( print_data(options) )
{
print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(F_FORMAT,temp1_float,temp2_float,ABS(temp1_float-temp2_float));
+ parallel_print(F_FORMAT, (double)temp1_float, (double)temp2_float, (double)ABS(temp1_float - temp2_float));
}
nfound++;
@@ -2102,7 +2279,7 @@ hsize_t diff_datum(void *_mem1,
{
print_pos(ph,0,i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(F_FORMAT,temp1_float,temp2_float,ABS(temp1_float-temp2_float));
+ parallel_print(F_FORMAT, (double)temp1_float, (double)temp2_float, (double)ABS(temp1_float - temp2_float));
}
nfound++;
}
@@ -2117,8 +2294,8 @@ hsize_t diff_datum(void *_mem1,
{
double temp1_double;
double temp2_double;
- int isnan1=0;
- int isnan2=0;
+ hbool_t isnan1 = FALSE;
+ hbool_t isnan2 = FALSE;
HDassert(type_size==sizeof(double));
@@ -2144,7 +2321,7 @@ hsize_t diff_datum(void *_mem1,
}
/* both not NaN, do the comparison */
- if ( isnan1==0 && isnan2==0)
+ if ( !isnan1 && !isnan2)
{
if (ABS(temp1_double-temp2_double) > options->delta)
@@ -2160,7 +2337,7 @@ hsize_t diff_datum(void *_mem1,
}
/* only one is NaN, assume difference */
- else if (isnan1==1 && isnan2==0 || isnan1==0 && isnan2==1)
+ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
{
if ( print_data(options) )
{
@@ -2191,7 +2368,7 @@ hsize_t diff_datum(void *_mem1,
}
/* both not NaN, do the comparison */
- if ( isnan1==0 && isnan2==0)
+ if ( !isnan1 && !isnan2)
{
PER(temp1_double,temp2_double);
@@ -2225,7 +2402,7 @@ hsize_t diff_datum(void *_mem1,
}
/* only one is NaN, assume difference */
- else if (isnan1==1 && isnan2==0 || isnan1==0 && isnan2==1)
+ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
{
if ( print_data(options) )
{
@@ -2256,7 +2433,7 @@ hsize_t diff_datum(void *_mem1,
}
/* both not NaN, do the comparison */
- if ( isnan1==0 && isnan2==0)
+ if ( !isnan1 && !isnan2)
{
PER(temp1_double,temp2_double);
@@ -2291,7 +2468,7 @@ hsize_t diff_datum(void *_mem1,
}
/* only one is NaN, assume difference */
- else if (isnan1==1 && isnan2==0 || isnan1==0 && isnan2==1)
+ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
{
if ( print_data(options) )
{
@@ -2331,8 +2508,8 @@ hsize_t diff_datum(void *_mem1,
{
long double temp1_double;
long double temp2_double;
- int isnan1=0;
- int isnan2=0;
+ hbool_t isnan1 = FALSE;
+ hbool_t isnan2 = FALSE;
HDassert(type_size==sizeof(long double));
@@ -2360,7 +2537,7 @@ hsize_t diff_datum(void *_mem1,
}
/* both not NaN, do the comparison */
- if ( isnan1==0 && isnan2==0)
+ if ( !isnan1 && !isnan2)
{
if (ABS(temp1_double-temp2_double) > options->delta)
@@ -2375,7 +2552,7 @@ hsize_t diff_datum(void *_mem1,
}
} /* NaN */
/* only one is NaN, assume difference */
- else if (isnan1==1 && isnan2==0 || isnan1==0 && isnan2==1)
+ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
{
if ( print_data(options) )
{
@@ -2405,7 +2582,7 @@ hsize_t diff_datum(void *_mem1,
}
/* both not NaN, do the comparison */
- if ( isnan1==0 && isnan2==0)
+ if ( !isnan1 && !isnan2)
{
PER(temp1_double,temp2_double);
@@ -2439,7 +2616,7 @@ hsize_t diff_datum(void *_mem1,
} /* NaN */
/* only one is NaN, assume difference */
- else if (isnan1==1 && isnan2==0 || isnan1==0 && isnan2==1)
+ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
{
if ( print_data(options) )
{
@@ -2469,7 +2646,7 @@ hsize_t diff_datum(void *_mem1,
}
/* both not NaN, do the comparison */
- if ( isnan1==0 && isnan2==0)
+ if ( !isnan1 && !isnan2)
{
PER(temp1_double,temp2_double);
@@ -2504,7 +2681,7 @@ hsize_t diff_datum(void *_mem1,
} /* NaN */
/* only one is NaN, assume difference */
- else if (isnan1==1 && isnan2==0 || isnan1==0 && isnan2==1)
+ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
{
if ( print_data(options) )
{
@@ -2671,14 +2848,15 @@ hsize_t diff_region(hid_t obj1_id,
*-------------------------------------------------------------------------
*/
if(nblocks1 > 0) {
- alloc_size = nblocks1 * ndims1 * 2 * sizeof(ptdata1[0]);
+ HDassert(ndims1 > 0);
+ alloc_size = (hsize_t)nblocks1 * (unsigned)ndims1 * 2 * sizeof(ptdata1[0]);
HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/
- ptdata1 = HDmalloc((size_t)alloc_size);
+ ptdata1 = (hsize_t *)HDmalloc((size_t)alloc_size);
H5_CHECK_OVERFLOW(nblocks1, hssize_t, hsize_t);
H5Sget_select_hyper_blocklist(region1_id, (hsize_t)0, (hsize_t)nblocks1, ptdata1);
- ptdata2 = HDmalloc((size_t)alloc_size);
+ ptdata2 = (hsize_t *)HDmalloc((size_t)alloc_size);
H5_CHECK_OVERFLOW(nblocks2, hssize_t, hsize_t);
H5Sget_select_hyper_blocklist(region2_id, (hsize_t)0, (hsize_t)nblocks2, ptdata2);
@@ -2726,14 +2904,14 @@ hsize_t diff_region(hid_t obj1_id,
*-------------------------------------------------------------------------
*/
if(npoints1 > 0) {
- alloc_size = npoints1 * ndims1 * sizeof(ptdata1[0]);
+ alloc_size = (hsize_t)npoints1 * (unsigned)ndims1 * sizeof(ptdata1[0]);
HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/
- ptdata1 = HDmalloc((size_t)alloc_size);
+ ptdata1 = (hsize_t *)HDmalloc((size_t)alloc_size);
H5_CHECK_OVERFLOW(npoints1,hssize_t,hsize_t);
H5Sget_select_elem_pointlist(region1_id, (hsize_t)0, (hsize_t)npoints1, ptdata1);
- ptdata2 = HDmalloc((size_t)alloc_size);
+ ptdata2 = (hsize_t *)HDmalloc((size_t)alloc_size);
H5_CHECK_OVERFLOW(npoints1,hssize_t,hsize_t);
H5Sget_select_elem_pointlist(region2_id, (hsize_t)0, (hsize_t)npoints2, ptdata2);
@@ -2790,8 +2968,8 @@ hsize_t diff_region(hid_t obj1_id,
HDfree(ptdata2);
}
- nfound_b = nfound_b/ndims1;
- nfound_p = nfound_p/ndims1;
+ nfound_b = nfound_b / (unsigned)ndims1;
+ nfound_p = nfound_p / (unsigned)ndims1;
return (nfound_p + nfound_b);
}
@@ -2807,8 +2985,8 @@ hsize_t diff_region(hid_t obj1_id,
*/
static
-hsize_t character_compare(unsigned char *mem1,
- unsigned char *mem2,
+hsize_t character_compare(char *mem1,
+ char *mem2,
hsize_t i,
unsigned u,
int rank,
@@ -2821,8 +2999,8 @@ hsize_t character_compare(unsigned char *mem1,
int *ph)
{
hsize_t nfound=0; /* differences found */
- unsigned char temp1_uchar;
- unsigned char temp2_uchar;
+ char temp1_uchar;
+ char temp2_uchar;
HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char));
HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char));
@@ -2857,7 +3035,7 @@ hsize_t character_compare(unsigned char *mem1,
*-------------------------------------------------------------------------
*/
-hsize_t character_compare_opt(unsigned char *mem1,
+static hsize_t character_compare_opt(unsigned char *mem1,
unsigned char *mem2,
hsize_t i,
int rank,
@@ -2873,7 +3051,7 @@ hsize_t character_compare_opt(unsigned char *mem1,
unsigned char temp1_uchar;
unsigned char temp2_uchar;
double per;
- int both_zero;
+ hbool_t both_zero;
HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char));
HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char));
@@ -2950,7 +3128,7 @@ hsize_t character_compare_opt(unsigned char *mem1,
*
*-------------------------------------------------------------------------
*/
-hsize_t diff_float(unsigned char *mem1,
+static hsize_t diff_float(unsigned char *mem1,
unsigned char *mem2,
hsize_t nelmts,
hsize_t hyper_start,
@@ -2969,9 +3147,9 @@ hsize_t diff_float(unsigned char *mem1,
float temp2_float;
hsize_t i;
double per;
- int both_zero;
- int isnan1=0;
- int isnan2=0;
+ hbool_t both_zero;
+ hbool_t isnan1 = FALSE;
+ hbool_t isnan2 = FALSE;
h5difftrace("diff_float start\n");
@@ -2998,27 +3176,27 @@ hsize_t diff_float(unsigned char *mem1,
}
/* both not NaN, do the comparison */
- if ( isnan1==0 && isnan2==0)
+ if ( !isnan1 && !isnan2)
{
- if (ABS(temp1_float-temp2_float) > options->delta)
+ if ((double)ABS(temp1_float-temp2_float) > options->delta)
{
if ( print_data(options) )
{
print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(F_FORMAT,temp1_float,temp2_float,ABS(temp1_float-temp2_float));
+ parallel_print(F_FORMAT, (double)temp1_float, (double)temp2_float, (double)ABS(temp1_float - temp2_float));
}
nfound++;
}
}
/* only one is NaN, assume difference */
- else if (isnan1==1 && isnan2==0 || isnan1==0 && isnan2==1)
+ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
{
if ( print_data(options) )
{
print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(F_FORMAT,temp1_float,temp2_float,ABS(temp1_float-temp2_float));
+ parallel_print(F_FORMAT, (double)temp1_float, (double)temp2_float, (double)ABS(temp1_float - temp2_float));
}
nfound++;
@@ -3051,7 +3229,7 @@ hsize_t diff_float(unsigned char *mem1,
isnan2 = my_isnan(FLT_FLOAT,&temp2_float);
}
/* both not NaN, do the comparison */
- if ( isnan1==0 && isnan2==0)
+ if ( (!isnan1 && !isnan2))
{
PER(temp1_float,temp2_float);
@@ -3062,8 +3240,8 @@ hsize_t diff_float(unsigned char *mem1,
{
print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(F_FORMAT_P_NOTCOMP,temp1_float,temp2_float,
- ABS(temp1_float-temp2_float));
+ parallel_print(F_FORMAT_P_NOTCOMP, (double)temp1_float, (double)temp2_float,
+ (double)ABS(temp1_float - temp2_float));
}
nfound++;
}
@@ -3076,21 +3254,21 @@ hsize_t diff_float(unsigned char *mem1,
{
print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(F_FORMAT_P,temp1_float,temp2_float,
- ABS(temp1_float-temp2_float),
- ABS(1-temp2_float/temp1_float));
+ parallel_print(F_FORMAT_P, (double)temp1_float, (double)temp2_float,
+ (double)ABS(temp1_float - temp2_float),
+ (double)ABS(1 - temp2_float / temp1_float));
}
nfound++;
}
}
/* only one is NaN, assume difference */
- else if (isnan1==1 && isnan2==0 || isnan1==0 && isnan2==1)
+ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
{
if ( print_data(options) )
{
print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(F_FORMAT,temp1_float,temp2_float,ABS(temp1_float-temp2_float));
+ parallel_print(F_FORMAT, (double)temp1_float, (double)temp2_float, (double)ABS(temp1_float - temp2_float));
}
nfound++;
@@ -3125,7 +3303,7 @@ hsize_t diff_float(unsigned char *mem1,
}
/* both not NaN, do the comparison */
- if ( isnan1==0 && isnan2==0)
+ if ( !isnan1 && !isnan2)
{
PER(temp1_float,temp2_float);
@@ -3136,36 +3314,36 @@ hsize_t diff_float(unsigned char *mem1,
{
print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(F_FORMAT_P_NOTCOMP,temp1_float,temp2_float,
- ABS(temp1_float-temp2_float));
+ parallel_print(F_FORMAT_P_NOTCOMP, (double)temp1_float, (double)temp2_float,
+ (double)ABS(temp1_float - temp2_float));
}
nfound++;
}
else
- if ( per > options->percent && ABS(temp1_float-temp2_float) > options->delta )
+ if ( per > options->percent && (double)ABS(temp1_float - temp2_float) > options->delta )
{
if ( print_data(options) )
{
print_pos(ph,1,hyper_start+i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(F_FORMAT_P,temp1_float,temp2_float,
- ABS(temp1_float-temp2_float),
- ABS(1-temp2_float/temp1_float));
+ parallel_print(F_FORMAT_P, (double)temp1_float, (double)temp2_float,
+ (double)ABS(temp1_float - temp2_float),
+ (double)ABS(1 - temp2_float / temp1_float));
}
nfound++;
}
}
/* only one is NaN, assume difference */
- else if (isnan1==1 && isnan2==0 || isnan1==0 && isnan2==1)
+ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
{
if ( print_data(options) )
{
print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(F_FORMAT,temp1_float,temp2_float,ABS(temp1_float-temp2_float));
+ parallel_print(F_FORMAT, (double)temp1_float, (double)temp2_float, (double)ABS(temp1_float - temp2_float));
}
nfound++;
@@ -3194,7 +3372,7 @@ hsize_t diff_float(unsigned char *mem1,
{
print_pos(ph,0,hyper_start+i,acc,pos,rank,dims,obj1,obj2);
parallel_print(SPACES);
- parallel_print(F_FORMAT,temp1_float,temp2_float,ABS(temp1_float-temp2_float));
+ parallel_print(F_FORMAT, (double)temp1_float, (double)temp2_float, (double)ABS(temp1_float - temp2_float));
}
nfound++;
}
@@ -3226,7 +3404,7 @@ hsize_t diff_float(unsigned char *mem1,
*
*-------------------------------------------------------------------------
*/
-hsize_t diff_double(unsigned char *mem1,
+static hsize_t diff_double(unsigned char *mem1,
unsigned char *mem2,
hsize_t nelmts,
hsize_t hyper_start,
@@ -3245,9 +3423,9 @@ hsize_t diff_double(unsigned char *mem1,
double temp2_double;
hsize_t i;
double per;
- int both_zero;
- int isnan1=0;
- int isnan2=0;
+ hbool_t both_zero;
+ hbool_t isnan1 = FALSE;
+ hbool_t isnan2 = FALSE;
h5difftrace("diff_double start\n");
/*-------------------------------------------------------------------------
@@ -3273,7 +3451,7 @@ hsize_t diff_double(unsigned char *mem1,
}
/* both not NaN, do the comparison */
- if ( isnan1==0 && isnan2==0)
+ if ( !isnan1 && !isnan2)
{
if (ABS(temp1_double-temp2_double) > options->delta)
{
@@ -3287,7 +3465,7 @@ hsize_t diff_double(unsigned char *mem1,
}
}
/* only one is NaN, assume difference */
- else if (isnan1==1 && isnan2==0 || isnan1==0 && isnan2==1)
+ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
{
if ( print_data(options) )
{
@@ -3326,7 +3504,7 @@ hsize_t diff_double(unsigned char *mem1,
isnan2 = my_isnan(FLT_DOUBLE,&temp2_double);
}
/* both not NaN, do the comparison */
- if ( isnan1==0 && isnan2==0)
+ if ( !isnan1 && !isnan2)
{
PER(temp1_double,temp2_double);
@@ -3359,7 +3537,7 @@ hsize_t diff_double(unsigned char *mem1,
}
}
/* only one is NaN, assume difference */
- else if (isnan1==1 && isnan2==0 || isnan1==0 && isnan2==1)
+ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
{
if ( print_data(options) )
{
@@ -3400,7 +3578,7 @@ hsize_t diff_double(unsigned char *mem1,
}
/* both not NaN, do the comparison */
- if ( isnan1==0 && isnan2==0)
+ if ( !isnan1 && !isnan2)
{
PER(temp1_double,temp2_double);
@@ -3434,7 +3612,7 @@ hsize_t diff_double(unsigned char *mem1,
}
/* only one is NaN, assume difference */
- else if (isnan1==1 && isnan2==0 || isnan1==0 && isnan2==1)
+ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
{
if ( print_data(options) )
{
@@ -3510,7 +3688,7 @@ hsize_t diff_double(unsigned char *mem1,
*/
#if H5_SIZEOF_LONG_DOUBLE !=0
-hsize_t diff_ldouble(unsigned char *mem1,
+static hsize_t diff_ldouble(unsigned char *mem1,
unsigned char *mem2,
hsize_t nelmts,
hsize_t hyper_start,
@@ -3529,9 +3707,9 @@ hsize_t diff_ldouble(unsigned char *mem1,
long double temp2_double;
hsize_t i;
double per;
- int both_zero;
- int isnan1=0;
- int isnan2=0;
+ hbool_t both_zero;
+ hbool_t isnan1 = FALSE;
+ hbool_t isnan2 = FALSE;
h5difftrace("diff_ldouble start\n");
@@ -3558,7 +3736,7 @@ hsize_t diff_ldouble(unsigned char *mem1,
}
/* both not NaN, do the comparison */
- if ( isnan1==0 && isnan2==0)
+ if ( !isnan1 && !isnan2)
{
if (ABS(temp1_double-temp2_double) > options->delta)
{
@@ -3572,7 +3750,7 @@ hsize_t diff_ldouble(unsigned char *mem1,
}
}
/* only one is NaN, assume difference */
- else if (isnan1==1 && isnan2==0 || isnan1==0 && isnan2==1)
+ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
{
if ( print_data(options) )
{
@@ -3611,7 +3789,7 @@ hsize_t diff_ldouble(unsigned char *mem1,
isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double);
}
/* both not NaN, do the comparison */
- if ( isnan1==0 && isnan2==0)
+ if ( !isnan1 && !isnan2)
{
PER(temp1_double,temp2_double);
@@ -3644,7 +3822,7 @@ hsize_t diff_ldouble(unsigned char *mem1,
}
}
/* only one is NaN, assume difference */
- else if (isnan1==1 && isnan2==0 || isnan1==0 && isnan2==1)
+ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
{
if ( print_data(options) )
{
@@ -3685,7 +3863,7 @@ hsize_t diff_ldouble(unsigned char *mem1,
}
/* both not NaN, do the comparison */
- if ( isnan1==0 && isnan2==0)
+ if ( !isnan1 && !isnan2)
{
PER(temp1_double,temp2_double);
@@ -3719,7 +3897,7 @@ hsize_t diff_ldouble(unsigned char *mem1,
}
/* only one is NaN, assume difference */
- else if (isnan1==1 && isnan2==0 || isnan1==0 && isnan2==1)
+ else if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
{
if ( print_data(options) )
{
@@ -3795,7 +3973,7 @@ hsize_t diff_ldouble(unsigned char *mem1,
*
*-------------------------------------------------------------------------
*/
-hsize_t diff_schar(unsigned char *mem1,
+static hsize_t diff_schar(unsigned char *mem1,
unsigned char *mem2,
hsize_t nelmts,
hsize_t hyper_start,
@@ -3814,7 +3992,7 @@ hsize_t diff_schar(unsigned char *mem1,
char temp2_char;
hsize_t i;
double per;
- int both_zero;
+ hbool_t both_zero;
h5difftrace("diff_schar start\n");
@@ -3974,7 +4152,7 @@ hsize_t diff_schar(unsigned char *mem1,
*
*-------------------------------------------------------------------------
*/
-hsize_t diff_uchar(unsigned char *mem1,
+static hsize_t diff_uchar(unsigned char *mem1,
unsigned char *mem2,
hsize_t nelmts,
hsize_t hyper_start,
@@ -3993,7 +4171,7 @@ hsize_t diff_uchar(unsigned char *mem1,
unsigned char temp2_uchar;
hsize_t i;
double per;
- int both_zero;
+ hbool_t both_zero;
h5difftrace("diff_uchar start\n");
@@ -4152,7 +4330,7 @@ hsize_t diff_uchar(unsigned char *mem1,
*
*-------------------------------------------------------------------------
*/
-hsize_t diff_short(unsigned char *mem1,
+static hsize_t diff_short(unsigned char *mem1,
unsigned char *mem2,
hsize_t nelmts,
hsize_t hyper_start,
@@ -4171,7 +4349,7 @@ hsize_t diff_short(unsigned char *mem1,
short temp2_short;
hsize_t i;
double per;
- int both_zero;
+ hbool_t both_zero;
h5difftrace("diff_short start\n");
/* -d and !-p */
@@ -4332,7 +4510,7 @@ hsize_t diff_short(unsigned char *mem1,
*
*-------------------------------------------------------------------------
*/
-hsize_t diff_ushort(unsigned char *mem1,
+static hsize_t diff_ushort(unsigned char *mem1,
unsigned char *mem2,
hsize_t nelmts,
hsize_t hyper_start,
@@ -4351,7 +4529,7 @@ hsize_t diff_ushort(unsigned char *mem1,
unsigned short temp2_ushort;
hsize_t i;
double per;
- int both_zero;
+ hbool_t both_zero;
h5difftrace("diff_ushort start\n");
/* -d and !-p */
@@ -4513,7 +4691,7 @@ hsize_t diff_ushort(unsigned char *mem1,
*
*-------------------------------------------------------------------------
*/
-hsize_t diff_int(unsigned char *mem1,
+static hsize_t diff_int(unsigned char *mem1,
unsigned char *mem2,
hsize_t nelmts,
hsize_t hyper_start,
@@ -4532,7 +4710,7 @@ hsize_t diff_int(unsigned char *mem1,
int temp2_int;
hsize_t i;
double per;
- int both_zero;
+ hbool_t both_zero;
h5difftrace("diff_int start\n");
/* -d and !-p */
@@ -4694,7 +4872,7 @@ hsize_t diff_int(unsigned char *mem1,
*
*-------------------------------------------------------------------------
*/
-hsize_t diff_uint(unsigned char *mem1,
+static hsize_t diff_uint(unsigned char *mem1,
unsigned char *mem2,
hsize_t nelmts,
hsize_t hyper_start,
@@ -4713,7 +4891,7 @@ hsize_t diff_uint(unsigned char *mem1,
unsigned int temp2_uint;
hsize_t i;
double per;
- int both_zero;
+ hbool_t both_zero;
h5difftrace("diff_uint start\n");
/* -d and !-p */
@@ -4873,7 +5051,7 @@ hsize_t diff_uint(unsigned char *mem1,
*
*-------------------------------------------------------------------------
*/
-hsize_t diff_long(unsigned char *mem1,
+static hsize_t diff_long(unsigned char *mem1,
unsigned char *mem2,
hsize_t nelmts,
hsize_t hyper_start,
@@ -4892,7 +5070,7 @@ hsize_t diff_long(unsigned char *mem1,
long temp2_long;
hsize_t i;
double per;
- int both_zero;
+ hbool_t both_zero;
h5difftrace("diff_long start\n");
/* -d and !-p */
@@ -5058,7 +5236,7 @@ hsize_t diff_long(unsigned char *mem1,
*
*-------------------------------------------------------------------------
*/
-hsize_t diff_ulong(unsigned char *mem1,
+static hsize_t diff_ulong(unsigned char *mem1,
unsigned char *mem2,
hsize_t nelmts,
hsize_t hyper_start,
@@ -5077,7 +5255,7 @@ hsize_t diff_ulong(unsigned char *mem1,
unsigned long temp2_ulong;
hsize_t i;
double per;
- int both_zero;
+ hbool_t both_zero;
h5difftrace("diff_ulong start\n");
@@ -5243,7 +5421,7 @@ hsize_t diff_ulong(unsigned char *mem1,
*
*-------------------------------------------------------------------------
*/
-hsize_t diff_llong(unsigned char *mem1,
+static hsize_t diff_llong(unsigned char *mem1,
unsigned char *mem2,
hsize_t nelmts,
hsize_t hyper_start,
@@ -5262,7 +5440,7 @@ hsize_t diff_llong(unsigned char *mem1,
long long temp2_llong;
hsize_t i;
double per;
- int both_zero;
+ hbool_t both_zero;
h5difftrace("diff_llong start\n");
/* -d and !-p */
@@ -5418,7 +5596,7 @@ hsize_t diff_llong(unsigned char *mem1,
*
*-------------------------------------------------------------------------
*/
-hsize_t diff_ullong(unsigned char *mem1,
+static hsize_t diff_ullong(unsigned char *mem1,
unsigned char *mem2,
hsize_t nelmts,
hsize_t hyper_start,
@@ -5438,7 +5616,7 @@ hsize_t diff_ullong(unsigned char *mem1,
hsize_t i;
float f1, f2;
double per;
- int both_zero;
+ hbool_t both_zero;
h5difftrace("diff_ullong start\n");
/* -d and !-p */
@@ -5665,8 +5843,8 @@ hbool_t equal_double(double value, double expected, diff_opt_t *options)
* detect NaNs
*-------------------------------------------------------------------------
*/
- int isnan1 = my_isnan(FLT_DOUBLE,&value);
- int isnan2 = my_isnan(FLT_DOUBLE,&expected);
+ hbool_t isnan1 = my_isnan(FLT_DOUBLE,&value);
+ hbool_t isnan2 = my_isnan(FLT_DOUBLE,&expected);
/*-------------------------------------------------------------------------
* we consider NaN == NaN to be true
@@ -5720,8 +5898,8 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio
* detect NaNs
*-------------------------------------------------------------------------
*/
- int isnan1 = my_isnan(FLT_LDOUBLE,&value);
- int isnan2 = my_isnan(FLT_LDOUBLE,&expected);
+ hbool_t isnan1 = my_isnan(FLT_LDOUBLE,&value);
+ hbool_t isnan2 = my_isnan(FLT_LDOUBLE,&expected);
/*-------------------------------------------------------------------------
* we consider NaN == NaN to be true
@@ -5779,8 +5957,8 @@ hbool_t equal_float(float value, float expected, diff_opt_t *options)
* detect NaNs
*-------------------------------------------------------------------------
*/
- int isnan1 = my_isnan(FLT_FLOAT,&value);
- int isnan2 = my_isnan(FLT_FLOAT,&expected);
+ hbool_t isnan1 = my_isnan(FLT_FLOAT,&value);
+ hbool_t isnan2 = my_isnan(FLT_FLOAT,&expected);
/*-------------------------------------------------------------------------
* we consider NaN == NaN to be true
@@ -5832,40 +6010,39 @@ hbool_t equal_float(float value, float expected, diff_opt_t *options)
*
*-------------------------------------------------------------------------
*/
-static int
+static hbool_t
my_isnan(dtype_t type, void *val)
{
- int retval = 0;
+ hbool_t retval = FALSE;
char s[256];
h5difftrace("my_isnan start\n");
if (FLT_FLOAT==type)
{
float x;
+
HDmemcpy(&x, val, sizeof(float));
retval = (x!=x);
-
-
-
}
else if (FLT_DOUBLE==type)
{
double x;
+
HDmemcpy(&x, val, sizeof(double));
retval = (x!=x);
-
-#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
}
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
else if (FLT_LDOUBLE==type)
{
long double x;
+
HDmemcpy(&x, val, sizeof(long double));
retval = (x!=x);
-#endif
}
+#endif
else
{
- return 0;
+ return FALSE;
}
/*
@@ -5877,44 +6054,39 @@ my_isnan(dtype_t type, void *val)
if (FLT_FLOAT==type)
{
float x;
- HDmemcpy(&x, val, sizeof(float));
- sprintf(s, "%g", x);
-
+ HDmemcpy(&x, val, sizeof(float));
+ HDsnprintf(s, sizeof(s), "%g", (double)x);
}
else if (FLT_DOUBLE==type)
{
double x;
+
HDmemcpy(&x, val, sizeof(double));
- sprintf(s, "%g", x);
-#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
+ HDsnprintf(s, sizeof(s), "%g", x);
}
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
else if (FLT_LDOUBLE==type)
{
long double x;
+
HDmemcpy(&x, val, sizeof(long double));
- sprintf(s, "%Lg", x);
-#endif
+ HDsnprintf(s, sizeof(s), "%Lg", x);
}
+#endif
else
{
- return 0;
+ return FALSE;
}
-
if ( HDstrstr(s, "NaN") ||
HDstrstr(s, "NAN") ||
HDstrstr(s, "nan") ||
HDstrstr(s, "-1.#IND") /* WIN32 */
)
{
-
- retval = 1;
+ retval = TRUE;
}
-
-
-
-
}
#ifdef H5_VMS
@@ -5925,15 +6097,17 @@ my_isnan(dtype_t type, void *val)
if (FLT_FLOAT==type)
{
float x;
+
HDmemcpy(&x, val, sizeof(float));
retval = (x==FLT_MAX || x==-FLT_MAX);
} else if (FLT_DOUBLE==type) {
double x;
+
HDmemcpy(&x, val, sizeof(double));
retval = (x==DBL_MAX || x==-DBL_MAX);
} else
{
- return 0;
+ return FALSE;
}
}
#endif /*H5_VMS*/
@@ -5943,9 +6117,6 @@ my_isnan(dtype_t type, void *val)
}
-
-
-
/*-------------------------------------------------------------------------
*
* Local functions
@@ -6164,8 +6335,8 @@ static void h5diff_print_char(char ch)
*/
static void get_member_types(hid_t tid, mcomp_t *members)
{
- int i;
int tclass;
+ unsigned u;
if (tid <=0 || !members)
return;
@@ -6179,23 +6350,24 @@ static void get_member_types(hid_t tid, mcomp_t *members)
}
else if (tclass == H5T_COMPOUND)
{
- members->n = H5Tget_nmembers( tid );
- if (members->n <=0)
+ int nmembs;
+
+ nmembs = H5Tget_nmembers(tid);
+ if(nmembs <= 0)
return;
+ members->n = (unsigned)nmembs;
- members->ids = HDcalloc(members->n, sizeof(hid_t));
- members->flags = HDcalloc(members->n, sizeof(unsigned char));
- members->offsets = HDcalloc(members->n, sizeof(size_t));
- members->m = HDcalloc(members->n, sizeof(mcomp_t *));
+ members->ids = (hid_t *)HDcalloc(members->n, sizeof(hid_t));
+ members->offsets = (size_t *)HDcalloc(members->n, sizeof(size_t));
+ members->m = (mcomp_t **)HDcalloc(members->n, sizeof(mcomp_t *));
- for (i=0; i< members->n; i++)
+ for(u = 0; u < members->n; u++)
{
- members->ids[i] = H5Tget_member_type( tid, i );
- members->flags[i] = H5Tis_variable_str( members->ids[i] );
- members->offsets[i] = H5Tget_member_offset( tid, i );
- members->m[i] = (mcomp_t *)HDmalloc(sizeof(mcomp_t));
- HDmemset(members->m[i], 0, sizeof(mcomp_t));
- get_member_types(members->ids[i], members->m[i]);
+ members->ids[u] = H5Tget_member_type( tid, u );
+ members->offsets[u] = H5Tget_member_offset( tid, u );
+ members->m[u] = (mcomp_t *)HDmalloc(sizeof(mcomp_t));
+ HDmemset(members->m[u], 0, sizeof(mcomp_t));
+ get_member_types(members->ids[u], members->m[u]);
}
}
@@ -6211,24 +6383,23 @@ static void get_member_types(hid_t tid, mcomp_t *members)
*/
static void close_member_types(mcomp_t *members)
{
- int i;
+ unsigned u;
if (!members || members->n<=0 || !members->ids)
return;
- for (i=0; i<members->n; i++)
+ for(u = 0; u < members->n; u++)
{
- if (members->m[i])
+ if(members->m[u])
{
- close_member_types(members->m[i]);
- HDfree(members->m[i]);
+ close_member_types(members->m[u]);
+ HDfree(members->m[u]);
}
- H5Tclose(members->ids[i]);
+ H5Tclose(members->ids[u]);
}
- HDfree (members->m);
- HDfree (members->ids);
- HDfree (members->flags);
- HDfree (members->offsets);
+ HDfree(members->m);
+ HDfree(members->ids);
+ HDfree(members->offsets);
}
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 4899200..ef1d761 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -108,17 +108,17 @@ static void table_attrs_free( table_attrs_t *table )
*------------------------------------------------------------------------*/
static void table_attr_mark_exist(unsigned *exist, char *name, table_attrs_t *table)
{
- unsigned int new;
+ size_t new_val;
if(table->nattrs == table->size) {
table->size = MAX(1, table->size * 2);
table->attrs = (match_attr_t *)HDrealloc(table->attrs, table->size * sizeof(match_attr_t));
} /* end if */
- new = table->nattrs++;
- table->attrs[new].exist[0] = exist[0];
- table->attrs[new].exist[1] = exist[1];
- table->attrs[new].name = (char *)HDstrdup(name);
+ new_val = table->nattrs++;
+ table->attrs[new_val].exist[0] = exist[0];
+ table->attrs[new_val].exist[1] = exist[1];
+ table->attrs[new_val].name = (char *)HDstrdup(name);
}
/*-------------------------------------------------------------------------
@@ -459,8 +459,8 @@ hsize_t diff_attr(hid_t loc1_id,
goto error;
/* format output string */
- sprintf(np1,"%s of <%s>",name1,path1);
- sprintf(np2,"%s of <%s>",name2,path2);
+ HDsnprintf(np1, sizeof(np1), "%s of <%s>", name1, path1);
+ HDsnprintf(np2, sizeof(np1), "%s of <%s>", name2, path2);
/*---------------------------------------------------------------------
* array compare
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index e1f71eb..4b12560 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -2962,11 +2962,14 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
int ndims = H5Sget_simple_extent_dims(sid, dims, NULL);
/* only print the compression ratio for these filters */
- for(i = 0; i < nfilters; i++) {
+ for(i = 0; i < nfilters && !ok; i++) {
cd_nelmts = NELMTS(cd_values);
filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts,
cd_values, sizeof(f_name), f_name, NULL);
-
+ ok = (filtn>=0);
+
+ /* this following code will not show compression ratio for
+ user defined filter. For example, see HDFFV-8344 --xcao@hdfgroup.org
switch(filtn) {
case H5Z_FILTER_DEFLATE:
case H5Z_FILTER_SZIP:
@@ -2975,6 +2978,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
ok = 1;
break;
}
+ */
}
if(ndims && ok) {
@@ -3152,6 +3156,9 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
cd_nelmts = NELMTS(cd_values);
filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts,
cd_values, sizeof(f_name), f_name, NULL);
+
+ if (filtn<0)
+ continue; /* nothing to print for invalid filter */
ctx->need_prefix = TRUE;
h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
@@ -3245,10 +3252,13 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, ncols, 0, 0);
break;
default:
+ /* filter do not have to be avaiable for showing registered filter info.
+ see HDFFV-8346 for details. --xcao@hdfgroup.org
if(H5Zfilter_avail(filtn))
h5tools_str_append(&buffer, "%s %s", "USER_REGISTERED_FILTER", BEGIN);
else
- h5tools_str_append(&buffer, "%s %s", "UNKNOWN_FILTER", BEGIN);
+ */
+ h5tools_str_append(&buffer, "%s %s", "USER_DEFINED_FILTER", BEGIN);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, ncols, 0, 0);
ctx->indent_level++;
diff --git a/tools/lib/h5tools_utils.h b/tools/lib/h5tools_utils.h
index 10c643d..3285278 100644
--- a/tools/lib/h5tools_utils.h
+++ b/tools/lib/h5tools_utils.h
@@ -159,7 +159,7 @@ typedef struct {
/* obtain link info from H5tools_get_symlink_info() */
typedef struct {
H5O_type_t trg_type; /* OUT: target type */
- const char *trg_path; /* OUT: target obj path. This must be freed
+ char *trg_path; /* OUT: target obj path. This must be freed
* when used with H5tools_get_symlink_info() */
haddr_t objno; /* OUT: target object address */
unsigned long fileno; /* OUT: File number that target object is located in */
diff --git a/tools/misc/h5cc.in b/tools/misc/h5cc.in
index 233c80a..f62c66f 100644
--- a/tools/misc/h5cc.in
+++ b/tools/misc/h5cc.in
@@ -85,11 +85,12 @@ CLINKERBASE="@CC@"
# CFLAGS, CPPFLAGS and LDFLAGS are reserved for use by the script user.
# FLAGS brought from the hdf5 build are put in H5BLD_*FLAGS.
-# User's CPPFLAGS and CFLAGS come after their H5BLD counterparts to override
-# them. User's LDFLAGS come just before clibpath, user's LIBS come after
-# $link_objs and before the hdf5 libraries in $link_args, followed by any
-# external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
-# or LIBS carried in from the hdf5 build.
+# User's CPPFLAGS and CFLAGS come after their H5BLD counterparts. User's
+# LDFLAGS come just before clibpath, user's LIBS come after $link_objs and
+# before the hdf5 libraries in $link_args, followed by any external library
+# paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in
+# from the hdf5 build. The order of the flags is intended to give precedence
+# to the user's flags.
H5BLD_CFLAGS="@AM_CFLAGS@ @CFLAGS@"
H5BLD_CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@"
H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@"
@@ -102,7 +103,17 @@ CPPFLAGS="${HDF5_CPPFLAGS:-$CPPFLAGSBASE}"
LDFLAGS="${HDF5_LDFLAGS:-$LDFLAGSBASE}"
LIBS="${HDF5_LIBS:-$LIBSBASE}"
-USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}"
+# If a static library is available, the default will be to use it. If the only
+# available library is shared, it will be used by default. The user can
+# override either default, although choosing an unavailable library will result
+# in link errors.
+STATIC_AVAILABLE="@enable_static@"
+if test "${STATIC_AVAILABLE}" = "yes"; then
+ USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}"
+else
+ USE_SHARED_LIB="${HDF5_USE_SHLIB:-yes}"
+fi
+
usage() {
# A wonderfully informative "usage" message.
@@ -121,8 +132,9 @@ usage() {
echo " subdirectories [default: $prefix]"
echo " -show Show the commands without executing them"
echo " -showconfig Show the HDF5 library configuration summary"
- echo " -shlib Compile with shared HDF5 libraries"
- echo " -noshlib Compile with static HDF5 libraries [default]"
+ echo " -shlib Compile with shared HDF5 libraries [default when built with"
+ echo " disable-static]"
+ echo " -noshlib Compile with static HDF5 libraries [default when static available]"
echo " "
echo " <compile line> - the normal compile line options for your compiler."
echo " $prog_name uses the same compiler you used to compile"
@@ -374,11 +386,12 @@ if test "x$do_link" = "xyes"; then
# module. It's okay if they're included twice in the compile line.
link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS"
- # User's CPPFLAGS and CFLAGS come after their H5BLD counterparts to override
- # them. User's LDFLAGS come just before clibpath, user's LIBS come after
- # $link_objs and before the hdf5 libraries in $link_args, followed by any
- # external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
- # or LIBS carried in from the hdf5 build.
+ # User's CPPFLAGS and CFLAGS come after their H5BLD counterparts. User's
+ # LDFLAGS come just before clibpath, user's LIBS come after $link_objs and
+ # before the hdf5 libraries in $link_args, followed by any external library
+ # paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in
+ # from the hdf5 build. The order of the flags is intended to give precedence
+ # to the user's flags.
$SHOW $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CFLAGS $CFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args $shared_link
status=$?
fi
diff --git a/tools/misc/h5mkgrp.c b/tools/misc/h5mkgrp.c
index b4ac6f6..b9fb588 100644
--- a/tools/misc/h5mkgrp.c
+++ b/tools/misc/h5mkgrp.c
@@ -46,6 +46,7 @@ typedef struct {
size_t ngroups; /* Number of groups to create */
char **groups; /* Pointer to array of group names */
} param_t;
+param_t params; /* Command line parameter settings */
/*-------------------------------------------------------------------------
@@ -62,6 +63,15 @@ typedef struct {
static void
leave(int ret)
{
+ int curr_group;
+
+ if (params.fname)
+ HDfree (params.fname);
+ if (params.ngroups) {
+ for(curr_group = 0; curr_group < params.ngroups; curr_group++)
+ HDfree (params.groups[curr_group]);
+ HDfree (params.groups);
+ }
h5tools_close();
HDexit(ret);
} /* end leave() */
@@ -206,7 +216,6 @@ for(curr_group = 0; curr_group < params->ngroups; curr_group++)
int
main(int argc, const char *argv[])
{
- param_t params; /* Command line parameter settings */
hid_t fid; /* HDF5 file ID */
hid_t fapl_id; /* File access property list ID */
hid_t lcpl_id; /* Link creation property list ID */
@@ -322,6 +331,6 @@ main(int argc, const char *argv[])
/* Shut down h5tools lib */
h5tools_close();
- return EXIT_SUCCESS;
+ leave(EXIT_SUCCESS);
} /* end main() */
diff --git a/tools/misc/h5perf_gentest.c b/tools/misc/h5perf_gentest.c
index 6a080d0..6a080d0 100755..100644
--- a/tools/misc/h5perf_gentest.c
+++ b/tools/misc/h5perf_gentest.c
diff --git a/tools/misc/h5redeploy.in b/tools/misc/h5redeploy.in
index ae79b70..6b6ef87 100644
--- a/tools/misc/h5redeploy.in
+++ b/tools/misc/h5redeploy.in
@@ -14,9 +14,10 @@
# access to either file, you may request a copy from help@hdfgroup.org.
#
-## Update HDF5 compiler tools after the HDF5 software has been installed
-## in a new location.
-## For help page, use "h5redeploy -help"
+## Update HDF5 compiler tools after the HDF5 software has been installed ##
+## in a new location. ##
+## For help page, use "h5redeploy -help" ##
+## ##
# Constants definitions
EXIT_SUCCESS=0
@@ -29,14 +30,20 @@ usage() {
# A wonderfully informative "usage" message.
echo "usage: $prog_name [OPTIONS]"
echo " OPTIONS:"
- echo " -help|help This help message"
- echo " -echo Show all the shell commands executed"
- echo " -force No prompt, just do it"
- echo " -prefix=DIR New directory to find HDF5 lib/ and include/"
- echo " subdirectories [default: current directory]"
- echo " -tool=TOOL Tool to update. TOOL must be in the current"
- echo " directory and writable. [default: $h5tools]"
- echo " -show Show the commands without executing them"
+ echo " -help|help This help message"
+ echo " -echo Show all the shell commands executed"
+ echo " -force No prompt, just do it"
+ echo " -prefix=DIR New directory to find HDF5 lib/ and include/"
+ echo " subdirectories [default: current directory]"
+ echo " -exec-prefix=DIR New directory to find HDF5 lib/"
+ echo " subdirectory [default: <prefix>]"
+ echo " -libdir=DIR New directory for the HDF5 lib directory"
+ echo " [default: <exec-prefix>/lib]"
+ echo " -includedir=DIR New directory for the HDF5 header files"
+ echo " [default: <prefix>/include]"
+ echo " -tool=TOOL Tool to update. TOOL must be in the current"
+ echo " directory and writable. [default: $h5tools]"
+ echo " -show Show the commands without executing them"
echo " "
exit $EXIT_FAILURE
}
@@ -70,17 +77,38 @@ ERROR()
# Main
#
+############################################################################
+## Installation directories: ##
+## prefix architecture-independent files. ##
+## exec_prefix architecture-dependent files, default is <prefix>. ##
+## libdir libraries, default is <exec_prefix>/lib. ##
+## includedir header files, default is <prefix/include>. ##
+## Not used here: ##
+## bindir executables, <exec_prefix/bin>. ##
+############################################################################
# Initialization
h5tools="h5cc h5pcc h5fc h5pfc h5c++" # possible hdf5 tools
foundtools= # tools found and will be modified
fmode= # force mode, default is off
-prefix=`(cd ..;pwd)`
+prefix=
+exec_prefix=
+libdir=
+includedir=
# Parse options
for arg in $@ ; do
case "$arg" in
-prefix=*)
- prefix="`expr "$arg" : '-prefix=\(.*\)'`"
+ prefix="`echo $arg | cut -f2 -d=`"
+ ;;
+ -exec-prefix=*)
+ exec_prefix="`echo $arg | cut -f2 -d=`"
+ ;;
+ -libdir=*)
+ libdir="`echo $arg | cut -f2 -d=`"
+ ;;
+ -includedir=*)
+ includedir="`echo $arg | cut -f2 -d=`"
;;
-echo)
set -x
@@ -89,7 +117,7 @@ for arg in $@ ; do
SHOW="echo"
;;
-tool=*)
- h5tools="`expr "$arg" : '-tool=\(.*\)'`"
+ h5tools="`echo $arg | cut -f2 -d=`"
;;
-help|help)
usage
@@ -105,10 +133,18 @@ for arg in $@ ; do
esac
done
-# Sanity checks
-if [ ! -d $prefix ]; then
- ERROR "prefix($prefix) is not an existing directory"
- exit $EXIT_FAILURE
+# Set to default value, one above where i am, if not given by user
+if [ -z "$prefix" ]; then
+ prefix=`(cd ..;pwd)`
+fi
+if [ -z "$exec_prefix" ]; then
+ exec_prefix='${prefix}' # use single quotes to prevent expansion of $
+fi
+if [ -z "$libdir" ]; then
+ libdir='${exec_prefix}'/lib # use single quotes to prevent expansion of $
+fi
+if [ -z "$includedir" ]; then
+ includedir='${prefix}'/include # use single quotes to prevent expansion of $
fi
for x in $h5tools; do
@@ -144,10 +180,19 @@ fi
CMDFILE=/tmp/h5redeploy.$$
touch $CMDFILE
chmod 0600 $CMDFILE
-echo "/^prefix/c" >> $CMDFILE
-echo prefix=\""$prefix"\" >> $CMDFILE
-echo . >> $CMDFILE
-(echo w; echo q) >> $CMDFILE
+echo "/^prefix=/c" >> $CMDFILE
+echo prefix=\""$prefix"\" >> $CMDFILE
+echo . >> $CMDFILE
+echo "/^exec_prefix=/c" >> $CMDFILE
+echo exec_prefix=\""$exec_prefix"\" >> $CMDFILE
+echo . >> $CMDFILE
+echo "/^libdir=/c" >> $CMDFILE
+echo libdir=\""$libdir"\" >> $CMDFILE
+echo . >> $CMDFILE
+echo "/^includedir=/c" >> $CMDFILE
+echo includedir=\""$includedir"\" >> $CMDFILE
+echo . >> $CMDFILE
+(echo w; echo q) >> $CMDFILE
# Update them
@@ -171,10 +216,3 @@ done
# Cleanup
rm -f $CMDFILE
exit $EXIT_SUCCESS
-
-# Some possible future features to add
-# CCBASE - Name of the alternative C compiler
-# CLINKERBASE - Name of the alternative linker
-# LDFLAGS - Path to different libraries your application will link with
-# (this path should include the path to the zlib library)
-# LIBS - Libraries your application will link with
diff --git a/tools/testfiles/tfletcher32.ddl b/tools/testfiles/tfletcher32.ddl
index 072ef23..c341ded 100644
--- a/tools/testfiles/tfletcher32.ddl
+++ b/tools/testfiles/tfletcher32.ddl
@@ -4,7 +4,7 @@ DATASET "fletcher32" {
DATASPACE SIMPLE { ( 20, 10 ) / ( 20, 10 ) }
STORAGE_LAYOUT {
CHUNKED ( 10, 5 )
- SIZE 816
+ SIZE 816 (0.980:1 COMPRESSION)
}
FILTERS {
CHECKSUM FLETCHER32
diff --git a/tools/testfiles/tshuffle.ddl b/tools/testfiles/tshuffle.ddl
index cd1b5f8..5c183fe 100644
--- a/tools/testfiles/tshuffle.ddl
+++ b/tools/testfiles/tshuffle.ddl
@@ -4,7 +4,7 @@ DATASET "shuffle" {
DATASPACE SIMPLE { ( 20, 10 ) / ( 20, 10 ) }
STORAGE_LAYOUT {
CHUNKED ( 10, 5 )
- SIZE 800
+ SIZE 800 (1.000:1 COMPRESSION)
}
FILTERS {
PREPROCESSING SHUFFLE
diff --git a/tools/testfiles/tuserfilter.ddl b/tools/testfiles/tuserfilter.ddl
index 07b478f..24745b9 100644
--- a/tools/testfiles/tuserfilter.ddl
+++ b/tools/testfiles/tuserfilter.ddl
@@ -4,10 +4,10 @@ DATASET "myfilter" {
DATASPACE SIMPLE { ( 20, 10 ) / ( 20, 10 ) }
STORAGE_LAYOUT {
CHUNKED ( 10, 5 )
- SIZE 800
+ SIZE 800 (1.000:1 COMPRESSION)
}
FILTERS {
- UNKNOWN_FILTER {
+ USER_DEFINED_FILTER {
FILTER_ID 405
COMMENT myfilter
PARAMS { 5 6 }
diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h
index e432421..c79ef97 100644
--- a/vms/src/h5pubconf.h
+++ b/vms/src/h5pubconf.h
@@ -502,7 +502,7 @@
#define H5_PACKAGE_NAME "HDF5"
/* Define to the full name and version of this package. */
-#define H5_PACKAGE_STRING "HDF5 1.9.148-FA_a5"
+#define H5_PACKAGE_STRING "HDF5 1.9.149-FA_a5"
/* Define to the one symbol short name of this package. */
#define H5_PACKAGE_TARNAME "hdf5"
@@ -511,7 +511,7 @@
#define H5_PACKAGE_URL ""
/* Define to the version of this package. */
-#define H5_PACKAGE_VERSION "1.9.148-FA_a5"
+#define H5_PACKAGE_VERSION "1.9.149-FA_a5"
/* Width for printf() for type `long long' or `__int64', use `ll' */
#define H5_PRINTF_LL_WIDTH "ll"
@@ -674,7 +674,7 @@
/* #undef H5_USING_MEMCHECKER */
/* Version number of package */
-#define H5_VERSION "1.9.148-FA_a5"
+#define H5_VERSION "1.9.149-FA_a5"
/* Define if vsnprintf() returns the correct value for formatted strings that
don't fit into size allowed */