diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-10-07 19:17:40 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-10-07 19:17:40 (GMT) |
commit | 3008aa61963303c45ffbe04585d5e05e24be9d92 (patch) | |
tree | 32ea2cc2dc1501ed2153c7494e392adae84be318 | |
parent | 1fee0ce58dd6eaabfaee16a36f46a28d80552bd8 (diff) | |
parent | 5a1adaacf07d6b2498d81492d7f1a57da231f8db (diff) | |
download | hdf5-3008aa61963303c45ffbe04585d5e05e24be9d92.zip hdf5-3008aa61963303c45ffbe04585d5e05e24be9d92.tar.gz hdf5-3008aa61963303c45ffbe04585d5e05e24be9d92.tar.bz2 |
Merge pull request #1986 in HDFFV/hdf5 from ~BYRN/hdf5_adb:hdf5_1_8 to hdf5_1_8
* commit '5a1adaacf07d6b2498d81492d7f1a57da231f8db':
Ran bin/reconfigure
Add missing checks for ros3 and hdfs vfds
Fix manifest
Fix compile errors
52 files changed, 3992 insertions, 2365 deletions
@@ -93,17 +93,6 @@ ./bin/timekeeper _DO_NOT_DISTRIBUTE_ ./bin/trace ./bin/yodconfigure -./bin/batch/ctestP.lsf.in.cmake -./bin/batch/ctestP.sl.in.cmake -./bin/batch/ctestS.lsf.in.cmake -./bin/batch/ctestS.sl.in.cmake -./bin/batch/knl_ctestP.sl.in.cmake -./bin/batch/knl_ctestS.sl.in.cmake -./bin/batch/knl_H5detect.sl.in.cmake -./bin/batch/ctest.qsub.in.cmake -./bin/batch/ray_ctestP.lsf.in.cmake -./bin/batch/ray_ctestS.lsf.in.cmake -./bin/batch/raybsub ./config/COPYING ./config/BlankForm @@ -595,6 +584,8 @@ ./src/H5FDdirect.h ./src/H5FDfamily.c ./src/H5FDfamily.h +./src/H5FDhdfs.c +./src/H5FDhdfs.h ./src/H5FDint.c ./src/H5FDlog.c ./src/H5FDlog.h @@ -1159,6 +1150,7 @@ ./tools/h5repack/dynlib_vrpk.c ./tools/h5repack/h5repack.sh.in ./tools/h5repack/h5repack_plugin.sh.in +./tools/h5repack/h5repackgentest.c ./tools/h5repack/h5repacktst.c ./tools/h5repack/testh5repack_detect_szip.c @@ -2122,7 +2114,7 @@ ./tools/h5repack/testfiles/h5repack_uint8be_ex-1.dat ./tools/h5repack/testfiles/h5repack_uint8be_ex-2.dat ./tools/h5repack/testfiles/h5repack_uint8be_ex-3.dat -./tools//h5repack/testfiles/h5repack_uint8be_ex.h5 +./tools/h5repack/testfiles/h5repack_uint8be_ex.h5 ./tools/h5repack/testfiles/ublock.bin ./tools/h5repack/testfiles/crtorder.tordergr.h5.ddl ./tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl diff --git a/Makefile.in b/Makefile.in index 8e1e694..cbdc707 100644 --- a/Makefile.in +++ b/Makefile.in @@ -312,6 +312,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -332,6 +333,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -367,6 +369,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/bin/Makefile.in b/bin/Makefile.in index 07f5f86..497ab90 100644 --- a/bin/Makefile.in +++ b/bin/Makefile.in @@ -424,6 +424,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -444,6 +445,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -479,6 +481,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/c++/Makefile.in b/c++/Makefile.in index dd81ac5..3ecc49e 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -475,6 +475,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -495,6 +496,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -530,6 +532,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index d453ca2..1358326 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -422,6 +422,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -442,6 +443,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -477,6 +479,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 4231963..7ad81a0 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -488,6 +488,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -508,6 +509,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -543,6 +545,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index 0207509..c08ce1e 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -477,6 +477,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -497,6 +498,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -532,6 +534,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ @@ -671,6 +671,11 @@ CONFIG_MODE CONFIG_USER CONFIG_DATE H5_VERSION +JNI_LDFLAGS +HAVE_LIBHDFS +ROS3_VFD_CONDITIONAL_FALSE +ROS3_VFD_CONDITIONAL_TRUE +ROS3_VFD DIRECT_VFD_CONDITIONAL_FALSE DIRECT_VFD_CONDITIONAL_TRUE ADD_PARALLEL_FILES @@ -925,6 +930,8 @@ enable_using_memchecker enable_parallel with_mpe enable_direct_vfd +enable_ros3_vfd +with_libhdfs with_default_plugindir enable_dconv_exception enable_dconv_accuracy @@ -1624,6 +1631,8 @@ Optional Features: --enable-direct-vfd Build the direct I/O virtual file driver (VFD). This is based on the POSIX (sec2) VFD and requires the open() call to take the O_DIRECT flag. [default=no] + --enable-ros3-vfd Build the Read-Only S3 virtual file driver (VFD). + [default=no] --enable-dconv-exception if exception handling functions is checked during data conversions [default=yes] @@ -1667,6 +1676,8 @@ Optional Packages: --with-pthread=DIR Specify alternative path to Pthreads library when thread-safe capability is built --with-mpe=DIR Use MPE instrumentation [default=no] + --with-libhdfs=DIR Provide libhdfs library to enable HDFS virtual file + driver (VFD) [default=no] --with-default-plugindir=location Specify default location for plugins [default="/usr/local/hdf5/lib/plugin"] @@ -27982,6 +27993,7 @@ else $as_echo "no" >&6; } fi +## Direct VFD files are not built if not required. if test "X$DIRECT_VFD" = "Xyes"; then DIRECT_VFD_CONDITIONAL_TRUE= DIRECT_VFD_CONDITIONAL_FALSE='#' @@ -27992,6 +28004,517 @@ fi ## ---------------------------------------------------------------------- +## Check if Read-Only S3 virtual file driver is enabled by --enable-ros3-vfd +## + + +## Default is no Read-Only S3 VFD +ROS3_VFD=no + +# Check whether --enable-ros3-vfd was given. +if test "${enable_ros3_vfd+set}" = set; then : + enableval=$enable_ros3_vfd; ROS3_VFD=$enableval +else + ROS3_VFD=no +fi + + +if test "X$ROS3_VFD" = "Xyes"; then + for ac_header in curl/curl.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "curl/curl.h" "ac_cv_header_curl_curl_h" "$ac_includes_default" +if test "x$ac_cv_header_curl_curl_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_CURL_CURL_H 1 +_ACEOF + +else + unset ROS3_VFD +fi + +done + + for ac_header in openssl/evp.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_evp_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OPENSSL_EVP_H 1 +_ACEOF + +else + unset ROS3_VFD +fi + +done + + for ac_header in openssl/hmac.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "openssl/hmac.h" "ac_cv_header_openssl_hmac_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_hmac_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OPENSSL_HMAC_H 1 +_ACEOF + +else + unset ROS3_VFD +fi + +done + + for ac_header in openssl/sha.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "openssl/sha.h" "ac_cv_header_openssl_sha_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_sha_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OPENSSL_SHA_H 1 +_ACEOF + +else + unset ROS3_VFD +fi + +done + + if test "X$ROS3_VFD" = "Xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_global_init in -lcurl" >&5 +$as_echo_n "checking for curl_global_init in -lcurl... " >&6; } +if ${ac_cv_lib_curl_curl_global_init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcurl $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 curl_global_init (); +#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 curl_global_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_curl_curl_global_init=yes +else + ac_cv_lib_curl_curl_global_init=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_curl_curl_global_init" >&5 +$as_echo "$ac_cv_lib_curl_curl_global_init" >&6; } +if test "x$ac_cv_lib_curl_curl_global_init" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBCURL 1 +_ACEOF + + LIBS="-lcurl $LIBS" + +else + unset ROS3_VFD +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5 +$as_echo_n "checking for EVP_sha256 in -lcrypto... " >&6; } +if ${ac_cv_lib_crypto_EVP_sha256+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $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 EVP_sha256 (); +#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 EVP_sha256 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_crypto_EVP_sha256=yes +else + ac_cv_lib_crypto_EVP_sha256=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_crypto_EVP_sha256" >&5 +$as_echo "$ac_cv_lib_crypto_EVP_sha256" >&6; } +if test "x$ac_cv_lib_crypto_EVP_sha256" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBCRYPTO 1 +_ACEOF + + LIBS="-lcrypto $LIBS" + +else + unset ROS3_VFD +fi + + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the Read-Only S3 virtual file driver (VFD) is enabled" >&5 +$as_echo_n "checking if the Read-Only S3 virtual file driver (VFD) is enabled... " >&6; } + if test "X$ROS3_VFD" = "Xyes"; then + +$as_echo "#define HAVE_ROS3_VFD 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ROS3_VFD=no + as_fn_error $? "The Read-Only S3 VFD was requested but cannot be built. + Please check that openssl and cURL are available on your + system, and/or re-configure without option + --enable-ros3-vfd." "$LINENO" 5 + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the Read-Only S3 virtual file driver (VFD) is enabled" >&5 +$as_echo_n "checking if the Read-Only S3 virtual file driver (VFD) is enabled... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ROS3_VFD=no + +fi + +## Read-only S3 files are not built if not required. + if test "X$ROS3_VFD" = "Xyes"; then + ROS3_VFD_CONDITIONAL_TRUE= + ROS3_VFD_CONDITIONAL_FALSE='#' +else + ROS3_VFD_CONDITIONAL_TRUE='#' + ROS3_VFD_CONDITIONAL_FALSE= +fi + + + +## ---------------------------------------------------------------------- +## Is libhdfs (Hadoop Distributed File System) present? +## It might be specified with the `--with-libhdfs' command-line switch. +## If found, enables the HDFS VFD. +## + + +# Check whether --with-libhdfs was given. +if test "${with_libhdfs+set}" = set; then : + withval=$with_libhdfs; +else + withval=no +fi + + +case $withval in + no) + HAVE_LIBHDFS="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhdfs" >&5 +$as_echo_n "checking for libhdfs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5 +$as_echo "suppressed" >&6; } + ;; + *) + HAVE_LIBHDFS="yes" + case "$withval" in + *,*) + libhdfs_inc="`echo $withval |cut -f1 -d,`" + libhdfs_lib="`echo $withval |cut -f2 -d, -s`" + ;; + yes) + libhdfs_inc="$HADOOP_HOME/include" + libhdfs_lib="$HADOOP_HOME/lib" + ;; + *) + if test -n "$withval"; then + libhdfs_inc="$withval/include" + libhdfs_lib="$withval/lib" + fi + ;; + esac + + if test -n "$libhdfs_inc"; then + CPPFLAGS="$CPPFLAGS -I$libhdfs_inc" + AM_CPPFLAGS="$AM_CPPFLAGS -I$libhdfs_inc" + fi + for ac_header in hdfs.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "hdfs.h" "ac_cv_header_hdfs_h" "$ac_includes_default" +if test "x$ac_cv_header_hdfs_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_HDFS_H 1 +_ACEOF + +else + unset HAVE_LIBHDFS +fi + +done + + + if test "x$HAVE_LIBHDFS" = "xyes"; then + JNI_LDFLAGS="" + if test $JAVA_HOME != "" + then + JNI_LDFLAGS="-L$JAVA_HOME/jre/lib/$OS_ARCH -L$JAVA_HOME/jre/lib/$OS_ARCH/server" + fi + ldflags_bak=$LDFLAGS + LDFLAGS="$LDFLAGS $JNI_LDFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JNI_GetCreatedJavaVMs in -ljvm" >&5 +$as_echo_n "checking for JNI_GetCreatedJavaVMs in -ljvm... " >&6; } +if ${ac_cv_lib_jvm_JNI_GetCreatedJavaVMs+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ljvm $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 JNI_GetCreatedJavaVMs (); +#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 JNI_GetCreatedJavaVMs (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_jvm_JNI_GetCreatedJavaVMs=yes +else + ac_cv_lib_jvm_JNI_GetCreatedJavaVMs=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_jvm_JNI_GetCreatedJavaVMs" >&5 +$as_echo "$ac_cv_lib_jvm_JNI_GetCreatedJavaVMs" >&6; } +if test "x$ac_cv_lib_jvm_JNI_GetCreatedJavaVMs" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBJVM 1 +_ACEOF + + LIBS="-ljvm $LIBS" + +fi + + LDFLAGS=$ldflags_bak + + if test -n "$libhdfs_lib"; then + ## Hadoop distribution hides libraries down one level in 'lib/native' + libhdfs_lib="$libhdfs_lib/native" + LDFLAGS="$LDFLAGS -L$libhdfs_lib $JNI_LDFLAGS" + AM_LDFLAGS="$AM_LDFLAGS -L$libhdfs_lib $JNI_LDFLAGS" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hdfsConnect in -lhdfs" >&5 +$as_echo_n "checking for hdfsConnect in -lhdfs... " >&6; } +if ${ac_cv_lib_hdfs_hdfsConnect+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lhdfs $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 hdfsConnect (); +#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 hdfsConnect (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_hdfs_hdfsConnect=yes +else + ac_cv_lib_hdfs_hdfsConnect=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_hdfs_hdfsConnect" >&5 +$as_echo "$ac_cv_lib_hdfs_hdfsConnect" >&6; } +if test "x$ac_cv_lib_hdfs_hdfsConnect" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBHDFS 1 +_ACEOF + + LIBS="-lhdfs $LIBS" + +else + unset HAVE_LIBHDFS +fi + + fi + + if test -z "$HAVE_LIBHDFS"; then + as_fn_error $? "Set to use libhdfs library, but could not find or use + libhdfs. Please verify that the path to HADOOP_HOME is + valid, and/or reconfigure without --with-libhdfs." "$LINENO" 5 + fi + ;; +esac + +if test "x$HAVE_LIBHDFS" = "xyes"; then + +$as_echo "#define HAVE_LIBHDFS 1" >>confdefs.h + +fi + +## Checkpoint the cache +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 + +## ---------------------------------------------------------------------- ## Enable custom plugin default path for library. It requires SHARED support. ## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for custom plugin default path definition" >&5 @@ -30849,7 +31372,7 @@ else fi -ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile testpar/testpflush.sh tools/Makefile tools/h5dump/Makefile tools/h5dump/h5dump_plugin.sh tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/Makefile tools/h5ls/h5ls_plugin.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/h5diff_plugin.sh tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh bin/h5cc bin/Makefile 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/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.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" +ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile testpar/testpflush.sh tools/Makefile tools/h5dump/Makefile tools/h5dump/h5dump_plugin.sh tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/Makefile tools/h5ls/h5ls_plugin.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/h5diff_plugin.sh tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/libtest/Makefile tools/misc/Makefile tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh bin/h5cc bin/Makefile 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/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.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 @@ -31034,6 +31557,10 @@ if test -z "${DIRECT_VFD_CONDITIONAL_TRUE}" && test -z "${DIRECT_VFD_CONDITIONAL 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 "${ROS3_VFD_CONDITIONAL_TRUE}" && test -z "${ROS3_VFD_CONDITIONAL_FALSE}"; then + as_fn_error $? "conditional \"ROS3_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 @@ -32169,6 +32696,7 @@ do "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/libtest/Makefile") CONFIG_FILES="$CONFIG_FILES tools/libtest/Makefile" ;; "tools/misc/Makefile") CONFIG_FILES="$CONFIG_FILES tools/misc/Makefile" ;; "tools/misc/testh5mkgrp.sh") CONFIG_FILES="$CONFIG_FILES tools/misc/testh5mkgrp.sh" ;; "tools/misc/testh5repart.sh") CONFIG_FILES="$CONFIG_FILES tools/misc/testh5repart.sh" ;; diff --git a/configure.ac b/configure.ac index 209b75e..07f0a0b 100644 --- a/configure.ac +++ b/configure.ac @@ -2199,9 +2199,139 @@ else AC_MSG_RESULT([no]) fi +## Direct VFD files are not built if not required. AM_CONDITIONAL([DIRECT_VFD_CONDITIONAL], [test "X$DIRECT_VFD" = "Xyes"]) ## ---------------------------------------------------------------------- +## Check if Read-Only S3 virtual file driver is enabled by --enable-ros3-vfd +## +AC_SUBST([ROS3_VFD]) + +## Default is no Read-Only S3 VFD +ROS3_VFD=no + +AC_ARG_ENABLE([ros3-vfd], + [AS_HELP_STRING([--enable-ros3-vfd], + [Build the Read-Only S3 virtual file driver (VFD). + [default=no]])], + [ROS3_VFD=$enableval], [ROS3_VFD=no]) + +if test "X$ROS3_VFD" = "Xyes"; then + AC_CHECK_HEADERS([curl/curl.h],, [unset ROS3_VFD]) + AC_CHECK_HEADERS([openssl/evp.h],, [unset ROS3_VFD]) + AC_CHECK_HEADERS([openssl/hmac.h],, [unset ROS3_VFD]) + AC_CHECK_HEADERS([openssl/sha.h],, [unset ROS3_VFD]) + if test "X$ROS3_VFD" = "Xyes"; then + AC_CHECK_LIB([curl], [curl_global_init],, [unset ROS3_VFD]) + AC_CHECK_LIB([crypto], [EVP_sha256],, [unset ROS3_VFD]) + fi + + AC_MSG_CHECKING([if the Read-Only S3 virtual file driver (VFD) is enabled]) + if test "X$ROS3_VFD" = "Xyes"; then + AC_DEFINE([HAVE_ROS3_VFD], [1], + [Define whether the Read-Only S3 virtual file driver (VFD) should be compiled]) + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + ROS3_VFD=no + AC_MSG_ERROR([The Read-Only S3 VFD was requested but cannot be built. + Please check that openssl and cURL are available on your + system, and/or re-configure without option + --enable-ros3-vfd.]) + fi +else + AC_MSG_CHECKING([if the Read-Only S3 virtual file driver (VFD) is enabled]) + AC_MSG_RESULT([no]) + ROS3_VFD=no + +fi + +## Read-only S3 files are not built if not required. +AM_CONDITIONAL([ROS3_VFD_CONDITIONAL], [test "X$ROS3_VFD" = "Xyes"]) + + +## ---------------------------------------------------------------------- +## Is libhdfs (Hadoop Distributed File System) present? +## It might be specified with the `--with-libhdfs' command-line switch. +## If found, enables the HDFS VFD. +## +AC_SUBST([HAVE_LIBHDFS]) +AC_ARG_WITH([libhdfs], + [AS_HELP_STRING([--with-libhdfs=DIR], + [Provide libhdfs library to enable HDFS virtual file driver (VFD) [default=no]])],, + [withval=no]) + +case $withval in + no) + HAVE_LIBHDFS="no" + AC_MSG_CHECKING([for libhdfs]) + AC_MSG_RESULT([suppressed]) + ;; + *) + HAVE_LIBHDFS="yes" + case "$withval" in + *,*) + libhdfs_inc="`echo $withval |cut -f1 -d,`" + libhdfs_lib="`echo $withval |cut -f2 -d, -s`" + ;; + yes) + libhdfs_inc="$HADOOP_HOME/include" + libhdfs_lib="$HADOOP_HOME/lib" + ;; + *) + if test -n "$withval"; then + libhdfs_inc="$withval/include" + libhdfs_lib="$withval/lib" + fi + ;; + esac + + if test -n "$libhdfs_inc"; then + CPPFLAGS="$CPPFLAGS -I$libhdfs_inc" + AM_CPPFLAGS="$AM_CPPFLAGS -I$libhdfs_inc" + fi + AC_CHECK_HEADERS([hdfs.h],, + [unset HAVE_LIBHDFS]) + + if test "x$HAVE_LIBHDFS" = "xyes"; then + dnl Check for '-ljvm' needed by libhdfs + JNI_LDFLAGS="" + if test $JAVA_HOME != "" + then + JNI_LDFLAGS="-L$JAVA_HOME/jre/lib/$OS_ARCH -L$JAVA_HOME/jre/lib/$OS_ARCH/server" + fi + ldflags_bak=$LDFLAGS + LDFLAGS="$LDFLAGS $JNI_LDFLAGS" + AC_CHECK_LIB([jvm], [JNI_GetCreatedJavaVMs]) + LDFLAGS=$ldflags_bak + AC_SUBST([JNI_LDFLAGS]) + if test -n "$libhdfs_lib"; then + ## Hadoop distribution hides libraries down one level in 'lib/native' + libhdfs_lib="$libhdfs_lib/native" + LDFLAGS="$LDFLAGS -L$libhdfs_lib $JNI_LDFLAGS" + AM_LDFLAGS="$AM_LDFLAGS -L$libhdfs_lib $JNI_LDFLAGS" + fi + AC_CHECK_LIB([hdfs], [hdfsConnect],, + [unset HAVE_LIBHDFS]) + fi + + if test -z "$HAVE_LIBHDFS"; then + AC_MSG_ERROR([Set to use libhdfs library, but could not find or use + libhdfs. Please verify that the path to HADOOP_HOME is + valid, and/or reconfigure without --with-libhdfs.]) + fi + ;; +esac + +if test "x$HAVE_LIBHDFS" = "xyes"; then + AC_DEFINE([HAVE_LIBHDFS], [1], + [Proceed to build with libhdfs]) +fi + +## Checkpoint the cache +AC_CACHE_SAVE + +## ---------------------------------------------------------------------- ## Enable custom plugin default path for library. It requires SHARED support. ## AC_MSG_CHECKING([for custom plugin default path definition]) @@ -3022,6 +3152,7 @@ AC_CONFIG_FILES([src/libhdf5.settings tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile + tools/libtest/Makefile tools/misc/Makefile tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh @@ -3031,9 +3162,9 @@ AC_CONFIG_FILES([src/libhdf5.settings examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh - bin/h5cc - bin/Makefile - c++/Makefile + bin/h5cc + bin/Makefile + c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile diff --git a/examples/Makefile.in b/examples/Makefile.in index 9e8e0bf..979a2f9 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -422,6 +422,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -442,6 +443,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -477,6 +479,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/fortran/Makefile.in b/fortran/Makefile.in index ecebe65..8fd1e38 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -479,6 +479,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -499,6 +500,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -534,6 +536,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index afbb1c9..24baa4e 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -430,6 +430,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -450,6 +451,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -485,6 +487,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index feebef8..0b0491e 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -539,6 +539,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -559,6 +560,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -594,6 +596,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 5144c8a..0fd73fa 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -547,6 +547,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -567,6 +568,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -602,6 +604,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index f2956e2..d5eb4e8 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -475,6 +475,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -495,6 +496,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -530,6 +532,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/hl/Makefile.in b/hl/Makefile.in index 8351ece..71b8ffd 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -479,6 +479,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -499,6 +500,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -534,6 +536,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index c569e10..695e026 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -475,6 +475,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -495,6 +496,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -530,6 +532,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index 832458a..8d0bcd7 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -422,6 +422,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -442,6 +443,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -477,6 +479,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index acc3674..b58e9a9 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -478,6 +478,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -498,6 +499,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -533,6 +535,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index 189b2ee..32c9cc1 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -475,6 +475,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -495,6 +496,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -530,6 +532,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index 1c9487c..5c046b1 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -422,6 +422,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -442,6 +443,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -477,6 +479,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index 8817f70..d05cc89 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -479,6 +479,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -499,6 +500,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -534,6 +536,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index e586c2f..297e902 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -423,6 +423,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -443,6 +444,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -478,6 +480,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index e7d600a..bad1a6c 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -496,6 +496,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -516,6 +517,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -551,6 +553,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index a07ff9b..e4f74f6 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -487,6 +487,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -507,6 +508,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -542,6 +544,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 4abe822..0581663 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -477,6 +477,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -497,6 +498,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -532,6 +534,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index dc5caf7..4dd0b7b 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -514,6 +514,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -534,6 +535,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -569,6 +571,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index 38eb808..39b58a2 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -476,6 +476,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -496,6 +497,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -531,6 +533,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index 548499d..efa704e 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -491,6 +491,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -511,6 +512,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -546,6 +548,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/src/H5Edefin.h b/src/H5Edefin.h index 4cc6115..6c0e794 100644 --- a/src/H5Edefin.h +++ b/src/H5Edefin.h @@ -19,40 +19,48 @@ #define _H5Edefin_H /* Major error IDs */ -hid_t H5E_FSPACE_g = FAIL; /* Free Space Manager */ -hid_t H5E_SLIST_g = FAIL; /* Skip Lists */ -hid_t H5E_NONE_MAJOR_g = FAIL; /* No error */ -hid_t H5E_IO_g = FAIL; /* Low-level I/O */ +hid_t H5E_DATASET_g = FAIL; /* Dataset */ +hid_t H5E_FUNC_g = FAIL; /* Function entry/exit */ +hid_t H5E_STORAGE_g = FAIL; /* Data storage */ +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 */ hid_t H5E_REFERENCE_g = FAIL; /* References */ +hid_t H5E_DATASPACE_g = FAIL; /* Dataspace */ hid_t H5E_RESOURCE_g = FAIL; /* Resource unavailable */ -hid_t H5E_ARGS_g = FAIL; /* Invalid arguments to routine */ -hid_t H5E_ATTR_g = FAIL; /* Attribute */ +hid_t H5E_PLIST_g = FAIL; /* Property lists */ +hid_t H5E_LINK_g = FAIL; /* Links */ +hid_t H5E_DATATYPE_g = FAIL; /* Datatype */ +hid_t H5E_RS_g = FAIL; /* Reference Counted Strings */ +hid_t H5E_HEAP_g = FAIL; /* Heap */ hid_t H5E_OHDR_g = FAIL; /* Object header */ +hid_t H5E_ATOM_g = FAIL; /* Object atom */ +hid_t H5E_ATTR_g = FAIL; /* Attribute */ +hid_t H5E_NONE_MAJOR_g = FAIL; /* No error */ +hid_t H5E_IO_g = FAIL; /* Low-level I/O */ +hid_t H5E_SLIST_g = FAIL; /* Skip Lists */ +hid_t H5E_EFL_g = FAIL; /* External file list */ +hid_t H5E_TST_g = FAIL; /* Ternary Search Trees */ +hid_t H5E_ARGS_g = FAIL; /* Invalid arguments to routine */ hid_t H5E_ERROR_g = FAIL; /* Error API */ hid_t H5E_PLINE_g = FAIL; /* Data filters */ -hid_t H5E_TST_g = FAIL; /* Ternary Search Trees */ -hid_t H5E_DATATYPE_g = FAIL; /* Datatype */ -hid_t H5E_LINK_g = FAIL; /* Links */ -hid_t H5E_SYM_g = FAIL; /* Symbol table */ -hid_t H5E_EFL_g = FAIL; /* External file list */ -hid_t H5E_PLIST_g = FAIL; /* Property lists */ -hid_t H5E_PLUGIN_g = FAIL; /* Plugin for dynamically loaded library */ -hid_t H5E_FILE_g = FAIL; /* File accessibilty */ -hid_t H5E_SOHM_g = FAIL; /* Shared Object Header Messages */ -hid_t H5E_VFL_g = FAIL; /* Virtual File Layer */ +hid_t H5E_FSPACE_g = FAIL; /* Free Space Manager */ hid_t H5E_CACHE_g = FAIL; /* Object cache */ -hid_t H5E_STORAGE_g = FAIL; /* Data storage */ -hid_t H5E_HEAP_g = FAIL; /* Heap */ -hid_t H5E_RS_g = FAIL; /* Reference Counted Strings */ -hid_t H5E_FUNC_g = FAIL; /* Function entry/exit */ -hid_t H5E_ATOM_g = FAIL; /* Object atom */ -hid_t H5E_DATASET_g = FAIL; /* Dataset */ -hid_t H5E_INTERNAL_g = FAIL; /* Internal error (too specific to document in detail) */ -hid_t H5E_DATASPACE_g = FAIL; /* Dataspace */ -hid_t H5E_BTREE_g = FAIL; /* B-Tree node */ /* Minor error IDs */ +/* Generic low-level file I/O errors */ +hid_t H5E_SEEKERROR_g = FAIL; /* Seek failed */ +hid_t H5E_READERROR_g = FAIL; /* Read failed */ +hid_t H5E_WRITEERROR_g = FAIL; /* Write failed */ +hid_t H5E_CLOSEERROR_g = FAIL; /* Close failed */ +hid_t H5E_OVERFLOW_g = FAIL; /* Address overflowed */ +hid_t H5E_FCNTL_g = FAIL; /* File control (fcntl) failed */ + /* Resource errors */ hid_t H5E_NOSPACE_g = FAIL; /* No space available for allocation */ hid_t H5E_CANTALLOC_g = FAIL; /* Can't allocate space */ @@ -65,12 +73,30 @@ hid_t H5E_CANTGC_g = FAIL; /* Unable to garbage collect */ hid_t H5E_CANTGETSIZE_g = FAIL; /* Unable to compute size */ hid_t H5E_OBJOPEN_g = FAIL; /* Object is already open */ +/* Heap errors */ +hid_t H5E_CANTRESTORE_g = FAIL; /* Can't restore condition */ +hid_t H5E_CANTCOMPUTE_g = FAIL; /* Can't compute value */ +hid_t H5E_CANTEXTEND_g = FAIL; /* Can't extend heap's space */ +hid_t H5E_CANTATTACH_g = FAIL; /* Can't attach object */ +hid_t H5E_CANTUPDATE_g = FAIL; /* Can't update object */ +hid_t H5E_CANTOPERATE_g = FAIL; /* Can't operate on object */ + +/* Function entry/exit interface errors */ +hid_t H5E_CANTINIT_g = FAIL; /* Unable to initialize object */ +hid_t H5E_ALREADYINIT_g = FAIL; /* Object already initialized */ +hid_t H5E_CANTRELEASE_g = FAIL; /* Unable to release object */ + /* Property list errors */ hid_t H5E_CANTGET_g = FAIL; /* Can't get value */ hid_t H5E_CANTSET_g = FAIL; /* Can't set value */ hid_t H5E_DUPCLASS_g = FAIL; /* Duplicate class name in parent class */ hid_t H5E_SETDISALLOWED_g = FAIL; /* Disallowed operation */ +/* Free space errors */ +hid_t H5E_CANTMERGE_g = FAIL; /* Can't merge objects */ +hid_t H5E_CANTREVIVE_g = FAIL; /* Can't revive object */ +hid_t H5E_CANTSHRINK_g = FAIL; /* Can't shrink container */ + /* Object header related errors */ hid_t H5E_LINKCOUNT_g = FAIL; /* Bad object header link count */ hid_t H5E_VERSION_g = FAIL; /* Wrong version number */ @@ -82,9 +108,29 @@ hid_t H5E_CANTPACK_g = FAIL; /* Can't pack messages */ hid_t H5E_CANTRESET_g = FAIL; /* Can't reset object */ hid_t H5E_CANTRENAME_g = FAIL; /* Unable to rename object */ +/* System level errors */ +hid_t H5E_SYSERRSTR_g = FAIL; /* System error message */ + +/* I/O pipeline errors */ +hid_t H5E_NOFILTER_g = FAIL; /* Requested filter is not available */ +hid_t H5E_CALLBACK_g = FAIL; /* Callback failed */ +hid_t H5E_CANAPPLY_g = FAIL; /* Error from filter 'can apply' callback */ +hid_t H5E_SETLOCAL_g = FAIL; /* Error from filter 'set local' callback */ +hid_t H5E_NOENCODER_g = FAIL; /* Filter present but encoding disabled */ +hid_t H5E_CANTFILTER_g = FAIL; /* Filter operation failed */ + +/* Group related errors */ +hid_t H5E_CANTOPENOBJ_g = FAIL; /* Can't open object */ +hid_t H5E_CANTCLOSEOBJ_g = FAIL; /* Can't close object */ +hid_t H5E_COMPLEN_g = FAIL; /* Name component is too long */ +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 */ @@ -104,22 +150,6 @@ hid_t H5E_CANTINC_g = FAIL; /* Unable to increment reference count * hid_t H5E_CANTDEC_g = FAIL; /* Unable to decrement reference count */ hid_t H5E_NOIDS_g = FAIL; /* Out of IDs for group */ -/* Plugin errors */ -hid_t H5E_OPENERROR_g = FAIL; /* Can't open directory or file */ - -/* Dataspace errors */ -hid_t H5E_CANTCLIP_g = FAIL; /* Can't clip hyperslab region */ -hid_t H5E_CANTCOUNT_g = FAIL; /* Can't count elements */ -hid_t H5E_CANTSELECT_g = FAIL; /* Can't select hyperslab */ -hid_t H5E_CANTNEXT_g = FAIL; /* Can't move to next iterator location */ -hid_t H5E_BADSELECT_g = FAIL; /* Invalid selection */ -hid_t H5E_CANTCOMPARE_g = FAIL; /* Can't compare objects */ - -/* Parallel MPI errors */ -hid_t H5E_MPI_g = FAIL; /* Some MPI function failed */ -hid_t H5E_MPIERRSTR_g = FAIL; /* MPI Error String */ -hid_t H5E_CANTRECV_g = FAIL; /* Can't receive data */ - /* Cache related errors */ hid_t H5E_CANTFLUSH_g = FAIL; /* Unable to flush data from cache */ hid_t H5E_CANTSERIALIZE_g = FAIL; /* Unable to serialize data from cache */ @@ -137,14 +167,6 @@ hid_t H5E_CANTDIRTY_g = FAIL; /* Unable to mark metadata as dirty */ hid_t H5E_CANTEXPUNGE_g = FAIL; /* Unable to expunge a metadata cache entry */ hid_t H5E_CANTRESIZE_g = FAIL; /* Unable to resize a metadata cache entry */ -/* Heap errors */ -hid_t H5E_CANTRESTORE_g = FAIL; /* Can't restore condition */ -hid_t H5E_CANTCOMPUTE_g = FAIL; /* Can't compute value */ -hid_t H5E_CANTEXTEND_g = FAIL; /* Can't extend heap's space */ -hid_t H5E_CANTATTACH_g = FAIL; /* Can't attach object */ -hid_t H5E_CANTUPDATE_g = FAIL; /* Can't update object */ -hid_t H5E_CANTOPERATE_g = FAIL; /* Can't operate on object */ - /* Link related errors */ hid_t H5E_TRAVERSE_g = FAIL; /* Link traversal failure */ hid_t H5E_NLINKS_g = FAIL; /* Too many soft links in path */ @@ -152,6 +174,26 @@ hid_t H5E_NOTREGISTERED_g = FAIL; /* Link class not registered */ hid_t H5E_CANTMOVE_g = FAIL; /* Can't move object */ hid_t H5E_CANTSORT_g = FAIL; /* Can't sort objects */ +/* Parallel MPI errors */ +hid_t H5E_MPI_g = FAIL; /* Some MPI function failed */ +hid_t H5E_MPIERRSTR_g = FAIL; /* MPI Error String */ +hid_t H5E_CANTRECV_g = FAIL; /* Can't receive data */ + +/* Dataspace errors */ +hid_t H5E_CANTCLIP_g = FAIL; /* Can't clip hyperslab region */ +hid_t H5E_CANTCOUNT_g = FAIL; /* Can't count elements */ +hid_t H5E_CANTSELECT_g = FAIL; /* Can't select hyperslab */ +hid_t H5E_CANTNEXT_g = FAIL; /* Can't move to next iterator location */ +hid_t H5E_BADSELECT_g = FAIL; /* Invalid selection */ +hid_t H5E_CANTCOMPARE_g = FAIL; /* Can't compare objects */ + +/* Argument errors */ +hid_t H5E_UNINITIALIZED_g = FAIL; /* Information is uinitialized */ +hid_t H5E_UNSUPPORTED_g = FAIL; /* Feature is unsupported */ +hid_t H5E_BADTYPE_g = FAIL; /* Inappropriate type */ +hid_t H5E_BADRANGE_g = FAIL; /* Out of range */ +hid_t H5E_BADVALUE_g = FAIL; /* Bad value */ + /* B-tree related errors */ hid_t H5E_NOTFOUND_g = FAIL; /* Object not found */ hid_t H5E_EXISTS_g = FAIL; /* Object already exists */ @@ -165,50 +207,8 @@ hid_t H5E_CANTLIST_g = FAIL; /* Unable to list node */ hid_t H5E_CANTMODIFY_g = FAIL; /* Unable to modify record */ hid_t H5E_CANTREMOVE_g = FAIL; /* Unable to remove object */ -/* I/O pipeline errors */ -hid_t H5E_NOFILTER_g = FAIL; /* Requested filter is not available */ -hid_t H5E_CALLBACK_g = FAIL; /* Callback failed */ -hid_t H5E_CANAPPLY_g = FAIL; /* Error from filter 'can apply' callback */ -hid_t H5E_SETLOCAL_g = FAIL; /* Error from filter 'set local' callback */ -hid_t H5E_NOENCODER_g = FAIL; /* Filter present but encoding disabled */ -hid_t H5E_CANTFILTER_g = FAIL; /* Filter operation failed */ - -/* Function entry/exit interface errors */ -hid_t H5E_CANTINIT_g = FAIL; /* Unable to initialize object */ -hid_t H5E_ALREADYINIT_g = FAIL; /* Object already initialized */ -hid_t H5E_CANTRELEASE_g = FAIL; /* Unable to release object */ - -/* Group related errors */ -hid_t H5E_CANTOPENOBJ_g = FAIL; /* Can't open object */ -hid_t H5E_CANTCLOSEOBJ_g = FAIL; /* Can't close object */ -hid_t H5E_COMPLEN_g = FAIL; /* Name component is too long */ -hid_t H5E_PATH_g = FAIL; /* Problem with path to object */ - -/* Generic low-level file I/O errors */ -hid_t H5E_SEEKERROR_g = FAIL; /* Seek failed */ -hid_t H5E_READERROR_g = FAIL; /* Read failed */ -hid_t H5E_WRITEERROR_g = FAIL; /* Write failed */ -hid_t H5E_CLOSEERROR_g = FAIL; /* Close failed */ -hid_t H5E_OVERFLOW_g = FAIL; /* Address overflowed */ -hid_t H5E_FCNTL_g = FAIL; /* File control (fcntl) failed */ - -/* Free space errors */ -hid_t H5E_CANTMERGE_g = FAIL; /* Can't merge objects */ -hid_t H5E_CANTREVIVE_g = FAIL; /* Can't revive object */ -hid_t H5E_CANTSHRINK_g = FAIL; /* Can't shrink container */ - -/* System level errors */ -hid_t H5E_SYSERRSTR_g = FAIL; /* System error message */ - /* Datatype conversion errors */ hid_t H5E_CANTCONVERT_g = FAIL; /* Can't convert datatypes */ hid_t H5E_BADSIZE_g = FAIL; /* Bad size for object */ -/* Argument errors */ -hid_t H5E_UNINITIALIZED_g = FAIL; /* Information is uinitialized */ -hid_t H5E_UNSUPPORTED_g = FAIL; /* Feature is unsupported */ -hid_t H5E_BADTYPE_g = FAIL; /* Inappropriate type */ -hid_t H5E_BADRANGE_g = FAIL; /* Out of range */ -hid_t H5E_BADVALUE_g = FAIL; /* Bad value */ - #endif /* H5Edefin_H */ diff --git a/src/H5Einit.h b/src/H5Einit.h index 53bfb6b..eeca33e 100644 --- a/src/H5Einit.h +++ b/src/H5Einit.h @@ -22,167 +22,199 @@ /* Major error codes */ /*********************/ -HDassert(H5E_FSPACE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Free Space Manager"))==NULL) +HDassert(H5E_DATASET_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataset"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_DATASET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_SLIST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Skip Lists"))==NULL) +HDassert(H5E_FUNC_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Function entry/exit"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_FUNC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_NONE_MAJOR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "No error"))==NULL) +HDassert(H5E_STORAGE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data storage"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NONE_MAJOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_STORAGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_IO_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Low-level I/O"))==NULL) +HDassert(H5E_FILE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "File accessibilty"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_IO_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_FILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_SOHM_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Shared Object Header Messages"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_SOHM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_SYM_g==(-1)); +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") +HDassert(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") +HDassert(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") +if((H5E_VFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_INTERNAL_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Internal error (too specific to document in detail)"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_INTERNAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_BTREE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "B-Tree node"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_BTREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") HDassert(H5E_REFERENCE_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "References"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_REFERENCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_DATASPACE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataspace"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_DATASPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") HDassert(H5E_RESOURCE_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Resource unavailable"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_RESOURCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_ARGS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Invalid arguments to routine"))==NULL) +HDassert(H5E_PLIST_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Property lists"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ARGS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_PLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_ATTR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Attribute"))==NULL) +HDassert(H5E_LINK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Links"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ATTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_LINK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_DATATYPE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Datatype"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_DATATYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_RS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Reference Counted Strings"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_RS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_HEAP_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Heap"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_HEAP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") HDassert(H5E_OHDR_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object header"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_OHDR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_ERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Error API"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_PLINE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data filters"))==NULL) +HDassert(H5E_ATOM_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object atom"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_PLINE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ATOM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_TST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Ternary Search Trees"))==NULL) +HDassert(H5E_ATTR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Attribute"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_TST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ATTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_DATATYPE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Datatype"))==NULL) +HDassert(H5E_NONE_MAJOR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "No error"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_DATATYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NONE_MAJOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_LINK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Links"))==NULL) +HDassert(H5E_IO_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Low-level I/O"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_LINK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_IO_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_SYM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Symbol table"))==NULL) +HDassert(H5E_SLIST_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Skip Lists"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SYM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") HDassert(H5E_EFL_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "External file list"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_EFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_PLIST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Property lists"))==NULL) +HDassert(H5E_TST_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Ternary Search Trees"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_PLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_TST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_PLUGIN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Plugin for dynamically loaded library"))==NULL) +HDassert(H5E_ARGS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Invalid arguments to routine"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_PLUGIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ARGS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_FILE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "File accessibilty"))==NULL) +HDassert(H5E_ERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Error API"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_SOHM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Shared Object Header Messages"))==NULL) +HDassert(H5E_PLINE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data filters"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SOHM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_PLINE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_VFL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Virtual File Layer"))==NULL) +HDassert(H5E_FSPACE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Free Space Manager"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_VFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_FSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") HDassert(H5E_CACHE_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object cache"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_CACHE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_STORAGE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data storage"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_STORAGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_HEAP_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Heap"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_HEAP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_RS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Reference Counted Strings"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_RS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_FUNC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Function entry/exit"))==NULL) + +/*********************/ +/* Minor error codes */ +/*********************/ + + +/* Generic low-level file I/O errors */ +HDassert(H5E_SEEKERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Seek failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FUNC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SEEKERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_ATOM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object atom"))==NULL) +HDassert(H5E_READERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Read failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ATOM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_READERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_DATASET_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataset"))==NULL) +HDassert(H5E_WRITEERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Write failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_DATASET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_WRITEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_INTERNAL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Internal error (too specific to document in detail)"))==NULL) +HDassert(H5E_CLOSEERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Close failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_INTERNAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CLOSEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_DATASPACE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataspace"))==NULL) +HDassert(H5E_OVERFLOW_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Address overflowed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_DATASPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_OVERFLOW_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BTREE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "B-Tree node"))==NULL) +HDassert(H5E_FCNTL_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "File control (fcntl) failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BTREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_FCNTL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/*********************/ -/* Minor error codes */ -/*********************/ - - /* Resource errors */ HDassert(H5E_NOSPACE_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MINOR, "No space available for allocation"))==NULL) @@ -235,6 +267,55 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Object is already open"))==NULL) if((H5E_OBJOPEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +/* Heap errors */ +HDassert(H5E_CANTRESTORE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't restore condition"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTRESTORE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTCOMPUTE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compute value"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTCOMPUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTEXTEND_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't extend heap's space"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTEXTEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTATTACH_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't attach object"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTATTACH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTUPDATE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't update object"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTUPDATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTOPERATE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't operate on object"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTOPERATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") + +/* Function entry/exit interface errors */ +HDassert(H5E_CANTINIT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to initialize object"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTINIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_ALREADYINIT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already initialized"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_ALREADYINIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTRELEASE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to release object"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTRELEASE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") + /* Property list errors */ HDassert(H5E_CANTGET_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't get value"))==NULL) @@ -257,6 +338,23 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Disallowed operation"))==NULL) if((H5E_SETDISALLOWED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +/* Free space errors */ +HDassert(H5E_CANTMERGE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't merge objects"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTMERGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTREVIVE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't revive object"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTREVIVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTSHRINK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't shrink container"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTSHRINK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") + /* Object header related errors */ HDassert(H5E_LINKCOUNT_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad object header link count"))==NULL) @@ -304,6 +402,67 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to rename object"))==NULL) if((H5E_CANTRENAME_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +/* System level errors */ +HDassert(H5E_SYSERRSTR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "System error message"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_SYSERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") + +/* I/O pipeline errors */ +HDassert(H5E_NOFILTER_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Requested filter is not available"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_NOFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CALLBACK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Callback failed"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CALLBACK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANAPPLY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Error from filter 'can apply' callback"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANAPPLY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_SETLOCAL_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Error from filter 'set local' callback"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_SETLOCAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_NOENCODER_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter present but encoding disabled"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_NOENCODER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTFILTER_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter operation failed"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") + +/* Group related errors */ +HDassert(H5E_CANTOPENOBJ_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open object"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTOPENOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTCLOSEOBJ_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't close object"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTCLOSEOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_COMPLEN_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Name component is too long"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_COMPLEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_PATH_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Problem with path to object"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_PATH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") + /* No error */ HDassert(H5E_NONE_MINOR_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MINOR, "No error"))==NULL) @@ -311,6 +470,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 */ +HDassert(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 */ HDassert(H5E_FILEEXISTS_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MINOR, "File already exists"))==NULL) @@ -390,62 +556,6 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of IDs for group"))==NULL) if((H5E_NOIDS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Plugin errors */ -HDassert(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") - -/* Dataspace errors */ -HDassert(H5E_CANTCLIP_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't clip hyperslab region"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCLIP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTCOUNT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't count elements"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTSELECT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't select hyperslab"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSELECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTNEXT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't move to next iterator location"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTNEXT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BADSELECT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Invalid selection"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADSELECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTCOMPARE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compare objects"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCOMPARE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Parallel MPI errors */ -HDassert(H5E_MPI_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Some MPI function failed"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_MPI_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_MPIERRSTR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "MPI Error String"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_MPIERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTRECV_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't receive data"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTRECV_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - /* Cache related errors */ HDassert(H5E_CANTFLUSH_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to flush data from cache"))==NULL) @@ -523,38 +633,6 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to resize a metadata cache entr if((H5E_CANTRESIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Heap errors */ -HDassert(H5E_CANTRESTORE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't restore condition"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTRESTORE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTCOMPUTE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compute value"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCOMPUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTEXTEND_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't extend heap's space"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTEXTEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTATTACH_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't attach object"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTATTACH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTUPDATE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't update object"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTUPDATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTOPERATE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't operate on object"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTOPERATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - /* Link related errors */ HDassert(H5E_TRAVERSE_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MINOR, "Link traversal failure"))==NULL) @@ -582,6 +660,82 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't sort objects"))==NULL) if((H5E_CANTSORT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +/* Parallel MPI errors */ +HDassert(H5E_MPI_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Some MPI function failed"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_MPI_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_MPIERRSTR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "MPI Error String"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_MPIERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTRECV_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't receive data"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTRECV_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") + +/* Dataspace errors */ +HDassert(H5E_CANTCLIP_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't clip hyperslab region"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTCLIP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTCOUNT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't count elements"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTCOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTSELECT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't select hyperslab"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTSELECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTNEXT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't move to next iterator location"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTNEXT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_BADSELECT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Invalid selection"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_BADSELECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_CANTCOMPARE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compare objects"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTCOMPARE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") + +/* Argument errors */ +HDassert(H5E_UNINITIALIZED_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Information is uinitialized"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_UNINITIALIZED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_UNSUPPORTED_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Feature is unsupported"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_UNSUPPORTED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_BADTYPE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Inappropriate type"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_BADTYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_BADRANGE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of range"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_BADRANGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_BADVALUE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad value"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_BADVALUE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") + /* B-tree related errors */ HDassert(H5E_NOTFOUND_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MINOR, "Object not found"))==NULL) @@ -639,133 +793,6 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to remove object"))==NULL) if((H5E_CANTREMOVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* I/O pipeline errors */ -HDassert(H5E_NOFILTER_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Requested filter is not available"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CALLBACK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Callback failed"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CALLBACK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANAPPLY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Error from filter 'can apply' callback"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANAPPLY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_SETLOCAL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Error from filter 'set local' callback"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SETLOCAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_NOENCODER_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter present but encoding disabled"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOENCODER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTFILTER_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter operation failed"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Function entry/exit interface errors */ -HDassert(H5E_CANTINIT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to initialize object"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTINIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_ALREADYINIT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already initialized"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ALREADYINIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTRELEASE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to release object"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTRELEASE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Group related errors */ -HDassert(H5E_CANTOPENOBJ_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open object"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTOPENOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTCLOSEOBJ_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't close object"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCLOSEOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_COMPLEN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Name component is too long"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_COMPLEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_PATH_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Problem with path to object"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_PATH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Generic low-level file I/O errors */ -HDassert(H5E_SEEKERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Seek failed"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SEEKERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_READERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Read failed"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_READERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_WRITEERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Write failed"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_WRITEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CLOSEERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Close failed"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CLOSEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_OVERFLOW_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Address overflowed"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_OVERFLOW_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_FCNTL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "File control (fcntl) failed"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FCNTL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Free space errors */ -HDassert(H5E_CANTMERGE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't merge objects"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTMERGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTREVIVE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't revive object"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTREVIVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTSHRINK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't shrink container"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSHRINK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* System level errors */ -HDassert(H5E_SYSERRSTR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "System error message"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SYSERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - /* Datatype conversion errors */ HDassert(H5E_CANTCONVERT_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't convert datatypes"))==NULL) @@ -778,31 +805,4 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad size for object"))==NULL) if((H5E_BADSIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Argument errors */ -HDassert(H5E_UNINITIALIZED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Information is uinitialized"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_UNINITIALIZED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_UNSUPPORTED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Feature is unsupported"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_UNSUPPORTED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BADTYPE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Inappropriate type"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADTYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BADRANGE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of range"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADRANGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BADVALUE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad value"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADVALUE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - #endif /* H5Einit_H */ diff --git a/src/H5Epubgen.h b/src/H5Epubgen.h index f96f107..0a72245 100644 --- a/src/H5Epubgen.h +++ b/src/H5Epubgen.h @@ -26,73 +26,87 @@ extern "C" { /* Major error codes */ /*********************/ -#define H5E_FSPACE (H5OPEN H5E_FSPACE_g) -#define H5E_SLIST (H5OPEN H5E_SLIST_g) -#define H5E_NONE_MAJOR (H5OPEN H5E_NONE_MAJOR_g) -#define H5E_IO (H5OPEN H5E_IO_g) +#define H5E_DATASET (H5OPEN H5E_DATASET_g) +#define H5E_FUNC (H5OPEN H5E_FUNC_g) +#define H5E_STORAGE (H5OPEN H5E_STORAGE_g) +#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) #define H5E_REFERENCE (H5OPEN H5E_REFERENCE_g) +#define H5E_DATASPACE (H5OPEN H5E_DATASPACE_g) #define H5E_RESOURCE (H5OPEN H5E_RESOURCE_g) -#define H5E_ARGS (H5OPEN H5E_ARGS_g) -#define H5E_ATTR (H5OPEN H5E_ATTR_g) +#define H5E_PLIST (H5OPEN H5E_PLIST_g) +#define H5E_LINK (H5OPEN H5E_LINK_g) +#define H5E_DATATYPE (H5OPEN H5E_DATATYPE_g) +#define H5E_RS (H5OPEN H5E_RS_g) +#define H5E_HEAP (H5OPEN H5E_HEAP_g) #define H5E_OHDR (H5OPEN H5E_OHDR_g) +#define H5E_ATOM (H5OPEN H5E_ATOM_g) +#define H5E_ATTR (H5OPEN H5E_ATTR_g) +#define H5E_NONE_MAJOR (H5OPEN H5E_NONE_MAJOR_g) +#define H5E_IO (H5OPEN H5E_IO_g) +#define H5E_SLIST (H5OPEN H5E_SLIST_g) +#define H5E_EFL (H5OPEN H5E_EFL_g) +#define H5E_TST (H5OPEN H5E_TST_g) +#define H5E_ARGS (H5OPEN H5E_ARGS_g) #define H5E_ERROR (H5OPEN H5E_ERROR_g) #define H5E_PLINE (H5OPEN H5E_PLINE_g) -#define H5E_TST (H5OPEN H5E_TST_g) -#define H5E_DATATYPE (H5OPEN H5E_DATATYPE_g) -#define H5E_LINK (H5OPEN H5E_LINK_g) -#define H5E_SYM (H5OPEN H5E_SYM_g) -#define H5E_EFL (H5OPEN H5E_EFL_g) -#define H5E_PLIST (H5OPEN H5E_PLIST_g) -#define H5E_PLUGIN (H5OPEN H5E_PLUGIN_g) -#define H5E_FILE (H5OPEN H5E_FILE_g) -#define H5E_SOHM (H5OPEN H5E_SOHM_g) -#define H5E_VFL (H5OPEN H5E_VFL_g) +#define H5E_FSPACE (H5OPEN H5E_FSPACE_g) #define H5E_CACHE (H5OPEN H5E_CACHE_g) -#define H5E_STORAGE (H5OPEN H5E_STORAGE_g) -#define H5E_HEAP (H5OPEN H5E_HEAP_g) -#define H5E_RS (H5OPEN H5E_RS_g) -#define H5E_FUNC (H5OPEN H5E_FUNC_g) -#define H5E_ATOM (H5OPEN H5E_ATOM_g) -#define H5E_DATASET (H5OPEN H5E_DATASET_g) -#define H5E_INTERNAL (H5OPEN H5E_INTERNAL_g) -#define H5E_DATASPACE (H5OPEN H5E_DATASPACE_g) -#define H5E_BTREE (H5OPEN H5E_BTREE_g) -H5_DLLVAR hid_t H5E_FSPACE_g; /* Free Space Manager */ -H5_DLLVAR hid_t H5E_SLIST_g; /* Skip Lists */ -H5_DLLVAR hid_t H5E_NONE_MAJOR_g; /* No error */ -H5_DLLVAR hid_t H5E_IO_g; /* Low-level I/O */ +H5_DLLVAR hid_t H5E_DATASET_g; /* Dataset */ +H5_DLLVAR hid_t H5E_FUNC_g; /* Function entry/exit */ +H5_DLLVAR hid_t H5E_STORAGE_g; /* Data storage */ +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 */ H5_DLLVAR hid_t H5E_REFERENCE_g; /* References */ +H5_DLLVAR hid_t H5E_DATASPACE_g; /* Dataspace */ H5_DLLVAR hid_t H5E_RESOURCE_g; /* Resource unavailable */ -H5_DLLVAR hid_t H5E_ARGS_g; /* Invalid arguments to routine */ -H5_DLLVAR hid_t H5E_ATTR_g; /* Attribute */ +H5_DLLVAR hid_t H5E_PLIST_g; /* Property lists */ +H5_DLLVAR hid_t H5E_LINK_g; /* Links */ +H5_DLLVAR hid_t H5E_DATATYPE_g; /* Datatype */ +H5_DLLVAR hid_t H5E_RS_g; /* Reference Counted Strings */ +H5_DLLVAR hid_t H5E_HEAP_g; /* Heap */ H5_DLLVAR hid_t H5E_OHDR_g; /* Object header */ +H5_DLLVAR hid_t H5E_ATOM_g; /* Object atom */ +H5_DLLVAR hid_t H5E_ATTR_g; /* Attribute */ +H5_DLLVAR hid_t H5E_NONE_MAJOR_g; /* No error */ +H5_DLLVAR hid_t H5E_IO_g; /* Low-level I/O */ +H5_DLLVAR hid_t H5E_SLIST_g; /* Skip Lists */ +H5_DLLVAR hid_t H5E_EFL_g; /* External file list */ +H5_DLLVAR hid_t H5E_TST_g; /* Ternary Search Trees */ +H5_DLLVAR hid_t H5E_ARGS_g; /* Invalid arguments to routine */ H5_DLLVAR hid_t H5E_ERROR_g; /* Error API */ H5_DLLVAR hid_t H5E_PLINE_g; /* Data filters */ -H5_DLLVAR hid_t H5E_TST_g; /* Ternary Search Trees */ -H5_DLLVAR hid_t H5E_DATATYPE_g; /* Datatype */ -H5_DLLVAR hid_t H5E_LINK_g; /* Links */ -H5_DLLVAR hid_t H5E_SYM_g; /* Symbol table */ -H5_DLLVAR hid_t H5E_EFL_g; /* External file list */ -H5_DLLVAR hid_t H5E_PLIST_g; /* Property lists */ -H5_DLLVAR hid_t H5E_PLUGIN_g; /* Plugin for dynamically loaded library */ -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_VFL_g; /* Virtual File Layer */ +H5_DLLVAR hid_t H5E_FSPACE_g; /* Free Space Manager */ H5_DLLVAR hid_t H5E_CACHE_g; /* Object cache */ -H5_DLLVAR hid_t H5E_STORAGE_g; /* Data storage */ -H5_DLLVAR hid_t H5E_HEAP_g; /* Heap */ -H5_DLLVAR hid_t H5E_RS_g; /* Reference Counted Strings */ -H5_DLLVAR hid_t H5E_FUNC_g; /* Function entry/exit */ -H5_DLLVAR hid_t H5E_ATOM_g; /* Object atom */ -H5_DLLVAR hid_t H5E_DATASET_g; /* Dataset */ -H5_DLLVAR hid_t H5E_INTERNAL_g; /* Internal error (too specific to document in detail) */ -H5_DLLVAR hid_t H5E_DATASPACE_g; /* Dataspace */ -H5_DLLVAR hid_t H5E_BTREE_g; /* B-Tree node */ /*********************/ /* Minor error codes */ /*********************/ +/* Generic low-level file I/O errors */ +#define H5E_SEEKERROR (H5OPEN H5E_SEEKERROR_g) +#define H5E_READERROR (H5OPEN H5E_READERROR_g) +#define H5E_WRITEERROR (H5OPEN H5E_WRITEERROR_g) +#define H5E_CLOSEERROR (H5OPEN H5E_CLOSEERROR_g) +#define H5E_OVERFLOW (H5OPEN H5E_OVERFLOW_g) +#define H5E_FCNTL (H5OPEN H5E_FCNTL_g) +H5_DLLVAR hid_t H5E_SEEKERROR_g; /* Seek failed */ +H5_DLLVAR hid_t H5E_READERROR_g; /* Read failed */ +H5_DLLVAR hid_t H5E_WRITEERROR_g; /* Write failed */ +H5_DLLVAR hid_t H5E_CLOSEERROR_g; /* Close failed */ +H5_DLLVAR hid_t H5E_OVERFLOW_g; /* Address overflowed */ +H5_DLLVAR hid_t H5E_FCNTL_g; /* File control (fcntl) failed */ + /* Resource errors */ #define H5E_NOSPACE (H5OPEN H5E_NOSPACE_g) #define H5E_CANTALLOC (H5OPEN H5E_CANTALLOC_g) @@ -115,6 +129,28 @@ H5_DLLVAR hid_t H5E_CANTGC_g; /* Unable to garbage collect */ H5_DLLVAR hid_t H5E_CANTGETSIZE_g; /* Unable to compute size */ H5_DLLVAR hid_t H5E_OBJOPEN_g; /* Object is already open */ +/* Heap errors */ +#define H5E_CANTRESTORE (H5OPEN H5E_CANTRESTORE_g) +#define H5E_CANTCOMPUTE (H5OPEN H5E_CANTCOMPUTE_g) +#define H5E_CANTEXTEND (H5OPEN H5E_CANTEXTEND_g) +#define H5E_CANTATTACH (H5OPEN H5E_CANTATTACH_g) +#define H5E_CANTUPDATE (H5OPEN H5E_CANTUPDATE_g) +#define H5E_CANTOPERATE (H5OPEN H5E_CANTOPERATE_g) +H5_DLLVAR hid_t H5E_CANTRESTORE_g; /* Can't restore condition */ +H5_DLLVAR hid_t H5E_CANTCOMPUTE_g; /* Can't compute value */ +H5_DLLVAR hid_t H5E_CANTEXTEND_g; /* Can't extend heap's space */ +H5_DLLVAR hid_t H5E_CANTATTACH_g; /* Can't attach object */ +H5_DLLVAR hid_t H5E_CANTUPDATE_g; /* Can't update object */ +H5_DLLVAR hid_t H5E_CANTOPERATE_g; /* Can't operate on object */ + +/* Function entry/exit interface errors */ +#define H5E_CANTINIT (H5OPEN H5E_CANTINIT_g) +#define H5E_ALREADYINIT (H5OPEN H5E_ALREADYINIT_g) +#define H5E_CANTRELEASE (H5OPEN H5E_CANTRELEASE_g) +H5_DLLVAR hid_t H5E_CANTINIT_g; /* Unable to initialize object */ +H5_DLLVAR hid_t H5E_ALREADYINIT_g; /* Object already initialized */ +H5_DLLVAR hid_t H5E_CANTRELEASE_g; /* Unable to release object */ + /* Property list errors */ #define H5E_CANTGET (H5OPEN H5E_CANTGET_g) #define H5E_CANTSET (H5OPEN H5E_CANTSET_g) @@ -125,6 +161,14 @@ H5_DLLVAR hid_t H5E_CANTSET_g; /* Can't set value */ H5_DLLVAR hid_t H5E_DUPCLASS_g; /* Duplicate class name in parent class */ H5_DLLVAR hid_t H5E_SETDISALLOWED_g; /* Disallowed operation */ +/* Free space errors */ +#define H5E_CANTMERGE (H5OPEN H5E_CANTMERGE_g) +#define H5E_CANTREVIVE (H5OPEN H5E_CANTREVIVE_g) +#define H5E_CANTSHRINK (H5OPEN H5E_CANTSHRINK_g) +H5_DLLVAR hid_t H5E_CANTMERGE_g; /* Can't merge objects */ +H5_DLLVAR hid_t H5E_CANTREVIVE_g; /* Can't revive object */ +H5_DLLVAR hid_t H5E_CANTSHRINK_g; /* Can't shrink container */ + /* Object header related errors */ #define H5E_LINKCOUNT (H5OPEN H5E_LINKCOUNT_g) #define H5E_VERSION (H5OPEN H5E_VERSION_g) @@ -145,10 +189,42 @@ H5_DLLVAR hid_t H5E_CANTPACK_g; /* Can't pack messages */ H5_DLLVAR hid_t H5E_CANTRESET_g; /* Can't reset object */ H5_DLLVAR hid_t H5E_CANTRENAME_g; /* Unable to rename object */ +/* System level errors */ +#define H5E_SYSERRSTR (H5OPEN H5E_SYSERRSTR_g) +H5_DLLVAR hid_t H5E_SYSERRSTR_g; /* System error message */ + +/* I/O pipeline errors */ +#define H5E_NOFILTER (H5OPEN H5E_NOFILTER_g) +#define H5E_CALLBACK (H5OPEN H5E_CALLBACK_g) +#define H5E_CANAPPLY (H5OPEN H5E_CANAPPLY_g) +#define H5E_SETLOCAL (H5OPEN H5E_SETLOCAL_g) +#define H5E_NOENCODER (H5OPEN H5E_NOENCODER_g) +#define H5E_CANTFILTER (H5OPEN H5E_CANTFILTER_g) +H5_DLLVAR hid_t H5E_NOFILTER_g; /* Requested filter is not available */ +H5_DLLVAR hid_t H5E_CALLBACK_g; /* Callback failed */ +H5_DLLVAR hid_t H5E_CANAPPLY_g; /* Error from filter 'can apply' callback */ +H5_DLLVAR hid_t H5E_SETLOCAL_g; /* Error from filter 'set local' callback */ +H5_DLLVAR hid_t H5E_NOENCODER_g; /* Filter present but encoding disabled */ +H5_DLLVAR hid_t H5E_CANTFILTER_g; /* Filter operation failed */ + +/* Group related errors */ +#define H5E_CANTOPENOBJ (H5OPEN H5E_CANTOPENOBJ_g) +#define H5E_CANTCLOSEOBJ (H5OPEN H5E_CANTCLOSEOBJ_g) +#define H5E_COMPLEN (H5OPEN H5E_COMPLEN_g) +#define H5E_PATH (H5OPEN H5E_PATH_g) +H5_DLLVAR hid_t H5E_CANTOPENOBJ_g; /* Can't open object */ +H5_DLLVAR hid_t H5E_CANTCLOSEOBJ_g; /* Can't close object */ +H5_DLLVAR hid_t H5E_COMPLEN_g; /* Name component is too long */ +H5_DLLVAR hid_t H5E_PATH_g; /* Problem with path to object */ + /* No error */ #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) @@ -183,32 +259,6 @@ H5_DLLVAR hid_t H5E_CANTINC_g; /* Unable to increment reference count */ H5_DLLVAR hid_t H5E_CANTDEC_g; /* Unable to decrement reference count */ H5_DLLVAR hid_t H5E_NOIDS_g; /* Out of IDs for group */ -/* Plugin errors */ -#define H5E_OPENERROR (H5OPEN H5E_OPENERROR_g) -H5_DLLVAR hid_t H5E_OPENERROR_g; /* Can't open directory or file */ - -/* Dataspace errors */ -#define H5E_CANTCLIP (H5OPEN H5E_CANTCLIP_g) -#define H5E_CANTCOUNT (H5OPEN H5E_CANTCOUNT_g) -#define H5E_CANTSELECT (H5OPEN H5E_CANTSELECT_g) -#define H5E_CANTNEXT (H5OPEN H5E_CANTNEXT_g) -#define H5E_BADSELECT (H5OPEN H5E_BADSELECT_g) -#define H5E_CANTCOMPARE (H5OPEN H5E_CANTCOMPARE_g) -H5_DLLVAR hid_t H5E_CANTCLIP_g; /* Can't clip hyperslab region */ -H5_DLLVAR hid_t H5E_CANTCOUNT_g; /* Can't count elements */ -H5_DLLVAR hid_t H5E_CANTSELECT_g; /* Can't select hyperslab */ -H5_DLLVAR hid_t H5E_CANTNEXT_g; /* Can't move to next iterator location */ -H5_DLLVAR hid_t H5E_BADSELECT_g; /* Invalid selection */ -H5_DLLVAR hid_t H5E_CANTCOMPARE_g; /* Can't compare objects */ - -/* Parallel MPI errors */ -#define H5E_MPI (H5OPEN H5E_MPI_g) -#define H5E_MPIERRSTR (H5OPEN H5E_MPIERRSTR_g) -#define H5E_CANTRECV (H5OPEN H5E_CANTRECV_g) -H5_DLLVAR hid_t H5E_MPI_g; /* Some MPI function failed */ -H5_DLLVAR hid_t H5E_MPIERRSTR_g; /* MPI Error String */ -H5_DLLVAR hid_t H5E_CANTRECV_g; /* Can't receive data */ - /* Cache related errors */ #define H5E_CANTFLUSH (H5OPEN H5E_CANTFLUSH_g) #define H5E_CANTSERIALIZE (H5OPEN H5E_CANTSERIALIZE_g) @@ -241,20 +291,6 @@ H5_DLLVAR hid_t H5E_CANTDIRTY_g; /* Unable to mark metadata as dirty */ H5_DLLVAR hid_t H5E_CANTEXPUNGE_g; /* Unable to expunge a metadata cache entry */ H5_DLLVAR hid_t H5E_CANTRESIZE_g; /* Unable to resize a metadata cache entry */ -/* Heap errors */ -#define H5E_CANTRESTORE (H5OPEN H5E_CANTRESTORE_g) -#define H5E_CANTCOMPUTE (H5OPEN H5E_CANTCOMPUTE_g) -#define H5E_CANTEXTEND (H5OPEN H5E_CANTEXTEND_g) -#define H5E_CANTATTACH (H5OPEN H5E_CANTATTACH_g) -#define H5E_CANTUPDATE (H5OPEN H5E_CANTUPDATE_g) -#define H5E_CANTOPERATE (H5OPEN H5E_CANTOPERATE_g) -H5_DLLVAR hid_t H5E_CANTRESTORE_g; /* Can't restore condition */ -H5_DLLVAR hid_t H5E_CANTCOMPUTE_g; /* Can't compute value */ -H5_DLLVAR hid_t H5E_CANTEXTEND_g; /* Can't extend heap's space */ -H5_DLLVAR hid_t H5E_CANTATTACH_g; /* Can't attach object */ -H5_DLLVAR hid_t H5E_CANTUPDATE_g; /* Can't update object */ -H5_DLLVAR hid_t H5E_CANTOPERATE_g; /* Can't operate on object */ - /* Link related errors */ #define H5E_TRAVERSE (H5OPEN H5E_TRAVERSE_g) #define H5E_NLINKS (H5OPEN H5E_NLINKS_g) @@ -267,6 +303,40 @@ H5_DLLVAR hid_t H5E_NOTREGISTERED_g; /* Link class not registered */ H5_DLLVAR hid_t H5E_CANTMOVE_g; /* Can't move object */ H5_DLLVAR hid_t H5E_CANTSORT_g; /* Can't sort objects */ +/* Parallel MPI errors */ +#define H5E_MPI (H5OPEN H5E_MPI_g) +#define H5E_MPIERRSTR (H5OPEN H5E_MPIERRSTR_g) +#define H5E_CANTRECV (H5OPEN H5E_CANTRECV_g) +H5_DLLVAR hid_t H5E_MPI_g; /* Some MPI function failed */ +H5_DLLVAR hid_t H5E_MPIERRSTR_g; /* MPI Error String */ +H5_DLLVAR hid_t H5E_CANTRECV_g; /* Can't receive data */ + +/* Dataspace errors */ +#define H5E_CANTCLIP (H5OPEN H5E_CANTCLIP_g) +#define H5E_CANTCOUNT (H5OPEN H5E_CANTCOUNT_g) +#define H5E_CANTSELECT (H5OPEN H5E_CANTSELECT_g) +#define H5E_CANTNEXT (H5OPEN H5E_CANTNEXT_g) +#define H5E_BADSELECT (H5OPEN H5E_BADSELECT_g) +#define H5E_CANTCOMPARE (H5OPEN H5E_CANTCOMPARE_g) +H5_DLLVAR hid_t H5E_CANTCLIP_g; /* Can't clip hyperslab region */ +H5_DLLVAR hid_t H5E_CANTCOUNT_g; /* Can't count elements */ +H5_DLLVAR hid_t H5E_CANTSELECT_g; /* Can't select hyperslab */ +H5_DLLVAR hid_t H5E_CANTNEXT_g; /* Can't move to next iterator location */ +H5_DLLVAR hid_t H5E_BADSELECT_g; /* Invalid selection */ +H5_DLLVAR hid_t H5E_CANTCOMPARE_g; /* Can't compare objects */ + +/* Argument errors */ +#define H5E_UNINITIALIZED (H5OPEN H5E_UNINITIALIZED_g) +#define H5E_UNSUPPORTED (H5OPEN H5E_UNSUPPORTED_g) +#define H5E_BADTYPE (H5OPEN H5E_BADTYPE_g) +#define H5E_BADRANGE (H5OPEN H5E_BADRANGE_g) +#define H5E_BADVALUE (H5OPEN H5E_BADVALUE_g) +H5_DLLVAR hid_t H5E_UNINITIALIZED_g; /* Information is uinitialized */ +H5_DLLVAR hid_t H5E_UNSUPPORTED_g; /* Feature is unsupported */ +H5_DLLVAR hid_t H5E_BADTYPE_g; /* Inappropriate type */ +H5_DLLVAR hid_t H5E_BADRANGE_g; /* Out of range */ +H5_DLLVAR hid_t H5E_BADVALUE_g; /* Bad value */ + /* B-tree related errors */ #define H5E_NOTFOUND (H5OPEN H5E_NOTFOUND_g) #define H5E_EXISTS (H5OPEN H5E_EXISTS_g) @@ -291,82 +361,12 @@ H5_DLLVAR hid_t H5E_CANTLIST_g; /* Unable to list node */ H5_DLLVAR hid_t H5E_CANTMODIFY_g; /* Unable to modify record */ H5_DLLVAR hid_t H5E_CANTREMOVE_g; /* Unable to remove object */ -/* I/O pipeline errors */ -#define H5E_NOFILTER (H5OPEN H5E_NOFILTER_g) -#define H5E_CALLBACK (H5OPEN H5E_CALLBACK_g) -#define H5E_CANAPPLY (H5OPEN H5E_CANAPPLY_g) -#define H5E_SETLOCAL (H5OPEN H5E_SETLOCAL_g) -#define H5E_NOENCODER (H5OPEN H5E_NOENCODER_g) -#define H5E_CANTFILTER (H5OPEN H5E_CANTFILTER_g) -H5_DLLVAR hid_t H5E_NOFILTER_g; /* Requested filter is not available */ -H5_DLLVAR hid_t H5E_CALLBACK_g; /* Callback failed */ -H5_DLLVAR hid_t H5E_CANAPPLY_g; /* Error from filter 'can apply' callback */ -H5_DLLVAR hid_t H5E_SETLOCAL_g; /* Error from filter 'set local' callback */ -H5_DLLVAR hid_t H5E_NOENCODER_g; /* Filter present but encoding disabled */ -H5_DLLVAR hid_t H5E_CANTFILTER_g; /* Filter operation failed */ - -/* Function entry/exit interface errors */ -#define H5E_CANTINIT (H5OPEN H5E_CANTINIT_g) -#define H5E_ALREADYINIT (H5OPEN H5E_ALREADYINIT_g) -#define H5E_CANTRELEASE (H5OPEN H5E_CANTRELEASE_g) -H5_DLLVAR hid_t H5E_CANTINIT_g; /* Unable to initialize object */ -H5_DLLVAR hid_t H5E_ALREADYINIT_g; /* Object already initialized */ -H5_DLLVAR hid_t H5E_CANTRELEASE_g; /* Unable to release object */ - -/* Group related errors */ -#define H5E_CANTOPENOBJ (H5OPEN H5E_CANTOPENOBJ_g) -#define H5E_CANTCLOSEOBJ (H5OPEN H5E_CANTCLOSEOBJ_g) -#define H5E_COMPLEN (H5OPEN H5E_COMPLEN_g) -#define H5E_PATH (H5OPEN H5E_PATH_g) -H5_DLLVAR hid_t H5E_CANTOPENOBJ_g; /* Can't open object */ -H5_DLLVAR hid_t H5E_CANTCLOSEOBJ_g; /* Can't close object */ -H5_DLLVAR hid_t H5E_COMPLEN_g; /* Name component is too long */ -H5_DLLVAR hid_t H5E_PATH_g; /* Problem with path to object */ - -/* Generic low-level file I/O errors */ -#define H5E_SEEKERROR (H5OPEN H5E_SEEKERROR_g) -#define H5E_READERROR (H5OPEN H5E_READERROR_g) -#define H5E_WRITEERROR (H5OPEN H5E_WRITEERROR_g) -#define H5E_CLOSEERROR (H5OPEN H5E_CLOSEERROR_g) -#define H5E_OVERFLOW (H5OPEN H5E_OVERFLOW_g) -#define H5E_FCNTL (H5OPEN H5E_FCNTL_g) -H5_DLLVAR hid_t H5E_SEEKERROR_g; /* Seek failed */ -H5_DLLVAR hid_t H5E_READERROR_g; /* Read failed */ -H5_DLLVAR hid_t H5E_WRITEERROR_g; /* Write failed */ -H5_DLLVAR hid_t H5E_CLOSEERROR_g; /* Close failed */ -H5_DLLVAR hid_t H5E_OVERFLOW_g; /* Address overflowed */ -H5_DLLVAR hid_t H5E_FCNTL_g; /* File control (fcntl) failed */ - -/* Free space errors */ -#define H5E_CANTMERGE (H5OPEN H5E_CANTMERGE_g) -#define H5E_CANTREVIVE (H5OPEN H5E_CANTREVIVE_g) -#define H5E_CANTSHRINK (H5OPEN H5E_CANTSHRINK_g) -H5_DLLVAR hid_t H5E_CANTMERGE_g; /* Can't merge objects */ -H5_DLLVAR hid_t H5E_CANTREVIVE_g; /* Can't revive object */ -H5_DLLVAR hid_t H5E_CANTSHRINK_g; /* Can't shrink container */ - -/* System level errors */ -#define H5E_SYSERRSTR (H5OPEN H5E_SYSERRSTR_g) -H5_DLLVAR hid_t H5E_SYSERRSTR_g; /* System error message */ - /* Datatype conversion errors */ #define H5E_CANTCONVERT (H5OPEN H5E_CANTCONVERT_g) #define H5E_BADSIZE (H5OPEN H5E_BADSIZE_g) H5_DLLVAR hid_t H5E_CANTCONVERT_g; /* Can't convert datatypes */ H5_DLLVAR hid_t H5E_BADSIZE_g; /* Bad size for object */ -/* Argument errors */ -#define H5E_UNINITIALIZED (H5OPEN H5E_UNINITIALIZED_g) -#define H5E_UNSUPPORTED (H5OPEN H5E_UNSUPPORTED_g) -#define H5E_BADTYPE (H5OPEN H5E_BADTYPE_g) -#define H5E_BADRANGE (H5OPEN H5E_BADRANGE_g) -#define H5E_BADVALUE (H5OPEN H5E_BADVALUE_g) -H5_DLLVAR hid_t H5E_UNINITIALIZED_g; /* Information is uinitialized */ -H5_DLLVAR hid_t H5E_UNSUPPORTED_g; /* Feature is unsupported */ -H5_DLLVAR hid_t H5E_BADTYPE_g; /* Inappropriate type */ -H5_DLLVAR hid_t H5E_BADRANGE_g; /* Out of range */ -H5_DLLVAR hid_t H5E_BADVALUE_g; /* Bad value */ - #ifdef __cplusplus } #endif diff --git a/src/H5Eterm.h b/src/H5Eterm.h index 7238707..2a8e11e 100644 --- a/src/H5Eterm.h +++ b/src/H5Eterm.h @@ -20,41 +20,49 @@ /* Reset major error IDs */ -H5E_FSPACE_g= -H5E_SLIST_g= -H5E_NONE_MAJOR_g= -H5E_IO_g= -H5E_REFERENCE_g= -H5E_RESOURCE_g= -H5E_ARGS_g= -H5E_ATTR_g= -H5E_OHDR_g= -H5E_ERROR_g= -H5E_PLINE_g= -H5E_TST_g= -H5E_DATATYPE_g= -H5E_LINK_g= -H5E_SYM_g= -H5E_EFL_g= -H5E_PLIST_g= -H5E_PLUGIN_g= +H5E_DATASET_g= +H5E_FUNC_g= +H5E_STORAGE_g= H5E_FILE_g= H5E_SOHM_g= +H5E_SYM_g= +H5E_PLUGIN_g= H5E_VFL_g= -H5E_CACHE_g= -H5E_STORAGE_g= -H5E_HEAP_g= -H5E_RS_g= -H5E_FUNC_g= -H5E_ATOM_g= -H5E_DATASET_g= H5E_INTERNAL_g= +H5E_BTREE_g= +H5E_REFERENCE_g= H5E_DATASPACE_g= -H5E_BTREE_g= (-1); +H5E_RESOURCE_g= +H5E_PLIST_g= +H5E_LINK_g= +H5E_DATATYPE_g= +H5E_RS_g= +H5E_HEAP_g= +H5E_OHDR_g= +H5E_ATOM_g= +H5E_ATTR_g= +H5E_NONE_MAJOR_g= +H5E_IO_g= +H5E_SLIST_g= +H5E_EFL_g= +H5E_TST_g= +H5E_ARGS_g= +H5E_ERROR_g= +H5E_PLINE_g= +H5E_FSPACE_g= +H5E_CACHE_g= (-1); /* Reset minor error IDs */ +/* Generic low-level file I/O errors */ +H5E_SEEKERROR_g= +H5E_READERROR_g= +H5E_WRITEERROR_g= +H5E_CLOSEERROR_g= +H5E_OVERFLOW_g= +H5E_FCNTL_g= + /* Resource errors */ H5E_NOSPACE_g= H5E_CANTALLOC_g= @@ -67,12 +75,30 @@ H5E_CANTGC_g= H5E_CANTGETSIZE_g= H5E_OBJOPEN_g= +/* Heap errors */ +H5E_CANTRESTORE_g= +H5E_CANTCOMPUTE_g= +H5E_CANTEXTEND_g= +H5E_CANTATTACH_g= +H5E_CANTUPDATE_g= +H5E_CANTOPERATE_g= + +/* Function entry/exit interface errors */ +H5E_CANTINIT_g= +H5E_ALREADYINIT_g= +H5E_CANTRELEASE_g= + /* Property list errors */ H5E_CANTGET_g= H5E_CANTSET_g= H5E_DUPCLASS_g= H5E_SETDISALLOWED_g= +/* Free space errors */ +H5E_CANTMERGE_g= +H5E_CANTREVIVE_g= +H5E_CANTSHRINK_g= + /* Object header related errors */ H5E_LINKCOUNT_g= H5E_VERSION_g= @@ -84,9 +110,29 @@ H5E_CANTPACK_g= H5E_CANTRESET_g= H5E_CANTRENAME_g= +/* System level errors */ +H5E_SYSERRSTR_g= + +/* I/O pipeline errors */ +H5E_NOFILTER_g= +H5E_CALLBACK_g= +H5E_CANAPPLY_g= +H5E_SETLOCAL_g= +H5E_NOENCODER_g= +H5E_CANTFILTER_g= + +/* Group related errors */ +H5E_CANTOPENOBJ_g= +H5E_CANTCLOSEOBJ_g= +H5E_COMPLEN_g= +H5E_PATH_g= + /* No error */ H5E_NONE_MINOR_g= +/* Plugin errors */ +H5E_OPENERROR_g= + /* File accessibilty errors */ H5E_FILEEXISTS_g= H5E_FILEOPEN_g= @@ -106,22 +152,6 @@ H5E_CANTINC_g= H5E_CANTDEC_g= H5E_NOIDS_g= -/* Plugin errors */ -H5E_OPENERROR_g= - -/* Dataspace errors */ -H5E_CANTCLIP_g= -H5E_CANTCOUNT_g= -H5E_CANTSELECT_g= -H5E_CANTNEXT_g= -H5E_BADSELECT_g= -H5E_CANTCOMPARE_g= - -/* Parallel MPI errors */ -H5E_MPI_g= -H5E_MPIERRSTR_g= -H5E_CANTRECV_g= - /* Cache related errors */ H5E_CANTFLUSH_g= H5E_CANTSERIALIZE_g= @@ -139,14 +169,6 @@ H5E_CANTDIRTY_g= H5E_CANTEXPUNGE_g= H5E_CANTRESIZE_g= -/* Heap errors */ -H5E_CANTRESTORE_g= -H5E_CANTCOMPUTE_g= -H5E_CANTEXTEND_g= -H5E_CANTATTACH_g= -H5E_CANTUPDATE_g= -H5E_CANTOPERATE_g= - /* Link related errors */ H5E_TRAVERSE_g= H5E_NLINKS_g= @@ -154,6 +176,26 @@ H5E_NOTREGISTERED_g= H5E_CANTMOVE_g= H5E_CANTSORT_g= +/* Parallel MPI errors */ +H5E_MPI_g= +H5E_MPIERRSTR_g= +H5E_CANTRECV_g= + +/* Dataspace errors */ +H5E_CANTCLIP_g= +H5E_CANTCOUNT_g= +H5E_CANTSELECT_g= +H5E_CANTNEXT_g= +H5E_BADSELECT_g= +H5E_CANTCOMPARE_g= + +/* Argument errors */ +H5E_UNINITIALIZED_g= +H5E_UNSUPPORTED_g= +H5E_BADTYPE_g= +H5E_BADRANGE_g= +H5E_BADVALUE_g= + /* B-tree related errors */ H5E_NOTFOUND_g= H5E_EXISTS_g= @@ -167,50 +209,8 @@ H5E_CANTLIST_g= H5E_CANTMODIFY_g= H5E_CANTREMOVE_g= -/* I/O pipeline errors */ -H5E_NOFILTER_g= -H5E_CALLBACK_g= -H5E_CANAPPLY_g= -H5E_SETLOCAL_g= -H5E_NOENCODER_g= -H5E_CANTFILTER_g= - -/* Function entry/exit interface errors */ -H5E_CANTINIT_g= -H5E_ALREADYINIT_g= -H5E_CANTRELEASE_g= - -/* Group related errors */ -H5E_CANTOPENOBJ_g= -H5E_CANTCLOSEOBJ_g= -H5E_COMPLEN_g= -H5E_PATH_g= - -/* Generic low-level file I/O errors */ -H5E_SEEKERROR_g= -H5E_READERROR_g= -H5E_WRITEERROR_g= -H5E_CLOSEERROR_g= -H5E_OVERFLOW_g= -H5E_FCNTL_g= - -/* Free space errors */ -H5E_CANTMERGE_g= -H5E_CANTREVIVE_g= -H5E_CANTSHRINK_g= - -/* System level errors */ -H5E_SYSERRSTR_g= - /* Datatype conversion errors */ H5E_CANTCONVERT_g= -H5E_BADSIZE_g= - -/* Argument errors */ -H5E_UNINITIALIZED_g= -H5E_UNSUPPORTED_g= -H5E_BADTYPE_g= -H5E_BADRANGE_g= -H5E_BADVALUE_g= (-1); +H5E_BADSIZE_g= (-1); #endif /* H5Eterm_H */ diff --git a/src/H5FDros3.c b/src/H5FDros3.c index f167ca0..3deca7c 100644 --- a/src/H5FDros3.c +++ b/src/H5FDros3.c @@ -242,7 +242,6 @@ static const H5FD_class_t H5FD_ros3_g = { "ros3", /* name */ MAXADDR, /* maxaddr */ H5F_CLOSE_WEAK, /* fc_degree */ - H5FD_ros3_term, /* terminate */ NULL, /* sb_size */ NULL, /* sb_encode */ NULL, /* sb_decode */ diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c index f08e9d5..c729821 100644 --- a/src/H5FDs3comms.c +++ b/src/H5FDs3comms.c @@ -67,7 +67,6 @@ */ #define S3COMMS_MAX_RANGE_STRING_SIZE 128 - /******************/ /* Local Typedefs */ /******************/ @@ -81,9 +80,9 @@ * pointer to data region and record of bytes written (offset) */ struct s3r_datastruct { - unsigned long magic; - char *data; - size_t size; + unsigned long magic; + char *data; + size_t size; }; #define S3COMMS_CALLBACK_DATASTRUCT_MAGIC 0x28c2b2ul @@ -91,10 +90,7 @@ struct s3r_datastruct { /* Local Prototypes */ /********************/ -size_t curlwritecallback(char *ptr, - size_t size, - size_t nmemb, - void *userdata); +size_t curlwritecallback(char *ptr, size_t size, size_t nmemb, void *userdata); herr_t H5FD_s3comms_s3r_getsize(s3r_t *handle); @@ -114,43 +110,32 @@ herr_t H5FD_s3comms_s3r_getsize(s3r_t *handle); /* Functions */ /*************/ - /*---------------------------------------------------------------------------- - * * Function: curlwritecallback() * * Purpose: - * * Function called by CURL to write received data. - * * Writes bytes to `userdata`. - * * Internally manages number of bytes processed. * * Return: - * * - Number of bytes processed. * - Should equal number of bytes passed to callback. * - Failure will result in curl error: CURLE_WRITE_ERROR. * * Programmer: Jacob Smith * 2017-08-17 - * *---------------------------------------------------------------------------- */ size_t -curlwritecallback(char *ptr, - size_t size, - size_t nmemb, - void *userdata) +curlwritecallback(char *ptr, size_t size, size_t nmemb, void *userdata) { - struct s3r_datastruct *sds = (struct s3r_datastruct *)userdata; - size_t product = (size * nmemb); - size_t written = 0; + struct s3r_datastruct *sds = (struct s3r_datastruct*) userdata; + size_t product = (size * nmemb); + size_t written = 0; - if (sds->magic != S3COMMS_CALLBACK_DATASTRUCT_MAGIC) { + if (sds->magic != S3COMMS_CALLBACK_DATASTRUCT_MAGIC) return written; - } if (size > 0) { HDmemcpy(&(sds->data[sds->size]), ptr, product); @@ -159,18 +144,13 @@ curlwritecallback(char *ptr, } return written; - } /* end curlwritecallback() */ - /*---------------------------------------------------------------------------- - * * Function: H5FD_s3comms_hrb_node_set() * * Purpose: - * * Create, insert, modify, and remove elements in a field node list. - * * `name` cannot be null; will return FAIL and list will be unaltered. * * Entries are accessed via the lowercase representation of their name: @@ -182,7 +162,6 @@ curlwritecallback(char *ptr, * - NULL, if list is empty * * Types of operations: - * * - CREATE * - If `L` is NULL and `name` and `value` are not NULL, * a new node is created at `L`, starting a list. @@ -203,7 +182,6 @@ curlwritecallback(char *ptr, * alphabetically by lowercase name. * * Return: - * * - SUCCESS: `SUCCEED` * - List was successfully modified * - FAILURE: `FAIL` @@ -213,25 +191,21 @@ curlwritecallback(char *ptr, * * Programmer: Jacob Smith * 2017-09-22 - * *---------------------------------------------------------------------------- */ herr_t -H5FD_s3comms_hrb_node_set( - hrb_node_t **L, - const char *name, - const char *value) +H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value) { - size_t i = 0; - char *valuecpy = NULL; - char *namecpy = NULL; - size_t namelen = 0; - char *lowername = NULL; - char *nvcat = NULL; - hrb_node_t *node_ptr = NULL; - hrb_node_t *new_node = NULL; + size_t i = 0; + char *valuecpy = NULL; + char *namecpy = NULL; + size_t namelen = 0; + char *lowername = NULL; + char *nvcat = NULL; + hrb_node_t *node_ptr = NULL; + hrb_node_t *new_node = NULL; hbool_t is_looking = TRUE; - herr_t ret_value = SUCCEED; + herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -248,89 +222,77 @@ H5FD_s3comms_hrb_node_set( node_ptr = NULL; #endif - if (name == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to operate on null name.\n"); - } + if (name == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to operate on null name.\n"); + namelen = HDstrlen(name); /*********************** * PREPARE ALL STRINGS * **********************/ - /* copy and lowercase name - */ - lowername = (char *)H5MM_malloc(sizeof(char) * (namelen + 1)); - if (lowername == NULL) { - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "cannot make space for lowercase name copy.\n"); - } - for (i = 0; i < namelen; i++) { - lowername[i] = (char)tolower((int)name[i]); - } + /* copy and lowercase name */ + lowername = (char*) H5MM_malloc(sizeof(char) * (namelen + 1)); + if (lowername == NULL) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot make space for lowercase name copy.\n"); + + for (i = 0; i < namelen; i++) + lowername[i] = (char) tolower((int) name[i]); + lowername[namelen] = 0; /* If value supplied, copy name, value, and concatenated "name: value". - * If NULL, we will be removing a node or doing nothing, so no need for - * copies + * If NULL, we will be removing a node or doing nothing, so no need for copies */ if (value != NULL) { - int ret = 0; + int ret = 0; size_t valuelen = HDstrlen(value); - size_t catlen = namelen + valuelen + 2; /* +2 from ": " */ + size_t catlen = namelen + valuelen + 2; /* +2 from ": " */ size_t catwrite = catlen + 3; /* 3 not 1 to quiet compiler warning */ + namecpy = (char*) H5MM_malloc(sizeof(char) * (namelen + 1)); + if (namecpy == NULL) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot make space for name copy.\n"); - namecpy = (char *)H5MM_malloc(sizeof(char) * (namelen + 1)); - if (namecpy == NULL) { - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "cannot make space for name copy.\n"); - } HDmemcpy(namecpy, name, (namelen + 1)); - valuecpy = (char *)H5MM_malloc(sizeof(char) * (valuelen + 1)); - if (valuecpy == NULL) { - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "cannot make space for value copy.\n"); - } + valuecpy = (char*) H5MM_malloc(sizeof(char) * (valuelen + 1)); + if (valuecpy == NULL) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot make space for value copy.\n"); + HDmemcpy(valuecpy, value, (valuelen + 1)); - nvcat = (char *)H5MM_malloc(sizeof(char) * catwrite); - if (nvcat == NULL) { - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "cannot make space for concatenated string.\n"); - } + nvcat = (char*) H5MM_malloc(sizeof(char) * catwrite); + if (nvcat == NULL) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot make space for concatenated string.\n"); + ret = HDsnprintf(nvcat, catwrite, "%s: %s", name, value); - if (ret < 0 || (size_t)ret > catlen) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "cannot concatenate `%s: %s", name, value); - } - HDassert( catlen == HDstrlen(nvcat) ); + if (ret < 0 || (size_t) ret > catlen) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot concatenate `%s: %s", name, value); - /* create new_node, should we need it - */ - new_node = (hrb_node_t *)H5MM_malloc(sizeof(hrb_node_t)); - if (new_node == NULL) { - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "cannot make space for new set.\n"); - } + HDassert(catlen == HDstrlen(nvcat)); + + /* create new_node, should we need it */ + new_node = (hrb_node_t*) H5MM_malloc(sizeof(hrb_node_t)); + if (new_node == NULL) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot make space for new set.\n"); - new_node->magic = S3COMMS_HRB_NODE_MAGIC; - new_node->name = NULL; - new_node->value = NULL; - new_node->cat = NULL; + + new_node->magic = S3COMMS_HRB_NODE_MAGIC; + new_node->name = NULL; + new_node->value = NULL; + new_node->cat = NULL; new_node->lowername = NULL; - new_node->next = NULL; + new_node->next = NULL; } /*************** * ACT ON LIST * ***************/ - if (*L == NULL) { + if (*L == NULL) { if (value == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "trying to remove node from empty list"); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove node from empty list"); } else { #if S3COMMS_DEBUG @@ -340,26 +302,23 @@ HDprintf("CREATE NEW\n"); fflush(stdout); * CREATE NEW LIST * *******************/ - new_node->cat = nvcat; - new_node->name = namecpy; + new_node->cat = nvcat; + new_node->name = namecpy; new_node->lowername = lowername; - new_node->value = valuecpy; + new_node->value = valuecpy; *L = new_node; goto done; /* bypass further seeking */ } } - /* sanity-check pointer passed in - */ - HDassert( (*L) != NULL ); - HDassert( (*L)->magic == S3COMMS_HRB_NODE_MAGIC ); + /* sanity-check pointer passed in */ + HDassert((*L) != NULL); + HDassert((*L)->magic == S3COMMS_HRB_NODE_MAGIC); node_ptr = (*L); - /* Check whether to modify/remove first node in list - */ + /* Check whether to modify/remove first node in list */ if (strcmp(lowername, node_ptr->lowername) == 0) { - is_looking = FALSE; if (value == NULL) { @@ -369,7 +328,6 @@ HDprintf("REMOVE HEAD\n"); fflush(stdout); /*************** * REMOVE HEAD * ***************/ - *L = node_ptr->next; #if S3COMMS_DEBUG @@ -393,7 +351,7 @@ HDprintf("MAGIC OK? %s\n", (node_ptr->magic == S3COMMS_HRB_NODE_MAGIC) ? "YES" : "NO"); fflush(stdout); #endif - HDassert( node_ptr->magic == S3COMMS_HRB_NODE_MAGIC ); + HDassert(node_ptr->magic == S3COMMS_HRB_NODE_MAGIC); node_ptr->magic += 1ul; #if S3COMMS_DEBUG HDprintf("FREEING POINTER\n"); fflush(stdout); @@ -403,7 +361,8 @@ HDprintf("FREEING POINTER\n"); fflush(stdout); #if S3COMMS_DEBUG HDprintf("FREEING WORKING LOWERNAME\n"); fflush(stdout); #endif - H5MM_xfree(lowername); lowername = NULL; + H5MM_xfree(lowername); + lowername = NULL; } else { #if S3COMMS_DEBUG @@ -425,17 +384,14 @@ HDprintf("MODIFY HEAD\n"); fflush(stdout); lowername = NULL; new_node->magic += 1ul; H5MM_xfree(new_node); - new_node = NULL; + new_node = NULL; } } - else - if (strcmp(lowername, node_ptr->lowername) < 0) { - + else if (strcmp(lowername, node_ptr->lowername) < 0) { is_looking = FALSE; if (value == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "trying to remove a node 'before' head"); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove a node 'before' head"); } else { #if S3COMMS_DEBUG @@ -444,12 +400,11 @@ HDprintf("PREPEND NEW HEAD\n"); fflush(stdout); /******************* * INSERT NEW HEAD * *******************/ - - new_node->name = namecpy; - new_node->value = valuecpy; + new_node->name = namecpy; + new_node->value = valuecpy; new_node->lowername = lowername; - new_node->cat = nvcat; - new_node->next = node_ptr; + new_node->cat = nvcat; + new_node->next = node_ptr; *L = new_node; } } @@ -457,15 +412,13 @@ HDprintf("PREPEND NEW HEAD\n"); fflush(stdout); /*************** * SEARCH LIST * ***************/ - while (is_looking) { if (node_ptr->next == NULL) { is_looking = FALSE; if (value == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "trying to remove absent node"); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node"); } else { #if S3COMMS_DEBUG @@ -474,23 +427,19 @@ HDprintf("APPEND A NODE\n"); fflush(stdout); /******************* * APPEND NEW NODE * *******************/ - - HDassert( strcmp(lowername, node_ptr->lowername) > 0 ); - new_node->name = namecpy; - new_node->value = valuecpy; + HDassert(strcmp(lowername, node_ptr->lowername) > 0); + new_node->name = namecpy; + new_node->value = valuecpy; new_node->lowername = lowername; - new_node->cat = nvcat; - node_ptr->next = new_node; + new_node->cat = nvcat; + node_ptr->next = new_node; } } - else - if (strcmp(lowername, node_ptr->next->lowername) < 0) { - + else if (strcmp(lowername, node_ptr->next->lowername) < 0) { is_looking = FALSE; if (value == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "trying to remove absent node"); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node"); } else { #if S3COMMS_DEBUG @@ -499,26 +448,22 @@ HDprintf("INSERT A NODE\n"); fflush(stdout); /******************* * INSERT NEW NODE * *******************/ - - HDassert( strcmp(lowername, node_ptr->lowername) > 0 ); - new_node->name = namecpy; - new_node->value = valuecpy; + HDassert(strcmp(lowername, node_ptr->lowername) > 0); + new_node->name = namecpy; + new_node->value = valuecpy; new_node->lowername = lowername; - new_node->cat = nvcat; - new_node->next = node_ptr->next; - node_ptr->next = new_node; + new_node->cat = nvcat; + new_node->next = node_ptr->next; + node_ptr->next = new_node; } } - else - if (strcmp(lowername, node_ptr->next->lowername) == 0) { - + else if (strcmp(lowername, node_ptr->next->lowername) == 0) { is_looking = FALSE; if (value == NULL) { /***************** - * REMOVE A NODE * - *****************/ - + * REMOVE A NODE * + *****************/ hrb_node_t *tmp = node_ptr->next; node_ptr->next = tmp->next; @@ -530,7 +475,7 @@ HDprintf("REMOVE A NODE\n"); fflush(stdout); H5MM_xfree(tmp->name); H5MM_xfree(tmp->value); - HDassert( tmp->magic == S3COMMS_HRB_NODE_MAGIC ); + HDassert(tmp->magic == S3COMMS_HRB_NODE_MAGIC); tmp->magic += 1ul; H5MM_xfree(tmp); @@ -544,43 +489,48 @@ HDprintf("MODIFY A NODE\n"); fflush(stdout); /***************** * MODIFY A NODE * *****************/ - node_ptr = node_ptr->next; H5MM_xfree(node_ptr->name); H5MM_xfree(node_ptr->value); H5MM_xfree(node_ptr->cat); - HDassert( new_node->magic == S3COMMS_HRB_NODE_MAGIC ); + HDassert(new_node->magic == S3COMMS_HRB_NODE_MAGIC); new_node->magic += 1ul; H5MM_xfree(new_node); H5MM_xfree(lowername); - new_node = NULL; + new_node = NULL; lowername = NULL; - node_ptr->name = namecpy; + node_ptr->name = namecpy; node_ptr->value = valuecpy; - node_ptr->cat = nvcat; + node_ptr->cat = nvcat; } } else { /**************** * KEEP LOOKING * ****************/ - - node_ptr = node_ptr->next; + node_ptr = node_ptr->next; } } /* end while is_looking */ done: if (ret_value == FAIL) { - /* clean up - */ - if (nvcat != NULL) { H5MM_xfree(nvcat); } - if (namecpy != NULL) { H5MM_xfree(namecpy); } - if (lowername != NULL) { H5MM_xfree(lowername); } - if (valuecpy != NULL) { H5MM_xfree(valuecpy); } - if (new_node != NULL) { - HDassert( new_node->magic == S3COMMS_HRB_NODE_MAGIC ); + /* clean up */ + if (nvcat != NULL) + H5MM_xfree(nvcat); + + if (namecpy != NULL) + H5MM_xfree(namecpy); + + if (lowername != NULL) + H5MM_xfree(lowername); + + if (valuecpy != NULL) + H5MM_xfree(valuecpy); + + if (new_node != NULL) { + HDassert(new_node->magic == S3COMMS_HRB_NODE_MAGIC); new_node->magic += 1ul; H5MM_xfree(new_node); } @@ -589,13 +539,10 @@ done: FUNC_LEAVE_NOAPI(ret_value); } /* end H5FD_s3comms_hrb_node_set() */ - /*---------------------------------------------------------------------------- - * * Function: H5FD_s3comms_hrb_destroy() * * Purpose: - * * Destroy and free resources _directly_ associated with an HTTP Buffer. * * Takes a pointer to pointer to the buffer structure. @@ -604,7 +551,6 @@ done: * If buffer or buffer pointer is NULL, there is no effect. * * Headers list at `first_header` is not touched. - * * - Programmer should re-use or destroy `first_header` pointer * (hrb_node_t *) as suits their purposes. * - Recommend fetching prior to destroy() @@ -614,7 +560,6 @@ done: * - Failure to account for this will result in a memory leak. * * Return: - * * - SUCCESS: `SUCCEED` * - successfully released buffer resources * - if `buf` is NULL or `*buf` is NULL, no effect @@ -623,14 +568,13 @@ done: * * Programmer: Jacob Smith * 2017-07-21 - * *---------------------------------------------------------------------------- */ herr_t H5FD_s3comms_hrb_destroy(hrb_t **_buf) { - hrb_t *buf = NULL; - herr_t ret_value = SUCCEED; + hrb_t *buf = NULL; + herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -641,8 +585,7 @@ H5FD_s3comms_hrb_destroy(hrb_t **_buf) if (_buf != NULL && *_buf != NULL) { buf = *_buf; if (buf->magic != S3COMMS_HRB_MAGIC) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "pointer's magic does not match.\n"); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "pointer's magic does not match.\n"); } H5MM_xfree(buf->verb); @@ -657,13 +600,10 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD_s3comms_hrb_destroy() */ - /*---------------------------------------------------------------------------- - * * Function: H5FD_s3comms_hrb_init_request() * * Purpose: - * * Create a new HTTP Request Buffer * * All non-null arguments should be null-terminated strings. @@ -671,35 +611,30 @@ done: * If `verb` is NULL, defaults to "GET". * If `http_version` is NULL, defaults to "HTTP/1.1". * - * `resource` cannot be NULL; should be string beginning with slash - * character ('/'). + * `resource` cannot be NULL; should be string beginning with slash character ('/'). * * All strings are copied into the structure, making them safe from * modification in source strings. * * Return: - * * - SUCCESS: pointer to new `hrb_t` * - FAILURE: `NULL` * * Programmer: Jacob Smith * 2017-07-21 - * *---------------------------------------------------------------------------- */ -hrb_t * -H5FD_s3comms_hrb_init_request(const char *_verb, - const char *_resource, - const char *_http_version) +hrb_t* +H5FD_s3comms_hrb_init_request(const char *_verb, const char *_resource, const char *_http_version) { - hrb_t *request = NULL; - char *res = NULL; - size_t reslen = 0; - hrb_t *ret_value = NULL; - char *verb = NULL; - size_t verblen = 0; - char *vrsn = NULL; - size_t vrsnlen = 0; + hrb_t *request = NULL; + char *res = NULL; + size_t reslen = 0; + hrb_t *ret_value = NULL; + char *verb = NULL; + size_t verblen = 0; + char *vrsn = NULL; + size_t vrsnlen = 0; FUNC_ENTER_NOAPI_NOINIT @@ -707,122 +642,102 @@ H5FD_s3comms_hrb_init_request(const char *_verb, HDfprintf(stdout, "called H5FD_s3comms_hrb_init_request.\n"); #endif - if (_resource == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, - "resource string cannot be null.\n"); - } + if (_resource == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "resource string cannot be null.\n"); - /* populate valid NULLs with defaults - */ - if (_verb == NULL) { + /* populate valid NULLs with defaults */ + if (_verb == NULL) _verb = "GET"; - } - if (_http_version == NULL) { + if (_http_version == NULL) _http_version = "HTTP/1.1"; - } - - /* malloc space for and prepare structure - */ - request = (hrb_t *)H5MM_malloc(sizeof(hrb_t)); - if (request == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, - "no space for request structure"); - } - request->magic = S3COMMS_HRB_MAGIC; - request->body = NULL; - request->body_len = 0; - request->first_header = NULL; + /* malloc space for and prepare structure */ + request = (hrb_t*) H5MM_malloc(sizeof(hrb_t)); + if (request == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, "no space for request structure"); + request->magic = S3COMMS_HRB_MAGIC; + request->body = NULL; + request->body_len = 0; + request->first_header = NULL; /* malloc and copy strings for the structure - */ + */ reslen = HDstrlen(_resource); if (_resource[0] == '/') { - res = (char *)H5MM_malloc(sizeof(char) * (reslen+1)); - if (res == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, - "no space for resource string"); - } - HDmemcpy(res, _resource, (reslen+1)); + res = (char*) H5MM_malloc(sizeof(char) * (reslen + 1)); + if (res == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, "no space for resource string"); + + HDmemcpy(res, _resource, (reslen + 1)); } else { - res = (char *)H5MM_malloc(sizeof(char) * (reslen+2)); - if (res == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, - "no space for resource string"); - } + res = (char*) H5MM_malloc(sizeof(char) * (reslen + 2)); + if (res == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, "no space for resource string"); + *res = '/'; - HDmemcpy((&res[1]), _resource, (reslen+1)); - HDassert( (reslen+1) == HDstrlen(res) ); + HDmemcpy((&res[1]), _resource, (reslen + 1)); + HDassert((reslen+1) == HDstrlen(res)); } /* end if (else resource string not starting with '/') */ verblen = HDstrlen(_verb) + 1; - verb = (char *)H5MM_malloc(sizeof(char) * verblen); - if (verb == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, - "no space for verb string"); - } + verb = (char*) H5MM_malloc(sizeof(char) * verblen); + if (verb == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "no space for verb string"); + HDstrncpy(verb, _verb, verblen); vrsnlen = HDstrlen(_http_version) + 1; - vrsn = (char *)H5MM_malloc(sizeof(char) * vrsnlen); - if (vrsn == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, - "no space for http-version string"); - } - HDstrncpy(vrsn, _http_version, vrsnlen); - + vrsn = (char*) H5MM_malloc(sizeof(char) * vrsnlen); + if (vrsn == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "no space for http-version string"); + HDstrncpy(vrsn, _http_version, vrsnlen); - /* place new copies into structure - */ + /* place new copies into structure */ request->resource = res; - request->verb = verb; - request->version = vrsn; + request->verb = verb; + request->version = vrsn; ret_value = request; done: - /* if there is an error, clean up after ourselves - */ + /* if there is an error, clean up after ourselves */ if (ret_value == NULL) { - if (request != NULL) H5MM_xfree(request); - if (vrsn != NULL) H5MM_xfree(vrsn); - if (verb != NULL) H5MM_xfree(verb); - if (res != NULL) H5MM_xfree(res); + if (request != NULL) + H5MM_xfree(request); + if (vrsn != NULL) + H5MM_xfree(vrsn); + if (verb != NULL) + H5MM_xfree(verb); + if (res != NULL) + H5MM_xfree(res); } FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD_s3comms_hrb_init_request() */ - /**************************************************************************** * S3R FUNCTIONS ****************************************************************************/ - /*---------------------------------------------------------------------------- - * * Function: H5FD_s3comms_s3r_close() * * Purpose: - * * Close communications through given S3 Request Handle (`s3r_t`) * and clean up associated resources. * * Return: - * * - SUCCESS: `SUCCEED` * - FAILURE: `FAIL` * - fails if handle is null or has invalid magic number * - * * Programmer: Jacob Smith * 2017-08-31 - * *---------------------------------------------------------------------------- */ herr_t @@ -836,14 +751,11 @@ H5FD_s3comms_s3r_close(s3r_t *handle) HDfprintf(stdout, "called H5FD_s3comms_s3r_close.\n"); #endif - if (handle == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "handle cannot be null.\n"); - } - if (handle->magic != S3COMMS_S3R_MAGIC) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "handle has invalid magic.\n"); - } + if (handle == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle cannot be null.\n"); + + if (handle->magic != S3COMMS_S3R_MAGIC) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has invalid magic.\n"); curl_easy_cleanup(handle->curlhandle); @@ -851,13 +763,11 @@ H5FD_s3comms_s3r_close(s3r_t *handle) H5MM_xfree(handle->region); H5MM_xfree(handle->signing_key); - HDassert( handle->httpverb != NULL ); + HDassert(handle->httpverb != NULL); H5MM_xfree(handle->httpverb); - if (FAIL == H5FD_s3comms_free_purl(handle->purl)) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to release parsed url structure") - } + if (FAIL == H5FD_s3comms_free_purl(handle->purl)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to release parsed url structure") H5MM_xfree(handle); @@ -865,25 +775,19 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5FD_s3comms_s3r_close */ - /*---------------------------------------------------------------------------- - * * Function: H5FD_s3comms_s3r_get_filesize() * * Purpose: - * * Retrieve the filesize of an open request handle. * * Wrapper "getter" to hide implementation details. * - * * Return: - * * - SUCCESS: size of file, in bytes, if handle is valid. * - FAILURE: 0, if handle is NULL or undefined. * * Programmer: Jacob Smith 2017-01-14 - * *---------------------------------------------------------------------------- */ size_t @@ -893,20 +797,16 @@ H5FD_s3comms_s3r_get_filesize(s3r_t *handle) FUNC_ENTER_NOAPI_NOINIT_NOERR - if (handle != NULL) { + if (handle != NULL) ret_value = handle->filesize; - } FUNC_LEAVE_NOAPI(ret_value) } /* H5FD_s3comms_s3r_get_filesize */ - /*---------------------------------------------------------------------------- - * * Function: H5FD_s3comms_s3r_getsize() * * Purpose: - * * Get the number of bytes of handle's target resource. * * Sets handle and curlhandle with to enact an HTTP HEAD request on file, @@ -924,28 +824,25 @@ H5FD_s3comms_s3r_get_filesize(s3r_t *handle) * not to be trusted. * * Return: - * * - SUCCESS: `SUCCEED` * - FAILURE: `FAIL` * * Programmer: Jacob Smith * 2017-08-23 - * *---------------------------------------------------------------------------- */ herr_t H5FD_s3comms_s3r_getsize(s3r_t *handle) { - uintmax_t content_length = 0; - CURL *curlh = NULL; - char *end = NULL; - char *headerresponse = NULL; - struct s3r_datastruct sds = { - S3COMMS_CALLBACK_DATASTRUCT_MAGIC, - NULL, - 0 }; - char *start = NULL; - herr_t ret_value = SUCCEED; + uintmax_t content_length = 0; + CURL *curlh = NULL; + char *end = NULL; + char *headerresponse = NULL; + char *start = NULL; + herr_t ret_value = SUCCEED; + struct s3r_datastruct sds = { + S3COMMS_CALLBACK_DATASTRUCT_MAGIC, NULL, 0 + }; FUNC_ENTER_NOAPI_NOINIT @@ -953,18 +850,14 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle) HDfprintf(stdout, "called H5FD_s3comms_s3r_getsize.\n"); #endif - if (handle == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "handle cannot be null.\n"); - } - if (handle->magic != S3COMMS_S3R_MAGIC) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "handle has invalid magic.\n"); - } - if (handle->curlhandle == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "handle has bad (null) curlhandle.\n") - } + if (handle == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle cannot be null.\n"); + + if (handle->magic != S3COMMS_S3R_MAGIC) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has invalid magic.\n"); + + if (handle->curlhandle == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has bad (null) curlhandle.\n") /******************** * PREPARE FOR HEAD * @@ -972,39 +865,25 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle) curlh = handle->curlhandle; - if ( CURLE_OK != - curl_easy_setopt(curlh, - CURLOPT_NOBODY, - 1L) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "error while setting CURL option (CURLOPT_NOBODY). " - "(placeholder flags)"); - } + if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_NOBODY, 1L)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while setting CURL option (CURLOPT_NOBODY). " + "(placeholder flags)"); - if ( CURLE_OK != - curl_easy_setopt(curlh, - CURLOPT_HEADERDATA, - &sds) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "error while setting CURL option (CURLOPT_HEADERDATA). " - "(placeholder flags)"); - } + if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_HEADERDATA, &sds)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while setting CURL option (CURLOPT_HEADERDATA). " + "(placeholder flags)"); + + HDassert(handle->httpverb == NULL); + handle->httpverb = (char*) H5MM_malloc(sizeof(char) * 16); + if (handle->httpverb == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "unable to allocate space for S3 request HTTP verb"); - HDassert( handle->httpverb == NULL ); - handle->httpverb = (char *)H5MM_malloc(sizeof(char) * 16); - if (handle->httpverb == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, - "unable to allocate space for S3 request HTTP verb"); - } HDmemcpy(handle->httpverb, "HEAD", 5); - headerresponse = (char *)H5MM_malloc(sizeof(char) * CURL_MAX_HTTP_HEADER); - if (headerresponse == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, - "unable to allocate space for curl header response"); - } + headerresponse = (char*) H5MM_malloc(sizeof(char) * CURL_MAX_HTTP_HEADER); + if (headerresponse == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "unable to allocate space for curl header response"); + sds.data = headerresponse; /******************* @@ -1015,109 +894,75 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle) * but, with a NULL destination and NOBODY and HEADERDATA supplied above, * only http metadata will be sent by server and recorded by s3comms */ - if (FAIL == - H5FD_s3comms_s3r_read(handle, 0, 0, NULL) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "problem in reading during getsize.\n"); - } + if (FAIL == H5FD_s3comms_s3r_read(handle, 0, 0, NULL)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem in reading during getsize.\n"); if (sds.size > CURL_MAX_HTTP_HEADER) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "HTTP metadata buffer overrun\n"); - } else if (sds.size == 0) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "No HTTP metadata\n"); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "HTTP metadata buffer overrun\n"); + } + else if (sds.size == 0) { + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "No HTTP metadata\n"); #if S3COMMS_DEBUG - } else { + } + else { HDfprintf(stderr, "GETSIZE: OK\n"); #endif } - /****************** * PARSE RESPONSE * ******************/ - start = strstr(headerresponse, - "\r\nContent-Length: "); - if (start == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "could not find \"Content-Length\" in response.\n"); - } + start = strstr(headerresponse, "\r\nContent-Length: "); + if (start == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not find \"Content-Length\" in response.\n"); /* move "start" to beginning of value in line; find end of line - */ + */ start = start + HDstrlen("\r\nContent-Length: "); end = strstr(start, "\r\n"); - if (end == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "could not find end of content length line"); - } + if (end == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not find end of content length line"); - /* place null terminator at end of numbers - */ + /* place null terminator at end of numbers */ *end = '\0'; - content_length = strtoumax((const char *)start, - NULL, - 0); + content_length = strtoumax((const char*) start, NULL, 0); - if (UINTMAX_MAX > SIZE_MAX && content_length > SIZE_MAX) { + if (UINTMAX_MAX > SIZE_MAX && content_length > SIZE_MAX) HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "content_length overflows size_t\n"); - } - if (content_length == 0 || - errno == ERANGE) /* errno set by strtoumax*/ - { + if (content_length == 0 || errno == ERANGE) /* errno set by strtoumax*/ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "could not convert found \"Content-Length\" response (\"%s\")", - start); /* range is null-terminated, remember */ - } + "could not convert found \"Content-Length\" response (\"%s\")", start); /* range is null-terminated, remember */ - handle->filesize = (size_t)content_length; + handle->filesize = (size_t) content_length; /********************** - * UNDO HEAD SETTINGS * - **********************/ + * UNDO HEAD SETTINGS * + **********************/ - if ( CURLE_OK != - curl_easy_setopt(curlh, - CURLOPT_NOBODY, - NULL) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "error while setting CURL option (CURLOPT_NOBODY). " - "(placeholder flags)"); + if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_NOBODY, NULL)) { + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while setting CURL option (CURLOPT_NOBODY). " + "(placeholder flags)"); } - if ( CURLE_OK != - curl_easy_setopt(curlh, - CURLOPT_HEADERDATA, - NULL) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "error while setting CURL option (CURLOPT_HEADERDATA). " - "(placeholder flags)"); - } + if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_HEADERDATA, NULL)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while setting CURL option (CURLOPT_HEADERDATA). " + "(placeholder flags)"); done: H5MM_xfree(headerresponse); sds.magic += 1; /* set to bad magic */ FUNC_LEAVE_NOAPI(ret_value); - } /* H5FD_s3comms_s3r_getsize */ - /*---------------------------------------------------------------------------- - * * Function: H5FD_s3comms_s3r_open() * * Purpose: - * * Logically 'open' a file hosted on S3. - * * - create new Request Handle * - copy supplied url * - copy authentication info if supplied @@ -1134,7 +979,6 @@ done: * Uses `H5FD_s3comms_parse_url()` to validate and parse url input. * * Return: - * * - SUCCESS: Pointer to new request handle. * - FAILURE: NULL * - occurs if: @@ -1146,20 +990,16 @@ done: * * Programmer: Jacob Smith * 2017-09-01 - * *---------------------------------------------------------------------------- */ -s3r_t * -H5FD_s3comms_s3r_open(const char *url, - const char *region, - const char *id, - const unsigned char *signing_key) +s3r_t* +H5FD_s3comms_s3r_open(const char *url, const char *region, const char *id, const unsigned char *signing_key) { - size_t tmplen = 0; - CURL *curlh = NULL; - s3r_t *handle = NULL; - parsed_url_t *purl = NULL; - s3r_t *ret_value = NULL; + size_t tmplen = 0; + CURL *curlh = NULL; + s3r_t *handle = NULL; + parsed_url_t *purl = NULL; + s3r_t *ret_value = NULL; FUNC_ENTER_NOAPI_NOINIT @@ -1167,83 +1007,65 @@ H5FD_s3comms_s3r_open(const char *url, HDfprintf(stdout, "called H5FD_s3comms_s3r_open.\n"); #endif + if (url == NULL || url[0] == '\0') + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "url cannot be null.\n"); + /* probably a malformed url, but could be internal error */ + if (FAIL == H5FD_s3comms_parse_url(url, &purl)) + HGOTO_ERROR(H5E_ARGS, H5E_CANTCREATE, NULL, "unable to create parsed url structure"); - if (url == NULL || url[0] == '\0') { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, - "url cannot be null.\n"); - } - - if (FAIL == H5FD_s3comms_parse_url(url, &purl)) { - /* probably a malformed url, but could be internal error */ - HGOTO_ERROR(H5E_ARGS, H5E_CANTCREATE, NULL, - "unable to create parsed url structure"); - } - HDassert( purl != NULL ); /* if above passes, this must be true */ - HDassert( purl->magic == S3COMMS_PARSED_URL_MAGIC ); + HDassert(purl != NULL); /* if above passes, this must be true */ + HDassert(purl->magic == S3COMMS_PARSED_URL_MAGIC); - handle = (s3r_t *)H5MM_malloc(sizeof(s3r_t)); - if (handle == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, - "could not malloc space for handle.\n"); - } + handle = (s3r_t*) H5MM_malloc(sizeof(s3r_t)); + if (handle == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, "could not malloc space for handle.\n"); - handle->magic = S3COMMS_S3R_MAGIC; - handle->purl = purl; - handle->filesize = 0; - handle->region = NULL; - handle->secret_id = NULL; - handle->signing_key = NULL; - handle->httpverb = NULL; + handle->magic = S3COMMS_S3R_MAGIC; + handle->purl = purl; + handle->filesize = 0; + handle->region = NULL; + handle->secret_id = NULL; + handle->signing_key = NULL; + handle->httpverb = NULL; /************************************* * RECORD AUTHENTICATION INFORMATION * *************************************/ - if ((region != NULL && *region != '\0') || - (id != NULL && *id != '\0') || - (signing_key != NULL && *signing_key != '\0')) - { - /* if one exists, all three must exist - */ - if (region == NULL || region[0] == '\0') { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, - "region cannot be null.\n"); - } - if (id == NULL || id[0] == '\0') { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, - "secret id cannot be null.\n"); - } - if (signing_key == NULL || signing_key[0] == '\0') { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, - "signing key cannot be null.\n"); - } + if ((region != NULL && *region != '\0') || + (id != NULL && *id != '\0') || + (signing_key != NULL && *signing_key != '\0')) { + /* if one exists, all three must exist */ + if (region == NULL || region[0] == '\0') + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "region cannot be null.\n"); - /* copy strings - */ + if (id == NULL || id[0] == '\0') + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "secret id cannot be null.\n"); + + if (signing_key == NULL || signing_key[0] == '\0') + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "signing key cannot be null.\n"); + + /* copy strings */ tmplen = HDstrlen(region) + 1; - handle->region = (char *)H5MM_malloc(sizeof(char) * tmplen); - if (handle->region == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, - "could not malloc space for handle region copy.\n"); - } + handle->region = (char*) H5MM_malloc(sizeof(char) * tmplen); + if (handle->region == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "could not malloc space for handle region copy.\n"); + HDmemcpy(handle->region, region, tmplen); tmplen = HDstrlen(id) + 1; - handle->secret_id = (char *)H5MM_malloc(sizeof(char) * tmplen); - if (handle->secret_id == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, - "could not malloc space for handle ID copy.\n"); - } + handle->secret_id = (char*) H5MM_malloc(sizeof(char) * tmplen); + if (handle->secret_id == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "could not malloc space for handle ID copy.\n"); + HDmemcpy(handle->secret_id, id, tmplen); tmplen = SHA256_DIGEST_LENGTH; - handle->signing_key = - (unsigned char *)H5MM_malloc(sizeof(unsigned char) * tmplen); - if (handle->signing_key == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, - "could not malloc space for handle key copy.\n"); - } + handle->signing_key = (unsigned char*) H5MM_malloc(sizeof(unsigned char) * tmplen); + if (handle->signing_key == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "could not malloc space for handle key copy.\n"); + HDmemcpy(handle->signing_key, signing_key, tmplen); } /* if authentication information provided */ @@ -1253,60 +1075,28 @@ H5FD_s3comms_s3r_open(const char *url, curlh = curl_easy_init(); - if (curlh == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, - "problem creating curl easy handle!\n"); - } + if (curlh == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "problem creating curl easy handle!\n"); - if ( CURLE_OK != - curl_easy_setopt(curlh, - CURLOPT_HTTPGET, - 1L) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, - "error while setting CURL option (CURLOPT_HTTPGET). " - "(placeholder flags)"); - } + if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_HTTPGET, 1L)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "error while setting CURL option (CURLOPT_HTTPGET). " + "(placeholder flags)"); - if ( CURLE_OK != - curl_easy_setopt(curlh, - CURLOPT_HTTP_VERSION, - CURL_HTTP_VERSION_1_1) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, - "error while setting CURL option (CURLOPT_HTTP_VERSION). " - "(placeholder flags)"); - } + if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "error while setting CURL option (CURLOPT_HTTP_VERSION). " + "(placeholder flags)"); - if ( CURLE_OK != - curl_easy_setopt(curlh, - CURLOPT_FAILONERROR, - 1L) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, - "error while setting CURL option (CURLOPT_FAILONERROR). " - "(placeholder flags)"); - } + if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_FAILONERROR, 1L)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "error while setting CURL option (CURLOPT_FAILONERROR). " + "(placeholder flags)"); - if ( CURLE_OK != - curl_easy_setopt(curlh, - CURLOPT_WRITEFUNCTION, - curlwritecallback) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, - "error while setting CURL option (CURLOPT_WRITEFUNCTION). " - "(placeholder flags)"); - } + if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_WRITEFUNCTION, curlwritecallback)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "error while setting CURL option (CURLOPT_WRITEFUNCTION). " + "(placeholder flags)"); - if ( CURLE_OK != - curl_easy_setopt(curlh, - CURLOPT_URL, - url) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, - "error while setting CURL option (CURLOPT_URL). " - "(placeholder flags)"); - } + if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_URL, url)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "error while setting CURL option (CURLOPT_URL). " + "(placeholder flags)"); #if S3COMMS_CURL_VERBOSITY > 1 /* CURL will print (to stdout) information for each operation @@ -1322,53 +1112,44 @@ H5FD_s3comms_s3r_open(const char *url, * GET FILE SIZE * *******************/ - if (FAIL == - H5FD_s3comms_s3r_getsize(handle) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, - "problem in H5FD_s3comms_s3r_getsize.\n"); - } + if (FAIL == H5FD_s3comms_s3r_getsize(handle)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "problem in H5FD_s3comms_s3r_getsize.\n"); /********************* * FINAL PREPARATION * *********************/ - HDassert( handle->httpverb != NULL ); + HDassert(handle->httpverb != NULL); HDmemcpy(handle->httpverb, "GET", 4); ret_value = handle; done: if (ret_value == NULL) { - if (curlh != NULL) { + if (curlh != NULL) curl_easy_cleanup(curlh); - } - if (FAIL == H5FD_s3comms_free_purl(purl)) { - HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, - "unable to free parsed url structure") - } + + if (FAIL == H5FD_s3comms_free_purl(purl)) + HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to free parsed url structure") + if (handle != NULL) { H5MM_xfree(handle->region); H5MM_xfree(handle->secret_id); H5MM_xfree(handle->signing_key); - if (handle->httpverb != NULL) { + if (handle->httpverb != NULL) H5MM_xfree(handle->httpverb); - } + H5MM_xfree(handle); } } FUNC_LEAVE_NOAPI(ret_value) - } /* H5FD_s3comms_s3r_open */ - /*---------------------------------------------------------------------------- - * * Function: H5FD_s3comms_s3r_read() * * Purpose: - * * Read file pointed to by request handle, writing specified * `offset` .. `offset + len` bytes to buffer `dest`. * @@ -1395,33 +1176,28 @@ done: * from server. * * Return: - * * - SUCCESS: `SUCCEED` * - FAILURE: `FAIL` * * Programmer: Jacob Smith * 2017-08-22 - * *---------------------------------------------------------------------------- */ herr_t -H5FD_s3comms_s3r_read(s3r_t *handle, - haddr_t offset, - size_t len, - void *dest) +H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest) { - CURL *curlh = NULL; - CURLcode p_status = CURLE_OK; - struct curl_slist *curlheaders = NULL; - hrb_node_t *headers = NULL; - hrb_node_t *node = NULL; - struct tm *now = NULL; - char *rangebytesstr = NULL; - hrb_t *request = NULL; - int ret = 0; /* working variable to check */ - /* return value of HDsnprintf */ - struct s3r_datastruct *sds = NULL; - herr_t ret_value = SUCCEED; + CURL *curlh = NULL; + CURLcode p_status = CURLE_OK; + struct curl_slist *curlheaders = NULL; + hrb_node_t *headers = NULL; + hrb_node_t *node = NULL; + struct tm *now = NULL; + char *rangebytesstr = NULL; + hrb_t *request = NULL; + int ret = 0; /* working variable to check */ + /* return value of HDsnprintf */ + struct s3r_datastruct *sds = NULL; + herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -1429,31 +1205,26 @@ H5FD_s3comms_s3r_read(s3r_t *handle, HDfprintf(stdout, "called H5FD_s3comms_s3r_read.\n"); #endif - /************************************** - * ABSOLUTELY NECESSARY SANITY-CHECKS * - **************************************/ +/************************************** + * ABSOLUTELY NECESSARY SANITY-CHECKS * + **************************************/ + + if (handle == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle cannot be null.\n"); + + if (handle->magic != S3COMMS_S3R_MAGIC) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has invalid magic.\n"); + + if (handle->curlhandle == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has bad (null) curlhandle.\n") + + if (handle->purl == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has bad (null) url.\n") + + HDassert(handle->purl->magic == S3COMMS_PARSED_URL_MAGIC); + if (offset > handle->filesize || (len + offset) > handle->filesize) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to read past EoF") - if (handle == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "handle cannot be null.\n"); - } - if (handle->magic != S3COMMS_S3R_MAGIC) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "handle has invalid magic.\n"); - } - if (handle->curlhandle == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "handle has bad (null) curlhandle.\n") - } - if (handle->purl == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "handle has bad (null) url.\n") - } - HDassert( handle->purl->magic == S3COMMS_PARSED_URL_MAGIC ); - if (offset > handle->filesize || (len + offset) > handle->filesize) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to read past EoF") - } curlh = handle->curlhandle; @@ -1462,25 +1233,17 @@ H5FD_s3comms_s3r_read(s3r_t *handle, *********************/ if (dest != NULL) { - sds = (struct s3r_datastruct *)H5MM_malloc( - sizeof(struct s3r_datastruct)); - if (sds == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, - "could not malloc destination datastructure.\n"); - } + sds = (struct s3r_datastruct*) H5MM_malloc(sizeof(struct s3r_datastruct)); + if (sds == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "could not malloc destination datastructure.\n"); + sds->magic = S3COMMS_CALLBACK_DATASTRUCT_MAGIC; - sds->data = (char *)dest; + sds->data = (char*) dest; sds->size = 0; - if (CURLE_OK != - curl_easy_setopt(curlh, - CURLOPT_WRITEDATA, - sds) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, - "error while setting CURL option (CURLOPT_WRITEDATA). " - "(placeholder flags)"); - } + if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_WRITEDATA, sds)) + HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, "error while setting CURL option (CURLOPT_WRITEDATA). " + "(placeholder flags)"); } /********************* @@ -1488,34 +1251,24 @@ H5FD_s3comms_s3r_read(s3r_t *handle, *********************/ if (len > 0) { - rangebytesstr = (char *)H5MM_malloc(sizeof(char) * \ - (S3COMMS_MAX_RANGE_STRING_SIZE+1) ); - if (rangebytesstr == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, - "could not malloc range format string.\n"); - } - ret = HDsnprintf(rangebytesstr, - (S3COMMS_MAX_RANGE_STRING_SIZE), - "bytes="H5_PRINTF_HADDR_FMT"-"H5_PRINTF_HADDR_FMT, - offset, - offset + len - 1); + rangebytesstr = (char*) H5MM_malloc(sizeof(char) * (S3COMMS_MAX_RANGE_STRING_SIZE + 1)); + if (rangebytesstr == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "could not malloc range format string.\n"); + + ret = HDsnprintf(rangebytesstr, (S3COMMS_MAX_RANGE_STRING_SIZE), + "bytes="H5_PRINTF_HADDR_FMT"-"H5_PRINTF_HADDR_FMT, offset, offset + len - 1); if (ret <= 0 || ret >= S3COMMS_MAX_RANGE_STRING_SIZE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to format HTTP Range value"); - } else if (offset > 0) { - rangebytesstr = (char *)H5MM_malloc(sizeof(char) * \ - (S3COMMS_MAX_RANGE_STRING_SIZE+1)); - if (rangebytesstr == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, - "could not malloc range format string.\n"); - } - ret = HDsnprintf(rangebytesstr, - (S3COMMS_MAX_RANGE_STRING_SIZE), - "bytes="H5_PRINTF_HADDR_FMT"-", - offset); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format HTTP Range value"); + } + else if (offset > 0) { + rangebytesstr = (char*) H5MM_malloc(sizeof(char) * (S3COMMS_MAX_RANGE_STRING_SIZE + 1)); + if (rangebytesstr == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "could not malloc range format string.\n"); + + ret = HDsnprintf(rangebytesstr, (S3COMMS_MAX_RANGE_STRING_SIZE), "bytes="H5_PRINTF_HADDR_FMT"-", + offset); if (ret <= 0 || ret >= S3COMMS_MAX_RANGE_STRING_SIZE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to format HTTP Range value"); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format HTTP Range value"); } /******************* @@ -1523,280 +1276,178 @@ H5FD_s3comms_s3r_read(s3r_t *handle, *******************/ if (handle->signing_key == NULL) { - /* Do not authenticate. - */ + /* Do not authenticate. */ if (rangebytesstr != NULL) { - /* Pass in range directly - */ + /* Pass in range directly */ char *bytesrange_ptr = NULL; /* pointer past "bytes=" portion */ bytesrange_ptr = strchr(rangebytesstr, '='); - HDassert( bytesrange_ptr != NULL ); + HDassert(bytesrange_ptr != NULL); bytesrange_ptr++; /* move to first char past '=' */ - HDassert( *bytesrange_ptr != '\0' ); + HDassert(*bytesrange_ptr != '\0'); - if (CURLE_OK != - curl_easy_setopt(curlh, - CURLOPT_RANGE, - bytesrange_ptr) ) - { + if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_RANGE, bytesrange_ptr)) HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "error while setting CURL option (CURLOPT_RANGE). "); - } } - } else { - /* authenticate request + } + else { + /* authenticate request */ + char authorization[512 + 1]; + /* 512 := approximate max length... + * 67 <len("AWS4-HMAC-SHA256 Credential=///s3/aws4_request," + * "SignedHeaders=,Signature=")> + * + 8 <yyyyMMDD> + * + 64 <hex(sha256())> + * + 128 <max? len(secret_id)> + * + 20 <max? len(region)> + * + 128 <max? len(signed_headers)> */ - char authorization[512+1]; - /* 512 := approximate max length... - * 67 <len("AWS4-HMAC-SHA256 Credential=///s3/aws4_request," - * "SignedHeaders=,Signature=")> - * + 8 <yyyyMMDD> - * + 64 <hex(sha256())> - * + 128 <max? len(secret_id)> - * + 20 <max? len(region)> - * + 128 <max? len(signed_headers)> - */ - char buffer1[512+1]; /* -> Canonical Request -> Signature */ - char buffer2[256+1]; /* -> String To Sign -> Credential */ + char buffer1[512 + 1]; /* -> Canonical Request -> Signature */ + char buffer2[256 + 1]; /* -> String To Sign -> Credential */ char iso8601now[ISO8601_SIZE]; - char signed_headers[48+1]; - /* should be large enough for nominal listing: - * "host;range;x-amz-content-sha256;x-amz-date" - * + '\0', with "range;" possibly absent - */ + char signed_headers[48 + 1]; + /* should be large enough for nominal listing: + * "host;range;x-amz-content-sha256;x-amz-date" + * + '\0', with "range;" possibly absent + */ /* zero start of strings */ - authorization[0] = 0; - buffer1[0] = 0; - buffer2[0] = 0; - iso8601now[0] = 0; + authorization[0] = 0; + buffer1[0] = 0; + buffer2[0] = 0; + iso8601now[0] = 0; signed_headers[0] = 0; /**** VERIFY INFORMATION EXISTS ****/ + if (handle->region == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle must have non-null region.\n"); - if (handle->region == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "handle must have non-null region.\n"); - } - if (handle->secret_id == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "handle must have non-null secret_id.\n"); - } - if (handle->signing_key == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "handle must have non-null signing_key.\n"); - } - if (handle->httpverb == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "handle must have non-null httpverb.\n"); - } - if (handle->purl->host == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "handle must have non-null host.\n"); - } - if (handle->purl->path == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "handle must have non-null resource.\n"); - } + if (handle->secret_id == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle must have non-null secret_id.\n"); + + if (handle->signing_key == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle must have non-null signing_key.\n"); + + if (handle->httpverb == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle must have non-null httpverb.\n"); + + if (handle->purl->host == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle must have non-null host.\n"); + + if (handle->purl->path == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle must have non-null resource.\n"); /**** CREATE HTTP REQUEST STRUCTURE (hrb_t) ****/ - request = H5FD_s3comms_hrb_init_request( - (const char *)handle->httpverb, - (const char *)handle->purl->path, - "HTTP/1.1"); - if (request == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "could not allocate hrb_t request.\n"); - } - HDassert( request->magic == S3COMMS_HRB_MAGIC ); + request = H5FD_s3comms_hrb_init_request((const char*) handle->httpverb, (const char*) handle->purl->path, "HTTP/1.1"); + if (request == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not allocate hrb_t request.\n"); + + HDassert(request->magic == S3COMMS_HRB_MAGIC); now = gmnow(); - if (ISO8601NOW(iso8601now, now) != (ISO8601_SIZE - 1)) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "could not format ISO8601 time.\n"); - } + if (ISO8601NOW(iso8601now, now) != (ISO8601_SIZE - 1)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not format ISO8601 time.\n"); - if (FAIL == - H5FD_s3comms_hrb_node_set( - &headers, - "x-amz-date", - (const char *)iso8601now) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to set x-amz-date header") - } - if (headers == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "problem building headers list. " - "(placeholder flags)\n"); - } - HDassert( headers->magic == S3COMMS_HRB_NODE_MAGIC ); - - if (FAIL == - H5FD_s3comms_hrb_node_set( - &headers, - "x-amz-content-sha256", - (const char *)EMPTY_SHA256) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to set x-amz-content-sha256 header") - } - if (headers == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "problem building headers list. " - "(placeholder flags)\n"); - } - HDassert( headers->magic == S3COMMS_HRB_NODE_MAGIC ); + if (FAIL == H5FD_s3comms_hrb_node_set(&headers, "x-amz-date", (const char*) iso8601now)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set x-amz-date header") + + if (headers == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list. " + "(placeholder flags)\n"); + + HDassert(headers->magic == S3COMMS_HRB_NODE_MAGIC); + + if (FAIL == H5FD_s3comms_hrb_node_set(&headers, "x-amz-content-sha256", (const char*) EMPTY_SHA256)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set x-amz-content-sha256 header") + + if (headers == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list. " + "(placeholder flags)\n"); + + HDassert(headers->magic == S3COMMS_HRB_NODE_MAGIC); if (rangebytesstr != NULL) { - if (FAIL == - H5FD_s3comms_hrb_node_set( - &headers, - "Range", - (const char *)rangebytesstr) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to set range header") - } - if (headers == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "problem building headers list. " - "(placeholder flags)\n"); - } - HDassert( headers->magic == S3COMMS_HRB_NODE_MAGIC ); + if (FAIL == H5FD_s3comms_hrb_node_set(&headers, "Range", (const char*) rangebytesstr)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set range header") + + if (headers == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list. " + "(placeholder flags)\n"); + + HDassert(headers->magic == S3COMMS_HRB_NODE_MAGIC); } - if (FAIL == - H5FD_s3comms_hrb_node_set( - &headers, - "Host", - (const char *)handle->purl->host) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to set host header") - } - if (headers == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "problem building headers list. " - "(placeholder flags)\n"); - } - HDassert( headers->magic == S3COMMS_HRB_NODE_MAGIC ); + if (FAIL == H5FD_s3comms_hrb_node_set(&headers, "Host", (const char*) handle->purl->host)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set host header") + + if (headers == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list. " + "(placeholder flags)\n"); + + HDassert(headers->magic == S3COMMS_HRB_NODE_MAGIC); request->first_header = headers; /**** COMPUTE AUTHORIZATION ****/ + if (FAIL == H5FD_s3comms_aws_canonical_request(buffer1, 512, signed_headers, 48, request)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "(placeholder flags)\n"); - if (FAIL == /* buffer1 -> canonical request */ - H5FD_s3comms_aws_canonical_request( - buffer1, - 512, - signed_headers, - 48, - request) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "(placeholder flags)\n"); - } - if ( FAIL == /* buffer2->string-to-sign */ - H5FD_s3comms_tostringtosign(buffer2, - buffer1, - iso8601now, - handle->region) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "(placeholder flags)\n"); - } - if (FAIL == /* buffer1 -> signature */ - H5FD_s3comms_HMAC_SHA256(handle->signing_key, - SHA256_DIGEST_LENGTH, - buffer2, - HDstrlen(buffer2), - buffer1) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "(placeholder flags)\n"); - } + /* buffer2->string-to-sign */ + if (FAIL == H5FD_s3comms_tostringtosign(buffer2, buffer1, iso8601now, handle->region)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "(placeholder flags)\n"); + + /* buffer1 -> signature */ + if (FAIL == H5FD_s3comms_HMAC_SHA256(handle->signing_key, SHA256_DIGEST_LENGTH, buffer2, HDstrlen(buffer2), buffer1)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "(placeholder flags)\n"); iso8601now[8] = 0; /* trim to yyyyMMDD */ - ret = S3COMMS_FORMAT_CREDENTIAL(buffer2, - handle->secret_id, - iso8601now, - handle->region, - "s3"); + ret = S3COMMS_FORMAT_CREDENTIAL(buffer2, handle->secret_id, iso8601now, handle->region, "s3"); if (ret == 0 || ret >= S3COMMS_MAX_CREDENTIAL_SIZE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to format aws4 credential string"); - - ret = HDsnprintf( - authorization, - 512, - "AWS4-HMAC-SHA256 Credential=%s,SignedHeaders=%s,Signature=%s", - buffer2, - signed_headers, - buffer1); - if (ret <= 0 || ret >= 512) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to format aws4 authorization string"); - } + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format aws4 credential string"); + + ret = HDsnprintf(authorization, 512, "AWS4-HMAC-SHA256 Credential=%s,SignedHeaders=%s,Signature=%s", + buffer2, signed_headers, buffer1); + if (ret <= 0 || ret >= 512) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format aws4 authorization string"); /* append authorization header to http request buffer - */ - if (H5FD_s3comms_hrb_node_set( - &headers, - "Authorization", - (const char *)authorization) - == FAIL) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to set Authorization header") - } - if (headers == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "problem building headers list. " - "(placeholder flags)\n"); - } + */ + if (H5FD_s3comms_hrb_node_set(&headers, "Authorization", (const char*) authorization) == FAIL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set Authorization header") + + if (headers == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list. " + "(placeholder flags)\n"); /* update hrb's "first header" pointer - */ + */ request->first_header = headers; /**** SET CURLHANDLE HTTP HEADERS FROM GENERATED DATA ****/ node = request->first_header; while (node != NULL) { - HDassert( node->magic == S3COMMS_HRB_NODE_MAGIC ); - curlheaders = curl_slist_append(curlheaders, - (const char *)node->cat); - if (curlheaders == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "could not append header to curl slist. " - "(placeholder flags)\n"); - } + HDassert(node->magic == S3COMMS_HRB_NODE_MAGIC); + curlheaders = curl_slist_append(curlheaders, (const char*) node->cat); + if (curlheaders == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not append header to curl slist. " + "(placeholder flags)\n"); + node = node->next; } - /* sanity-check - */ - if (curlheaders == NULL) { - /* above loop was probably never run */ - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "curlheaders was never populated.\n"); - } + /* sanity-check */ + /* above loop was probably never run */ + if (curlheaders == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "curlheaders was never populated.\n"); /* finally, set http headers in curl handle - */ - if (curl_easy_setopt( - curlh, - CURLOPT_HTTPHEADER, - curlheaders) - != CURLE_OK) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "error while setting CURL option " - "(CURLOPT_HTTPHEADER). (placeholder flags)"); - } + */ + if (curl_easy_setopt(curlh, CURLOPT_HTTPHEADER, curlheaders) != CURLE_OK) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while setting CURL option " + "(CURLOPT_HTTPHEADER). (placeholder flags)"); } /* end if should authenticate (info provided) */ @@ -1813,42 +1464,27 @@ H5FD_s3comms_s3r_read(s3r_t *handle, char curlerrbuf[CURL_ERROR_SIZE]; curlerrbuf[0] = '\0'; - if (CURLE_OK != - curl_easy_setopt(curlh, CURLOPT_ERRORBUFFER, curlerrbuf) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "problem setting error buffer") - } + if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_ERRORBUFFER, curlerrbuf)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem setting error buffer") p_status = curl_easy_perform(curlh); if (p_status != CURLE_OK) { - if (CURLE_OK != - curl_easy_getinfo(curlh, CURLINFO_RESPONSE_CODE, &httpcode) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "problem getting response code") - } - HDfprintf(stderr, "CURL ERROR CODE: %d\nHTTP CODE: %d\n", - p_status, httpcode); + if (CURLE_OK != curl_easy_getinfo(curlh, CURLINFO_RESPONSE_CODE, &httpcode)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem getting response code") + + HDfprintf(stderr, "CURL ERROR CODE: %d\nHTTP CODE: %d\n", p_status, httpcode); HDfprintf(stderr, "%s\n", curl_easy_strerror(p_status)); - HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, - "problem while performing request.\n"); - } - if (CURLE_OK != - curl_easy_setopt(curlh, CURLOPT_ERRORBUFFER, NULL) ) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "problem unsetting error buffer") + HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "problem while performing request.\n"); } + if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_ERRORBUFFER, NULL)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem unsetting error buffer") } /* verbose error reporting */ #else - p_status = curl_easy_perform(curlh); + p_status = curl_easy_perform(curlh); - if (p_status != CURLE_OK) { - HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, - "curl cannot perform request\n") - } + if (p_status != CURLE_OK) + HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "curl cannot perform request\n") #endif #if S3COMMS_DEBUG @@ -1861,9 +1497,8 @@ H5FD_s3comms_s3r_read(s3r_t *handle, else { HDfprintf(stderr, "sds: 0x%lx\n", (long long)sds); HDfprintf(stderr, "sds->size: %d\n", (int)sds->size); - if (len > sds->size) { + if (len > sds->size) HDfprintf(stderr, "buffer overwrite\n"); - } } } else { @@ -1872,8 +1507,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle, #endif done: - /* clean any malloc'd resources - */ + /* clean any malloc'd resources */ if (curlheaders != NULL) { curl_slist_free_all(curlheaders); curlheaders = NULL; @@ -1888,62 +1522,47 @@ done: } if (request != NULL) { while (headers != NULL) - if (FAIL == - H5FD_s3comms_hrb_node_set(&headers, headers->name, NULL)) - { - HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "cannot release header node") - } - HDassert( NULL == headers ); - if (FAIL == H5FD_s3comms_hrb_destroy(&request)) { - HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "cannot release header request structure") - } - HDassert( NULL == request ); + if (FAIL == H5FD_s3comms_hrb_node_set(&headers, headers->name, NULL)) + HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot release header node") + + HDassert(NULL == headers); + if (FAIL == H5FD_s3comms_hrb_destroy(&request)) + HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot release header request structure") + HDassert(NULL == request); } if (curlh != NULL) { /* clear any Range */ - if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_RANGE, NULL) ) { - HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "cannot unset CURLOPT_RANGE") - } + if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_RANGE, NULL)) + HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot unset CURLOPT_RANGE") /* clear headers */ - if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_HTTPHEADER, NULL) ) { - HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "cannot unset CURLOPT_HTTPHEADER") - } + if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_HTTPHEADER, NULL)) + HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot unset CURLOPT_HTTPHEADER") } FUNC_LEAVE_NOAPI(ret_value); } /* H5FD_s3comms_s3r_read */ - /**************************************************************************** * MISCELLANEOUS FUNCTIONS ****************************************************************************/ - /*---------------------------------------------------------------------------- - * * Function: gmnow() * * Purpose: - * * Get the output of `time.h`'s `gmtime()` call while minimizing setup * clutter where important. * * Return: - * * Pointer to resulting `struct tm`,as created by gmtime(time_t * T). * * Programmer: Jacob Smith * 2017-07-12 - * *---------------------------------------------------------------------------- */ -struct tm * +struct tm* gmnow(void) { time_t now; @@ -1951,22 +1570,18 @@ gmnow(void) struct tm *ret_value = NULL; /* Doctor assert, checks against error in time() */ - if ( (time_t)(-1) != time(now_ptr) ) { + if ((time_t)(-1) != time(now_ptr)) ret_value = gmtime(now_ptr); - } - HDassert( ret_value != NULL ); + HDassert(ret_value != NULL); return ret_value; } /* end gmnow() */ - /*---------------------------------------------------------------------------- - * * Function: H5FD_s3comms_aws_canonical_request() * * Purpose: - * * Compose AWS "Canonical Request" (and signed headers string) * as defined in the REST API documentation. * @@ -1975,7 +1590,6 @@ gmnow(void) * Destination string arguments must be provided with adequate space. * * Canonical Request format: - * * <HTTP VERB>"\n" * <resource path>"\n" * <query string>"\n" @@ -1988,7 +1602,6 @@ gmnow(void) * <hex-string of sha256sum of body> ("e3b0c4429...", e.g.) * * Return: - * * - SUCCESS: `SUCCEED` * - writes canonical request to respective `...dest` strings * - FAILURE: `FAIL` @@ -1997,27 +1610,23 @@ gmnow(void) * * Programmer: Jacob Smith * 2017-10-04 - * *---------------------------------------------------------------------------- */ herr_t -H5FD_s3comms_aws_canonical_request( - char *canonical_request_dest, - int _cr_size, - char *signed_headers_dest, - int _sh_size, - hrb_t *http_request) +H5FD_s3comms_aws_canonical_request(char *canonical_request_dest, int _cr_size, char *signed_headers_dest, + int _sh_size, hrb_t *http_request) { - hrb_node_t *node = NULL; + hrb_node_t *node = NULL; const char *query_params = ""; /* unused at present */ - herr_t ret_value = SUCCEED; - int ret = 0; - size_t cr_size = (size_t)_cr_size; - size_t sh_size = (size_t)_sh_size; - size_t cr_len = 0; /* working length of canonical request str */ - size_t sh_len = 0; /* working length of signed headers str */ - char tmpstr[256+1]; - tmpstr[256] = 0; /* terminating NULL */ + herr_t ret_value = SUCCEED; + int ret = 0; + size_t cr_size = (size_t) _cr_size; + size_t sh_size = (size_t) _sh_size; + size_t cr_len = 0; /* working length of canonical request str */ + size_t sh_len = 0; /* working length of signed headers str */ + char tmpstr[256 + 1]; + + tmpstr[256] = 0; /* terminating NULL */ /* "query params" refers to the optional element in the URL, e.g. * http://bucket.aws.com/myfile.txt?max-keys=2&prefix=J @@ -2035,92 +1644,60 @@ H5FD_s3comms_aws_canonical_request( HDfprintf(stdout, "called H5FD_s3comms_aws_canonical_request.\n"); #endif - if (http_request == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "hrb object cannot be null.\n"); - } - HDassert( http_request->magic == S3COMMS_HRB_MAGIC ); + if (http_request == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hrb object cannot be null.\n"); - if (canonical_request_dest == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "canonical request destination cannot be null.\n"); - } + HDassert(http_request->magic == S3COMMS_HRB_MAGIC); - if (signed_headers_dest == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "signed headers destination cannot be null.\n"); - } + if (canonical_request_dest == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "canonical request destination cannot be null.\n"); + + if (signed_headers_dest == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "signed headers destination cannot be null.\n"); /* HTTP verb, resource path, and query string lines - */ - cr_len = (HDstrlen(http_request->verb) + - HDstrlen(http_request->resource) + - HDstrlen(query_params) + - (size_t)3); /* three newline chars */ - if (cr_len >= cr_size) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "not enough space in canonical request"); - } + */ + cr_len = (HDstrlen(http_request->verb) + HDstrlen(http_request->resource) + HDstrlen(query_params) + + (size_t) 3); /* three newline chars */ + if (cr_len >= cr_size) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not enough space in canonical request"); + ret = HDsnprintf( /* TODO: compiler warning */ - canonical_request_dest, - (cr_size-1), - "%s\n%s\n%s\n", - http_request->verb, - http_request->resource, - query_params); - if (ret < 0 || (size_t)ret >= cr_size) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to compose canonical request first line"); - } + canonical_request_dest, (cr_size - 1), "%s\n%s\n%s\n", http_request->verb, http_request->resource, query_params); + if (ret < 0 || (size_t) ret >= cr_size) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to compose canonical request first line"); /* write in canonical headers, building signed headers concurrently - */ + */ node = http_request->first_header; /* assumed sorted */ while (node != NULL) { - HDassert(node->magic == S3COMMS_HRB_NODE_MAGIC); - ret = HDsnprintf( - tmpstr, - 256, - "%s:%s\n", - node->lowername, - node->value); - if (ret < 0 || ret >= 256) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to concatenate HTTP header %s:%s", - node->lowername, - node->value); - } + ret = HDsnprintf(tmpstr, 256, "%s:%s\n", node->lowername, node->value); + if (ret < 0 || ret >= 256) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to concatenate HTTP header %s:%s", + node->lowername, node->value); + cr_len += HDstrlen(tmpstr); - if (cr_len + 1 > cr_size) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "not enough space in canonical request"); - } + if (cr_len + 1 > cr_size) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not enough space in canonical request"); + strcat(canonical_request_dest, tmpstr); - ret = HDsnprintf( - tmpstr, - 256, - "%s;", - node->lowername); - if (ret < 0 || ret >= 256) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to append semicolon to lowername %s", - node->lowername); - } + ret = HDsnprintf(tmpstr, 256, "%s;", node->lowername); + if (ret < 0 || ret >= 256) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to append semicolon to lowername %s", node->lowername); + sh_len += HDstrlen(tmpstr); - if (sh_len + 1 > sh_size) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "not enough space in signed headers"); - } + if (sh_len + 1 > sh_size) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not enough space in signed headers"); + strcat(signed_headers_dest, tmpstr); node = node->next; } /* end while node is not NULL */ - /* remove tailing ';' from signed headers sequence - */ + /* remove tailing ';' from signed headers sequence */ signed_headers_dest[HDstrlen(signed_headers_dest) - 1] = '\0'; /* append signed headers and payload hash @@ -2136,13 +1713,10 @@ done: FUNC_LEAVE_NOAPI(ret_value); } /* end H5FD_s3comms_aws_canonical_request() */ - /*---------------------------------------------------------------------------- - * * Function: H5FD_s3comms_bytes_to_hex() * * Purpose: - * * Produce human-readable hex string [0-9A-F] from sequence of bytes. * * For each byte (char), writes two-character hexadecimal representation. @@ -2156,7 +1730,6 @@ done: * `msg_len` message length of 0 has no effect. * * Return: - * * - SUCCESS: `SUCCEED` * - hex string written to `dest` (not null-terminated) * - FAILURE: `FAIL` @@ -2164,18 +1737,13 @@ done: * - `msg == NULL` * * Programmer: Jacob Smith - * 2017-07-12 - * + * 2017-07-12 * *---------------------------------------------------------------------------- */ herr_t -H5FD_s3comms_bytes_to_hex( - char *dest, - const unsigned char *msg, - size_t msg_len, - hbool_t lowercase) +H5FD_s3comms_bytes_to_hex(char *dest, const unsigned char *msg, size_t msg_len, hbool_t lowercase) { - size_t i = 0; + size_t i = 0; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -2184,50 +1752,37 @@ H5FD_s3comms_bytes_to_hex( HDfprintf(stdout, "called H5FD_s3comms_bytes_to_hex.\n"); #endif - if (dest == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "hex destination cannot be null.\n") - } - if (msg == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "bytes sequence cannot be null.\n") - } + if (dest == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hex destination cannot be null.\n") + + if (msg == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bytes sequence cannot be null.\n") for (i = 0; i < msg_len; i++) { - int chars_written = HDsnprintf(&(dest[i * 2]), - 3, /* 'X', 'X', '\n' */ - (lowercase == TRUE) ? "%02x" : "%02X", - msg[i]); + int chars_written = HDsnprintf(&(dest[i * 2]), 3, /* 'X', 'X', '\n' */ + (lowercase == TRUE) ? "%02x" : "%02X", msg[i]); if (chars_written != 2) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "problem while writing hex chars for %c", - msg[i]); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem while writing hex chars for %c", msg[i]); } } done: FUNC_LEAVE_NOAPI(ret_value); - } /* end H5FD_s3comms_bytes_to_hex() */ - /*---------------------------------------------------------------------------- - * * Function: H5FD_s3comms_free_purl() * * Purpose: - * * Release resources from a parsed_url_t pointer. * * If pointer is null, nothing happens. * * Return: - * * `SUCCEED` (never fails) * * Programmer: Jacob Smith * 2017-11-01 - * *---------------------------------------------------------------------------- */ herr_t @@ -2240,12 +1795,22 @@ H5FD_s3comms_free_purl(parsed_url_t *purl) #endif if (purl != NULL) { - HDassert( purl->magic == S3COMMS_PARSED_URL_MAGIC ); - if (purl->scheme != NULL) { H5MM_xfree(purl->scheme); } - if (purl->host != NULL) { H5MM_xfree(purl->host); } - if (purl->port != NULL) { H5MM_xfree(purl->port); } - if (purl->path != NULL) { H5MM_xfree(purl->path); } - if (purl->query != NULL) { H5MM_xfree(purl->query); } + HDassert(purl->magic == S3COMMS_PARSED_URL_MAGIC); + if (purl->scheme != NULL) + H5MM_xfree(purl->scheme); + + if (purl->host != NULL) + H5MM_xfree(purl->host); + + if (purl->port != NULL) + H5MM_xfree(purl->port); + + if (purl->path != NULL) + H5MM_xfree(purl->path); + + if (purl->query != NULL) + H5MM_xfree(purl->query); + purl->magic += 1ul; H5MM_xfree(purl); } @@ -2253,13 +1818,10 @@ H5FD_s3comms_free_purl(parsed_url_t *purl) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5FD_s3comms_free_purl() */ - /*---------------------------------------------------------------------------- - * * Function: H5FD_s3comms_HMAC_SHA256() * * Purpose: - * * Generate Hash-based Message Authentication Checksum using the SHA-256 * hashing algorithm. * @@ -2272,7 +1834,6 @@ H5FD_s3comms_free_purl(parsed_url_t *purl) * `dest` will _not_ be null-terminated by this function. * * Return: - * * - SUCCESS: `SUCCEED` * - hex string written to `dest` (not null-terminated) * - FAILURE: `FAIL` @@ -2281,19 +1842,13 @@ H5FD_s3comms_free_purl(parsed_url_t *purl) * * Programmer: Jacob Smith * 2017-07-?? - * *---------------------------------------------------------------------------- */ herr_t -H5FD_s3comms_HMAC_SHA256( - const unsigned char *key, - size_t key_len, - const char *msg, - size_t msg_len, - char *dest) +H5FD_s3comms_HMAC_SHA256(const unsigned char *key, size_t key_len, const char *msg, size_t msg_len, char *dest) { unsigned char md[SHA256_DIGEST_LENGTH]; - unsigned int md_len = SHA256_DIGEST_LENGTH; + unsigned int md_len = SHA256_DIGEST_LENGTH; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -2302,41 +1857,22 @@ H5FD_s3comms_HMAC_SHA256( HDfprintf(stdout, "called H5FD_s3comms_HMAC_SHA256.\n"); #endif - if (dest == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "destination cannot be null."); - } + if (dest == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination cannot be null."); - HMAC(EVP_sha256(), - key, - (int)key_len, - (const unsigned char *)msg, - msg_len, - md, - &md_len); - - if (H5FD_s3comms_bytes_to_hex( - dest, - (const unsigned char *)md, - (size_t)md_len, - true) - == FAIL) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "could not convert to hex string."); - } + HMAC(EVP_sha256(), key, (int) key_len, (const unsigned char*) msg, msg_len, md, &md_len); + + if (H5FD_s3comms_bytes_to_hex(dest, (const unsigned char*) md, (size_t) md_len, TRUE) == FAIL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not convert to hex string."); done: FUNC_LEAVE_NOAPI(ret_value); } /* H5FD_s3comms_HMAC_SHA256 */ - /*----------------------------------------------------------------------------- - * * Function: H5FD__s3comms_load_aws_creds_from_file() * * Purpose: - * * Extract AWS configuration information from a target file. * * Given a file and a profile name, e.g. "ros3_vfd_test", attempt to locate @@ -2366,7 +1902,6 @@ done: * when reading from multiple files. * * Return: - * * + SUCCESS: `SUCCEED` * + no error. settings may or may not have been loaded. * + FAILURE: `FAIL` @@ -2377,35 +1912,22 @@ done: * * Programmer: Jacob Smith * 2018-02-27 - * *----------------------------------------------------------------------------- */ static herr_t -H5FD__s3comms_load_aws_creds_from_file( - FILE *file, - const char *profile_name, - char *key_id, - char *access_key, - char *aws_region) +H5FD__s3comms_load_aws_creds_from_file(FILE *file, const char *profile_name, char *key_id, + char *access_key, char *aws_region) { char profile_line[32]; char buffer[128]; - const char *setting_names[] = { - "region", - "aws_access_key_id", - "aws_secret_access_key", - }; - char * const setting_pointers[] = { - aws_region, - key_id, - access_key, - }; - unsigned setting_count = 3; - herr_t ret_value = SUCCEED; - unsigned buffer_i = 0; - unsigned setting_i = 0; - int found_setting = 0; - char *line_buffer = &(buffer[0]); + const char *setting_names[] = { "region", "aws_access_key_id", "aws_secret_access_key", }; + char *const setting_pointers[] = { aws_region, key_id, access_key, }; + unsigned setting_count = 3; + herr_t ret_value = SUCCEED; + unsigned buffer_i = 0; + unsigned setting_i = 0; + int found_setting = 0; + char *line_buffer = &(buffer[0]); FUNC_ENTER_NOAPI_NOINIT @@ -2413,16 +1935,14 @@ H5FD__s3comms_load_aws_creds_from_file( HDfprintf(stdout, "called load_aws_creds_from_file.\n"); #endif - /* format target line for start of profile */ - if (32 < HDsnprintf(profile_line, 32, "[%s]", profile_name)) { - HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, - "unable to format profile label") - } +/* format target line for start of profile */ + if (32 < HDsnprintf(profile_line, 32, "[%s]", profile_name)) + HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format profile label"); /* look for start of profile */ do { /* clear buffer */ - for (buffer_i=0; buffer_i < 128; buffer_i++) { + for (buffer_i = 0; buffer_i < 128; buffer_i++) { buffer[buffer_i] = 0; } @@ -2435,59 +1955,50 @@ H5FD__s3comms_load_aws_creds_from_file( /* extract credentials from lines */ do { /* clear buffer */ - for (buffer_i=0; buffer_i < 128; buffer_i++) { - buffer[buffer_i] = 0; + for (buffer_i = 0; buffer_i < 128; buffer_i++) { + buffer[buffer_i] = 0; } /* collect a line from file */ line_buffer = fgets(line_buffer, 128, file); if (line_buffer == NULL) { - goto done; /* end of file */ + goto done; + /* end of file */ } /* loop over names to see if line looks like assignment */ for (setting_i = 0; setting_i < setting_count; setting_i++) { - size_t setting_name_len = 0; - const char *setting_name = NULL; - char line_prefix[128]; + size_t setting_name_len = 0; + const char *setting_name = NULL; + char line_prefix[128]; setting_name = setting_names[setting_i]; setting_name_len = HDstrlen(setting_name); - if (HDsnprintf(line_prefix, 128, "%s=", setting_name) < 0) { - HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, - "unable to format line prefix") - } + if (HDsnprintf(line_prefix, 128, "%s=", setting_name) < 0) + HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format line prefix"); /* found a matching name? */ if (!HDstrncmp(line_buffer, line_prefix, setting_name_len + 1)) { found_setting = 1; /* skip NULL destination buffer */ - if (setting_pointers[setting_i] == NULL) { - break; - } + if (setting_pointers[setting_i] == NULL) + break; + /* advance to end of name in string */ do { line_buffer++; } while (*line_buffer != 0 && *line_buffer != '='); - if (*line_buffer == 0 || *(line_buffer+1) == 0) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "incomplete assignment in file") - } + if (*line_buffer == 0 || *(line_buffer + 1) == 0) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "incomplete assignment in file"); + line_buffer++; /* was pointing at '='; advance */ /* copy line buffer into out pointer */ - if (HDstrncpy( - setting_pointers[setting_i], - (const char *)line_buffer, - HDstrlen(line_buffer)) - == NULL) - { - HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, - "unable to copy line into pointer") - } + if (HDstrncpy(setting_pointers[setting_i], (const char *)line_buffer, HDstrlen(line_buffer)) == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to copy line into pointer"); /* "trim" tailing whitespace by replacing with null terminator*/ buffer_i = 0; @@ -2505,13 +2016,10 @@ done: FUNC_LEAVE_NOAPI(ret_value); } /* end H5FD__s3comms_load_aws_creds_from_file() */ - /*---------------------------------------------------------------------------- - * * Function: H5FD_s3comms_load_aws_profile() * * Purpose : - * * Read aws profile elements from standard location on system and store * settings in memory. * @@ -2525,7 +2033,6 @@ done: * Settings are stored in the supplied buffers as null-terminated strings. * * Return: - * * + SUCCESS: `SUCCEED` (0) * + no error occurred and all settings were populated * + FAILURE: `FAIL` (-1) @@ -2535,20 +2042,16 @@ done: * * Programmer: Jacob Smith * 2018-02-27 - * *---------------------------------------------------------------------------- */ herr_t -H5FD_s3comms_load_aws_profile(const char *profile_name, - char *key_id_out, - char *secret_access_key_out, - char *aws_region_out) +H5FD_s3comms_load_aws_profile(const char *profile_name, char *key_id_out, char *secret_access_key_out, char *aws_region_out) { herr_t ret_value = SUCCEED; - FILE *credfile = NULL; - char awspath[117]; - char filepath[128]; - int ret = 0; + FILE *credfile = NULL; + char awspath[117]; + char filepath[128]; + int ret = 0; FUNC_ENTER_NOAPI_NOINIT @@ -2559,88 +2062,61 @@ H5FD_s3comms_load_aws_profile(const char *profile_name, #ifdef H5_HAVE_WIN32_API ret = HDsnprintf(awspath, 117, "%s/.aws/", getenv("USERPROFILE")) ; #else - ret = HDsnprintf(awspath, 117, "%s/.aws/", getenv("HOME")) ; + ret = HDsnprintf(awspath, 117, "%s/.aws/", getenv("HOME")); #endif - if (ret < 0 || (size_t)ret >= 117) { - HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, - "unable to format home-aws path") - } + if (ret < 0 || (size_t) ret >= 117) + HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format home-aws path") + ret = HDsnprintf(filepath, 128, "%s%s", awspath, "credentials"); - if (ret < 0 || (size_t)ret >= 128) { - HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, - "unable to format credentials path") - } + if (ret < 0 || (size_t) ret >= 128) + HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format credentials path") credfile = fopen(filepath, "r"); if (credfile != NULL) { - if (H5FD__s3comms_load_aws_creds_from_file( - credfile, - profile_name, - key_id_out, - secret_access_key_out, - aws_region_out) - == FAIL) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to load from aws credentials") - } - if (fclose(credfile) == EOF) { - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, - "unable to close credentials file") + if (H5FD__s3comms_load_aws_creds_from_file(credfile, profile_name, key_id_out, secret_access_key_out, + aws_region_out) == FAIL) { + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to load from aws credentials") } + if (fclose(credfile) == EOF) + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close credentials file") + credfile = NULL; } /* end if credential file opened */ ret = HDsnprintf(filepath, 128, "%s%s", awspath, "config"); - if (ret < 0 || (size_t)ret >= 128) { - HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, - "unable to format config path") - } + if (ret < 0 || (size_t) ret >= 128) + HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format config path") + credfile = fopen(filepath, "r"); if (credfile != NULL) { - if (H5FD__s3comms_load_aws_creds_from_file( - credfile, - profile_name, + if (H5FD__s3comms_load_aws_creds_from_file(credfile, profile_name, (*key_id_out == 0) ? key_id_out : NULL, (*secret_access_key_out == 0) ? secret_access_key_out : NULL, - (*aws_region_out == 0) ? aws_region_out : NULL) - == FAIL) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to load from aws config") - } - if (fclose(credfile) == EOF) { - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, - "unable to close config file") + (*aws_region_out == 0) ? aws_region_out : NULL) == FAIL) { + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to load from aws config") } + if (fclose(credfile) == EOF) + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close config file") + credfile = NULL; } /* end if credential file opened */ /* fail if not all three settings were loaded */ - if (*key_id_out == 0 || - *secret_access_key_out == 0 || - *aws_region_out == 0) - { + if (*key_id_out == 0 || *secret_access_key_out == 0 || *aws_region_out == 0) ret_value = FAIL; - } -done: - if (credfile != NULL) { + done: if (credfile != NULL) { if (fclose(credfile) == EOF) { - HDONE_ERROR(H5E_ARGS, H5E_ARGS, FAIL, - "problem error-closing aws configuration file") + HDONE_ERROR(H5E_ARGS, H5E_ARGS, FAIL, "problem error-closing aws configuration file") } } FUNC_LEAVE_NOAPI(ret_value); } /* end H5FD_s3comms_load_aws_profile() */ - /*---------------------------------------------------------------------------- - * * Function: H5FD_s3comms_nlowercase() * * Purpose: - * * From string starting at `s`, write `len` characters to `dest`, * converting all to lowercase. * @@ -2650,7 +2126,6 @@ done: * Provided as convenience. * * Return: - * * - SUCCESS: `SUCCEED` * - upon completion, `dest` is populated * - FAILURE: `FAIL` @@ -2658,14 +2133,10 @@ done: * * Programmer: Jacob Smith * 2017-09-18 - * *---------------------------------------------------------------------------- */ herr_t -H5FD_s3comms_nlowercase( - char *dest, - const char *s, - size_t len) +H5FD_s3comms_nlowercase(char *dest, const char *s, size_t len) { herr_t ret_value = SUCCEED; @@ -2675,16 +2146,14 @@ H5FD_s3comms_nlowercase( HDfprintf(stdout, "called H5FD_s3comms_nlowercase.\n"); #endif - if (dest == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "destination cannot be null.\n"); - } + if (dest == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination cannot be null.\n"); if (len > 0) { HDmemcpy(dest, s, len); do { len--; - dest[len] = (char)tolower( (int)dest[len] ); + dest[len] = (char) tolower((int) dest[len]); } while (len > 0); } @@ -2692,13 +2161,10 @@ done: FUNC_LEAVE_NOAPI(ret_value); } /* end H5FD_s3comms_nlowercase() */ - /*---------------------------------------------------------------------------- - * * Function: H5FD_s3comms_parse_url() * * Purpose: - * * Parse URL-like string and stuff URL components into * `parsed_url` structure, if possible. * @@ -2712,7 +2178,6 @@ done: * Empty or absent elements are NULL in new purl structure. * * Return: - * * - SUCCESS: `SUCCEED` * - `purl` pointer is populated * - FAILURE: `FAIL` @@ -2721,83 +2186,67 @@ done: * * Programmer: Jacob Smith * 2017-10-30 - * *---------------------------------------------------------------------------- */ herr_t -H5FD_s3comms_parse_url( - const char *str, - parsed_url_t **_purl) +H5FD_s3comms_parse_url(const char *str, parsed_url_t **_purl) { - parsed_url_t *purl = NULL; /* pointer to new structure */ - const char *tmpstr = NULL; /* working pointer in string */ - const char *curstr = str; /* "start" pointer in string */ - long int len = 0; /* substring length */ - long int urllen = 0; /* length of passed-in url string */ - unsigned int i = 0; - herr_t ret_value = FAIL; + parsed_url_t *purl = NULL; /* pointer to new structure */ + const char *tmpstr = NULL; /* working pointer in string */ + const char *curstr = str; /* "start" pointer in string */ + long int len = 0; /* substring length */ + long int urllen = 0; /* length of passed-in url string */ + unsigned int i = 0; + herr_t ret_value = FAIL; - FUNC_ENTER_NOAPI_NOINIT; + FUNC_ENTER_NOAPI_NOINIT #if S3COMMS_DEBUG HDprintf("called H5FD_s3comms_parse_url.\n"); #endif - if (str == NULL || *str == '\0') { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "invalid url string"); - } + if (str == NULL || *str == '\0') + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid url string"); - urllen = (long int)HDstrlen(str); + urllen = (long int) HDstrlen(str); - purl = (parsed_url_t *)H5MM_malloc(sizeof(parsed_url_t)); - if (purl == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, - "can't allocate space for parsed_url_t"); - } - purl->magic = S3COMMS_PARSED_URL_MAGIC; + purl = (parsed_url_t*) H5MM_malloc(sizeof(parsed_url_t)); + if (purl == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for parsed_url_t"); + + purl->magic = S3COMMS_PARSED_URL_MAGIC; purl->scheme = NULL; - purl->host = NULL; - purl->port = NULL; - purl->path = NULL; - purl->query = NULL; + purl->host = NULL; + purl->port = NULL; + purl->path = NULL; + purl->query = NULL; /*************** * READ SCHEME * ***************/ tmpstr = HDstrchr(curstr, ':'); - if (tmpstr == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "invalid SCHEME construction: probably not URL"); - } + if (tmpstr == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid SCHEME construction: probably not URL"); + len = tmpstr - curstr; - HDassert( (0 <= len) && (len < urllen) ); + HDassert((0 <= len) && (len < urllen)); - /* check for restrictions - */ + /* check for restrictions */ for (i = 0; i < len; i++) { /* scheme = [a-zA-Z+-.]+ (terminated by ":") */ - if (!isalpha(curstr[i]) && - '+' != curstr[i] && - '-' != curstr[i] && - '.' != curstr[i]) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "invalid SCHEME construction"); - } - } - /* copy lowercased scheme to structure - */ - purl->scheme = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1)); - if (purl->scheme == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, - "can't allocate space for SCHEME"); + if (!isalpha(curstr[i]) && '+' != curstr[i] && '-' != curstr[i] && '.' != curstr[i]) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid SCHEME construction"); } - (void)HDstrncpy(purl->scheme, curstr, (size_t)len); + /* copy lowercased scheme to structure */ + purl->scheme = (char*) H5MM_malloc(sizeof(char) * (size_t)(len + 1)); + if (purl->scheme == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for SCHEME"); + + (void) HDstrncpy(purl->scheme, curstr, (size_t )len); purl->scheme[len] = '\0'; - for ( i = 0; i < len; i++ ) { - purl->scheme[i] = (char)tolower(purl->scheme[i]); + for (i = 0; i < len; i++) { + purl->scheme[i] = (char) tolower(purl->scheme[i]); } /* Skip "://" */ @@ -2805,50 +2254,41 @@ H5FD_s3comms_parse_url( curstr = tmpstr; /************* - * READ HOST * - *************/ + * READ HOST * + *************/ if (*curstr == '[') { /* IPv6 */ while (']' != *tmpstr) { - if (tmpstr == 0) { /* end of string reached! */ - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "reached end of URL: incomplete IPv6 HOST"); - } + if (tmpstr == 0) /* end of string reached! */ + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "reached end of URL: incomplete IPv6 HOST"); + tmpstr++; } tmpstr++; } /* end if (IPv6) */ else { while (0 != *tmpstr) { - if (':' == *tmpstr || - '/' == *tmpstr || - '?' == *tmpstr) - { + if (':' == *tmpstr || '/' == *tmpstr || '?' == *tmpstr) break; - } + tmpstr++; } } /* end else (IPv4) */ len = tmpstr - curstr; if (len == 0) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "HOST substring cannot be empty"); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "HOST substring cannot be empty"); } - else - if (len > urllen) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "problem with length of HOST substring"); + else if (len > urllen) { + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem with length of HOST substring"); } - /* copy host - */ - purl->host = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1)); - if (purl->host == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, - "can't allocate space for HOST"); - } - (void)HDstrncpy(purl->host, curstr, (size_t)len); + /* copy host */ + purl->host = (char*) H5MM_malloc(sizeof(char) * (size_t)(len + 1)); + if (purl->host == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for HOST"); + + (void) HDstrncpy(purl->host, curstr, (size_t )len); purl->host[len] = 0; /************* @@ -2863,29 +2303,24 @@ H5FD_s3comms_parse_url( } len = tmpstr - curstr; if (len == 0) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "PORT element cannot be empty"); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "PORT element cannot be empty"); } - else - if (len > urllen) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "problem with length of PORT substring"); + else if (len > urllen) { + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem with length of PORT substring"); } - for (i = 0; i < len; i ++) { - if (!isdigit(curstr[i])) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "PORT is not a decimal string"); - } + + for (i = 0; i < len; i++) { + if (!isdigit(curstr[i])) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "PORT is not a decimal string"); } /* copy port - */ - purl->port = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1)); - if (purl->port == NULL) { /* cannot malloc */ - HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, - "can't allocate space for PORT"); - } - (void)HDstrncpy(purl->port, curstr, (size_t)len); + */ + purl->port = (char*) H5MM_malloc(sizeof(char) * (size_t)(len + 1)); + if (purl->port == NULL) /* cannot malloc */ + HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for PORT"); + + (void) HDstrncpy(purl->port, curstr, (size_t )len); purl->port[len] = 0; } /* end if PORT element */ @@ -2899,22 +2334,20 @@ H5FD_s3comms_parse_url( curstr = tmpstr; /* seek end of PATH - */ + */ while ((0 != *tmpstr) && ('?' != *tmpstr)) { tmpstr++; } len = tmpstr - curstr; - if (len > urllen) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "problem with length of PATH substring"); - } + if (len > urllen) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem with length of PATH substring"); + if (len > 0) { - purl->path = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1)); - if (purl->path == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, - "can't allocate space for PATH"); - } /* cannot malloc path pointer */ - (void)HDstrncpy(purl->path, curstr, (size_t)len); + purl->path = (char*) H5MM_malloc(sizeof(char) * (size_t)(len + 1)); + if (purl->path == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for PATH"); + /* cannot malloc path pointer */ + (void) HDstrncpy(purl->path, curstr, (size_t )len); purl->path[len] = 0; } } /* end if PATH element */ @@ -2931,38 +2364,33 @@ H5FD_s3comms_parse_url( } len = tmpstr - curstr; if (len == 0) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "QUERY cannot be empty"); - } else if (len > urllen) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "problem with length of QUERY substring"); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "QUERY cannot be empty"); + } + else if (len > urllen) { + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem with length of QUERY substring"); } - purl->query = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1)); - if (purl->query == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, - "can't allocate space for QUERY"); - } /* cannot malloc path pointer */ - (void)HDstrncpy(purl->query, curstr, (size_t)len); + purl->query = (char*) H5MM_malloc(sizeof(char) * (size_t)(len + 1)); + if (purl->query == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for QUERY"); + /* cannot malloc path pointer */ + (void) HDstrncpy(purl->query, curstr, (size_t )len); purl->query[len] = 0; } /* end if QUERY exists */ *_purl = purl; - ret_value = SUCCEED; + ret_value = SUCCEED; done: - if (ret_value == FAIL) { + if (ret_value == FAIL) H5FD_s3comms_free_purl(purl); - } + FUNC_LEAVE_NOAPI(ret_value); } /* end H5FD_s3comms_parse_url() */ - /*---------------------------------------------------------------------------- - * * Function: H5FD_s3comms_percent_encode_char() * * Purpose: - * * "Percent-encode" utf-8 character `c`, e.g., * '$' -> "%24" * '¢' -> "%C2%A2" @@ -2985,7 +2413,6 @@ done: * `repr_len`. * * Return : SUCCEED/FAIL - * * - SUCCESS: `SUCCEED` * - percent-encoded representation written to `repr` * - 'repr' is null-terminated @@ -2993,21 +2420,17 @@ done: * - `c` or `repr` was NULL * * Programmer: Jacob Smith - * *---------------------------------------------------------------------------- */ herr_t -H5FD_s3comms_percent_encode_char( - char *repr, - const unsigned char c, - size_t *repr_len) +H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr_len) { - unsigned int i = 0; - int chars_written = 0; - herr_t ret_value = SUCCEED; + unsigned int i = 0; + int chars_written = 0; + herr_t ret_value = SUCCEED; #if S3COMMS_DEBUG - unsigned char s[2] = {c, 0}; - unsigned char hex[3] = {0, 0, 0}; + unsigned char s[2] = {c, 0}; + unsigned char hex[3] = {0, 0, 0}; #endif FUNC_ENTER_NOAPI_NOINIT @@ -3016,9 +2439,9 @@ H5FD_s3comms_percent_encode_char( HDfprintf(stdout, "called H5FD_s3comms_percent_encode_char.\n"); #endif - if (repr == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination `repr`.\n") - } + if (repr == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination `repr`.\n") + #if S3COMMS_DEBUG H5FD_s3comms_bytes_to_hex((char *)hex, s, 1, FALSE); @@ -3026,7 +2449,7 @@ H5FD_s3comms_percent_encode_char( HDfprintf(stdout, " CHAR-HEX: \"%s\"\n", hex); #endif - if (c <= (unsigned char)0x7f) { + if (c <= (unsigned char) 0x7f) { /* character represented in a single "byte" * and single percent-code */ @@ -3035,32 +2458,28 @@ H5FD_s3comms_percent_encode_char( #endif *repr_len = 3; chars_written = HDsnprintf(repr, 4, "%%%02X", c); - if (chars_written < 0) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "cannot write char %c", - c); - } + if (chars_written < 0) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot write char %c", c); + } /* end if single-byte unicode char */ else { - /* multi-byte, multi-percent representation - */ - unsigned int acc = 0; /* byte accumulator */ - unsigned int k = 0; /* uint character representation */ + /* multi-byte, multi-percent representation */ + unsigned int acc = 0; /* byte accumulator */ + unsigned int k = 0; /* uint character representation */ unsigned int stack_size = 0; - unsigned char stack[4] = {0, 0, 0, 0}; + unsigned char stack[4] = { 0, 0, 0, 0 }; #if S3COMMS_DEBUG HDfprintf(stdout, " MULTI-BYTE\n"); #endif stack_size = 0; - k = (unsigned int)c; + k = (unsigned int) c; *repr_len = 0; do { - /* push number onto stack in six-bit slices - */ + /* push number onto stack in six-bit slices */ acc = k; acc >>= 6; /* cull least */ acc <<= 6; /* six bits */ - stack[stack_size++] = (unsigned char)(k - acc); + stack[stack_size++] = (unsigned char) (k - acc); k = acc >> 6; } while (k > 0); @@ -3071,11 +2490,7 @@ H5FD_s3comms_percent_encode_char( #if S3COMMS_DEBUG HDfprintf(stdout, " STACK:\n {\n"); for (i = 0; i < stack_size; i++) { - H5FD_s3comms_bytes_to_hex( - (char *)hex, - (&stack[i]), - 1, - FALSE); + H5FD_s3comms_bytes_to_hex((char *)hex, (&stack[i]), 1, FALSE); hex[2] = 0; HDfprintf(stdout, " %s,\n", hex); } @@ -3088,20 +2503,14 @@ H5FD_s3comms_percent_encode_char( /* prepend 11[1[1]]0 to first byte */ /* 110xxxxx, 1110xxxx, or 11110xxx */ - acc = 0xC0; /* 0x11000000 */ + acc = 0xC0; /* 0x11000000 */ acc += (stack_size > 2) ? 0x20 : 0; /* 0x00100000 */ acc += (stack_size > 3) ? 0x10 : 0; /* 0x00010000 */ stack_size--; - chars_written = HDsnprintf( - repr, - 4, - "%%%02X", - (unsigned char)(acc + stack[stack_size])); - if (chars_written < 0) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "cannot write char %c", - c); - } + chars_written = HDsnprintf(repr, 4, "%%%02X", (unsigned char) (acc + stack[stack_size])); + if (chars_written < 0) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot write char %c", c); + *repr_len += 3; /************************ @@ -3110,16 +2519,10 @@ H5FD_s3comms_percent_encode_char( /* 10xxxxxx */ for (i = 0; i < stack_size; i++) { - chars_written = HDsnprintf( - &repr[i*3 + 3], - 4, - "%%%02X", - (unsigned char)(0x80 + stack[stack_size - 1 - i])); - if (chars_written < 0) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "cannot write char %c", - c); - } + chars_written = HDsnprintf(&repr[i * 3 + 3], 4, "%%%02X", (unsigned char) (0x80 + stack[stack_size - 1 - i])); + if (chars_written < 0) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot write char %c", c); + *repr_len += 3; } /* end for each continuation byte */ } /* end else (multi-byte) */ @@ -3130,13 +2533,10 @@ done: FUNC_LEAVE_NOAPI(ret_value); } /* H5FD_s3comms_percent_encode_char */ - /*---------------------------------------------------------------------------- - * * Function: H5FD_s3comms_signing_key() * * Purpose: - * * Create AWS4 "Signing Key" from secret key, AWS region, and timestamp. * * Sequentially runs HMAC_SHA256 on strings in specified order, @@ -3158,7 +2558,6 @@ done: * Programmer must ensure that `md` is appropriately allocated. * * Return: - * * - SUCCESS: `SUCCEED` * - raw byte data of signing key written to `md` * - FAILURE: `FAIL` @@ -3166,23 +2565,18 @@ done: * * Programmer: Jacob Smith * 2017-07-13 - * *---------------------------------------------------------------------------- */ herr_t -H5FD_s3comms_signing_key( - unsigned char *md, - const char *secret, - const char *region, - const char *iso8601now) +H5FD_s3comms_signing_key(unsigned char *md, const char *secret, const char *region, const char *iso8601now) { - char *AWS4_secret = NULL; - size_t AWS4_secret_len = 0; - unsigned char datekey[SHA256_DIGEST_LENGTH]; - unsigned char dateregionkey[SHA256_DIGEST_LENGTH]; - unsigned char dateregionservicekey[SHA256_DIGEST_LENGTH]; - int ret = 0; /* return value of HDsnprintf */ - herr_t ret_value = SUCCEED; + char *AWS4_secret = NULL; + size_t AWS4_secret_len = 0; + unsigned char datekey[SHA256_DIGEST_LENGTH]; + unsigned char dateregionkey[SHA256_DIGEST_LENGTH]; + unsigned char dateregionservicekey[SHA256_DIGEST_LENGTH]; + int ret = 0; /* return value of HDsnprintf */ + herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -3190,70 +2584,40 @@ H5FD_s3comms_signing_key( HDfprintf(stdout, "called H5FD_s3comms_signing_key.\n"); #endif - if (md == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "Destination `md` cannot be NULL.\n") - } - if (secret == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "`secret` cannot be NULL.\n") - } - if (region == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "`region` cannot be NULL.\n") - } - if (iso8601now == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "`iso8601now` cannot be NULL.\n") - } + if (md == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Destination `md` cannot be NULL.\n") + + if (secret == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "`secret` cannot be NULL.\n") + + if (region == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "`region` cannot be NULL.\n") + + if (iso8601now == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "`iso8601now` cannot be NULL.\n") AWS4_secret_len = 4 + HDstrlen(secret) + 1; - AWS4_secret = (char*)H5MM_malloc(sizeof(char *) * AWS4_secret_len); - if (AWS4_secret == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "Could not allocate space.\n") - } + AWS4_secret = (char*) H5MM_malloc(sizeof(char*) * AWS4_secret_len); + if (AWS4_secret == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Could not allocate space.\n") - /* prepend "AWS4" to start of the secret key - */ - ret = HDsnprintf(AWS4_secret, AWS4_secret_len,"%s%s", "AWS4", secret); - if ((size_t)ret != (AWS4_secret_len - 1)) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "problem writing AWS4+secret `%s`", - secret); - } + /* prepend "AWS4" to start of the secret key */ + ret = HDsnprintf(AWS4_secret, AWS4_secret_len, "%s%s", "AWS4", secret); + if ((size_t) ret != (AWS4_secret_len - 1)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem writing AWS4+secret `%s`", secret); /* hash_func, key, len(key), msg, len(msg), digest_dest, digest_len_dest * we know digest length, so ignore via NULL */ - HMAC(EVP_sha256(), - (const unsigned char *)AWS4_secret, - (int)HDstrlen(AWS4_secret), - (const unsigned char*)iso8601now, - 8, /* 8 --> length of 8 --> "yyyyMMDD" */ - datekey, - NULL); - HMAC(EVP_sha256(), - (const unsigned char *)datekey, - SHA256_DIGEST_LENGTH, - (const unsigned char *)region, - HDstrlen(region), - dateregionkey, - NULL); - HMAC(EVP_sha256(), - (const unsigned char *)dateregionkey, - SHA256_DIGEST_LENGTH, - (const unsigned char *)"s3", - 2, - dateregionservicekey, - NULL); - HMAC(EVP_sha256(), - (const unsigned char *)dateregionservicekey, - SHA256_DIGEST_LENGTH, - (const unsigned char *)"aws4_request", - 12, - md, - NULL); + HMAC(EVP_sha256(), (const unsigned char*) AWS4_secret, (int) HDstrlen(AWS4_secret), + (const unsigned char*) iso8601now, 8, /* 8 --> length of 8 --> "yyyyMMDD" */ + datekey, NULL); + HMAC(EVP_sha256(), (const unsigned char*) datekey, SHA256_DIGEST_LENGTH, (const unsigned char*) region, + HDstrlen(region), dateregionkey, NULL); + HMAC(EVP_sha256(), (const unsigned char*) dateregionkey, SHA256_DIGEST_LENGTH, (const unsigned char*) "s3", + 2, dateregionservicekey, NULL); + HMAC(EVP_sha256(), (const unsigned char*) dateregionservicekey, SHA256_DIGEST_LENGTH, + (const unsigned char*) "aws4_request", 12, md, NULL); done: H5MM_xfree(AWS4_secret); @@ -3261,13 +2625,10 @@ done: FUNC_LEAVE_NOAPI(ret_value); } /* end H5FD_s3comms_signing_key() */ - /*---------------------------------------------------------------------------- - * * Function: H5FD_s3comms_tostringtosign() * * Purpose: - * * Get AWS "String to Sign" from Canonical Request, timestamp, * and AWS "region". * @@ -3286,7 +2647,6 @@ done: * It is left to programmer to ensure `dest` has adequate space. * * Return: - * * - SUCCESS: `SUCCEED` * - "string to sign" written to `dest` and null-terminated * - FAILURE: `FAIL` @@ -3295,22 +2655,17 @@ done: * * Programmer: Jacob Smith * 2017-07-?? - * *---------------------------------------------------------------------------- */ herr_t -H5FD_s3comms_tostringtosign( - char *dest, - const char *req, - const char *now, - const char *region) +H5FD_s3comms_tostringtosign(char *dest, const char *req, const char *now, const char *region) { unsigned char checksum[SHA256_DIGEST_LENGTH * 2 + 1]; - size_t d = 0; + size_t d = 0; char day[9]; char hexsum[SHA256_DIGEST_LENGTH * 2 + 1]; - size_t i = 0; - int ret = 0; /* HDsnprintf return value */ + size_t i = 0; + int ret = 0; /* HDsnprintf return value */ herr_t ret_value = SUCCEED; char tmp[128]; @@ -3320,22 +2675,17 @@ H5FD_s3comms_tostringtosign( HDfprintf(stdout, "called H5FD_s3comms_tostringtosign.\n"); #endif - if (dest == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "destination buffer cannot be null.\n") - } - if (req == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "canonical request cannot be null.\n") - } - if (now == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "Timestring cannot be NULL.\n") - } - if (region == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "Region cannot be NULL.\n") - } + if (dest == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination buffer cannot be null.\n") + + if (req == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "canonical request cannot be null.\n") + + if (now == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Timestring cannot be NULL.\n") + + if (region == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Region cannot be NULL.\n") for (i = 0; i < 128; i++) { tmp[i] = '\0'; @@ -3347,15 +2697,13 @@ H5FD_s3comms_tostringtosign( HDstrncpy(day, now, 8); day[8] = '\0'; ret = HDsnprintf(tmp, 127, "%s/%s/s3/aws4_request", day, region); - if (ret <= 0 || ret >= 127) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "problem adding day and region to string") - } + if (ret <= 0 || ret >= 127) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem adding day and region to string") HDmemcpy((dest + d), "AWS4-HMAC-SHA256\n", 17); d = 17; - HDmemcpy((dest+d), now, HDstrlen(now)); + HDmemcpy((dest + d), now, HDstrlen(now)); d += HDstrlen(now); dest[d++] = '\n'; @@ -3363,20 +2711,10 @@ H5FD_s3comms_tostringtosign( d += HDstrlen(tmp); dest[d++] = '\n'; - SHA256((const unsigned char *)req, - HDstrlen(req), - checksum); + SHA256((const unsigned char*) req, HDstrlen(req), checksum); - if (H5FD_s3comms_bytes_to_hex( - hexsum, - (const unsigned char *)checksum, - SHA256_DIGEST_LENGTH, - true) - == FAIL) - { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "could not create hex string"); - } + if (H5FD_s3comms_bytes_to_hex(hexsum, (const unsigned char*) checksum, SHA256_DIGEST_LENGTH, TRUE) == FAIL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not create hex string"); for (i = 0; i < SHA256_DIGEST_LENGTH * 2; i++) { dest[d++] = hexsum[i]; @@ -3388,9 +2726,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5ros3_tostringtosign() */ - /*---------------------------------------------------------------------------- - * * Function: H5FD_s3comms_trim() * * Purpose: @@ -3408,21 +2744,16 @@ done: * is set to 0. * * Return: - * * - SUCCESS: `SUCCEED` * - FAILURE: `FAIL` * - `dest == NULL` * * Programmer: Jacob Smith * 2017-09-18 - * *---------------------------------------------------------------------------- */ herr_t -H5FD_s3comms_trim(char *dest, - char *s, - size_t s_len, - size_t *n_written) +H5FD_s3comms_trim(char *dest, char *s, size_t s_len, size_t *n_written) { herr_t ret_value = SUCCEED; @@ -3432,23 +2763,19 @@ H5FD_s3comms_trim(char *dest, HDfprintf(stdout, "called H5FD_s3comms_trim.\n"); #endif - if (dest == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "destination cannot be null.") - } - if (s == NULL) { + if (dest == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination cannot be null.") + + if (s == NULL) s_len = 0; - } if (s_len > 0) { /* Find first non-whitespace character from start; - * reduce total length per character. - */ - while ((s_len > 0) && - isspace((unsigned char)s[0]) && s_len > 0) - { - s++; - s_len--; + * reduce total length per character. + */ + while ((s_len > 0) && isspace((unsigned char) s[0]) && s_len > 0) { + s++; + s_len--; } /* Find first non-whitespace character from tail; @@ -3458,11 +2785,11 @@ H5FD_s3comms_trim(char *dest, if (s_len > 0) { do { s_len--; - } while( isspace((unsigned char)s[s_len]) ); + } while (isspace((unsigned char) s[s_len])); s_len++; /* write output into dest - */ + */ HDmemcpy(dest, s, s_len); } } @@ -3473,13 +2800,10 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD_s3comms_trim() */ - /*---------------------------------------------------------------------------- - * * Function: H5FD_s3comms_uriencode() * * Purpose: - * * URIencode (percent-encode) every byte except "[a-zA-Z0-9]-._~". * * For each character in source string `_s` from `s[0]` to `s[s_len-1]`, @@ -3501,7 +2825,6 @@ done: * `s_len == 0` will have no effect. * * Return: - * * - SUCCESS: `SUCCEED` * - FAILURE: `FAIL` * - source strings `s` or destination `dest` are NULL @@ -3509,24 +2832,18 @@ done: * * Programmer: Jacob Smith * 2017-07-?? - * *---------------------------------------------------------------------------- */ herr_t -H5FD_s3comms_uriencode( - char *dest, - const char *s, - size_t s_len, - hbool_t encode_slash, - size_t *n_written) +H5FD_s3comms_uriencode(char *dest, const char *s, size_t s_len, hbool_t encode_slash, size_t *n_written) { - char c = 0; - size_t dest_off = 0; + char c = 0; + size_t dest_off = 0; char hex_buffer[13]; - size_t hex_off = 0; - size_t hex_len = 0; + size_t hex_off = 0; + size_t hex_len = 0; herr_t ret_value = SUCCEED; - size_t s_off = 0; + size_t s_off = 0; FUNC_ENTER_NOAPI_NOINIT @@ -3534,43 +2851,28 @@ H5FD_s3comms_uriencode( HDfprintf(stdout, "H5FD_s3comms_uriencode called.\n"); #endif - if (s == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "source string cannot be NULL"); - } - if (dest == NULL) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "destination cannot be NULL"); - } + if (s == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "source string cannot be NULL"); + + if (dest == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination cannot be NULL"); /* Write characters to destination, converting to percent-encoded - * "hex-utf-8" strings if necessary. - * e.g., '$' -> "%24" - */ + * "hex-utf-8" strings if necessary. + * e.g., '$' -> "%24" + */ for (s_off = 0; s_off < s_len; s_off++) { c = s[s_off]; - if (isalnum(c) || - c == '.' || - c == '-' || - c == '_' || - c == '~' || - (c == '/' && encode_slash == FALSE)) - { + if (isalnum(c) || c == '.' || c == '-' || c == '_' || c == '~' || (c == '/' && encode_slash == FALSE)) { dest[dest_off++] = c; } else { hex_off = 0; - if (H5FD_s3comms_percent_encode_char( - hex_buffer, - (const unsigned char)c, - &hex_len) - == FAIL) - { + if (H5FD_s3comms_percent_encode_char(hex_buffer, (const unsigned char) c, &hex_len) == FAIL) { hex_buffer[0] = c; hex_buffer[1] = 0; - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to percent-encode character \'%s\' " - "at %d in \"%s\"", hex_buffer, (int)s_off, s); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to percent-encode character \'%s\' " + "at %d in \"%s\"", hex_buffer, (int )s_off, s); } for (hex_off = 0; hex_off < hex_len; hex_off++) { @@ -3580,8 +2882,7 @@ H5FD_s3comms_uriencode( } /* end for each character */ if (dest_off < s_len) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "buffer overflow"); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buffer overflow"); *n_written = dest_off; diff --git a/src/H5config.h.in b/src/H5config.h.in index a1a02bb..22a2289 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -52,6 +52,9 @@ /* Define if the function stack tracing code is to be compiled in */ #undef HAVE_CODESTACK +/* Define to 1 if you have the <curl/curl.h> header file. */ +#undef HAVE_CURL_CURL_H + /* Define if Darwin or Mac OS X */ #undef HAVE_DARWIN @@ -112,6 +115,9 @@ /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY +/* Define to 1 if you have the <hdfs.h> header file. */ +#undef HAVE_HDFS_H + /* Define if the compiler understands inline */ #undef HAVE_INLINE @@ -128,12 +134,24 @@ /* Define to 1 if you have the <io.h> header file. */ #undef HAVE_IO_H +/* Define to 1 if you have the `crypto' library (-lcrypto). */ +#undef HAVE_LIBCRYPTO + +/* Define to 1 if you have the `curl' library (-lcurl). */ +#undef HAVE_LIBCURL + /* 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 +/* Proceed to build with libhdfs */ +#undef HAVE_LIBHDFS + +/* Define to 1 if you have the `jvm' library (-ljvm). */ +#undef HAVE_LIBJVM + /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM @@ -176,6 +194,15 @@ /* Define if `MPI_Info_c2f' and `MPI_Info_f2c' exists */ #undef HAVE_MPI_MULTI_LANG_Info +/* Define to 1 if you have the <openssl/evp.h> header file. */ +#undef HAVE_OPENSSL_EVP_H + +/* Define to 1 if you have the <openssl/hmac.h> header file. */ +#undef HAVE_OPENSSL_HMAC_H + +/* Define to 1 if you have the <openssl/sha.h> header file. */ +#undef HAVE_OPENSSL_SHA_H + /* Define if we have parallel support */ #undef HAVE_PARALLEL @@ -188,6 +215,10 @@ /* Define to 1 if you have the `rand_r' function. */ #undef HAVE_RAND_R +/* Define whether the Read-Only S3 virtual file driver (VFD) should be + compiled */ +#undef HAVE_ROS3_VFD + /* Define to 1 if you have the `setjmp' function. */ #undef HAVE_SETJMP diff --git a/src/Makefile.in b/src/Makefile.in index 8284041..7b15785 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -107,6 +107,9 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = H5detect$(EXEEXT) H5make_libsettings$(EXEEXT) + +# Only compile the read-only S3 VFD if necessary +@ROS3_VFD_CONDITIONAL_TRUE@am__append_1 = H5FDros3.c H5FDs3comms.c TESTS = subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -151,6 +154,51 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(settingsdir)" \ "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libhdf5_la_LIBADD = +am__libhdf5_la_SOURCES_DIST = H5.c H5checksum.c H5dbg.c H5system.c \ + H5timer.c H5trace.c H5A.c H5Abtree2.c H5Adense.c H5Adeprec.c \ + H5Aint.c H5Atest.c H5AC.c H5B.c H5Bcache.c H5Bdbg.c H5B2.c \ + H5B2cache.c H5B2dbg.c H5B2hdr.c H5B2int.c H5B2stat.c \ + H5B2test.c H5C.c H5CS.c H5D.c H5Dbtree.c H5Dchunk.c \ + H5Dcompact.c H5Dcontig.c H5Ddbg.c H5Ddeprec.c H5Defl.c \ + H5Dfill.c H5Dint.c H5Dio.c H5Dlayout.c H5Dmpio.c H5Doh.c \ + H5Dscatgath.c H5Dselect.c H5Dtest.c H5E.c H5Edeprec.c H5Eint.c \ + H5F.c H5Fint.c H5Faccum.c H5Fcwfs.c H5Fdbg.c H5Fefc.c \ + H5Ffake.c H5Fio.c H5Fmount.c H5Fmpi.c H5Fquery.c H5Fsfile.c \ + H5Fsuper.c H5Fsuper_cache.c H5Ftest.c H5FD.c H5FDcore.c \ + H5FDdirect.c H5FDfamily.c H5FDhdfs.c H5FDint.c H5FDlog.c \ + H5FDmpi.c H5FDmpio.c H5FDmulti.c H5FDsec2.c H5FDspace.c \ + H5FDstdio.c H5FL.c H5FO.c H5FS.c H5FScache.c H5FSdbg.c \ + H5FSsection.c H5FSstat.c H5FStest.c H5G.c H5Gbtree2.c \ + H5Gcache.c H5Gcompact.c H5Gdense.c H5Gdeprec.c H5Gent.c \ + H5Gint.c H5Glink.c H5Gloc.c H5Gname.c H5Gnode.c H5Gobj.c \ + H5Goh.c H5Groot.c H5Gstab.c H5Gtest.c H5Gtraverse.c H5HF.c \ + H5HFbtree2.c H5HFcache.c H5HFdbg.c H5HFdblock.c H5HFdtable.c \ + H5HFhdr.c H5HFhuge.c H5HFiblock.c H5HFiter.c H5HFman.c \ + H5HFsection.c H5HFspace.c H5HFstat.c H5HFtest.c H5HFtiny.c \ + H5HG.c H5HGcache.c H5HGdbg.c H5HGquery.c H5HL.c H5HLcache.c \ + H5HLdbg.c H5HLint.c H5HP.c H5I.c H5Itest.c H5L.c H5Lexternal.c \ + H5lib_settings.c H5MF.c H5MFaggr.c H5MFdbg.c H5MFsection.c \ + H5MM.c H5MP.c H5MPtest.c H5O.c H5Oainfo.c H5Oalloc.c H5Oattr.c \ + H5Oattribute.c H5Obogus.c H5Obtreek.c H5Ocache.c H5Ochunk.c \ + H5Ocont.c H5Ocopy.c H5Odbg.c H5Odrvinfo.c H5Odtype.c H5Oefl.c \ + H5Ofill.c H5Oginfo.c H5Olayout.c H5Olinfo.c H5Olink.c \ + H5Omessage.c H5Omtime.c H5Oname.c H5Onull.c H5Opline.c \ + H5Orefcount.c H5Osdspace.c H5Oshared.c H5Ostab.c H5Oshmesg.c \ + H5Otest.c H5Ounknown.c H5P.c H5Pacpl.c H5Pdapl.c H5Pdcpl.c \ + H5Pdeprec.c H5Pdxpl.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 H5S.c \ + H5Sall.c H5Sdbg.c H5Shyper.c H5Smpio.c H5Snone.c H5Spoint.c \ + H5Sselect.c H5Stest.c H5SL.c H5SM.c H5SMbtree2.c H5SMcache.c \ + H5SMmessage.c H5SMtest.c H5ST.c H5T.c H5Tarray.c H5Tbit.c \ + H5Tcommit.c H5Tcompound.c H5Tconv.c H5Tcset.c H5Tdbg.c \ + H5Tdeprec.c H5Tenum.c H5Tfields.c H5Tfixed.c H5Tfloat.c \ + H5Tinit.c H5Tnative.c H5Toffset.c H5Toh.c H5Topaque.c \ + H5Torder.c H5Tpad.c H5Tprecis.c H5Tstrpad.c H5Tvisit.c \ + H5Tvlen.c H5TS.c H5VM.c H5WB.c H5Z.c H5Zdeflate.c \ + H5Zfletcher32.c H5Znbit.c H5Zshuffle.c H5Zscaleoffset.c \ + H5Zszip.c H5Ztrans.c H5FDros3.c H5FDs3comms.c +@ROS3_VFD_CONDITIONAL_TRUE@am__objects_1 = H5FDros3.lo H5FDs3comms.lo am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \ H5timer.lo H5trace.lo H5A.lo H5Abtree2.lo H5Adense.lo \ H5Adeprec.lo H5Aint.lo H5Atest.lo H5AC.lo H5B.lo H5Bcache.lo \ @@ -163,10 +211,9 @@ am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \ H5Faccum.lo H5Fcwfs.lo H5Fdbg.lo H5Fefc.lo H5Ffake.lo H5Fio.lo \ H5Fmount.lo H5Fmpi.lo H5Fquery.lo H5Fsfile.lo H5Fsuper.lo \ H5Fsuper_cache.lo H5Ftest.lo H5FD.lo H5FDcore.lo H5FDdirect.lo \ - H5FDfamily.lo H5FDhdfs.lo H5FDint.lo H5FDlog.lo H5FDs3comms.lo \ - H5FDmpi.lo H5FDmpio.lo H5FDmulti.lo H5FDros3.lo H5FDsec2.lo \ - H5FDspace.lo H5FDstdio.lo H5FL.lo \ - H5FO.lo H5FS.lo H5FScache.lo H5FSdbg.lo H5FSsection.lo \ + H5FDfamily.lo H5FDhdfs.lo H5FDint.lo H5FDlog.lo H5FDmpi.lo \ + H5FDmpio.lo H5FDmulti.lo H5FDsec2.lo H5FDspace.lo H5FDstdio.lo \ + H5FL.lo H5FO.lo H5FS.lo H5FScache.lo H5FSdbg.lo H5FSsection.lo \ H5FSstat.lo H5FStest.lo H5G.lo H5Gbtree2.lo H5Gcache.lo \ H5Gcompact.lo H5Gdense.lo H5Gdeprec.lo H5Gent.lo H5Gint.lo \ H5Glink.lo H5Gloc.lo H5Gname.lo H5Gnode.lo H5Gobj.lo H5Goh.lo \ @@ -198,8 +245,8 @@ am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \ H5Toffset.lo H5Toh.lo H5Topaque.lo H5Torder.lo H5Tpad.lo \ H5Tprecis.lo H5Tstrpad.lo H5Tvisit.lo H5Tvlen.lo H5TS.lo \ H5VM.lo H5WB.lo H5Z.lo H5Zdeflate.lo H5Zfletcher32.lo \ - H5Znbit.lo H5Zshuffle.lo H5Zszip.lo H5Zscaleoffset.lo \ - H5Ztrans.lo + H5Znbit.lo H5Zshuffle.lo H5Zscaleoffset.lo H5Zszip.lo \ + H5Ztrans.lo $(am__objects_1) libhdf5_la_OBJECTS = $(am_libhdf5_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -250,7 +297,8 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libhdf5_la_SOURCES) H5detect.c H5make_libsettings.c -DIST_SOURCES = $(libhdf5_la_SOURCES) H5detect.c H5make_libsettings.c +DIST_SOURCES = $(am__libhdf5_la_SOURCES_DIST) H5detect.c \ + H5make_libsettings.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -531,12 +579,12 @@ H5_CPPFLAGS = @H5_CPPFLAGS@ H5_CXXFLAGS = @H5_CXXFLAGS@ H5_FCFLAGS = @H5_FCFLAGS@ H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@ -HAVE_LIBHDFS = @HAVE_LIBHDFS@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -557,6 +605,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -769,69 +818,50 @@ MOSTLYCLEANFILES = H5Tinit.c H5lib_settings.c DISTCLEANFILES = H5pubconf.h $(H5CC_NAME) # library sources -libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ - H5A.c H5Abtree2.c H5Adense.c H5Adeprec.c H5Aint.c H5Atest.c \ - H5AC.c H5B.c H5Bcache.c H5Bdbg.c \ - H5B2.c H5B2cache.c H5B2dbg.c H5B2hdr.c H5B2int.c H5B2stat.c H5B2test.c \ - H5C.c H5CS.c \ - H5D.c H5Dbtree.c H5Dchunk.c H5Dcompact.c H5Dcontig.c H5Ddbg.c \ - H5Ddeprec.c H5Defl.c H5Dfill.c H5Dint.c \ - H5Dio.c H5Dlayout.c \ - H5Dmpio.c H5Doh.c H5Dscatgath.c H5Dselect.c H5Dtest.c \ - H5E.c H5Edeprec.c H5Eint.c \ - H5F.c H5Fint.c H5Faccum.c H5Fcwfs.c \ - H5Fdbg.c H5Fefc.c H5Ffake.c H5Fio.c \ - H5Fmount.c H5Fmpi.c H5Fquery.c \ - H5Fsfile.c H5Fsuper.c H5Fsuper_cache.c H5Ftest.c \ - H5FD.c H5FDcore.c \ - H5FDdirect.c H5FDfamily.c H5FDhdfs.c H5FDint.c H5FDlog.c H5FDmpi.c H5FDmpio.c H5FDs3comms.c \ - H5FDmulti.c H5FDros3.c H5FDsec2.c H5FDspace.c H5FDstdio.c \ - H5FL.c H5FO.c H5FS.c H5FScache.c H5FSdbg.c H5FSsection.c H5FSstat.c H5FStest.c \ - H5G.c H5Gbtree2.c H5Gcache.c \ - H5Gcompact.c H5Gdense.c H5Gdeprec.c H5Gent.c \ - H5Gint.c H5Glink.c \ - H5Gloc.c H5Gname.c H5Gnode.c H5Gobj.c H5Goh.c H5Groot.c H5Gstab.c H5Gtest.c \ - H5Gtraverse.c \ - H5HF.c H5HFbtree2.c H5HFcache.c H5HFdbg.c H5HFdblock.c H5HFdtable.c \ - H5HFhdr.c H5HFhuge.c H5HFiblock.c H5HFiter.c H5HFman.c H5HFsection.c \ - H5HFspace.c H5HFstat.c H5HFtest.c H5HFtiny.c \ - H5HG.c H5HGcache.c H5HGdbg.c H5HGquery.c \ - H5HL.c H5HLcache.c H5HLdbg.c H5HLint.c \ - H5HP.c H5I.c H5Itest.c H5L.c H5Lexternal.c H5lib_settings.c \ - H5MF.c H5MFaggr.c H5MFdbg.c H5MFsection.c \ - H5MM.c H5MP.c H5MPtest.c \ - H5O.c H5Oainfo.c H5Oalloc.c H5Oattr.c \ - H5Oattribute.c H5Obogus.c H5Obtreek.c H5Ocache.c H5Ochunk.c \ - H5Ocont.c H5Ocopy.c H5Odbg.c H5Odrvinfo.c H5Odtype.c H5Oefl.c \ - H5Ofill.c H5Oginfo.c \ - H5Olayout.c \ - H5Olinfo.c H5Olink.c H5Omessage.c H5Omtime.c \ - H5Oname.c H5Onull.c H5Opline.c H5Orefcount.c \ - H5Osdspace.c H5Oshared.c H5Ostab.c \ - H5Oshmesg.c H5Otest.c H5Ounknown.c \ - H5P.c H5Pacpl.c H5Pdapl.c H5Pdcpl.c \ - H5Pdeprec.c H5Pdxpl.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 \ - H5S.c H5Sall.c H5Sdbg.c H5Shyper.c H5Smpio.c H5Snone.c H5Spoint.c \ - H5Sselect.c H5Stest.c \ - H5SL.c \ - H5SM.c H5SMbtree2.c H5SMcache.c H5SMmessage.c H5SMtest.c \ - H5ST.c \ - H5T.c H5Tarray.c H5Tbit.c H5Tcommit.c H5Tcompound.c H5Tconv.c \ - H5Tcset.c H5Tdbg.c H5Tdeprec.c H5Tenum.c H5Tfields.c \ - H5Tfixed.c \ - H5Tfloat.c H5Tinit.c H5Tnative.c H5Toffset.c H5Toh.c \ - H5Topaque.c \ - H5Torder.c \ - H5Tpad.c H5Tprecis.c H5Tstrpad.c H5Tvisit.c H5Tvlen.c H5TS.c H5VM.c H5WB.c H5Z.c \ - H5Zdeflate.c H5Zfletcher32.c H5Znbit.c H5Zshuffle.c H5Zszip.c \ - H5Zscaleoffset.c H5Ztrans.c - +libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c \ + H5trace.c H5A.c H5Abtree2.c H5Adense.c H5Adeprec.c H5Aint.c \ + H5Atest.c H5AC.c H5B.c H5Bcache.c H5Bdbg.c H5B2.c H5B2cache.c \ + H5B2dbg.c H5B2hdr.c H5B2int.c H5B2stat.c H5B2test.c H5C.c \ + H5CS.c H5D.c H5Dbtree.c H5Dchunk.c H5Dcompact.c H5Dcontig.c \ + H5Ddbg.c H5Ddeprec.c H5Defl.c H5Dfill.c H5Dint.c H5Dio.c \ + H5Dlayout.c H5Dmpio.c H5Doh.c H5Dscatgath.c H5Dselect.c \ + H5Dtest.c H5E.c H5Edeprec.c H5Eint.c H5F.c H5Fint.c H5Faccum.c \ + H5Fcwfs.c H5Fdbg.c H5Fefc.c H5Ffake.c H5Fio.c H5Fmount.c \ + H5Fmpi.c H5Fquery.c H5Fsfile.c H5Fsuper.c H5Fsuper_cache.c \ + H5Ftest.c H5FD.c H5FDcore.c H5FDdirect.c H5FDfamily.c \ + H5FDhdfs.c H5FDint.c H5FDlog.c H5FDmpi.c H5FDmpio.c \ + H5FDmulti.c H5FDsec2.c H5FDspace.c H5FDstdio.c H5FL.c H5FO.c \ + H5FS.c H5FScache.c H5FSdbg.c H5FSsection.c H5FSstat.c \ + H5FStest.c H5G.c H5Gbtree2.c H5Gcache.c H5Gcompact.c \ + H5Gdense.c H5Gdeprec.c H5Gent.c H5Gint.c H5Glink.c H5Gloc.c \ + H5Gname.c H5Gnode.c H5Gobj.c H5Goh.c H5Groot.c H5Gstab.c \ + H5Gtest.c H5Gtraverse.c H5HF.c H5HFbtree2.c H5HFcache.c \ + H5HFdbg.c H5HFdblock.c H5HFdtable.c H5HFhdr.c H5HFhuge.c \ + H5HFiblock.c H5HFiter.c H5HFman.c H5HFsection.c H5HFspace.c \ + H5HFstat.c H5HFtest.c H5HFtiny.c H5HG.c H5HGcache.c H5HGdbg.c \ + H5HGquery.c H5HL.c H5HLcache.c H5HLdbg.c H5HLint.c H5HP.c \ + H5I.c H5Itest.c H5L.c H5Lexternal.c H5lib_settings.c H5MF.c \ + H5MFaggr.c H5MFdbg.c H5MFsection.c H5MM.c H5MP.c H5MPtest.c \ + H5O.c H5Oainfo.c H5Oalloc.c H5Oattr.c H5Oattribute.c \ + H5Obogus.c H5Obtreek.c H5Ocache.c H5Ochunk.c H5Ocont.c \ + H5Ocopy.c H5Odbg.c H5Odrvinfo.c H5Odtype.c H5Oefl.c H5Ofill.c \ + H5Oginfo.c H5Olayout.c H5Olinfo.c H5Olink.c H5Omessage.c \ + H5Omtime.c H5Oname.c H5Onull.c H5Opline.c H5Orefcount.c \ + H5Osdspace.c H5Oshared.c H5Ostab.c H5Oshmesg.c H5Otest.c \ + H5Ounknown.c H5P.c H5Pacpl.c H5Pdapl.c H5Pdcpl.c H5Pdeprec.c \ + H5Pdxpl.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 H5S.c \ + H5Sall.c H5Sdbg.c H5Shyper.c H5Smpio.c H5Snone.c H5Spoint.c \ + H5Sselect.c H5Stest.c H5SL.c H5SM.c H5SMbtree2.c H5SMcache.c \ + H5SMmessage.c H5SMtest.c H5ST.c H5T.c H5Tarray.c H5Tbit.c \ + H5Tcommit.c H5Tcompound.c H5Tconv.c H5Tcset.c H5Tdbg.c \ + H5Tdeprec.c H5Tenum.c H5Tfields.c H5Tfixed.c H5Tfloat.c \ + H5Tinit.c H5Tnative.c H5Toffset.c H5Toh.c H5Topaque.c \ + H5Torder.c H5Tpad.c H5Tprecis.c H5Tstrpad.c H5Tvisit.c \ + H5Tvlen.c H5TS.c H5VM.c H5WB.c H5Z.c H5Zdeflate.c \ + H5Zfletcher32.c H5Znbit.c H5Zshuffle.c H5Zscaleoffset.c \ + H5Zszip.c H5Ztrans.c $(am__append_1) # Public headers include_HEADERS = hdf5.h H5api_adpt.h H5overflow.h H5pubconf.h H5public.h H5version.h \ @@ -839,8 +869,8 @@ include_HEADERS = hdf5.h H5api_adpt.h H5overflow.h H5pubconf.h H5public.h H5vers H5Cpublic.h H5Dpublic.h \ H5Epubgen.h H5Epublic.h H5Fpublic.h \ H5FDpublic.h H5FDcore.h H5FDdirect.h \ - H5FDfamily.h H5FDlog.h H5FDmpi.h H5FDmpio.h \ - H5FDmulti.h H5FDsec2.h H5FDstdio.h \ + H5FDfamily.h H5FDhdfs.h H5FDlog.h H5FDmpi.h H5FDmpio.h \ + H5FDmulti.h H5FDros3.h H5FDsec2.h H5FDstdio.h \ H5Gpublic.h H5Ipublic.h H5Lpublic.h \ H5MMpublic.h H5Opublic.h H5Ppublic.h \ H5PLextern.h H5PLpublic.h \ @@ -1031,11 +1061,14 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDcore.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDdirect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDfamily.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDhdfs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDlog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDmpi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDmpio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDmulti.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDros3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDs3comms.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDsec2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDspace.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FDstdio.Plo@am__quote@ diff --git a/test/Makefile.in b/test/Makefile.in index e7d36a3..9948f78 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -177,10 +177,11 @@ am__EXEEXT_1 = testhdf5$(EXEEXT) lheap$(EXEEXT) ohdr$(EXEEXT) \ big$(EXEEXT) mtime$(EXEEXT) fillval$(EXEEXT) mount$(EXEEXT) \ flush1$(EXEEXT) flush2$(EXEEXT) app_ref$(EXEEXT) enum$(EXEEXT) \ set_extent$(EXEEXT) ttsafe$(EXEEXT) getname$(EXEEXT) \ - vfd$(EXEEXT) ntypes$(EXEEXT) dangle$(EXEEXT) \ - dtransform$(EXEEXT) reserved$(EXEEXT) cross_read$(EXEEXT) \ - freespace$(EXEEXT) mf$(EXEEXT) btree2$(EXEEXT) fheap$(EXEEXT) \ - file_image$(EXEEXT) unregister$(EXEEXT) + vfd$(EXEEXT) ros3$(EXEEXT) s3comms$(EXEEXT) hdfs$(EXEEXT) \ + ntypes$(EXEEXT) dangle$(EXEEXT) dtransform$(EXEEXT) \ + reserved$(EXEEXT) cross_read$(EXEEXT) freespace$(EXEEXT) \ + mf$(EXEEXT) btree2$(EXEEXT) fheap$(EXEEXT) file_image$(EXEEXT) \ + unregister$(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) \ @@ -375,6 +376,10 @@ gheap_SOURCES = gheap.c gheap_OBJECTS = gheap.$(OBJEXT) gheap_LDADD = $(LDADD) gheap_DEPENDENCIES = libh5test.la $(LIBHDF5) +hdfs_SOURCES = hdfs.c +hdfs_OBJECTS = hdfs.$(OBJEXT) +hdfs_LDADD = $(LDADD) +hdfs_DEPENDENCIES = libh5test.la $(LIBHDF5) hyperslab_SOURCES = hyperslab.c hyperslab_OBJECTS = hyperslab.$(OBJEXT) hyperslab_LDADD = $(LDADD) @@ -431,6 +436,14 @@ reserved_SOURCES = reserved.c reserved_OBJECTS = reserved.$(OBJEXT) reserved_LDADD = $(LDADD) reserved_DEPENDENCIES = libh5test.la $(LIBHDF5) +ros3_SOURCES = ros3.c +ros3_OBJECTS = ros3.$(OBJEXT) +ros3_LDADD = $(LDADD) +ros3_DEPENDENCIES = libh5test.la $(LIBHDF5) +s3comms_SOURCES = s3comms.c +s3comms_OBJECTS = s3comms.$(OBJEXT) +s3comms_LDADD = $(LDADD) +s3comms_DEPENDENCIES = libh5test.la $(LIBHDF5) set_extent_SOURCES = set_extent.c set_extent_OBJECTS = set_extent.$(OBJEXT) set_extent_LDADD = $(LDADD) @@ -527,11 +540,11 @@ SOURCES = $(libdynlib1_la_SOURCES) $(libdynlib2_la_SOURCES) \ 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_sizes_lheap.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 plugin.c pool.c \ - reserved.c set_extent.c space_overflow.c stab.c \ - tcheck_version.c $(testhdf5_SOURCES) testmeta.c \ - $(ttsafe_SOURCES) unlink.c unregister.c vfd.c + gheap.c hdfs.c hyperslab.c istore.c lheap.c links.c \ + links_env.c mf.c mount.c mtime.c ntypes.c objcopy.c ohdr.c \ + plugin.c pool.c reserved.c ros3.c s3comms.c set_extent.c \ + space_overflow.c stab.c tcheck_version.c $(testhdf5_SOURCES) \ + testmeta.c $(ttsafe_SOURCES) unlink.c unregister.c vfd.c DIST_SOURCES = $(am__libdynlib1_la_SOURCES_DIST) \ $(am__libdynlib2_la_SOURCES_DIST) \ $(am__libdynlib3_la_SOURCES_DIST) \ @@ -545,12 +558,12 @@ DIST_SOURCES = $(am__libdynlib1_la_SOURCES_DIST) \ gen_deflate.c gen_file_image.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_sizes_lheap.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 plugin.c pool.c reserved.c \ - set_extent.c space_overflow.c stab.c tcheck_version.c \ - $(testhdf5_SOURCES) testmeta.c $(ttsafe_SOURCES) unlink.c \ - unregister.c vfd.c + gen_sizes_lheap.c gen_udlinks.c getname.c gheap.c hdfs.c \ + hyperslab.c istore.c lheap.c links.c links_env.c mf.c mount.c \ + mtime.c ntypes.c objcopy.c ohdr.c plugin.c pool.c reserved.c \ + ros3.c s3comms.c set_extent.c space_overflow.c stab.c \ + tcheck_version.c $(testhdf5_SOURCES) testmeta.c \ + $(ttsafe_SOURCES) unlink.c unregister.c vfd.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -864,6 +877,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -884,6 +898,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -919,6 +934,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ @@ -1085,10 +1101,11 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 accum.h5 \ unlink_chunked.h5 btree2.h5 objcopy_src.h5 objcopy_dst.h5 \ objcopy_ext.dat trefer1.h5 trefer2.h5 app_ref.h5 \ tcheck_version_*.out tcheck_version_*.err efc[0-5].h5 \ - log_vfd_out.log new_multi_file_v16-r.h5 \ - new_multi_file_v16-s.h5 split_get_file_image_test-m.h5 \ - split_get_file_image_test-r.h5 file_image_core_test.h5.copy \ - unregister_filter_1.h5 unregister_filter_2.h5 + log_vfd_out.log log_ros3_out.log log_s3comms_out.log \ + new_multi_file_v16-r.h5 new_multi_file_v16-s.h5 \ + split_get_file_image_test-m.h5 split_get_file_image_test-r.h5 \ + file_image_core_test.h5.copy unregister_filter_1.h5 \ + unregister_filter_2.h5 # Test script for error_test and err_compat TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh \ @@ -1109,7 +1126,7 @@ TEST_PROG = testhdf5 lheap ohdr stab gheap cache cache_api \ dtypes dsets cmpd_dset filter_fail extend external efc objcopy links unlink \ big mtime fillval mount flush1 flush2 app_ref enum \ set_extent ttsafe \ - getname vfd ntypes dangle dtransform reserved cross_read \ + getname vfd ros3 s3comms hdfs ntypes dangle dtransform reserved cross_read \ freespace mf btree2 fheap file_image unregister @@ -1464,6 +1481,10 @@ gheap$(EXEEXT): $(gheap_OBJECTS) $(gheap_DEPENDENCIES) $(EXTRA_gheap_DEPENDENCIE @rm -f gheap$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gheap_OBJECTS) $(gheap_LDADD) $(LIBS) +hdfs$(EXEEXT): $(hdfs_OBJECTS) $(hdfs_DEPENDENCIES) $(EXTRA_hdfs_DEPENDENCIES) + @rm -f hdfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(hdfs_OBJECTS) $(hdfs_LDADD) $(LIBS) + hyperslab$(EXEEXT): $(hyperslab_OBJECTS) $(hyperslab_DEPENDENCIES) $(EXTRA_hyperslab_DEPENDENCIES) @rm -f hyperslab$(EXEEXT) $(AM_V_CCLD)$(LINK) $(hyperslab_OBJECTS) $(hyperslab_LDADD) $(LIBS) @@ -1520,6 +1541,14 @@ reserved$(EXEEXT): $(reserved_OBJECTS) $(reserved_DEPENDENCIES) $(EXTRA_reserved @rm -f reserved$(EXEEXT) $(AM_V_CCLD)$(LINK) $(reserved_OBJECTS) $(reserved_LDADD) $(LIBS) +ros3$(EXEEXT): $(ros3_OBJECTS) $(ros3_DEPENDENCIES) $(EXTRA_ros3_DEPENDENCIES) + @rm -f ros3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ros3_OBJECTS) $(ros3_LDADD) $(LIBS) + +s3comms$(EXEEXT): $(s3comms_OBJECTS) $(s3comms_DEPENDENCIES) $(EXTRA_s3comms_DEPENDENCIES) + @rm -f s3comms$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(s3comms_OBJECTS) $(s3comms_LDADD) $(LIBS) + set_extent$(EXEEXT): $(set_extent_OBJECTS) $(set_extent_DEPENDENCIES) $(EXTRA_set_extent_DEPENDENCIES) @rm -f set_extent$(EXEEXT) $(AM_V_CCLD)$(LINK) $(set_extent_OBJECTS) $(set_extent_LDADD) $(LIBS) @@ -1618,6 +1647,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gheap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5test.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hdfs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hyperslab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/istore.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lheap.Po@am__quote@ @@ -1632,6 +1662,8 @@ distclean-compile: @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)/ros3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s3comms.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_extent.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/space_overflow.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stab.Po@am__quote@ @@ -2127,6 +2159,27 @@ vfd.log: vfd$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +ros3.log: ros3$(EXEEXT) + @p='ros3$(EXEEXT)'; \ + b='ros3'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +s3comms.log: s3comms$(EXEEXT) + @p='s3comms$(EXEEXT)'; \ + b='s3comms'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +hdfs.log: hdfs$(EXEEXT) + @p='hdfs$(EXEEXT)'; \ + b='hdfs'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) ntypes.log: ntypes$(EXEEXT) @p='ntypes$(EXEEXT)'; \ b='ntypes'; \ diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 56137c3..e9546fe 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -508,6 +508,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -528,6 +529,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -563,6 +565,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/tools/Makefile.in b/tools/Makefile.in index 73be063..4722302 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -477,6 +477,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -497,6 +498,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -532,6 +534,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index 124d51f..8682850 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -476,6 +476,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -496,6 +497,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -531,6 +533,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index 5aede16..95dfbb6 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -505,6 +505,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -525,6 +526,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -560,6 +562,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 7029fff..702dc2d 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -508,6 +508,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -528,6 +529,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -563,6 +565,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index 646599c..6fc85ae 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -477,6 +477,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -497,6 +498,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -532,6 +534,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index 38ea9af..06d2f7c 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -495,6 +495,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -515,6 +516,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -550,6 +552,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index ab8bfed..2ab6804 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -490,6 +490,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -510,6 +511,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -545,6 +547,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index 8281d83..812afbd 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -144,7 +144,8 @@ libdynlibvers_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ -o $@ @BUILD_TESTS_CONDITIONAL_TRUE@@HAVE_SHARED_CONDITIONAL_TRUE@@NOT_UNAME_CYGWIN_TRUE@am_libdynlibvers_la_rpath = am__installdirs = "$(DESTDIR)$(bindir)" -@BUILD_TESTS_CONDITIONAL_TRUE@am__EXEEXT_1 = h5repacktst$(EXEEXT) +@BUILD_TESTS_CONDITIONAL_TRUE@am__EXEEXT_1 = h5repacktst$(EXEEXT) \ +@BUILD_TESTS_CONDITIONAL_TRUE@ h5repackgentest$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am__objects_1 = h5repack.$(OBJEXT) h5repack_copy.$(OBJEXT) \ h5repack_filters.$(OBJEXT) h5repack_opttable.$(OBJEXT) \ @@ -160,6 +161,14 @@ h5repack_LDADD = $(LDADD) h5repack_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(h5repack_LDFLAGS) $(LDFLAGS) -o $@ +h5repackgentest_SOURCES = h5repackgentest.c +h5repackgentest_OBJECTS = h5repackgentest.$(OBJEXT) +h5repackgentest_LDADD = $(LDADD) +@BUILD_TESTS_CONDITIONAL_FALSE@h5repackgentest_DEPENDENCIES = \ +@BUILD_TESTS_CONDITIONAL_FALSE@ $(LIBH5TOOLS) $(LIBHDF5) +@BUILD_TESTS_CONDITIONAL_TRUE@h5repackgentest_DEPENDENCIES = \ +@BUILD_TESTS_CONDITIONAL_TRUE@ $(LIBH5TOOLS) $(LIBH5TEST) \ +@BUILD_TESTS_CONDITIONAL_TRUE@ $(LIBHDF5) am__h5repacktst_SOURCES_DIST = h5repack.c h5repack_copy.c \ h5repack_filters.c h5repack_opttable.c h5repack_parse.c \ h5repack_refs.c h5repack_verify.c h5repacktst.c @@ -219,11 +228,11 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdynlibadd_la_SOURCES) $(libdynlibvers_la_SOURCES) \ - $(h5repack_SOURCES) $(h5repacktst_SOURCES) \ + $(h5repack_SOURCES) h5repackgentest.c $(h5repacktst_SOURCES) \ $(testh5repack_detect_szip_SOURCES) DIST_SOURCES = $(am__libdynlibadd_la_SOURCES_DIST) \ $(am__libdynlibvers_la_SOURCES_DIST) $(h5repack_SOURCES) \ - $(am__h5repacktst_SOURCES_DIST) \ + h5repackgentest.c $(am__h5repacktst_SOURCES_DIST) \ $(am__testh5repack_detect_szip_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ @@ -472,7 +481,8 @@ AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ # Include src, test, and tools/lib directories AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \ - -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib + -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib \ + -I$(top_srcdir)/tools/h5repack AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ @@ -540,6 +550,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -560,6 +571,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -595,6 +607,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ @@ -734,7 +747,8 @@ TRACE = perl $(top_srcdir)/bin/trace # Temporary files. *.h5 are generated by h5repack. They should # copied to the testfiles/ directory if update is required. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 *.bin \ +# *.dat files may be created by h5repackgentest. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 *.dat *.bin \ testfiles/h5diff_attr1.h5 testfiles/tfamily*.h5 @BUILD_TESTS_CONDITIONAL_FALSE@TEST_SCRIPT = @@ -742,7 +756,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 *.bin \ @BUILD_TESTS_CONDITIONAL_TRUE@TEST_SCRIPT = h5repack.sh \ @BUILD_TESTS_CONDITIONAL_TRUE@ $(am__append_1) @BUILD_TESTS_CONDITIONAL_FALSE@TEST_PROG = -@BUILD_TESTS_CONDITIONAL_TRUE@TEST_PROG = h5repacktst +@BUILD_TESTS_CONDITIONAL_TRUE@TEST_PROG = h5repacktst h5repackgentest SCRIPT_DEPEND = h5repack$(EXEEXT) check_SCRIPTS = $(TEST_SCRIPT) @@ -929,6 +943,10 @@ h5repack$(EXEEXT): $(h5repack_OBJECTS) $(h5repack_DEPENDENCIES) $(EXTRA_h5repack @rm -f h5repack$(EXEEXT) $(AM_V_CCLD)$(h5repack_LINK) $(h5repack_OBJECTS) $(h5repack_LDADD) $(LIBS) +h5repackgentest$(EXEEXT): $(h5repackgentest_OBJECTS) $(h5repackgentest_DEPENDENCIES) $(EXTRA_h5repackgentest_DEPENDENCIES) + @rm -f h5repackgentest$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5repackgentest_OBJECTS) $(h5repackgentest_LDADD) $(LIBS) + h5repacktst$(EXEEXT): $(h5repacktst_OBJECTS) $(h5repacktst_DEPENDENCIES) $(EXTRA_h5repacktst_DEPENDENCIES) @rm -f h5repacktst$(EXEEXT) $(AM_V_CCLD)$(LINK) $(h5repacktst_OBJECTS) $(h5repacktst_LDADD) $(LIBS) @@ -953,6 +971,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5repack_parse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5repack_refs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5repack_verify.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5repackgentest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5repacktst.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testh5repack_detect_szip.Po@am__quote@ @@ -1172,6 +1191,13 @@ h5repacktst.log: h5repacktst$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +h5repackgentest.log: h5repackgentest$(EXEEXT) + @p='h5repackgentest$(EXEEXT)'; \ + b='h5repackgentest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) .sh.log: @p='$<'; \ $(am__set_b); \ diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index 5475c49..60bb4bc 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -478,6 +478,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -498,6 +499,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -533,6 +535,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index d5d414c..1d5863c 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -473,6 +473,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -493,6 +494,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -528,6 +530,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/tools/libtest/Makefile.in b/tools/libtest/Makefile.in new file mode 100644 index 0000000..2f934bf --- /dev/null +++ b/tools/libtest/Makefile.in @@ -0,0 +1,1419 @@ +# Makefile.in generated by automake 1.15 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Read-Only S3 Virtual File Driver (VFD) +# Copyright (c) 2017-2018, The HDF Group. +# +# All rights reserved. +# +# NOTICE: +# All information contained herein is, and remains, the property of The HDF +# Group. The intellectual and technical concepts contained herein are +# proprietary to The HDF Group. Dissemination of this information or +# reproduction of this material is strictly forbidden unless prior written +# permission is obtained from The HDF Group. +# +# HDF5 Library Makefile(.in) +# + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = h5tools_test_utils$(EXEEXT) +TESTS = +subdir = tools/libtest +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \ + $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/src/H5config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +h5tools_test_utils_SOURCES = h5tools_test_utils.c +h5tools_test_utils_OBJECTS = h5tools_test_utils.$(OBJEXT) +h5tools_test_utils_LDADD = $(LDADD) +h5tools_test_utils_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5) +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_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +depcomp = $(SHELL) $(top_srcdir)/bin/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +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 = h5tools_test_utils.c +DIST_SOURCES = h5tools_test_utils.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ + fi; \ +} +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__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.sh.log=.log) +SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver +SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/bin/depcomp \ + $(top_srcdir)/bin/mkinstalldirs $(top_srcdir)/bin/test-driver \ + $(top_srcdir)/config/commence.am \ + $(top_srcdir)/config/conclude.am +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@ +AMTAR = @AMTAR@ + +# H5_CFLAGS holds flags that should be used when building hdf5, +# but which should not be exported to h5cc for building other programs. +# AM_CFLAGS is an automake construct which should be used by Makefiles +# instead of CFLAGS, as CFLAGS is reserved solely for the user to define. +# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well. +AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ + +# Include src and tools/lib directories +AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \ + -I$(top_srcdir)/tools/lib +AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ +AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BYTESEX = @BYTESEX@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_VERSION = @CC_VERSION@ +CFLAGS = @CFLAGS@ +CLEARFILEBUF = @CLEARFILEBUF@ +CODESTACK = @CODESTACK@ +CONFIG_DATE = @CONFIG_DATE@ +CONFIG_MODE = @CONFIG_MODE@ +CONFIG_USER = @CONFIG_USER@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXX_VERSION = @CXX_VERSION@ +CYGPATH_W = @CYGPATH_W@ +DEBUG_PKG = @DEBUG_PKG@ +DEFAULT_API_VERSION = @DEFAULT_API_VERSION@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@ +DIRECT_VFD = @DIRECT_VFD@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +EXTERNAL_FILTERS = @EXTERNAL_FILTERS@ + +# Make sure that these variables are exported to the Makefiles +F9XMODEXT = @F9XMODEXT@ +F9XMODFLAG = @F9XMODFLAG@ +F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ +FC = @FC@ +FC2003 = @FC2003@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_f90 = @FCFLAGS_f90@ +FCLIBS = @FCLIBS@ +FC_VERSION = @FC_VERSION@ +FGREP = @FGREP@ +FSEARCH_DIRS = @FSEARCH_DIRS@ +GREP = @GREP@ +H5_CFLAGS = @H5_CFLAGS@ +H5_CPPFLAGS = @H5_CPPFLAGS@ +H5_CXXFLAGS = @H5_CXXFLAGS@ +H5_FCFLAGS = @H5_FCFLAGS@ +H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@ +H5_LDFLAGS = @H5_LDFLAGS@ +H5_VERSION = @H5_VERSION@ +HADDR_T = @HADDR_T@ +HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ +HAVE_PTHREAD = @HAVE_PTHREAD@ +HDF5_HL = @HDF5_HL@ +HDF5_INTERFACES = @HDF5_INTERFACES@ +HDF5_TESTS = @HDF5_TESTS@ +HDF5_TOOLS = @HDF5_TOOLS@ +HDF_CXX = @HDF_CXX@ +HDF_FORTRAN = @HDF_FORTRAN@ +HDF_FORTRAN2003 = @HDF_FORTRAN2003@ +HID_T = @HID_T@ +HL = @HL@ +HL_FOR = @HL_FOR@ +HSIZE_T = @HSIZE_T@ +HSSIZE_T = @HSSIZE_T@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTRUMENT = @INSTRUMENT@ +INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LL_PATH = @LL_PATH@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_STATIC_EXEC = @LT_STATIC_EXEC@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MPE = @MPE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PARALLEL = @PARALLEL@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +RANLIB = @RANLIB@ +ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ +RUNPARALLEL = @RUNPARALLEL@ +RUNSERIAL = @RUNSERIAL@ +R_INTEGER = @R_INTEGER@ +R_LARGE = @R_LARGE@ +SEARCH = @SEARCH@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIZE_T = @SIZE_T@ +STATIC_EXEC = @STATIC_EXEC@ +STATIC_SHARED = @STATIC_SHARED@ +STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@ +STRIP = @STRIP@ +TESTPARALLEL = @TESTPARALLEL@ +THREADSAFE = @THREADSAFE@ +TIME = @TIME@ +TR = @TR@ +TRACE_API = @TRACE_API@ +UNAME_CYGWIN = @UNAME_CYGWIN@ +UNAME_INFO = @UNAME_INFO@ +USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@ +USE_FILTER_SZIP = @USE_FILTER_SZIP@ +USINGMEMCHECKER = @USINGMEMCHECKER@ +VERSION = @VERSION@ +WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ + +# Install directories that automake doesn't know about +docdir = $(exec_prefix)/doc +dvidir = @dvidir@ +enable_shared = @enable_shared@ +enable_static = @enable_static@ +exec_prefix = @exec_prefix@ +fortran_linux_linker_option = @fortran_linux_linker_option@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# Shell commands used in Makefiles +RM = rm -f +CP = cp + +# Some machines need a command to run executables; this is that command +# so that our tests will run. +# We use RUNEXEC instead of RUNSERIAL directly because it may be that +# some tests need to be run with a different command. Older versions +# of the makefiles used the command +# $(LIBTOOL) --mode=execute +# in some directories, for instance. +RUNEXEC = $(RUNSERIAL) + +# Libraries to link to while building +LIBHDF5 = $(top_builddir)/src/libhdf5.la +LIBH5TEST = $(top_builddir)/test/libh5test.la +LIBH5F = $(top_builddir)/fortran/src/libhdf5_fortran.la +LIBH5FTEST = $(top_builddir)/fortran/test/libh5test_fortran.la +LIBH5CPP = $(top_builddir)/c++/src/libhdf5_cpp.la +LIBH5TOOLS = $(top_builddir)/tools/lib/libh5tools.la +LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la +LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la +LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la + +# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below +# has been removed. According to the official description of DESTDIR by Gnu at +# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is +# prepended to the normal and complete install path that it precedes for the +# purpose of installing in a temporary directory which is useful for building +# rpms and other packages. The '/' after ${DESTDIR} will be followed by another +# '/' at the beginning of the normal install path. When DESTDIR is empty the +# path then begins with '//', which is incorrect and causes problems at least for +# Cygwin. + +# Scripts used to build examples +# If only shared libraries have been installed, have h5cc build examples with +# shared libraries instead of static libraries +H5CC = ${DESTDIR}$(bindir)/h5cc +H5CC_PP = ${DESTDIR}$(bindir)/h5pcc +H5FC = ${DESTDIR}$(bindir)/h5fc +H5FC_PP = ${DESTDIR}$(bindir)/h5pfc +H5CPP = ${DESTDIR}$(bindir)/h5c++ +ACLOCAL_AMFLAGS = "-I m4" + +# The trace script; this is used on source files from the C library to +# insert tracing macros. +TRACE = perl $(top_srcdir)/bin/trace + +# .chkexe files are used to mark tests that have run successfully. +# .chklog files are output from those tests. +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 + +# All programs depend on the hdf5 and h5tools libraries +LDADD = $(LIBH5TOOLS) $(LIBHDF5) + +# Automake needs to be taught how to build lib, progs and tests targets. +# These will be filled in automatically for the most part (e.g., +# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and +# EXTRA_TEST variables are supplied to allow the user to force targets to +# be built at certain times. +LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ + $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) + +PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ + $(EXTRA_PROG) + +chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) +TEST_EXTENSIONS = .sh +SH_LOG_COMPILER = $(SHELL) +AM_SH_LOG_FLAGS = +REALTIMEOUTPUT = $(realtimeOutput) +TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_) +TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_) +TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_) +TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .log .o .obj .sh .sh$(EXEEXT) .trs +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/libtest/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign tools/libtest/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__empty): + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +h5tools_test_utils$(EXEEXT): $(h5tools_test_utils_OBJECTS) $(h5tools_test_utils_DEPENDENCIES) $(EXTRA_h5tools_test_utils_DEPENDENCIES) + @rm -f h5tools_test_utils$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5tools_test_utils_OBJECTS) $(h5tools_test_utils_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5tools_test_utils.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + elif test -n "$$redo_logs"; then \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 +recheck: all + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +.sh.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.sh$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(PROGRAMS) all-local +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool mostlyclean-local + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \ + check-am clean clean-binPROGRAMS clean-generic clean-libtool \ + cscopelist-am ctags ctags-am 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 recheck tags tags-am \ + uninstall uninstall-am uninstall-binPROGRAMS + +.PRECIOUS: Makefile + + +# List all build rules defined by HDF5 Makefiles as "PHONY" targets here. +# This tells the Makefiles that these targets are not files to be built but +# commands that should be executed even if a file with the same name already +# exists. +.PHONY: build-check-clean build-check-p build-check-s build-lib build-progs \ + build-tests check-clean check-install check-p check-s check-vfd \ + install-doc lib progs tests uninstall-doc _exec_check-s _test help + +help: + @$(top_srcdir)/bin/makehelp + +# lib/progs/tests targets recurse into subdirectories. build-* targets +# build files in this directory. +build-lib: $(LIB) +build-progs: $(LIB) $(PROGS) +build-tests: $(LIB) $(PROGS) $(chk_TESTS) + +# General rule for recursive building targets. +# BUILT_SOURCES contain targets that need to be built before anything else +# in the directory (e.g., for Fortran type detection) +lib progs tests check-s check-p :: $(BUILT_SOURCES) + @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; + @for d in X $(SUBDIRS); do \ + if test $$d != X && test $$d != .; then \ + (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ + fi; \ + done + +# General rule for recursive cleaning targets. Like the rule above, +# but doesn't require building BUILT_SOURCES. +check-clean :: + @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; + @for d in X $(SUBDIRS); do \ + if test $$d != X && test $$d != .; then \ + (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \ + fi; \ + done + +# Tell Automake to build tests when the user types `make all' (this is +# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since +# Automake won't build them automatically, either. +all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS) + +# make install-doc doesn't do anything outside of doc directory, but +# Makefiles should recognize it. +# UPDATE: docs no longer reside in this build tree, so this target +# is deprecated. +install-doc uninstall-doc: + @echo "Nothing to be done." + +# clean up files generated by tests so they can be re-run. +build-check-clean: + $(RM) -rf $(CHECK_CLEANFILES) + +# run check-clean whenever mostlyclean is run +mostlyclean-local: build-check-clean + +# check-install is just a synonym for installcheck +check-install: installcheck + +# Run each test in order, passing $(TEST_FLAGS) to the program. +# Since tests are done in a shell loop, "make -i" does apply inside it. +# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop. +# The timestamps give a rough idea how much time the tests use. +# +# Note that targets in chk_TESTS (defined above) will be built when the user +# types 'make tests' or 'make check', but only programs in TEST_PROG, +# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed. +check-TESTS: test + +test _test: + @$(MAKE) build-check-s + @$(MAKE) build-check-p + +# Actual execution of check-s. +build-check-s: $(LIB) $(PROGS) $(chk_TESTS) + @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \ + echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \ + fi + @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s + @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \ + echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\ + fi + +_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH) + +# The dummy.chkexe here prevents the target from being +# empty if there are no tests in the current directory. +# $${log} is the log file. +# $${tname} is the name of test. +$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_: + @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummy.chkexe_"; then \ + tname=$(@:.chkexe_=)$(EXEEXT);\ + log=$(@:.chkexe_=.chklog); \ + echo "============================"; \ + if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \ + echo "No need to test $${tname} again."; \ + else \ + if test -n "$(REALTIMEOUTPUT)"; then \ + echo "============================" | tee $${log}; \ + else \ + echo "============================" > $${log}; \ + fi; \ + if test "X$(FORTRAN_API)" = "Xyes"; then \ + echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ + if test -n "$(REALTIMEOUTPUT)"; then \ + echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \ + else \ + echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ + fi; \ + elif test "X$(CXX_API)" = "Xyes"; then \ + echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ + if test -n "$(REALTIMEOUTPUT)"; then \ + echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\ + else \ + echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\ + fi; \ + else \ + echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ + if test -n "$(REALTIMEOUTPUT)"; then \ + echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \ + else \ + echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ + fi; \ + fi; \ + if test -n "$(REALTIMEOUTPUT)"; then \ + echo "============================" | tee -a $${log}; \ + else \ + echo "============================" >> $${log}; \ + fi; \ + if test -n "$(REALTIMEOUTPUT)"; then \ + srcdir="$(srcdir)" \ + $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) | tee -a $${log} 2>&1 \ + && touch $(@:.chkexe_=.chkexe) || \ + (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ + (cat $${log} && false) || exit 1; \ + else \ + srcdir="$(srcdir)" \ + $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \ + && touch $(@:.chkexe_=.chkexe) || \ + (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ + (cat $${log} && false) || exit 1; \ + fi; \ + echo "" >> $${log}; \ + if test -n "$(REALTIMEOUTPUT)"; then \ + echo "Finished testing $${tname} $(TEST_FLAGS)" | tee -a $${log}; \ + echo "============================" | tee -a $${log}; \ + else \ + echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \ + echo "============================" >> $${log}; \ + fi; \ + if test -z "$(REALTIMEOUTPUT)"; then \ + cat $${log}; \ + fi; \ + fi; \ + fi + +# The dummysh.chkexe here prevents the target from being +# empty if there are no tests in the current directory. +# $${log} is the log file. +# $${tname} is the name of test. +$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_: + @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummysh.chkexe_"; then \ + cmd=$(@:.chkexe_=);\ + tname=`basename $$cmd`;\ + chkname=`basename $(@:.chkexe_=.chkexe)`;\ + log=`basename $(@:.chkexe_=.chklog)`; \ + echo "============================"; \ + if $(top_srcdir)/bin/newer $${chkname} $$cmd $(SCRIPT_DEPEND); then \ + echo "No need to test $${tname} again."; \ + else \ + echo "============================" > $${log}; \ + if test "X$(FORTRAN_API)" = "Xyes"; then \ + echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \ + echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ + elif test "X$(CXX_API)" = "Xyes"; then \ + echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \ + echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ + else \ + echo "Testing $${tname} $(TEST_FLAGS)"; \ + echo "$${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ + fi; \ + echo "============================" >> $${log}; \ + RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \ + srcdir="$(srcdir)" \ + $(TIME) $(SHELL) $$cmd $(TEST_FLAGS) >> $${log} 2>&1 \ + && touch $${chkname} || \ + (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ + (cat $${log} && false) || exit 1; \ + echo "" >> $${log}; \ + echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \ + echo "============================" >> $${log}; \ + echo "Finished testing $${tname} $(TEST_FLAGS)"; \ + cat $${log}; \ + fi; \ + echo "============================"; \ + fi + +# Actual execution of check-p. +build-check-p: $(LIB) $(PROGS) $(chk_TESTS) + @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \ + echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \ + fi + @if test -n "$(TEST_PROG_PARA)"; then \ + echo "**** Hint ****"; \ + echo "Parallel test files reside in the current directory" \ + "by default."; \ + echo "Set HDF5_PARAPREFIX to use another directory. e.g.,"; \ + echo " HDF5_PARAPREFIX=/PFS/user/me"; \ + echo " export HDF5_PARAPREFIX"; \ + echo " make check"; \ + echo "**** end of Hint ****"; \ + fi + @for test in $(TEST_PROG_PARA) dummy; do \ + if test $$test != dummy; then \ + $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \ + RUNEXEC="$(RUNPARALLEL)" || exit 1; \ + fi; \ + done + @for test in $(TEST_SCRIPT_PARA) dummy; do \ + if test $$test != dummy; then \ + $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ || exit 1; \ + fi; \ + done + @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \ + echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\ + fi + +# Run test with different Virtual File Driver +check-vfd: $(LIB) $(PROGS) $(chk_TESTS) + @for vfd in $(VFD_LIST) dummy; do \ + if test $$vfd != dummy; then \ + echo "============================"; \ + echo "Testing Virtual File Driver $$vfd"; \ + echo "============================"; \ + $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \ + HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \ + fi; \ + done +# check_PROGRAMS=$(TEST_PROG) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index e8a1a87..ead8476 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -495,6 +495,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -515,6 +516,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -550,6 +552,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index a17cbb3..19fad43 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -514,6 +514,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_LIBHDFS = @HAVE_LIBHDFS@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -534,6 +535,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +JNI_LDFLAGS = @JNI_LDFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -569,6 +571,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ ROOT = @ROOT@ +ROS3_VFD = @ROS3_VFD@ RUNPARALLEL = @RUNPARALLEL@ RUNSERIAL = @RUNSERIAL@ R_INTEGER = @R_INTEGER@ |