summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt26
-rw-r--r--MANIFEST2
-rw-r--r--config/cmake/CTestCustom.cmake3
-rw-r--r--config/cmake/HDFCompilerFlags.cmake4
-rw-r--r--config/cmake/jvolTest.cmake301
-rw-r--r--config/sanitizer/sanitizers.cmake27
-rw-r--r--fortran/src/CMakeLists.txt4
-rw-r--r--fortran/src/H5Pf.c73
-rw-r--r--fortran/src/H5Pff.F9095
-rw-r--r--fortran/src/H5VLff.F9098
-rw-r--r--fortran/src/H5_f.c8
-rw-r--r--fortran/src/H5_ff.F9010
-rw-r--r--fortran/src/H5f90global.F9012
-rw-r--r--fortran/src/H5f90proto.h1
-rw-r--r--fortran/src/H5match_types.c2
-rw-r--r--fortran/src/hdf5_fortrandll.def.in5
-rw-r--r--fortran/test/CMakeLists.txt4
-rw-r--r--fortran/test/tH5P_F03.F9042
-rw-r--r--fortran/test/vol_connector.F9044
-rw-r--r--fortran/testpar/CMakeLists.txt42
-rw-r--r--hl/fortran/src/CMakeLists.txt4
-rw-r--r--hl/src/H5LT.c18
-rw-r--r--hl/src/H5LTanalyze.c1043
-rw-r--r--hl/src/H5LTanalyze.l1
-rw-r--r--hl/src/H5LTparse.c510
-rw-r--r--hl/src/H5LTparse.h15
-rw-r--r--hl/tools/gif2h5/CMakeTests.cmake16
-rw-r--r--hl/tools/gif2h5/decompress.c23
-rw-r--r--hl/tools/gif2h5/hdfgifwr.c96
-rw-r--r--hl/tools/h5watch/CMakeTests.cmake12
-rw-r--r--java/examples/datasets/JavaDatasetExample.sh.in44
-rw-r--r--java/src/hdf/hdf5lib/H5.java4
-rw-r--r--java/src/jni/h5Constants.c13
-rw-r--r--java/src/jni/h5pDCPLImp.c20
-rw-r--r--java/src/jni/h5plImp.c26
-rw-r--r--java/src/jni/h5rImp.c16
-rw-r--r--java/src/jni/h5util.c10
-rw-r--r--java/src/jni/h5vlImp.c60
-rw-r--r--java/src/jni/h5vlImp.h22
-rw-r--r--java/test/CMakeLists.txt79
-rw-r--r--java/test/Makefile.am5
-rw-r--r--java/test/TestH5VL.java26
-rw-r--r--java/test/testfiles/JUnit-TestH5VL.txt3
-rw-r--r--release_docs/RELEASE.txt80
-rw-r--r--src/H5B.c2
-rw-r--r--src/H5CS.c6
-rw-r--r--src/H5Cdbg.c5
-rw-r--r--src/H5Cpkg.h2
-rw-r--r--src/H5Dchunk.c101
-rw-r--r--src/H5Dint.c5
-rw-r--r--src/H5Dio.c15
-rw-r--r--src/H5Eint.c17
-rw-r--r--src/H5F.c10
-rw-r--r--src/H5FD.c30
-rw-r--r--src/H5FDdirect.c16
-rw-r--r--src/H5FDfamily.c10
-rw-r--r--src/H5FDmulti.c5
-rw-r--r--src/H5FDprivate.h2
-rw-r--r--src/H5FDs3comms.c4
-rw-r--r--src/H5Fint.c2
-rw-r--r--src/H5Fsuper_cache.c14
-rw-r--r--src/H5MM.c25
-rw-r--r--src/H5MMprivate.h1
-rw-r--r--src/H5PL.c32
-rw-r--r--src/H5PLint.c5
-rw-r--r--src/H5PLpath.c64
-rw-r--r--src/H5PLplugin_cache.c5
-rw-r--r--src/H5Pdcpl.c62
-rw-r--r--src/H5Pfapl.c24
-rw-r--r--src/H5TS.c119
-rw-r--r--src/H5TSprivate.h10
-rw-r--r--src/H5Tnative.c15
-rw-r--r--src/H5VL.c109
-rw-r--r--src/H5VLcallback.c11
-rw-r--r--src/H5VLconnector.h3
-rw-r--r--src/H5VLint.c134
-rw-r--r--src/H5VLnative_file.c4
-rw-r--r--src/H5VLpassthru.c12
-rw-r--r--src/H5VLpkg.h7
-rw-r--r--src/H5VLprivate.h4
-rw-r--r--src/H5VLpublic.h9
-rw-r--r--src/H5Z.c4
-rw-r--r--src/H5detect.c3
-rw-r--r--src/H5private.h5
-rw-r--r--src/H5system.c5
-rw-r--r--src/H5win32defs.h10
-rw-r--r--test/CMakeLists.txt1
-rw-r--r--test/H5srcdir.h49
-rw-r--r--test/Makefile.am2
-rw-r--r--test/big.c5
-rw-r--r--test/cache_common.h1
-rw-r--r--test/dsets.c4
-rw-r--r--test/dt_arith.c34
-rw-r--r--test/error_test.c5
-rw-r--r--test/fheap.c5
-rw-r--r--test/file_image.c5
-rw-r--r--test/fillval.c5
-rw-r--r--test/h5test.c74
-rw-r--r--test/thread_id.c162
-rw-r--r--test/trefer.c2
-rw-r--r--test/tvltypes.c14
-rw-r--r--test/vfd.c30
-rw-r--r--test/vol.c34
-rw-r--r--test/vol_plugin.c83
-rw-r--r--testpar/t_2Gio.c2
-rw-r--r--testpar/t_bigio.c4
-rw-r--r--testpar/testpar.h4
-rw-r--r--tools/lib/h5diff_array.c188
-rw-r--r--tools/lib/h5diff_attr.c1
-rw-r--r--tools/lib/h5tools.c4
-rw-r--r--tools/lib/h5tools_utils.h2
-rw-r--r--tools/src/h5diff/CMakeLists.txt4
-rw-r--r--tools/src/h5import/h5import.c2
-rw-r--r--tools/src/h5repack/h5repack_main.c12
-rw-r--r--tools/src/h5repack/h5repack_refs.c9
-rw-r--r--tools/test/h5copy/CMakeTests.cmake30
-rw-r--r--tools/test/h5diff/CMakeTests.cmake14
-rw-r--r--tools/test/h5dump/CMakeTests.cmake44
-rw-r--r--tools/test/h5dump/CMakeTestsPBITS.cmake10
-rw-r--r--tools/test/h5dump/CMakeTestsVDS.cmake18
-rw-r--r--tools/test/h5dump/CMakeTestsXML.cmake10
-rw-r--r--tools/test/h5dump/CMakeVFDTests.cmake8
-rw-r--r--tools/test/h5format_convert/CMakeTests.cmake22
-rw-r--r--tools/test/h5import/CMakeTests.cmake28
-rw-r--r--tools/test/h5jam/CMakeTests.cmake28
-rw-r--r--tools/test/h5ls/CMakeTests.cmake16
-rw-r--r--tools/test/h5ls/CMakeTestsVDS.cmake14
-rw-r--r--tools/test/h5repack/CMakeTests.cmake70
-rw-r--r--tools/test/h5stat/CMakeTests.cmake14
-rw-r--r--tools/test/misc/CMakeTestsClear.cmake34
-rw-r--r--tools/test/misc/CMakeTestsMkgrp.cmake16
-rw-r--r--tools/test/misc/CMakeTestsRepart.cmake14
-rw-r--r--tools/test/perform/pio_engine.c14
-rw-r--r--tools/test/perform/sio_engine.c5
134 files changed, 3280 insertions, 1753 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1466865..129a73a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,9 +1,9 @@
cmake_minimum_required (VERSION 3.10)
project (HDF5 C)
-if(POLICY CMP0074)
- cmake_policy(SET CMP0074 NEW)
-endif()
+if (POLICY CMP0074)
+ cmake_policy (SET CMP0074 NEW)
+endif ()
#-----------------------------------------------------------------------------
# Instructions for use : Normal Build
@@ -15,7 +15,7 @@ endif()
# Make install can be used to install all components for system-wide use.
#
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
- MESSAGE(FATAL_ERROR "\nERROR! ${PROJECT_NAME} DOES NOT SUPPORT IN SOURCE BUILDS!\n"
+ message (FATAL_ERROR "\nERROR! ${PROJECT_NAME} DOES NOT SUPPORT IN SOURCE BUILDS!\n"
"CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}"
" == CMAKE_CURRENT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}\n"
"NEXT STEPS:\n"
@@ -100,7 +100,7 @@ mark_as_advanced (HDF5_EXTERNAL_LIB_PREFIX)
# # Add the sub project
# add_subdirectory (Utilities/hdf5-1.8)
#-----------------------------------------------------------------------------
-string(TIMESTAMP CONFIG_DATE "%Y-%m-%d")
+string (TIMESTAMP CONFIG_DATE "%Y-%m-%d")
#-----------------------------------------------------------------------------
# Allow Visual Studio solution directories
@@ -394,9 +394,6 @@ HDF_DIR_PATHS(${HDF5_PACKAGE_NAME})
include (${HDF_RESOURCES_EXT_DIR}/HDFLibMacros.cmake)
include (${HDF_RESOURCES_DIR}/HDF5Macros.cmake)
-if (HDF5_ENABLE_SANITIZERS)
- include (${HDF5_SOURCE_DIR}/config/sanitizer/sanitizers.cmake)
-endif ()
#-----------------------------------------------------------------------------
# Targets built within this project are exported at Install time for use
@@ -440,6 +437,7 @@ set (H5_ENABLE_STATIC_LIB NO)
option (BUILD_SHARED_LIBS "Build Shared Libraries" ON)
set (H5_ENABLE_SHARED_LIB NO)
option (ONLY_SHARED_LIBS "Only Build Shared Libraries" OFF)
+mark_as_advanced (ONLY_SHARED_LIBS)
if (BUILD_STATIC_LIBS)
set (H5_ENABLE_STATIC_LIB YES)
@@ -460,6 +458,12 @@ endif ()
set (CMAKE_POSITION_INDEPENDENT_CODE ON)
+if (NOT BUILD_SHARED_LIBS)
+ set (tgt_file_ext "")
+else ()
+ set (tgt_file_ext "-shared")
+endif ()
+
#-----------------------------------------------------------------------------
# Option to Build Static executables
#-----------------------------------------------------------------------------
@@ -485,7 +489,7 @@ option (HDF5_ENABLE_COVERAGE "Enable code coverage for Libraries and Programs" O
if (HDF5_ENABLE_COVERAGE)
include (${HDF5_SOURCE_DIR}/config/sanitizer/code-coverage.cmake)
if(CODE_COVERAGE AND CODE_COVERAGE_ADDED)
- add_code_coverage() # Adds instrumentation to all targets
+ add_code_coverage () # Adds instrumentation to all targets
else ()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 --coverage -fprofile-arcs -ftest-coverage")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g --coverage -O0 -fprofile-arcs -ftest-coverage")
@@ -795,8 +799,8 @@ if (HDF5_ENABLE_THREADSAFE)
message (FATAL_ERROR " **** thread-safe option requires Win32 threads or Pthreads **** ")
endif ()
endif ()
- set(THREADS_PREFER_PTHREAD_FLAG ON)
- find_package(Threads REQUIRED)
+ set (THREADS_PREFER_PTHREAD_FLAG ON)
+ find_package (Threads REQUIRED)
if (Threads_FOUND)
set (H5_HAVE_THREADSAFE 1)
endif ()
diff --git a/MANIFEST b/MANIFEST
index c6a7b31..35d21ce 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1183,6 +1183,7 @@
./test/th5s.c
./test/th5s.h5
./test/theap.c
+./test/thread_id.c
./test/tid.c
./test/titerate.c
./test/tlayouto.h5
@@ -3357,6 +3358,7 @@
./config/cmake/HDF5Macros.cmake
./config/cmake/HDF5UseFortran.cmake
./config/cmake/jrunTest.cmake
+./config/cmake/jvolTest.cmake
./config/cmake/libh5cc.in
./config/cmake/libhdf5.pc.in
./config/cmake/libhdf5.settings.cmake.in
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake
index 1b8d7d7..fa4c66e 100644
--- a/config/cmake/CTestCustom.cmake
+++ b/config/cmake/CTestCustom.cmake
@@ -25,6 +25,7 @@ set (CTEST_CUSTOM_WARNING_EXCEPTION
# "H5Tconv.c[0-9 \t:]*warning:[ \t]*comparison is always false due to limited range of data type"
# "H5Ztrans.c.[0-9]+.[ \t]*:[ \t]*warning C4244"
"src.ZLIB.*:[ \t]*warning"
+ "warning LNK4197:.*ZLIB-prefix"
"src.SZIP.*:[ \t]*warning"
# "POSIX name for this item is deprecated"
"disabling jobserver mode"
@@ -134,7 +135,9 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE
H5REPACK-szip_individual-clear-objects
H5REPACK-szip_remove-clear-objects
H5REPACK-upgrade_layout-clear-objects
+ H5REPACK_DMP-attrregion-clear-objects
H5REPACK_DMP-crtorder-clear-objects
+ H5REPACK_DMP-dataregion-clear-objects
H5REPACK_DMP-deflate_limit-clear-objects
H5REPACK-bug1814-clear-objects
H5REPACK-HDFFV-5932-clear-objects
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index ea85736..17b0854 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -30,8 +30,10 @@ macro (ADD_H5_FLAGS h5_flag_var infile)
#message (STATUS "h5_flag_var=${${h5_flag_var}}")
endmacro ()
-message (STATUS "Warnings Configuration:")
set (CMAKE_C_FLAGS "${CMAKE_C99_STANDARD_COMPILE_OPTION} ${CMAKE_C_FLAGS}")
+set (CMAKE_C_FLAGS "${CMAKE_C_SANITIZER_FLAGS} ${CMAKE_C_FLAGS}")
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_SANITIZER_FLAGS} ${CMAKE_CXX_FLAGS}")
+message (STATUS "Warnings Configuration: default: ${CMAKE_C_FLAGS} : ${CMAKE_CXX_FLAGS}")
#-----------------------------------------------------------------------------
# Compiler specific flags : Shouldn't there be compiler tests for these
#-----------------------------------------------------------------------------
diff --git a/config/cmake/jvolTest.cmake b/config/cmake/jvolTest.cmake
new file mode 100644
index 0000000..3a3877b
--- /dev/null
+++ b/config/cmake/jvolTest.cmake
@@ -0,0 +1,301 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+# jrunTest.cmake executes a command and captures the output in a file. File is then compared
+# against a reference file. Exit status of command can also be compared.
+cmake_policy(SET CMP0007 NEW)
+
+# arguments checking
+if (NOT TEST_TESTER)
+ message (FATAL_ERROR "Require TEST_TESTER to be defined")
+endif ()
+if (NOT TEST_PROGRAM)
+ message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
+endif ()
+if (NOT TEST_LIBRARY_DIRECTORY)
+ message (STATUS "Require TEST_LIBRARY_DIRECTORY to be defined")
+endif ()
+if (NOT TEST_FOLDER)
+ message (FATAL_ERROR "Require TEST_FOLDER to be defined")
+endif ()
+if (NOT TEST_OUTPUT)
+ message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
+endif ()
+if (NOT TEST_CLASSPATH)
+ message (STATUS "Require TEST_CLASSPATH to be defined")
+endif ()
+if (NOT TEST_VOL)
+ message (FATAL_ERROR "Require TEST_VOL to be defined")
+endif ()
+
+if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}")
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
+endif ()
+
+if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+endif ()
+
+if (NOT TEST_LOG_LEVEL)
+ set (LOG_LEVEL "info")
+else ()
+ set (LOG_LEVEL "${TEST_LOG_LEVEL}")
+endif ()
+
+message (STATUS "USING ${TEST_VOL} ON COMMAND: ${TEST_TESTER} -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=${LOG_LEVEL} -Djava.library.path=\"${TEST_LIBRARY_DIRECTORY}\" -cp \"${TEST_CLASSPATH}\" ${TEST_ARGS} ${TEST_PROGRAM} ${ARGN}")
+
+set (ENV{HDF5_VOL_CONNECTOR} "${TEST_VOL}")
+
+if (WIN32 OR MINGW)
+ set (ENV{PATH} "$ENV{PATH}\\;${TEST_LIBRARY_DIRECTORY}")
+else ()
+ set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}")
+endif ()
+
+# run the test program, capture the stdout/stderr and the result var
+execute_process (
+ COMMAND ${TEST_TESTER} -Xmx1024M
+ -Dorg.slf4j.simpleLogger.defaultLogLevel=${LOG_LEVEL}
+ -Djava.library.path=${TEST_LIBRARY_DIRECTORY}
+ -cp "${TEST_CLASSPATH}" ${TEST_ARGS} ${TEST_PROGRAM}
+ ${ARGN}
+ WORKING_DIRECTORY ${TEST_FOLDER}
+ RESULT_VARIABLE TEST_RESULT
+ OUTPUT_FILE ${TEST_OUTPUT}
+ ERROR_FILE ${TEST_OUTPUT}.err
+ OUTPUT_VARIABLE TEST_OUT
+ ERROR_VARIABLE TEST_ERROR
+)
+
+message (STATUS "COMMAND Result: ${TEST_RESULT}")
+
+# if the .err file exists and ERRROR_APPEND is enabled
+if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
+ list(LENGTH TEST_STREAM test_len)
+ if (test_len GREATER 0)
+ if (TEST_MASK_FILE)
+ STRING(REGEX REPLACE "CurrentDir is [^\n]+\n" "CurrentDir is (dir name)\n" TEST_STREAM "${TEST_STREAM}")
+ endif ()
+
+ if (NOT ERROR_APPEND)
+ # write back to original .err file
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}")
+ else ()
+ # append error output to the stdout output file
+ file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
+ endif ()
+ endif ()
+endif ()
+
+# if the output file or the .err file needs to mask out error stack info
+if (TEST_MASK_ERROR)
+ if (NOT TEST_ERRREF)
+ # the error stack has been appended to the output file
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+ else ()
+ # the error stack remains in the .err file
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
+ endif ()
+ string (REGEX REPLACE "Time:[^\n]+\n" "Time: XXXX\n" TEST_STREAM "${TEST_STREAM}")
+ string (REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}")
+ string (REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}")
+ string (REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}")
+ #string (REGEX REPLACE "v[1-9]*[.][0-9]*[.]" "version (number)." TEST_STREAM "${TEST_STREAM}")
+ string (REGEX REPLACE "HDF5 .[1-9]*[.][0-9]*[.][0-9]*[^)]*" "HDF5 (version (number)" TEST_STREAM "${TEST_STREAM}")
+ string (REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
+ string (REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
+ # write back the changes to the original files
+ if (NOT TEST_ERRREF)
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
+ else ()
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}")
+ endif ()
+endif ()
+
+# if the return value is !=expected bail out
+if (NOT TEST_RESULT EQUAL TEST_EXPECT)
+ message (STATUS "ERROR OUTPUT: ${TEST_STREAM}")
+ message (FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != 0.\n${TEST_ERROR}")
+endif ()
+
+message (STATUS "COMMAND Error: ${TEST_ERROR}")
+
+# compare output files to references unless this must be skipped
+set (TEST_COMPARE_RESULT 0)
+if (NOT TEST_SKIP_COMPARE)
+ if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}")
+ file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
+ list(LENGTH TEST_STREAM test_len)
+ if (test_len GREATER 0)
+ if (WIN32 OR MINGW)
+ configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
+ if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp")
+ file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE})
+ endif ()
+ #file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
+ #file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
+ endif ()
+
+ if (NOT TEST_SORT_COMPARE)
+ # now compare the output with the reference
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
+ RESULT_VARIABLE TEST_COMPARE_RESULT
+ )
+ else ()
+ file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} v1)
+ file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} v2)
+ list (SORT v1)
+ list (SORT v2)
+ if (NOT v1 STREQUAL v2)
+ set(TEST_COMPARE_RESULT 1)
+ endif ()
+ endif ()
+
+ if (TEST_COMPARE_RESULT)
+ set (TEST_COMPARE_RESULT 0)
+ file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
+ list (LENGTH test_act len_act)
+ file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
+ list (LENGTH test_ref len_ref)
+ if (len_act GREATER 0 AND len_ref GREATER 0)
+ math (EXPR _FP_LEN "${len_ref} - 1")
+ foreach (line RANGE 0 ${_FP_LEN})
+ list (GET test_act ${line} str_act)
+ list (GET test_ref ${line} str_ref)
+ if (NOT str_act STREQUAL str_ref)
+ if (str_act)
+ set (TEST_COMPARE_RESULT 1)
+ message (STATUS "line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
+ endif ()
+ endif ()
+ endforeach ()
+ else ()
+ if (len_act EQUAL 0)
+ message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT} is empty")
+ endif ()
+ if (len_ref EQUAL 0)
+ message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_REFERENCE} is empty")
+ endif ()
+ endif ()
+ if (NOT len_act EQUAL len_ref)
+ set (TEST_COMPARE_RESULT 1)
+ endif ()
+ endif ()
+ endif ()
+
+ message (STATUS "COMPARE Result: ${TEST_COMPARE_RESULT}")
+
+ # again, if return value is !=0 scream and shout
+ if (TEST_COMPARE_RESULT)
+ message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}")
+ endif ()
+ endif ()
+
+ # now compare the .err file with the error reference, if supplied
+ set (TEST_ERRREF_RESULT 0)
+ if (TEST_ERRREF)
+ file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
+ list(LENGTH TEST_STREAM test_len)
+ if (test_len GREATER 0)
+ if (WIN32 OR MINGW)
+ configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF)
+ if (EXISTS "${TEST_FOLDER}/${TEST_ERRREF}.tmp")
+ file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF})
+ endif ()
+ #file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
+ #file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}")
+ endif ()
+
+ # now compare the error output with the error reference
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
+ RESULT_VARIABLE TEST_ERRREF_RESULT
+ )
+ if (TEST_ERRREF_RESULT)
+ set (TEST_ERRREF_RESULT 0)
+ file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act)
+ list (LENGTH test_act len_act)
+ file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref)
+ list (LENGTH test_ref len_ref)
+ math (EXPR _FP_LEN "${len_ref} - 1")
+ if (len_act GREATER 0 AND len_ref GREATER 0)
+ math (EXPR _FP_LEN "${len_ref} - 1")
+ foreach (line RANGE 0 ${_FP_LEN})
+ list (GET test_act ${line} str_act)
+ list (GET test_ref ${line} str_ref)
+ if (NOT str_act STREQUAL str_ref)
+ if (str_act)
+ set (TEST_ERRREF_RESULT 1)
+ message (STATUS "line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
+ endif ()
+ endif ()
+ endforeach ()
+ else ()
+ if (len_act EQUAL 0)
+ message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT}.err is empty")
+ endif ()
+ if (len_ref EQUAL 0)
+ message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_ERRREF} is empty")
+ endif ()
+ endif ()
+ if (NOT len_act EQUAL len_ref)
+ set (TEST_ERRREF_RESULT 1)
+ endif ()
+ endif ()
+ endif ()
+
+ message (STATUS "COMPARE Result: ${TEST_ERRREF_RESULT}")
+
+ # again, if return value is !=0 scream and shout
+ if (TEST_ERRREF_RESULT)
+ message (FATAL_ERROR "Failed: The error output of ${TEST_OUTPUT}.err did not match ${TEST_ERRREF}")
+ endif ()
+ endif ()
+endif ()
+
+set (TEST_GREP_RESULT 0)
+if (TEST_GREP_COMPARE)
+ # now grep the output with the reference
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+ list(LENGTH TEST_STREAM test_len)
+ if (test_len GREATER 0)
+ # TEST_REFERENCE should always be matched
+ string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
+ string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_GREP_RESULT)
+ if (NOT TEST_GREP_RESULT)
+ message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}")
+ endif ()
+
+ string (REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM})
+ if (TEST_EXPECT)
+ # TEST_EXPECT (1) interprets TEST_FILTER as; NOT to match
+ string (LENGTH "${TEST_MATCH}" TEST_GREP_RESULT)
+ if (TEST_GREP_RESULT)
+ message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}")
+ endif ()
+ endif ()
+ endif ()
+endif ()
+
+# dump the output unless nodisplay option is set
+if (TEST_SKIP_COMPARE AND NOT TEST_NO_DISPLAY)
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E echo ${TEST_STREAM}
+ RESULT_VARIABLE TEST_RESULT
+ )
+endif ()
+
+# everything went fine...
+message (STATUS "${TEST_PROGRAM} program used vol ${TEST_VOL} Passed")
+
diff --git a/config/sanitizer/sanitizers.cmake b/config/sanitizer/sanitizers.cmake
index 2625ec3..ecee2de 100644
--- a/config/sanitizer/sanitizers.cmake
+++ b/config/sanitizer/sanitizers.cmake
@@ -28,52 +28,53 @@ function(append value)
endforeach(variable)
endfunction()
-if(USE_SANITIZER AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+message(STATUS "USE_SANITIZER=${USE_SANITIZER}, CMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}")
+if(USE_SANITIZER AND "${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
- append("-fno-omit-frame-pointer" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fno-omit-frame-pointer" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
+ message(STATUS "Building with sanitize, base flags=${CMAKE_C_SANITIZER_FLAGS}")
if(UNIX)
if(uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
- append("-O1" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-O1" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
endif()
if(USE_SANITIZER MATCHES "([Aa]ddress);([Uu]ndefined)"
OR USE_SANITIZER MATCHES "([Uu]ndefined);([Aa]ddress)")
message(STATUS "Building with Address, Undefined sanitizers")
- append("-fsanitize=address,undefined" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=address,undefined" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
set(MEMCHECK_TYPE AddressSanitizer)
elseif(USE_SANITIZER MATCHES "([Aa]ddress)")
# Optional: -fno-optimize-sibling-calls -fsanitize-address-use-after-scope
message(STATUS "Building with Address sanitizer")
- append("-fsanitize=address" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=address" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
set(MEMCHECK_TYPE AddressSanitizer)
elseif(USE_SANITIZER MATCHES "([Mm]emory([Ww]ith[Oo]rigins)?)")
# Optional: -fno-optimize-sibling-calls -fsanitize-memory-track-origins=2
- append("-fsanitize=memory" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=memory" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
if(USE_SANITIZER MATCHES "([Mm]emory[Ww]ith[Oo]rigins)")
message(STATUS "Building with MemoryWithOrigins sanitizer")
- append("-fsanitize-memory-track-origins" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize-memory-track-origins" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
else()
message(STATUS "Building with Memory sanitizer")
endif()
set(MEMCHECK_TYPE MemorySanitizer)
elseif(USE_SANITIZER MATCHES "([Uu]ndefined)")
message(STATUS "Building with Undefined sanitizer")
- append("-fsanitize=undefined" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=undefined" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
if(EXISTS "${BLACKLIST_FILE}")
- append("-fsanitize-blacklist=${BLACKLIST_FILE}" CMAKE_C_FLAGS
- CMAKE_CXX_FLAGS)
+ append("-fsanitize-blacklist=${BLACKLIST_FILE}" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
endif()
set(MEMCHECK_TYPE UndefinedBehaviorSanitizer)
elseif(USE_SANITIZER MATCHES "([Tt]hread)")
message(STATUS "Building with Thread sanitizer")
- append("-fsanitize=thread" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=thread" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
set(MEMCHECK_TYPE ThreadSanitizer)
elseif(USE_SANITIZER MATCHES "([Ll]eak)")
message(STATUS "Building with Leak sanitizer")
- append("-fsanitize=leak" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=leak" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
set(MEMCHECK_TYPE LeakSanitizer)
else()
message(
@@ -82,7 +83,7 @@ if(USE_SANITIZER AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
elseif(MSVC)
if(USE_SANITIZER MATCHES "([Aa]ddress)")
message(STATUS "Building with Address sanitizer")
- append("-fsanitize=address" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=address" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
else()
message(
FATAL_ERROR
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 0ec14ab..b380340 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -267,7 +267,7 @@ if (NOT ONLY_SHARED_LIBS)
PRIVATE
"${HDF5_F90_SRC_SOURCE_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
INTERFACE
- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/static>"
)
target_compile_definitions(${HDF5_F90_LIB_TARGET}
PRIVATE
@@ -307,7 +307,7 @@ if (BUILD_SHARED_LIBS)
PRIVATE
"${HDF5_F90_SRC_SOURCE_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
INTERFACE
- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/shared>"
)
target_compile_definitions(${HDF5_F90_LIBSH_TARGET}
PUBLIC
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index 9fdd19b..a931903 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -488,12 +488,26 @@ h5pget_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
* Removed extra length parameters EP 7/6/00
* SOURCE
*/
+#ifdef H5_NO_DEPRECATED_SYMBOLS
+int_f
+h5pget_version_c (hid_t_f H5_ATTR_UNUSED *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr)
+/******/
+{
+ /*
+ * Fill in fake values [since we need a file ID to call H5Fget_info :-( -QAK ]
+ */
+ *boot = (int_f)0;
+ *freelist = (int_f)0;
+ *stab = (int_f)0;
+ *shhdr = (int_f)0;
+
+ return 0;
+}
+#else /* H5_NO_DEPRECATED_SYMBOLS */
int_f
h5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr)
/******/
{
- int ret_value = -1;
-#ifndef H5_NO_DEPRECATED_SYMBOLS
herr_t ret;
unsigned c_boot;
unsigned c_freelist;
@@ -504,25 +518,16 @@ h5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab,
* Call H5Pget_version function.
*/
ret = H5Pget_version((hid_t)*prp_id, &c_boot, &c_freelist, &c_stab, &c_shhdr);
- if (ret < 0) return ret_value;
+ if (ret < 0) return -1;
*boot = (int_f)c_boot;
*freelist = (int_f)c_freelist;
*stab = (int_f)c_stab;
*shhdr = (int_f)c_shhdr;
-#else /* H5_NO_DEPRECATED_SYMBOLS */
- /*
- * Fill in fake values [since we need a file ID to call H5Fget_info :-( -QAK ]
- */
- *boot = (int_f)0;
- *freelist = (int_f)0;
- *stab = (int_f)0;
- *shhdr = (int_f)0;
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
- ret_value = 0;
- return ret_value;
+ return 0;
}
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
/****if* H5Pf/h5pget_userblock_c
* NAME
@@ -4056,46 +4061,6 @@ h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags)
ret_value = 0;
return ret_value;
}
-/****if* H5Pf/h5pset_libver_bounds_c
- * NAME
- * h5pset_libver_bounds_c
- * PURPOSE
- * Calls H5Pset_libver_bounds
- *
- * INPUTS
- *
- * fapl_id - File access property list identifier
- * low - The earliest version of the library that will be used for writing objects.
- * high - The latest version of the library that will be used for writing objects.
- * OUTPUTS
- *
- *
- * RETURNS
- * 0 on success, -1 on failure
- * AUTHOR
- * M. Scot Breitenfeld
- * February 18, 2008
- * HISTORY
- *
- * SOURCE
-*/
-int_f
-h5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high )
-/******/
-{
- int ret_value = -1;
- herr_t ret;
-
- /*
- * Call H5Pset_libver_bounds function.
- */
- ret = H5Pset_libver_bounds( (hid_t)*fapl_id, (H5F_libver_t)*low, (H5F_libver_t)*high );
- if (ret < 0) return ret_value;
-
- ret_value = 0;
- return ret_value;
-}
-
/****if* H5Pf/h5pset_link_creation_order_c
* NAME
* h5pset_link_creation_order_c
diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90
index 0c0500d..61d30b8 100644
--- a/fortran/src/H5Pff.F90
+++ b/fortran/src/H5Pff.F90
@@ -4754,6 +4754,65 @@ CONTAINS
END SUBROUTINE h5pget_attr_creation_order_f
+!****s* H5P/H5Pget_libver_bounds_f
+! NAME
+! H5Pget_libver_bounds_f
+!
+! PURPOSE
+! Retrieves the lower and upper bounds on the HDF5 library release versions that indirectly
+! determine the object format versions used when creating objects in the file.
+!
+! INPUTS
+!
+! fapl_id - File access property list identifier
+! low - The earliest version of the library that will be used for writing objects.
+! high - The latest version of the library that will be used for writing objects.
+!
+! OUTPUTS
+!
+! hdferr - error code
+! Success: 0
+! Failure: -1
+!
+! AUTHOR
+! M. Scot Breitenfeld
+! February 10, 2020
+!
+! Fortran Interface:
+ SUBROUTINE h5pget_libver_bounds_f(fapl_id, low, high, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier
+ INTEGER, INTENT(OUT) :: low ! The earliest version of the library that will be used for writing objects.
+ INTEGER, INTENT(OUT) :: high ! The latest version of the library that will be used for writing objects.
+ INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success and -1 on failure
+!*****
+! Local variables
+ INTEGER(ENUM_T) :: low_c, high_c
+ INTEGER(C_INT) :: hdferr_c
+!
+! MS FORTRAN needs explicit interface for C functions called here.
+!
+ INTERFACE
+ INTEGER(C_INT) FUNCTION h5pget_libver_bounds(fapl_id, low, high) &
+ BIND(C,NAME='H5Pget_libver_bounds')
+ IMPORT :: C_INT, HID_T, ENUM_T
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN) , VALUE :: fapl_id
+ INTEGER(ENUM_T), INTENT(OUT) :: low
+ INTEGER(ENUM_T), INTENT(OUT) :: high
+ END FUNCTION h5pget_libver_bounds
+ END INTERFACE
+
+ hdferr_c = H5Pget_libver_bounds(fapl_id, low_c, high_c)
+
+ low = INT(low_c)
+ high = INT(high_c)
+
+ hdferr = 0
+ IF(hdferr_c.LT.0) hdferr = -1
+
+ END SUBROUTINE h5pget_libver_bounds_f
+
!****s* H5P/H5Pset_libver_bounds_f
! NAME
! H5Pset_libver_bounds_f
@@ -4781,32 +4840,30 @@ CONTAINS
SUBROUTINE h5pset_libver_bounds_f(fapl_id, low, high, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier
- INTEGER, INTENT(IN) :: low ! The earliest version of the library that will be used for writing objects.
- ! Currently, low must be one of two pre-defined values:
- ! HDF_LIBVER_EARLIEST_F
- ! HDF_LIBVER_LATEST_F
- INTEGER, INTENT(IN) :: high ! The latest version of the library that will be used for writing objects.
- ! Currently, low must set to the pre-defined value:
- ! HDF_LIBVER_LATEST_F
- INTEGER, INTENT(OUT) :: hdferr ! Error code
- ! 0 on success and -1 on failure
-!*****
+ INTEGER, INTENT(IN) :: low ! The earliest version of the library that will be used for writing objects.
+ INTEGER, INTENT(IN) :: high ! The latest version of the library that will be used for writing objects.
+ INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success and -1 on failure
+!*****
+! Local variables
+ INTEGER(C_INT) :: hdferr_c
!
! MS FORTRAN needs explicit interface for C functions called here.
!
INTERFACE
- INTEGER FUNCTION h5pset_libver_bounds_c(fapl_id, low, high) &
- BIND(C,NAME='h5pset_libver_bounds_c')
- IMPORT :: HID_T
+ INTEGER(C_INT) FUNCTION h5pset_libver_bounds(fapl_id, low, high) &
+ BIND(C,NAME='H5Pset_libver_bounds')
+ IMPORT :: C_INT, HID_T, ENUM_T
IMPLICIT NONE
- INTEGER(HID_T), INTENT(IN) :: fapl_id
- INTEGER, INTENT(IN) :: low
- INTEGER, INTENT(IN) :: high
-
- END FUNCTION H5pset_libver_bounds_c
+ INTEGER(HID_T), INTENT(IN), VALUE :: fapl_id
+ INTEGER(ENUM_T), INTENT(IN), VALUE :: low
+ INTEGER(ENUM_T), INTENT(IN), VALUE :: high
+ END FUNCTION h5pset_libver_bounds
END INTERFACE
- hdferr = h5pset_libver_bounds_c(fapl_id, low, high)
+ hdferr_c = h5pset_libver_bounds(fapl_id, INT(low, ENUM_T), INT(high, ENUM_T))
+
+ hdferr = 0
+ IF(hdferr_c.LT.0) hdferr = -1
END SUBROUTINE h5pset_libver_bounds_f
diff --git a/fortran/src/H5VLff.F90 b/fortran/src/H5VLff.F90
index eea9dfe..32dd7d7 100644
--- a/fortran/src/H5VLff.F90
+++ b/fortran/src/H5VLff.F90
@@ -124,13 +124,14 @@ CONTAINS
END SUBROUTINE H5VLregister_connector_by_value_f
!
-!****s* H5VL/H5VLis_connector_registered_f
+!****s* H5VL/H5VLis_connector_registered_by_name_f
!
! NAME
-! H5VLis_connector_registered_f
+! H5VLis_connector_registered_by_name_f
!
! PURPOSE
-! Tests whether a VOL class has been registered or not.
+! Tests whether a VOL class has been registered or not
+! according to a specified connector name.
!
! INPUTS
! name - Connector name
@@ -139,7 +140,7 @@ CONTAINS
! hdferr - Returns 0 if successful and -1 if fails
! SOURCE
- SUBROUTINE H5VLis_connector_registered_f(name, registered, hdferr)
+ SUBROUTINE H5VLis_connector_registered_by_name_f(name, registered, hdferr)
IMPLICIT NONE
CHARACTER(LEN=*), INTENT(IN) :: name
LOGICAL, INTENT(OUT) :: registered
@@ -149,22 +150,63 @@ CONTAINS
INTEGER(C_INT) :: registered_c
INTERFACE
- INTEGER(C_INT) FUNCTION H5VLis_connector_registered(name) BIND(C,NAME='H5VLis_connector_registered')
+ INTEGER(C_INT) FUNCTION H5VLis_connector_registered_by_name(name) BIND(C,NAME='H5VLis_connector_registered_by_name')
IMPORT :: C_CHAR
IMPORT :: C_INT
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name
- END FUNCTION H5VLis_connector_registered
+ END FUNCTION H5VLis_connector_registered_by_name
END INTERFACE
c_name = TRIM(name)//C_NULL_CHAR
- registered_c = H5VLis_connector_registered(c_name)
+ registered_c = H5VLis_connector_registered_by_name(c_name)
hdferr = 0
registered = .FALSE.
IF(registered_c .GT. 0) registered = .TRUE.
IF(registered_c .LT. 0) hdferr = INT(registered_c)
- END SUBROUTINE H5VLis_connector_registered_f
+ END SUBROUTINE H5VLis_connector_registered_by_name_f
+
+!
+!****s* H5VL/H5VLis_connector_registered_by_value_f
+!
+! NAME
+! H5VLis_connector_registered_by_value_f
+!
+! PURPOSE
+! Tests whether a VOL class has been registered or not
+! according to a specified connector value (ID).
+!
+! INPUTS
+! value - Connector value
+! OUTPUTS
+! registered - state of VOL class registration
+! hdferr - Returns 0 if successful and -1 if fails
+! SOURCE
+
+ SUBROUTINE H5VLis_connector_registered_by_value_f(value, registered, hdferr)
+ IMPLICIT NONE
+ INTEGER, INTENT(IN) :: value
+ LOGICAL, INTENT(OUT) :: registered
+ INTEGER, INTENT(OUT) :: hdferr
+!*****
+ INTEGER(C_INT) :: registered_c
+
+ INTERFACE
+ INTEGER(C_INT) FUNCTION H5VLis_connector_registered_by_value(value) BIND(C,NAME='H5VLis_connector_registered_by_value')
+ IMPORT :: C_INT
+ INTEGER(C_INT), VALUE :: value
+ END FUNCTION H5VLis_connector_registered_by_value
+ END INTERFACE
+
+ registered_c = H5VLis_connector_registered_by_value(INT(value,C_INT))
+
+ hdferr = 0
+ registered = .FALSE.
+ IF(registered_c .GT. 0) registered = .TRUE.
+ IF(registered_c .LT. 0) hdferr = INT(registered_c)
+
+ END SUBROUTINE H5VLis_connector_registered_by_value_f
!
!****s* H5VL/H5VLget_connector_id_f
@@ -248,6 +290,46 @@ CONTAINS
END SUBROUTINE H5VLget_connector_id_by_name_f
+!
+!****s* H5VL/H5VLget_connector_id_by_value_f
+!
+! NAME
+! H5VLget_connector_id_by_value_f
+!
+! PURPOSE
+! Retrieves the ID for a registered VOL connector.
+!
+! INPUTS
+! value - Connector value
+! OUTPUTS
+! vol_id - Connector id
+! hdferr - Returns 0 if successful and -1 if fails
+! SOURCE
+
+ SUBROUTINE H5VLget_connector_id_by_value_f(value, vol_id, hdferr)
+ IMPLICIT NONE
+ INTEGER, INTENT(IN) :: value
+ INTEGER(HID_T), INTENT(OUT) :: vol_id
+ INTEGER, INTENT(OUT) :: hdferr
+!*****
+ INTERFACE
+ INTEGER(HID_T) FUNCTION H5VLget_connector_id_by_value(value) BIND(C,NAME='H5VLget_connector_id_by_value')
+ IMPORT :: C_INT
+ IMPORT :: HID_T
+ INTEGER(C_INT), VALUE :: value
+ END FUNCTION H5VLget_connector_id_by_value
+ END INTERFACE
+
+ vol_id = H5VLget_connector_id_by_value(INT(value,C_INT))
+
+ hdferr = 0
+ IF(vol_id.LT.0)THEN
+ hdferr = -1
+ vol_id = H5I_INVALID_HID_F
+ ENDIF
+
+ END SUBROUTINE H5VLget_connector_id_by_value_f
+
SUBROUTINE H5VLget_connector_name_f(obj_id, name, hdferr, name_len)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index 132da7b..ced5049 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -441,7 +441,13 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5f_flags[15] = (int_f)H5F_OBJ_ALL;
h5f_flags[16] = (int_f)H5F_LIBVER_EARLIEST;
h5f_flags[17] = (int_f)H5F_LIBVER_LATEST;
- h5f_flags[18] = (int_f)H5F_UNLIMITED;
+ h5f_flags[18] = (int_f)H5F_LIBVER_ERROR;
+ h5f_flags[19] = (int_f)H5F_LIBVER_NBOUNDS;
+ h5f_flags[20] = (int_f)H5F_UNLIMITED;
+ h5f_flags[21] = (int_f)H5F_LIBVER_V18;
+ h5f_flags[22] = (int_f)H5F_LIBVER_V110;
+ h5f_flags[23] = (int_f)H5F_LIBVER_V112;
+ h5f_flags[24] = (int_f)H5F_LIBVER_V114;
/*
* H5FD flags
diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90
index 443be79..7c7c751 100644
--- a/fortran/src/H5_ff.F90
+++ b/fortran/src/H5_ff.F90
@@ -46,7 +46,7 @@ MODULE H5LIB
!
! H5F flags declaration
!
- INTEGER, PARAMETER :: H5F_FLAGS_LEN = 19
+ INTEGER, PARAMETER :: H5F_FLAGS_LEN = 25
INTEGER, DIMENSION(1:H5F_FLAGS_LEN) :: H5F_flags
!
! H5generic flags declaration
@@ -343,7 +343,13 @@ CONTAINS
H5F_OBJ_ALL_F = H5F_flags(16)
H5F_LIBVER_EARLIEST_F = H5F_flags(17)
H5F_LIBVER_LATEST_F = H5F_flags(18)
- H5F_UNLIMITED_F = H5F_flags(19)
+ H5F_LIBVER_ERROR_F = H5F_flags(19)
+ H5F_LIBVER_NBOUNDS_F = H5F_flags(20)
+ H5F_UNLIMITED_F = H5F_flags(21)
+ H5F_LIBVER_V18_F = H5F_flags(22)
+ H5F_LIBVER_V110_F = H5F_flags(23)
+ H5F_LIBVER_V112_F = H5F_flags(24)
+ H5F_LIBVER_V114_F = H5F_flags(25)
!
! H5generic flags
!
diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90
index dabc0bb..6b601e9 100644
--- a/fortran/src/H5f90global.F90
+++ b/fortran/src/H5f90global.F90
@@ -237,6 +237,12 @@ MODULE H5GLOBAL
!DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_EARLIEST_F
!DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_LATEST_F
!DEC$ATTRIBUTES DLLEXPORT :: H5F_UNLIMITED_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_ERROR_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_NBOUNDS_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V18_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V110_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V112_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V114_F
!DEC$endif
INTEGER :: H5F_ACC_RDWR_F
@@ -258,6 +264,12 @@ MODULE H5GLOBAL
INTEGER :: H5F_LIBVER_EARLIEST_F
INTEGER :: H5F_LIBVER_LATEST_F
INTEGER :: H5F_UNLIMITED_F
+ INTEGER :: H5F_LIBVER_ERROR_F
+ INTEGER :: H5F_LIBVER_NBOUNDS_F
+ INTEGER :: H5F_LIBVER_V18_F
+ INTEGER :: H5F_LIBVER_V110_F
+ INTEGER :: H5F_LIBVER_V112_F
+ INTEGER :: H5F_LIBVER_V114_F
!
! H5G flags declaration
!
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index e6f5dd4..fe616d3 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -454,7 +454,6 @@ H5_FCDLL int_f h5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_f
H5_FCDLL int_f h5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes );
H5_FCDLL int_f h5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size);
H5_FCDLL int_f h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags);
-H5_FCDLL int_f h5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high);
H5_FCDLL int_f h5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags);
H5_FCDLL int_f h5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense );
H5_FCDLL int_f h5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag);
diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c
index 2a6204d..ec2d66f 100644
--- a/fortran/src/H5match_types.c
+++ b/fortran/src/H5match_types.c
@@ -153,7 +153,9 @@ int main(void)
int FORTRAN_NUM_INTEGER_KINDS=H5_FORTRAN_NUM_INTEGER_KINDS;
int H5_FORTRAN_NUM_REAL_KINDS;
+#if H5_FORTRAN_HAVE_C_LONG_DOUBLE!=0
int found_long_double = 0;
+#endif
/* Open target files */
c_header = fopen(CFILE, "w");
diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in
index 7e8b611..9c69e5a 100644
--- a/fortran/src/hdf5_fortrandll.def.in
+++ b/fortran/src/hdf5_fortrandll.def.in
@@ -288,6 +288,7 @@ H5P_mp_H5PSET_ATTR_CREATION_ORDER_F
H5P_mp_H5PSET_SHARED_MESG_NINDEXES_F
H5P_mp_H5PSET_SHARED_MESG_INDEX_F
H5P_mp_H5PGET_ATTR_CREATION_ORDER_F
+H5P_mp_H5PGET_LIBVER_BOUNDS_F
H5P_mp_H5PSET_LIBVER_BOUNDS_F
H5P_mp_H5PSET_LINK_CREATION_ORDER_F
H5P_mp_H5PGET_LINK_PHASE_CHANGE_F
@@ -458,9 +459,11 @@ H5T_mp_H5TENUM_INSERT_F03
; H5VL
H5VL_mp_H5VLREGISTER_CONNECTOR_BY_NAME_F
H5VL_mp_H5VLREGISTER_CONNECTOR_BY_VALUE_F
-H5VL_mp_H5VLIS_CONNECTOR_REGISTERED_F
+H5VL_mp_H5VLIS_CONNECTOR_REGISTERED_BY_NAME_F
+H5VL_mp_H5VLIS_CONNECTOR_REGISTERED_BY_VALUE_F
H5VL_mp_H5VLGET_CONNECTOR_ID_F
H5VL_mp_H5VLGET_CONNECTOR_ID_BY_NAME_F
+H5VL_mp_H5VLGET_CONNECTOR_ID_BY_VALUE_F
H5VL_mp_H5VLGET_CONNECTOR_NAME_F
H5VL_mp_H5VLCLOSE_F
H5VL_mp_H5VLUNREGISTER_CONNECTOR_F
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 3c46c9e..a3cc552 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -132,7 +132,7 @@ if (NOT BUILD_SHARED_LIBS)
PRIVATE
"${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static"
INTERFACE
- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/static>"
)
target_compile_definitions(${HDF5_F90_TEST_LIB_TARGET}
PRIVATE
@@ -165,7 +165,7 @@ else ()
PRIVATE
"${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared"
INTERFACE
- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/shared>"
)
target_compile_definitions(${HDF5_F90_TEST_LIBSH_TARGET}
PUBLIC
diff --git a/fortran/test/tH5P_F03.F90 b/fortran/test/tH5P_F03.F90
index b44540b..083c312 100644
--- a/fortran/test/tH5P_F03.F90
+++ b/fortran/test/tH5P_F03.F90
@@ -112,6 +112,7 @@ SUBROUTINE test_create(total_error)
INTEGER :: ifill
REAL :: rfill
REAL(KIND=dp) :: dpfill
+ INTEGER :: low, high
!
! * Create a file.
@@ -205,11 +206,48 @@ SUBROUTINE test_create(total_error)
CALL check("h5fclose_f", error, total_error)
! Open the file and get the dataset fill value from each dataset
- CALL H5Pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
- CALL check("H5Pcreate_f",error, total_error)
+ CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
+ CALL check("h5pcreate_f",error, total_error)
+
+ CALL h5pset_libver_bounds_f(fapl, H5F_LIBVER_V18_F, H5F_LIBVER_V18_F, error)
+ CALL check("h5pset_libver_bounds_f",error, total_error)
+ CALL h5pget_libver_bounds_f(fapl, low, high, error)
+ CALL check("h5pget_libver_bounds_f",error, total_error)
+ CALL VERIFY("***ERROR: Returned wrong low libver_bounds", low, H5F_LIBVER_V18_F, total_error)
+ CALL VERIFY("***ERROR: Returned wrong high libver_bounds", high, H5F_LIBVER_V18_F, total_error)
+
+ CALL h5pset_libver_bounds_f(fapl, H5F_LIBVER_V18_F, H5F_LIBVER_V110_F, error)
+ CALL check("h5pset_libver_bounds_f",error, total_error)
+ CALL h5pget_libver_bounds_f(fapl, low, high, error)
+ CALL check("h5pget_libver_bounds_f",error, total_error)
+ CALL VERIFY("***ERROR: Returned wrong low libver_bounds", low, H5F_LIBVER_V18_F, total_error)
+ CALL VERIFY("***ERROR: Returned wrong high libver_bounds", high, H5F_LIBVER_V110_F, total_error)
+
+ CALL h5pset_libver_bounds_f(fapl, H5F_LIBVER_V112_F, H5F_LIBVER_V112_F, error)
+ CALL check("h5pset_libver_bounds_f",error, total_error)
+ CALL h5pget_libver_bounds_f(fapl, low, high, error)
+ CALL check("h5pget_libver_bounds_f",error, total_error)
+ CALL VERIFY("***ERROR: Returned wrong low libver_bounds", low, H5F_LIBVER_V112_F, total_error)
+ CALL VERIFY("***ERROR: Returned wrong high libver_bounds", high, H5F_LIBVER_V112_F, total_error)
+
+ CALL h5pset_libver_bounds_f(fapl, H5F_LIBVER_V114_F, H5F_LIBVER_V114_F, error)
+ CALL check("h5pset_libver_bounds_f",error, total_error)
+ CALL h5pget_libver_bounds_f(fapl, low, high, error)
+ CALL check("h5pget_libver_bounds_f",error, total_error)
+ CALL VERIFY("***ERROR: Returned wrong low libver_bounds", low, H5F_LIBVER_V114_F, total_error)
+ CALL VERIFY("***ERROR: Returned wrong high libver_bounds", high, H5F_LIBVER_V114_F, total_error)
CALL H5Pset_libver_bounds_f(fapl, H5F_LIBVER_LATEST_F, H5F_LIBVER_LATEST_F, error)
CALL check("H5Pset_libver_bounds_f",error, total_error)
+ CALL h5pget_libver_bounds_f(fapl, low, high, error)
+ CALL check("h5pget_libver_bounds_f",error, total_error)
+ CALL VERIFY("***ERROR: Returned wrong low libver_bounds", low, H5F_LIBVER_LATEST_F, total_error)
+ CALL VERIFY("***ERROR: Returned wrong high libver_bounds", high, H5F_LIBVER_LATEST_F, total_error)
+ IF(H5F_LIBVER_LATEST_F.GE.H5F_LIBVER_NBOUNDS_F)THEN
+ WRITE(*,'(A,I0,A,I0,A)') &
+ "***ERROR: H5F_LIBVER_LATEST_F (",H5F_LIBVER_LATEST_F,") .GE. H5F_LIBVER_NBOUNDS_F (",H5F_LIBVER_NBOUNDS_F,")"
+ total_error = total_error + 1
+ ENDIF
CALL h5fopen_f (FILENAME, H5F_ACC_RDONLY_F, file, error, fapl)
CALL check("h5fopen_f", error, total_error)
diff --git a/fortran/test/vol_connector.F90 b/fortran/test/vol_connector.F90
index cd05cb1..d346737 100644
--- a/fortran/test/vol_connector.F90
+++ b/fortran/test/vol_connector.F90
@@ -61,18 +61,18 @@ CONTAINS
INTEGER(hid_t) :: file_id
! The null VOL connector should not be registered at the start of the test
- CALL H5VLis_connector_registered_f( "FAKE_VOL_CONNECTOR_NAME", is_registered, error)
- CALL check("H5VLis_connector_registered_f",error,total_error)
- CALL VERIFY("H5VLis_connector_registered_f", is_registered, .FALSE., total_error)
+ CALL H5VLis_connector_registered_by_name_f( "FAKE_VOL_CONNECTOR_NAME", is_registered, error)
+ CALL check("H5VLis_connector_registered_by_name_f",error,total_error)
+ CALL VERIFY("H5VLis_connector_registered_by_name_f", is_registered, .FALSE., total_error)
! Register the connector by name
CALL H5VLregister_connector_by_name_f(NATIVE_VOL_CONNECTOR_NAME, vol_id, error)
CALL check("H5VLregister_connector_by_name_f",error,total_error)
! The connector should be registered now
- CALL H5VLis_connector_registered_f(NATIVE_VOL_CONNECTOR_NAME, is_registered, error)
- CALL check("H5VLis_connector_registered_f",error,total_error)
- CALL VERIFY("H5VLis_connector_registered_f", is_registered, .TRUE., total_error)
+ CALL H5VLis_connector_registered_by_name_f(NATIVE_VOL_CONNECTOR_NAME, is_registered, error)
+ CALL check("H5VLis_connector_registered_by_name_f",error,total_error)
+ CALL VERIFY("H5VLis_connector_registered_by_name_f", is_registered, .TRUE., total_error)
CALL H5VLget_connector_id_by_name_f(NATIVE_VOL_CONNECTOR_NAME, vol_id_out, error)
CALL check("H5VLget_connector_id_by_name_f",error,total_error)
@@ -118,24 +118,24 @@ CONTAINS
INTEGER, INTENT(INOUT) :: total_error
INTEGER :: error = 0
-
+
LOGICAL :: is_registered = .FALSE.
INTEGER(hid_t) :: vol_id = 0
! The null VOL connector should not be registered at the start of the test
- CALL H5VLis_connector_registered_f( "FAKE_VOL_CONNECTOR_NAME", is_registered, error)
- CALL check("H5VLis_connector_registered_f",error,total_error)
- CALL VERIFY("H5VLis_connector_registered_f", is_registered, .FALSE., total_error)
+ CALL H5VLis_connector_registered_by_name_f( "FAKE_VOL_CONNECTOR_NAME", is_registered, error)
+ CALL check("H5VLis_connector_registered_by_name_f",error,total_error)
+ CALL VERIFY("H5VLis_connector_registered_by_name_f", is_registered, .FALSE., total_error)
! Register the connector by value
CALL H5VLregister_connector_by_value_f(NATIVE_VOL_CONNECTOR_VALUE, vol_id, error)
CALL check("H5VLregister_connector_by_value_f", error, total_error)
! The connector should be registered now
- CALL H5VLis_connector_registered_f(NATIVE_VOL_CONNECTOR_NAME, is_registered, error)
- CALL check("H5VLis_connector_registered_f",error,total_error)
- CALL VERIFY("H5VLis_connector_registered_f", is_registered, .TRUE., total_error)
+ CALL H5VLis_connector_registered_by_name_f(NATIVE_VOL_CONNECTOR_NAME, is_registered, error)
+ CALL check("H5VLis_connector_registered_by_name_f",error,total_error)
+ CALL VERIFY("H5VLis_connector_registered_by_name_f", is_registered, .TRUE., total_error)
END SUBROUTINE test_registration_by_value
@@ -162,23 +162,23 @@ CONTAINS
INTEGER(hid_t) :: fapl_id
TYPE(C_PTR) :: f_ptr
- CALL H5VLis_connector_registered_f( "FAKE_VOL_CONNECTOR_NAME", is_registered, error)
+ CALL H5VLis_connector_registered_by_name_f( "FAKE_VOL_CONNECTOR_NAME", is_registered, error)
- CALL check("H5VLis_connector_registered_f",error,total_error)
- CALL VERIFY("H5VLis_connector_registered_f", is_registered, .FALSE., total_error)
+ CALL check("H5VLis_connector_registered_by_name_f",error,total_error)
+ CALL VERIFY("H5VLis_connector_registered_by_name_f", is_registered, .FALSE., total_error)
! The null VOL connector should not be registered at the start of the test
- CALL H5VLis_connector_registered_f( "FAKE_VOL_CONNECTOR_NAME", is_registered, error)
- CALL check("H5VLis_connector_registered_f",error,total_error)
- CALL VERIFY("H5VLis_connector_registered_f", is_registered, .FALSE., total_error)
+ CALL H5VLis_connector_registered_by_name_f( "FAKE_VOL_CONNECTOR_NAME", is_registered, error)
+ CALL check("H5VLis_connector_registered_by_name_f",error,total_error)
+ CALL VERIFY("H5VLis_connector_registered_by_name_f", is_registered, .FALSE., total_error)
CALL H5VLregister_connector_by_name_f(NATIVE_VOL_CONNECTOR_NAME, vol_id, error)
CALL check("H5VLregister_connector_by_name_f",error,total_error)
! The connector should be registered now
- CALL H5VLis_connector_registered_f(NATIVE_VOL_CONNECTOR_NAME, is_registered, error)
- CALL check("H5VLis_connector_registered_f",error,total_error)
- CALL VERIFY("H5VLis_connector_registered_f", is_registered, .TRUE., total_error)
+ CALL H5VLis_connector_registered_by_name_f(NATIVE_VOL_CONNECTOR_NAME, is_registered, error)
+ CALL check("H5VLis_connector_registered_by_name_f",error,total_error)
+ CALL VERIFY("H5VLis_connector_registered_by_name_f", is_registered, .TRUE., total_error)
! Register the connector
CALL H5Pcreate_f(H5P_FILE_ACCESS_F, fapl_id, error)
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index 17aa6c3..1f8dbb4 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -4,7 +4,12 @@ project (HDF5_FORTRAN_TESTPAR C Fortran)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
-set (TESTPAR_INCLUDES ${MPI_Fortran_INCLUDE_DIRS} ${CMAKE_Fortran_MODULE_DIRECTORY}/static ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
+set (TESTPAR_INCLUDES ${MPI_Fortran_INCLUDE_DIRS} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src))
+if (NOT BUILD_SHARED_LIBS)
+ set (TESTPAR_INCLUDES ${TESTPAR_INCLUDES} ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+else ()
+ set (TESTPAR_INCLUDES ${TESTPAR_INCLUDES} ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
+endif ()
#-----------------------------------------------------------------------------
# Add Tests
@@ -24,11 +29,30 @@ target_compile_options(parallel_test
PRIVATE
$<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
)
-target_link_libraries (parallel_test
- PRIVATE
- ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_Fortran_LIBS}
- $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"ws2_32.lib">
-)
+if (NOT BUILD_SHARED_LIBS)
+ target_link_libraries (parallel_test
+ PRIVATE
+ ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_Fortran_LIBS}
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"ws2_32.lib">
+ )
+ set_target_properties (parallel_test PROPERTIES
+ FOLDER test/fortran
+ LINKER_LANGUAGE Fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
+ )
+else ()
+ target_link_libraries (parallel_test
+ PRIVATE
+ ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${LINK_Fortran_LIBS}
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"ws2_32.lib">
+ )
+ set_target_properties (parallel_test PROPERTIES
+ FOLDER test/fortran
+ LINKER_LANGUAGE Fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
+ )
+endif ()
+
#set_property(TARGET parallel_test APPEND PROPERTY
# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
#)
@@ -38,12 +62,6 @@ target_link_libraries (parallel_test
if(MSVC)
set_property(TARGET parallel_test PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
endif()
-set_target_properties (parallel_test PROPERTIES
- FOLDER test/fortran
- LINKER_LANGUAGE Fortran
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
-)
-endif ()
if (HDF5_TEST_FORTRAN AND HDF5_TEST_PARALLEL)
include (CMakeTests.cmake)
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index e532fff..91ec669 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -164,7 +164,7 @@ if (NOT ONLY_SHARED_LIBS)
PRIVATE
"${HDF5_F90_BINARY_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
INTERFACE
- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/static>"
)
target_compile_definitions(${HDF5_HL_F90_LIB_TARGET}
PUBLIC
@@ -201,7 +201,7 @@ if (BUILD_SHARED_LIBS)
PRIVATE
"${HDF5_F90_BINARY_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
INTERFACE
- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/shared>"
)
target_compile_definitions(${HDF5_HL_F90_LIBSH_TARGET}
PUBLIC
diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c
index 3f6c538..1caa881 100644
--- a/hl/src/H5LT.c
+++ b/hl/src/H5LT.c
@@ -1407,13 +1407,18 @@ find_dataset(hid_t loc_id, const char *name, const H5L_info2_t *linfo, void *op_
*
*-------------------------------------------------------------------------
*/
-
+/* H5Literate wants a non-const pointer but we have a const pointer in the API
+ * call. It's safe to ignore this because we control the callback, don't
+ * modify the op_data buffer (i.e.: dset_name) during the traversal, and the
+ * library never modifies that buffer.
+ */
+H5_GCC_DIAG_OFF(cast-qual)
herr_t
H5LTfind_dataset( hid_t loc_id, const char *dset_name )
{
return H5Literate2(loc_id, H5_INDEX_NAME, H5_ITER_INC, 0, find_dataset, (void *)dset_name);
}
-
+H5_GCC_DIAG_ON(cast-qual)
/*-------------------------------------------------------------------------
*
@@ -2033,13 +2038,18 @@ herr_t H5LTfind_attribute( hid_t loc_id, const char* attr_name )
*
*-------------------------------------------------------------------------
*/
-
+/* H5Aiterate wants a non-const pointer but we have a const pointer in the API
+ * call. It's safe to ignore this because we control the callback, don't
+ * modify the op_data buffer (i.e.: attr_name) during the traversal, and the
+ * library never modifies that buffer.
+ */
+H5_GCC_DIAG_OFF(cast-qual)
herr_t
H5LT_find_attribute( hid_t loc_id, const char* attr_name )
{
return H5Aiterate2(loc_id, H5_INDEX_NAME, H5_ITER_INC, NULL, find_attr, (void *)attr_name);
}
-
+H5_GCC_DIAG_ON(cast-qual)
/*-------------------------------------------------------------------------
diff --git a/hl/src/H5LTanalyze.c b/hl/src/H5LTanalyze.c
index 2219263..4094cd8 100644
--- a/hl/src/H5LTanalyze.c
+++ b/hl/src/H5LTanalyze.c
@@ -30,11 +30,17 @@
#define yy_create_buffer H5LTyy_create_buffer
#define yy_delete_buffer H5LTyy_delete_buffer
-#define yy_flex_debug H5LTyy_flex_debug
+#define yy_scan_buffer H5LTyy_scan_buffer
+#define yy_scan_string H5LTyy_scan_string
+#define yy_scan_bytes H5LTyy_scan_bytes
#define yy_init_buffer H5LTyy_init_buffer
#define yy_flush_buffer H5LTyy_flush_buffer
#define yy_load_buffer_state H5LTyy_load_buffer_state
#define yy_switch_to_buffer H5LTyy_switch_to_buffer
+#define yypush_buffer_state H5LTyypush_buffer_state
+#define yypop_buffer_state H5LTyypop_buffer_state
+#define yyensure_buffer_stack H5LTyyensure_buffer_stack
+#define yy_flex_debug H5LTyy_flex_debug
#define yyin H5LTyyin
#define yyleng H5LTyyleng
#define yylex H5LTyylex
@@ -49,12 +55,246 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
+#ifdef yy_create_buffer
+#define H5LTyy_create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer H5LTyy_create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define H5LTyy_delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer H5LTyy_delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define H5LTyy_scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer H5LTyy_scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define H5LTyy_scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string H5LTyy_scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define H5LTyy_scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes H5LTyy_scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define H5LTyy_init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer H5LTyy_init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define H5LTyy_flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer H5LTyy_flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define H5LTyy_load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state H5LTyy_load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define H5LTyy_switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer H5LTyy_switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define H5LTyypush_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state H5LTyypush_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define H5LTyypop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state H5LTyypop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define H5LTyyensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack H5LTyyensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define H5LTyylex_ALREADY_DEFINED
+#else
+#define yylex H5LTyylex
+#endif
+
+#ifdef yyrestart
+#define H5LTyyrestart_ALREADY_DEFINED
+#else
+#define yyrestart H5LTyyrestart
+#endif
+
+#ifdef yylex_init
+#define H5LTyylex_init_ALREADY_DEFINED
+#else
+#define yylex_init H5LTyylex_init
+#endif
+
+#ifdef yylex_init_extra
+#define H5LTyylex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra H5LTyylex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define H5LTyylex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy H5LTyylex_destroy
+#endif
+
+#ifdef yyget_debug
+#define H5LTyyget_debug_ALREADY_DEFINED
+#else
+#define yyget_debug H5LTyyget_debug
+#endif
+
+#ifdef yyset_debug
+#define H5LTyyset_debug_ALREADY_DEFINED
+#else
+#define yyset_debug H5LTyyset_debug
+#endif
+
+#ifdef yyget_extra
+#define H5LTyyget_extra_ALREADY_DEFINED
+#else
+#define yyget_extra H5LTyyget_extra
+#endif
+
+#ifdef yyset_extra
+#define H5LTyyset_extra_ALREADY_DEFINED
+#else
+#define yyset_extra H5LTyyset_extra
+#endif
+
+#ifdef yyget_in
+#define H5LTyyget_in_ALREADY_DEFINED
+#else
+#define yyget_in H5LTyyget_in
+#endif
+
+#ifdef yyset_in
+#define H5LTyyset_in_ALREADY_DEFINED
+#else
+#define yyset_in H5LTyyset_in
+#endif
+
+#ifdef yyget_out
+#define H5LTyyget_out_ALREADY_DEFINED
+#else
+#define yyget_out H5LTyyget_out
+#endif
+
+#ifdef yyset_out
+#define H5LTyyset_out_ALREADY_DEFINED
+#else
+#define yyset_out H5LTyyset_out
+#endif
+
+#ifdef yyget_leng
+#define H5LTyyget_leng_ALREADY_DEFINED
+#else
+#define yyget_leng H5LTyyget_leng
+#endif
+
+#ifdef yyget_text
+#define H5LTyyget_text_ALREADY_DEFINED
+#else
+#define yyget_text H5LTyyget_text
+#endif
+
+#ifdef yyget_lineno
+#define H5LTyyget_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno H5LTyyget_lineno
+#endif
+
+#ifdef yyset_lineno
+#define H5LTyyset_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno H5LTyyset_lineno
+#endif
+
+#ifdef yywrap
+#define H5LTyywrap_ALREADY_DEFINED
+#else
+#define yywrap H5LTyywrap
+#endif
+
+#ifdef yyalloc
+#define H5LTyyalloc_ALREADY_DEFINED
+#else
+#define yyalloc H5LTyyalloc
+#endif
+
+#ifdef yyrealloc
+#define H5LTyyrealloc_ALREADY_DEFINED
+#else
+#define yyrealloc H5LTyyrealloc
+#endif
+
+#ifdef yyfree
+#define H5LTyyfree_ALREADY_DEFINED
+#else
+#define yyfree H5LTyyfree
+#endif
+
+#ifdef yytext
+#define H5LTyytext_ALREADY_DEFINED
+#else
+#define yytext H5LTyytext
+#endif
+
+#ifdef yyleng
+#define H5LTyyleng_ALREADY_DEFINED
+#else
+#define yyleng H5LTyyleng
+#endif
+
+#ifdef yyin
+#define H5LTyyin_ALREADY_DEFINED
+#else
+#define yyin H5LTyyin
+#endif
+
+#ifdef yyout
+#define H5LTyyout_ALREADY_DEFINED
+#else
+#define yyout H5LTyyout
+#endif
+
+#ifdef yy_flex_debug
+#define H5LTyy_flex_debug_ALREADY_DEFINED
+#else
+#define yy_flex_debug H5LTyy_flex_debug
+#endif
+
+#ifdef yylineno
+#define H5LTyylineno_ALREADY_DEFINED
+#else
+#define yylineno H5LTyylineno
+#endif
+
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
@@ -88,7 +328,6 @@ typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
-typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
@@ -96,7 +335,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -127,63 +365,61 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
-#endif /* ! FLEXINT_H */
-
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
+#endif /* ! C99 */
-#define YY_USE_CONST
+#endif /* ! FLEXINT_H */
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
+/* begin standard C++ headers. */
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
#else
-#define yyconst
+#define yynoreturn
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
*/
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN (yy_start) = 1 + 2 *
-
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START
-
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE H5LTyyrestart(H5LTyyin )
-
+#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -200,30 +436,30 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
typedef size_t yy_size_t;
#endif
-extern yy_size_t H5LTyyleng;
+extern int yyleng;
-extern FILE *H5LTyyin, *H5LTyyout;
+extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
-
+
#define YY_LESS_LINENO(n)
+ #define YY_LINENO_REWIND_TO(ptr)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up H5LTyytext. */ \
+ /* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = (yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET \
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up H5LTyytext again */ \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_STRUCT_YY_BUFFER_STATE
@@ -238,12 +474,12 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- yy_size_t yy_n_chars;
+ int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -266,7 +502,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -283,8 +519,8 @@ struct yy_buffer_state
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
- * (via H5LTyyrestart()), so that the user can continue scanning by
- * just pointing H5LTyyin at a new input file.
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
@@ -294,7 +530,7 @@ struct yy_buffer_state
/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
@@ -305,103 +541,98 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
-
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
-/* yy_hold_char holds the character lost when H5LTyytext is formed. */
+/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
-static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
-yy_size_t H5LTyyleng;
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+int yyleng;
/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
+static char *yy_c_buf_p = NULL;
static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
-/* Flag which is used to allow H5LTyywrap()'s to do buffer switches
- * instead of setting up a fresh H5LTyyin. A bit of a hack ...
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
-void H5LTyyrestart (FILE *input_file );
-void H5LTyy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE H5LTyy_create_buffer (FILE *file,int size );
-void H5LTyy_delete_buffer (YY_BUFFER_STATE b );
-void H5LTyy_flush_buffer (YY_BUFFER_STATE b );
-void H5LTyypush_buffer_state (YY_BUFFER_STATE new_buffer );
-void H5LTyypop_buffer_state (void );
+void yyrestart ( FILE *input_file );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
+void yy_delete_buffer ( YY_BUFFER_STATE b );
+void yy_flush_buffer ( YY_BUFFER_STATE b );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state ( void );
-static void H5LTyyensure_buffer_stack (void );
-static void H5LTyy_load_buffer_state (void );
-static void H5LTyy_init_buffer (YY_BUFFER_STATE b,FILE *file );
+static void yyensure_buffer_stack ( void );
+static void yy_load_buffer_state ( void );
+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
-#define YY_FLUSH_BUFFER H5LTyy_flush_buffer(YY_CURRENT_BUFFER )
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
-YY_BUFFER_STATE H5LTyy_scan_buffer (char *base,yy_size_t size );
-YY_BUFFER_STATE H5LTyy_scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE H5LTyy_scan_bytes (yyconst char *bytes,yy_size_t len );
-
-void *H5LTyyalloc (yy_size_t );
-void *H5LTyyrealloc (void *,yy_size_t );
-void H5LTyyfree (void * );
-
-#define yy_new_buffer H5LTyy_create_buffer
+void *yyalloc ( yy_size_t );
+void *yyrealloc ( void *, yy_size_t );
+void yyfree ( void * );
+#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- H5LTyyensure_buffer_stack (); \
+ yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- H5LTyy_create_buffer(H5LTyyin,YY_BUF_SIZE ); \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
-
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
- H5LTyyensure_buffer_stack (); \
+ yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- H5LTyy_create_buffer(H5LTyyin,YY_BUF_SIZE ); \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
-
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* Begin user sect3 */
+typedef flex_uint8_t YY_CHAR;
-typedef unsigned char YY_CHAR;
-
-FILE *H5LTyyin = (FILE *) 0, *H5LTyyout = (FILE *) 0;
+FILE *yyin = NULL, *yyout = NULL;
typedef int yy_state_type;
-extern int H5LTyylineno;
+extern int yylineno;
+int yylineno = 1;
-int H5LTyylineno = 1;
-
-extern char *H5LTyytext;
-#define yytext_ptr H5LTyytext
+extern char *yytext;
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
+#define yytext_ptr yytext
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
-static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[] );
+static yy_state_type yy_get_previous_state ( void );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
+static int yy_get_next_buffer ( void );
+static void yynoreturn yy_fatal_error ( const char* msg );
/* Done after the current pattern has been matched and before the
- * corresponding action - sets up H5LTyytext.
+ * corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
- H5LTyyleng = (yy_size_t) (yy_cp - yy_bp); \
+ yyleng = (int) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
-
#define YY_NUM_RULES 66
#define YY_END_OF_BUFFER 67
/* This struct is not used in this scanner,
@@ -411,7 +642,7 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_acclist[437] =
+static const flex_int16_t yy_acclist[437] =
{ 0,
64, 64, 64, 64, 67, 66, 64, 66, 64, 65,
66, 56, 66, 55, 66, 62, 66, 63, 66, 66,
@@ -463,7 +694,7 @@ static yyconst flex_int16_t yy_acclist[437] =
57, 21, 57, 34, 34, 57
} ;
-static yyconst flex_int16_t yy_accept[546] =
+static const flex_int16_t yy_accept[546] =
{ 0,
1, 2, 3, 4, 5, 6, 7, 9, 12, 14,
16, 18, 20, 21, 22, 23, 24, 26, 28, 30,
@@ -527,7 +758,7 @@ static yyconst flex_int16_t yy_accept[546] =
432, 434, 435, 437, 437
} ;
-static yyconst flex_int32_t yy_ec[256] =
+static const YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -559,7 +790,7 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[42] =
+static const YY_CHAR yy_meta[42] =
{ 0,
1, 1, 1, 2, 3, 3, 3, 3, 3, 3,
3, 3, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -568,7 +799,7 @@ static yyconst flex_int32_t yy_meta[42] =
1
} ;
-static yyconst flex_int16_t yy_base[547] =
+static const flex_int16_t yy_base[547] =
{ 0,
0, 0, 41, 0, 610, 611, 81, 83, 611, 0,
611, 611, 56, 599, 580, 575, 611, 611, 611, 611,
@@ -632,7 +863,7 @@ static yyconst flex_int16_t yy_base[547] =
0, 611, 0, 611, 106, 275
} ;
-static yyconst flex_int16_t yy_def[547] =
+static const flex_int16_t yy_def[547] =
{ 0,
544, 1, 544, 3, 544, 544, 544, 544, 544, 545,
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
@@ -696,7 +927,7 @@ static yyconst flex_int16_t yy_def[547] =
546, 544, 546, 0, 544, 544
} ;
-static yyconst flex_int16_t yy_nxt[653] =
+static const flex_int16_t yy_nxt[653] =
{ 0,
6, 7, 8, 9, 10, 10, 10, 10, 10, 10,
10, 10, 11, 12, 6, 6, 13, 6, 6, 6,
@@ -772,7 +1003,7 @@ static yyconst flex_int16_t yy_nxt[653] =
544, 544
} ;
-static yyconst flex_int16_t yy_chk[653] =
+static const flex_int16_t yy_chk[653] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -848,15 +1079,15 @@ static yyconst flex_int16_t yy_chk[653] =
544, 544
} ;
-extern int H5LTyy_flex_debug;
-int H5LTyy_flex_debug = 0;
+extern int yy_flex_debug;
+int yy_flex_debug = 0;
static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
static char *yy_full_match;
static int yy_lp;
#define REJECT \
{ \
-*yy_cp = (yy_hold_char); /* undo effects of setting up H5LTyytext */ \
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
++(yy_lp); \
goto find_rule; \
@@ -865,7 +1096,7 @@ goto find_rule; \
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-char *H5LTyytext;
+char *yytext;
#line 1 "hl/src/H5LTanalyze.l"
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
@@ -893,7 +1124,6 @@ char *H5LTyytext;
/* Turn off suggest const & malloc attribute warnings in gcc */
#if defined __GNUC__ && 402 <= __GNUC__ * 100 + __GNUC_MINOR__
#pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
-#pragma GCC diagnostic ignored "-Wsuggest-attribute=malloc"
#endif
int my_yyinput(char *, int);
@@ -943,8 +1173,9 @@ extern hbool_t is_opq_tag;
hbool_t first_quote = 1;
+#line 1155 "hl/src/H5LTanalyze.c"
-#line 926 "hl/src/H5LTanalyze.c"
+#line 1157 "hl/src/H5LTanalyze.c"
#define INITIAL 0
#define TAG_STRING 1
@@ -953,36 +1184,36 @@ hbool_t first_quote = 1;
#define YY_EXTRA_TYPE void *
#endif
-static int yy_init_globals (void );
+static int yy_init_globals ( void );
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int H5LTyylex_destroy (void );
+int yylex_destroy ( void );
-int H5LTyyget_debug (void );
+int yyget_debug ( void );
-void H5LTyyset_debug (int debug_flag );
+void yyset_debug ( int debug_flag );
-YY_EXTRA_TYPE H5LTyyget_extra (void );
+YY_EXTRA_TYPE yyget_extra ( void );
-void H5LTyyset_extra (YY_EXTRA_TYPE user_defined );
+void yyset_extra ( YY_EXTRA_TYPE user_defined );
-FILE *H5LTyyget_in (void );
+FILE *yyget_in ( void );
-void H5LTyyset_in (FILE * in_str );
+void yyset_in ( FILE * _in_str );
-FILE *H5LTyyget_out (void );
+FILE *yyget_out ( void );
-void H5LTyyset_out (FILE * out_str );
+void yyset_out ( FILE * _out_str );
-yy_size_t H5LTyyget_leng (void );
+ int yyget_leng ( void );
-char *H5LTyyget_text (void );
+char *yyget_text ( void );
-int H5LTyyget_lineno (void );
+int yyget_lineno ( void );
-void H5LTyyset_lineno (int line_number );
+void yyset_lineno ( int _line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -990,35 +1221,43 @@ void H5LTyyset_lineno (int line_number );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int H5LTyywrap (void );
+extern "C" int yywrap ( void );
#else
-extern int H5LTyywrap (void );
+extern int yywrap ( void );
#endif
#endif
- static void yyunput (int c,char *buf_ptr );
+#ifndef YY_NO_UNPUT
+
+ static void yyunput ( int c, char *buf_ptr );
+#endif
+
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
+static void yy_flex_strncpy ( char *, const char *, int );
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
+static int yy_flex_strlen ( const char * );
#endif
#ifndef YY_NO_INPUT
-
#ifdef __cplusplus
-static int yyinput (void );
+static int yyinput ( void );
#else
-static int input (void );
+static int input ( void );
#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -1026,7 +1265,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( H5LTyytext, H5LTyyleng, 1, H5LTyyout )
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -1037,20 +1276,20 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- yy_size_t n; \
+ int n; \
for ( n = 0; n < max_size && \
- (c = getc( H5LTyyin )) != EOF && c != '\n'; ++n ) \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
- if ( c == EOF && ferror( H5LTyyin ) ) \
+ if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
- while ( (result = fread(buf, 1, max_size, H5LTyyin))==0 && ferror(H5LTyyin)) \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
@@ -1058,7 +1297,7 @@ static int input (void );
break; \
} \
errno=0; \
- clearerr(H5LTyyin); \
+ clearerr(yyin); \
} \
}\
\
@@ -1091,12 +1330,12 @@ static int input (void );
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int H5LTyylex (void);
+extern int yylex (void);
-#define YY_DECL int H5LTyylex (void)
+#define YY_DECL int yylex (void)
#endif /* !YY_DECL */
-/* Code executed at the beginning of each rule, after H5LTyytext and H5LTyyleng
+/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
@@ -1105,7 +1344,7 @@ extern int H5LTyylex (void);
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
-#define YY_BREAK break;
+#define YY_BREAK /*LINTED*/break;
#endif
#define YY_RULE_SETUP \
@@ -1115,15 +1354,10 @@ extern int H5LTyylex (void);
*/
YY_DECL
{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
-#line 83 "hl/src/H5LTanalyze.l"
-
-
-#line 1104 "hl/src/H5LTanalyze.c"
-
if ( !(yy_init) )
{
(yy_init) = 1;
@@ -1134,33 +1368,39 @@ YY_DECL
/* Create the reject buffer large enough to save one state per allowed character. */
if ( ! (yy_state_buf) )
- (yy_state_buf) = (yy_state_type *)H5LTyyalloc(YY_STATE_BUF_SIZE );
+ (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE );
if ( ! (yy_state_buf) )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyylex()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
if ( ! (yy_start) )
(yy_start) = 1; /* first start state */
- if ( ! H5LTyyin )
- H5LTyyin = stdin;
+ if ( ! yyin )
+ yyin = stdin;
- if ( ! H5LTyyout )
- H5LTyyout = stdout;
+ if ( ! yyout )
+ yyout = stdout;
if ( ! YY_CURRENT_BUFFER ) {
- H5LTyyensure_buffer_stack ();
+ yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- H5LTyy_create_buffer(H5LTyyin,YY_BUF_SIZE );
+ yy_create_buffer( yyin, YY_BUF_SIZE );
}
- H5LTyy_load_buffer_state( );
+ yy_load_buffer_state( );
}
- while ( 1 ) /* loops until end-of-file is reached */
+ {
+#line 82 "hl/src/H5LTanalyze.l"
+
+
+#line 1376 "hl/src/H5LTanalyze.c"
+
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
- /* Support of H5LTyytext. */
+ /* Support of yytext. */
*yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of
@@ -1176,14 +1416,14 @@ YY_DECL
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 545 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
*(yy_state_ptr)++ = yy_current_state;
++yy_cp;
}
@@ -1192,8 +1432,9 @@ yy_match:
yy_find_action:
yy_current_state = *--(yy_state_ptr);
(yy_lp) = yy_accept[yy_current_state];
-goto find_rule; /* Shut up GCC warning -Wall */
+
find_rule: /* we branch to this label when backing up */
+
for ( ; ; ) /* until we find what rule we matched */
{
if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
@@ -1217,282 +1458,282 @@ do_action: /* This label is used only to access EOF actions. */
{ /* beginning of action switch */
case 1:
YY_RULE_SETUP
-#line 85 "hl/src/H5LTanalyze.l"
+#line 84 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I8BE_TOKEN);}
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 86 "hl/src/H5LTanalyze.l"
+#line 85 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I8LE_TOKEN);}
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 87 "hl/src/H5LTanalyze.l"
+#line 86 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I16BE_TOKEN);}
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 88 "hl/src/H5LTanalyze.l"
+#line 87 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I16LE_TOKEN);}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 89 "hl/src/H5LTanalyze.l"
+#line 88 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I32BE_TOKEN);}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 90 "hl/src/H5LTanalyze.l"
+#line 89 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I32LE_TOKEN);}
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 91 "hl/src/H5LTanalyze.l"
+#line 90 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I64BE_TOKEN);}
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 92 "hl/src/H5LTanalyze.l"
+#line 91 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I64LE_TOKEN);}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 94 "hl/src/H5LTanalyze.l"
+#line 93 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U8BE_TOKEN);}
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 95 "hl/src/H5LTanalyze.l"
+#line 94 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U8LE_TOKEN);}
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 96 "hl/src/H5LTanalyze.l"
+#line 95 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U16BE_TOKEN);}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 97 "hl/src/H5LTanalyze.l"
+#line 96 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U16LE_TOKEN);}
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 98 "hl/src/H5LTanalyze.l"
+#line 97 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U32BE_TOKEN);}
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 99 "hl/src/H5LTanalyze.l"
+#line 98 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U32LE_TOKEN);}
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 100 "hl/src/H5LTanalyze.l"
+#line 99 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U64BE_TOKEN);}
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 101 "hl/src/H5LTanalyze.l"
+#line 100 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U64LE_TOKEN);}
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 103 "hl/src/H5LTanalyze.l"
+#line 102 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_CHAR_TOKEN);}
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 104 "hl/src/H5LTanalyze.l"
+#line 103 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_SCHAR_TOKEN);}
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 105 "hl/src/H5LTanalyze.l"
+#line 104 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_UCHAR_TOKEN);}
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 106 "hl/src/H5LTanalyze.l"
+#line 105 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_SHORT_TOKEN);}
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 107 "hl/src/H5LTanalyze.l"
+#line 106 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_USHORT_TOKEN);}
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 108 "hl/src/H5LTanalyze.l"
+#line 107 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_INT_TOKEN);}
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 109 "hl/src/H5LTanalyze.l"
+#line 108 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_UINT_TOKEN);}
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 110 "hl/src/H5LTanalyze.l"
+#line 109 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_LONG_TOKEN);}
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 111 "hl/src/H5LTanalyze.l"
+#line 110 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_ULONG_TOKEN);}
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 112 "hl/src/H5LTanalyze.l"
+#line 111 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_LLONG_TOKEN);}
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 113 "hl/src/H5LTanalyze.l"
+#line 112 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_ULLONG_TOKEN);}
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 115 "hl/src/H5LTanalyze.l"
+#line 114 "hl/src/H5LTanalyze.l"
{return hid(H5T_IEEE_F32BE_TOKEN);}
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 116 "hl/src/H5LTanalyze.l"
+#line 115 "hl/src/H5LTanalyze.l"
{return hid(H5T_IEEE_F32LE_TOKEN);}
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 117 "hl/src/H5LTanalyze.l"
+#line 116 "hl/src/H5LTanalyze.l"
{return hid(H5T_IEEE_F64BE_TOKEN);}
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 118 "hl/src/H5LTanalyze.l"
+#line 117 "hl/src/H5LTanalyze.l"
{return hid(H5T_IEEE_F64LE_TOKEN);}
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 119 "hl/src/H5LTanalyze.l"
+#line 118 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_FLOAT_TOKEN);}
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 120 "hl/src/H5LTanalyze.l"
+#line 119 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_DOUBLE_TOKEN);}
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 121 "hl/src/H5LTanalyze.l"
+#line 120 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_LDOUBLE_TOKEN);}
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 123 "hl/src/H5LTanalyze.l"
+#line 122 "hl/src/H5LTanalyze.l"
{return token(H5T_STRING_TOKEN);}
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 124 "hl/src/H5LTanalyze.l"
+#line 123 "hl/src/H5LTanalyze.l"
{return token(STRSIZE_TOKEN);}
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 125 "hl/src/H5LTanalyze.l"
+#line 124 "hl/src/H5LTanalyze.l"
{return token(STRPAD_TOKEN);}
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 126 "hl/src/H5LTanalyze.l"
+#line 125 "hl/src/H5LTanalyze.l"
{return token(CSET_TOKEN);}
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 127 "hl/src/H5LTanalyze.l"
+#line 126 "hl/src/H5LTanalyze.l"
{return token(CTYPE_TOKEN);}
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 128 "hl/src/H5LTanalyze.l"
+#line 127 "hl/src/H5LTanalyze.l"
{return token(H5T_STR_NULLTERM_TOKEN);}
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 129 "hl/src/H5LTanalyze.l"
+#line 128 "hl/src/H5LTanalyze.l"
{return token(H5T_STR_NULLPAD_TOKEN);}
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 130 "hl/src/H5LTanalyze.l"
+#line 129 "hl/src/H5LTanalyze.l"
{return token(H5T_STR_SPACEPAD_TOKEN);}
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 131 "hl/src/H5LTanalyze.l"
+#line 130 "hl/src/H5LTanalyze.l"
{return token(H5T_CSET_ASCII_TOKEN);}
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 132 "hl/src/H5LTanalyze.l"
+#line 131 "hl/src/H5LTanalyze.l"
{return token(H5T_CSET_UTF8_TOKEN);}
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 133 "hl/src/H5LTanalyze.l"
+#line 132 "hl/src/H5LTanalyze.l"
{return token(H5T_C_S1_TOKEN);}
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 134 "hl/src/H5LTanalyze.l"
+#line 133 "hl/src/H5LTanalyze.l"
{return token(H5T_FORTRAN_S1_TOKEN);}
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 135 "hl/src/H5LTanalyze.l"
+#line 134 "hl/src/H5LTanalyze.l"
{return token(H5T_VARIABLE_TOKEN);}
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 137 "hl/src/H5LTanalyze.l"
+#line 136 "hl/src/H5LTanalyze.l"
{return token(H5T_COMPOUND_TOKEN);}
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 138 "hl/src/H5LTanalyze.l"
+#line 137 "hl/src/H5LTanalyze.l"
{return token(H5T_ENUM_TOKEN);}
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 139 "hl/src/H5LTanalyze.l"
+#line 138 "hl/src/H5LTanalyze.l"
{return token(H5T_ARRAY_TOKEN);}
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 140 "hl/src/H5LTanalyze.l"
+#line 139 "hl/src/H5LTanalyze.l"
{return token(H5T_VLEN_TOKEN);}
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 142 "hl/src/H5LTanalyze.l"
+#line 141 "hl/src/H5LTanalyze.l"
{return token(H5T_OPAQUE_TOKEN);}
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 143 "hl/src/H5LTanalyze.l"
+#line 142 "hl/src/H5LTanalyze.l"
{return token(OPQ_SIZE_TOKEN);}
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 144 "hl/src/H5LTanalyze.l"
+#line 143 "hl/src/H5LTanalyze.l"
{return token(OPQ_TAG_TOKEN);}
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 146 "hl/src/H5LTanalyze.l"
+#line 145 "hl/src/H5LTanalyze.l"
{
if( is_str_size || (is_enum && is_enum_memb) ||
is_opq_size || (asindex>-1 && arr_stack[asindex].is_dim) ||
(csindex>-1 && cmpd_stack[csindex].is_field) ) {
- H5LTyylval.ival = atoi(H5LTyytext);
+ H5LTyylval.ival = atoi(yytext);
return NUMBER;
} else
REJECT;
@@ -1500,7 +1741,7 @@ YY_RULE_SETUP
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 156 "hl/src/H5LTanalyze.l"
+#line 155 "hl/src/H5LTanalyze.l"
{
/*if it's first quote, and is a compound field name or an enum symbol*/
if((is_opq_tag || is_enum || (csindex>-1 && cmpd_stack[csindex].is_field))
@@ -1515,12 +1756,12 @@ YY_RULE_SETUP
case 57:
/* rule 57 can match eol */
YY_RULE_SETUP
-#line 166 "hl/src/H5LTanalyze.l"
+#line 165 "hl/src/H5LTanalyze.l"
{
#ifdef H5_HAVE_WIN32_API
- H5LTyylval.sval = _strdup(H5LTyytext);
+ H5LTyylval.sval = _strdup(yytext);
#else /* H5_HAVE_WIN32_API */
- H5LTyylval.sval = strdup(H5LTyytext);
+ H5LTyylval.sval = strdup(yytext);
#endif /* H5_HAVE_WIN32_API */
BEGIN INITIAL;
return STRING;
@@ -1528,52 +1769,52 @@ YY_RULE_SETUP
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 176 "hl/src/H5LTanalyze.l"
+#line 175 "hl/src/H5LTanalyze.l"
{return token('{');}
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 177 "hl/src/H5LTanalyze.l"
+#line 176 "hl/src/H5LTanalyze.l"
{return token('}');}
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 178 "hl/src/H5LTanalyze.l"
+#line 177 "hl/src/H5LTanalyze.l"
{return token('[');}
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 179 "hl/src/H5LTanalyze.l"
+#line 178 "hl/src/H5LTanalyze.l"
{return token(']');}
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 180 "hl/src/H5LTanalyze.l"
+#line 179 "hl/src/H5LTanalyze.l"
{return token(':');}
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 181 "hl/src/H5LTanalyze.l"
+#line 180 "hl/src/H5LTanalyze.l"
{return token(';');}
YY_BREAK
case 64:
/* rule 64 can match eol */
YY_RULE_SETUP
-#line 182 "hl/src/H5LTanalyze.l"
+#line 181 "hl/src/H5LTanalyze.l"
;
YY_BREAK
case 65:
/* rule 65 can match eol */
YY_RULE_SETUP
-#line 183 "hl/src/H5LTanalyze.l"
+#line 182 "hl/src/H5LTanalyze.l"
{ return 0; }
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 185 "hl/src/H5LTanalyze.l"
+#line 184 "hl/src/H5LTanalyze.l"
ECHO;
YY_BREAK
-#line 1555 "hl/src/H5LTanalyze.c"
+#line 1796 "hl/src/H5LTanalyze.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(TAG_STRING):
yyterminate();
@@ -1591,15 +1832,15 @@ ECHO;
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
- * just pointed H5LTyyin at a new source and called
- * H5LTyylex(). If so, then we have to assure
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
* consistency between YY_CURRENT_BUFFER and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = H5LTyyin;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
@@ -1652,11 +1893,11 @@ ECHO;
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( H5LTyywrap( ) )
+ if ( yywrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
- * H5LTyytext, we can now set up
+ * yytext, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
@@ -1705,7 +1946,8 @@ ECHO;
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
-} /* end of H5LTyylex */
+ } /* end of user's declarations */
+} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -1716,9 +1958,9 @@ ECHO;
*/
static int yy_get_next_buffer (void)
{
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = (yytext_ptr);
- register int number_to_move, i;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = (yytext_ptr);
+ int number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@@ -1747,7 +1989,7 @@ static int yy_get_next_buffer (void)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
@@ -1760,7 +2002,7 @@ static int yy_get_next_buffer (void)
else
{
- yy_size_t num_to_read =
+ int num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
@@ -1786,7 +2028,7 @@ static int yy_get_next_buffer (void)
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- H5LTyyrestart(H5LTyyin );
+ yyrestart( yyin );
}
else
@@ -1800,12 +2042,15 @@ static int yy_get_next_buffer (void)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) H5LTyyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
(yy_n_chars) += number_to_move;
@@ -1821,8 +2066,8 @@ static int yy_get_next_buffer (void)
static yy_state_type yy_get_previous_state (void)
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
+ yy_state_type yy_current_state;
+ char *yy_cp;
yy_current_state = (yy_start);
@@ -1831,14 +2076,14 @@ static int yy_get_next_buffer (void)
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
{
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 545 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
*(yy_state_ptr)++ = yy_current_state;
}
@@ -1852,39 +2097,41 @@ static int yy_get_next_buffer (void)
*/
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
{
- register int yy_is_jam;
+ int yy_is_jam;
- register YY_CHAR yy_c = 1;
+ YY_CHAR yy_c = 1;
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 545 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 544);
if ( ! yy_is_jam )
*(yy_state_ptr)++ = yy_current_state;
- return yy_is_jam ? 0 : yy_current_state;
+ return yy_is_jam ? 0 : yy_current_state;
}
- static void yyunput (int c, register char * yy_bp )
+#ifndef YY_NO_UNPUT
+
+ static void yyunput (int c, char * yy_bp )
{
- register char *yy_cp;
+ char *yy_cp;
yy_cp = (yy_c_buf_p);
- /* undo effects of setting up H5LTyytext */
+ /* undo effects of setting up yytext */
*yy_cp = (yy_hold_char);
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register yy_size_t number_to_move = (yy_n_chars) + 2;
- register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+ int number_to_move = (yy_n_chars) + 2;
+ char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
- register char *source =
+ char *source =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
@@ -1893,7 +2140,7 @@ static int yy_get_next_buffer (void)
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+ (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
@@ -1906,6 +2153,8 @@ static int yy_get_next_buffer (void)
(yy_c_buf_p) = yy_cp;
}
+#endif
+
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (void)
@@ -1930,7 +2179,7 @@ static int yy_get_next_buffer (void)
else
{ /* need more input */
- yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
@@ -1947,13 +2196,13 @@ static int yy_get_next_buffer (void)
*/
/* Reset buffer status. */
- H5LTyyrestart(H5LTyyin );
+ yyrestart( yyin );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( H5LTyywrap( ) )
+ if ( yywrap( ) )
return 0;
if ( ! (yy_did_buffer_switch_on_eof) )
@@ -1973,7 +2222,7 @@ static int yy_get_next_buffer (void)
}
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve H5LTyytext */
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
(yy_hold_char) = *++(yy_c_buf_p);
return c;
@@ -1985,32 +2234,32 @@ static int yy_get_next_buffer (void)
*
* @note This function does not reset the start condition to @c INITIAL .
*/
- void H5LTyyrestart (FILE * input_file )
+ void yyrestart (FILE * input_file )
{
if ( ! YY_CURRENT_BUFFER ){
- H5LTyyensure_buffer_stack ();
+ yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- H5LTyy_create_buffer(H5LTyyin,YY_BUF_SIZE );
+ yy_create_buffer( yyin, YY_BUF_SIZE );
}
- H5LTyy_init_buffer(YY_CURRENT_BUFFER,input_file );
- H5LTyy_load_buffer_state( );
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file );
+ yy_load_buffer_state( );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*/
- void H5LTyy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
/* TODO. We should be able to replace this entire function body
* with
- * H5LTyypop_buffer_state();
- * H5LTyypush_buffer_state(new_buffer);
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
*/
- H5LTyyensure_buffer_stack ();
+ yyensure_buffer_stack ();
if ( YY_CURRENT_BUFFER == new_buffer )
return;
@@ -2023,21 +2272,21 @@ static int yy_get_next_buffer (void)
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- H5LTyy_load_buffer_state( );
+ yy_load_buffer_state( );
/* We don't actually know whether we did this switch during
- * EOF (H5LTyywrap()) processing, but the only time this flag
- * is looked at is after H5LTyywrap() is called, so it's safe
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
(yy_did_buffer_switch_on_eof) = 1;
}
-static void H5LTyy_load_buffer_state (void)
+static void yy_load_buffer_state (void)
{
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- H5LTyyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
(yy_hold_char) = *(yy_c_buf_p);
}
@@ -2047,35 +2296,35 @@ static void H5LTyy_load_buffer_state (void)
*
* @return the allocated buffer state.
*/
- YY_BUFFER_STATE H5LTyy_create_buffer (FILE * file, int size )
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
- b = (YY_BUFFER_STATE) H5LTyyalloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyy_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) H5LTyyalloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyy_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- H5LTyy_init_buffer(b,file );
+ yy_init_buffer( b, file );
return b;
}
/** Destroy the buffer.
- * @param b a buffer created with H5LTyy_create_buffer()
+ * @param b a buffer created with yy_create_buffer()
*
*/
- void H5LTyy_delete_buffer (YY_BUFFER_STATE b )
+ void yy_delete_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
@@ -2085,31 +2334,27 @@ static void H5LTyy_load_buffer_state (void)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- H5LTyyfree((void *) b->yy_ch_buf );
+ yyfree( (void *) b->yy_ch_buf );
- H5LTyyfree((void *) b );
+ yyfree( (void *) b );
}
-#ifndef __cplusplus
-extern int isatty (int );
-#endif /* __cplusplus */
-
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
- * such as during a H5LTyyrestart() or at EOF.
+ * such as during a yyrestart() or at EOF.
*/
- static void H5LTyy_init_buffer (YY_BUFFER_STATE b, FILE * file )
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
{
int oerrno = errno;
- H5LTyy_flush_buffer(b );
+ yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then H5LTyy_init_buffer was _probably_
- * called from H5LTyyrestart() or through yy_get_next_buffer.
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column.
*/
if (b != YY_CURRENT_BUFFER){
@@ -2126,7 +2371,7 @@ extern int isatty (int );
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
*
*/
- void H5LTyy_flush_buffer (YY_BUFFER_STATE b )
+ void yy_flush_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
@@ -2146,7 +2391,7 @@ extern int isatty (int );
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- H5LTyy_load_buffer_state( );
+ yy_load_buffer_state( );
}
/** Pushes the new state onto the stack. The new state becomes
@@ -2155,14 +2400,14 @@ extern int isatty (int );
* @param new_buffer The new state.
*
*/
-void H5LTyypush_buffer_state (YY_BUFFER_STATE new_buffer )
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
{
if (new_buffer == NULL)
return;
- H5LTyyensure_buffer_stack();
+ yyensure_buffer_stack();
- /* This block is copied from H5LTyy_switch_to_buffer. */
+ /* This block is copied from yy_switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
@@ -2176,8 +2421,8 @@ void H5LTyypush_buffer_state (YY_BUFFER_STATE new_buffer )
(yy_buffer_stack_top)++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from H5LTyy_switch_to_buffer. */
- H5LTyy_load_buffer_state( );
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
@@ -2185,18 +2430,18 @@ void H5LTyypush_buffer_state (YY_BUFFER_STATE new_buffer )
* The next element becomes the new top.
*
*/
-void H5LTyypop_buffer_state (void)
+void yypop_buffer_state (void)
{
if (!YY_CURRENT_BUFFER)
return;
- H5LTyy_delete_buffer(YY_CURRENT_BUFFER );
+ yy_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
if ((yy_buffer_stack_top) > 0)
--(yy_buffer_stack_top);
if (YY_CURRENT_BUFFER) {
- H5LTyy_load_buffer_state( );
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
@@ -2204,7 +2449,7 @@ void H5LTyypop_buffer_state (void)
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
-static void H5LTyyensure_buffer_stack (void)
+static void yyensure_buffer_stack (void)
{
yy_size_t num_to_alloc;
@@ -2214,15 +2459,15 @@ static void H5LTyyensure_buffer_stack (void)
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
- num_to_alloc = 1;
- (yy_buffer_stack) = (struct yy_buffer_state**)H5LTyyalloc
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyyensure_buffer_stack()" );
-
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
(yy_buffer_stack_max) = num_to_alloc;
(yy_buffer_stack_top) = 0;
return;
@@ -2231,15 +2476,15 @@ static void H5LTyyensure_buffer_stack (void)
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
/* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
num_to_alloc = (yy_buffer_stack_max) + grow_size;
- (yy_buffer_stack) = (struct yy_buffer_state**)H5LTyyrealloc
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyyensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
/* zero only the new slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -2251,9 +2496,9 @@ static void H5LTyyensure_buffer_stack (void)
* @param base the character buffer
* @param size the size in bytes of the character buffer
*
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE H5LTyy_scan_buffer (char * base, yy_size_t size )
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
@@ -2261,68 +2506,69 @@ YY_BUFFER_STATE H5LTyy_scan_buffer (char * base, yy_size_t size )
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
- return 0;
+ return NULL;
- b = (YY_BUFFER_STATE) H5LTyyalloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyy_scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
+ b->yy_input_file = NULL;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- H5LTyy_switch_to_buffer(b );
+ yy_switch_to_buffer( b );
return b;
}
-/** Setup the input buffer state to scan a string. The next call to H5LTyylex() will
+/** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
*
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
- * H5LTyy_scan_bytes() instead.
+ * yy_scan_bytes() instead.
*/
-YY_BUFFER_STATE H5LTyy_scan_string (yyconst char * yystr )
+YY_BUFFER_STATE yy_scan_string (const char * yystr )
{
- return H5LTyy_scan_bytes(yystr,strlen(yystr) );
+ return yy_scan_bytes( yystr, (int) strlen(yystr) );
}
-/** Setup the input buffer state to scan the given bytes. The next call to H5LTyylex() will
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE H5LTyy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
+YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
- yy_size_t n, i;
+ yy_size_t n;
+ int i;
/* Get memory for full buffer, including space for trailing EOB's. */
- n = _yybytes_len + 2;
- buf = (char *) H5LTyyalloc(n );
+ n = (yy_size_t) (_yybytes_len + 2);
+ buf = (char *) yyalloc( n );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyy_scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = H5LTyy_scan_buffer(buf,n );
+ b = yy_scan_buffer( buf, n );
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in H5LTyy_scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
@@ -2336,9 +2582,9 @@ YY_BUFFER_STATE H5LTyy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_
#define YY_EXIT_FAILURE 2
#endif
-static void yy_fatal_error (yyconst char* msg )
+static void yynoreturn yy_fatal_error (const char* msg )
{
- (void) fprintf( stderr, "%s\n", msg );
+ fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
@@ -2348,14 +2594,14 @@ static void yy_fatal_error (yyconst char* msg )
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up H5LTyytext. */ \
+ /* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
- H5LTyytext[H5LTyyleng] = (yy_hold_char); \
- (yy_c_buf_p) = H5LTyytext + yyless_macro_arg; \
+ yytext[yyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
- H5LTyyleng = yyless_macro_arg; \
+ yyleng = yyless_macro_arg; \
} \
while ( 0 )
@@ -2364,91 +2610,91 @@ static void yy_fatal_error (yyconst char* msg )
/** Get the current line number.
*
*/
-int H5LTyyget_lineno (void)
+int yyget_lineno (void)
{
-
- return H5LTyylineno;
+
+ return yylineno;
}
/** Get the input stream.
*
*/
-FILE *H5LTyyget_in (void)
+FILE *yyget_in (void)
{
- return H5LTyyin;
+ return yyin;
}
/** Get the output stream.
*
*/
-FILE *H5LTyyget_out (void)
+FILE *yyget_out (void)
{
- return H5LTyyout;
+ return yyout;
}
/** Get the length of the current token.
*
*/
-yy_size_t H5LTyyget_leng (void)
+int yyget_leng (void)
{
- return H5LTyyleng;
+ return yyleng;
}
/** Get the current token.
*
*/
-char *H5LTyyget_text (void)
+char *yyget_text (void)
{
- return H5LTyytext;
+ return yytext;
}
/** Set the current line number.
- * @param line_number
+ * @param _line_number line number
*
*/
-void H5LTyyset_lineno (int line_number )
+void yyset_lineno (int _line_number )
{
- H5LTyylineno = line_number;
+ yylineno = _line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param in_str A readable stream.
+ * @param _in_str A readable stream.
*
- * @see H5LTyy_switch_to_buffer
+ * @see yy_switch_to_buffer
*/
-void H5LTyyset_in (FILE * in_str )
+void yyset_in (FILE * _in_str )
{
- H5LTyyin = in_str ;
+ yyin = _in_str ;
}
-void H5LTyyset_out (FILE * out_str )
+void yyset_out (FILE * _out_str )
{
- H5LTyyout = out_str ;
+ yyout = _out_str ;
}
-int H5LTyyget_debug (void)
+int yyget_debug (void)
{
- return H5LTyy_flex_debug;
+ return yy_flex_debug;
}
-void H5LTyyset_debug (int bdebug )
+void yyset_debug (int _bdebug )
{
- H5LTyy_flex_debug = bdebug ;
+ yy_flex_debug = _bdebug ;
}
static int yy_init_globals (void)
{
/* Initialization is the same as for the non-reentrant scanner.
- * This function is called from H5LTyylex_destroy(), so don't allocate here.
+ * This function is called from yylex_destroy(), so don't allocate here.
*/
- (yy_buffer_stack) = 0;
+ (yy_buffer_stack) = NULL;
(yy_buffer_stack_top) = 0;
(yy_buffer_stack_max) = 0;
- (yy_c_buf_p) = (char *) 0;
+ (yy_c_buf_p) = NULL;
(yy_init) = 0;
(yy_start) = 0;
@@ -2459,39 +2705,39 @@ static int yy_init_globals (void)
/* Defined in main.c */
#ifdef YY_STDINIT
- H5LTyyin = stdin;
- H5LTyyout = stdout;
+ yyin = stdin;
+ yyout = stdout;
#else
- H5LTyyin = (FILE *) 0;
- H5LTyyout = (FILE *) 0;
+ yyin = NULL;
+ yyout = NULL;
#endif
/* For future reference: Set errno on error, since we are called by
- * H5LTyylex_init()
+ * yylex_init()
*/
return 0;
}
-/* H5LTyylex_destroy is for both reentrant and non-reentrant scanners. */
-int H5LTyylex_destroy (void)
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- H5LTyy_delete_buffer(YY_CURRENT_BUFFER );
+ yy_delete_buffer( YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
- H5LTyypop_buffer_state();
+ yypop_buffer_state();
}
/* Destroy the stack itself. */
- H5LTyyfree((yy_buffer_stack) );
+ yyfree((yy_buffer_stack) );
(yy_buffer_stack) = NULL;
- H5LTyyfree ( (yy_state_buf) );
+ yyfree ( (yy_state_buf) );
(yy_state_buf) = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
- * H5LTyylex() is called, initialization will occur. */
+ * yylex() is called, initialization will occur. */
yy_init_globals( );
return 0;
@@ -2502,18 +2748,19 @@ int H5LTyylex_destroy (void)
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+static void yy_flex_strncpy (char* s1, const char * s2, int n )
{
- register int i;
+
+ int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s )
+static int yy_flex_strlen (const char * s )
{
- register int n;
+ int n;
for ( n = 0; s[n]; ++n )
;
@@ -2521,13 +2768,14 @@ static int yy_flex_strlen (yyconst char * s )
}
#endif
-void *H5LTyyalloc (yy_size_t size )
+void *yyalloc (yy_size_t size )
{
- return (void *) malloc( size );
+ return malloc(size);
}
-void *H5LTyyrealloc (void * ptr, yy_size_t size )
+void *yyrealloc (void * ptr, yy_size_t size )
{
+
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
@@ -2535,18 +2783,17 @@ void *H5LTyyrealloc (void * ptr, yy_size_t size )
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
- return (void *) realloc( (char *) ptr, size );
+ return realloc(ptr, size);
}
-void H5LTyyfree (void * ptr )
+void yyfree (void * ptr )
{
- free( (char *) ptr ); /* see H5LTyyrealloc() for (char *) cast */
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
-#line 185 "hl/src/H5LTanalyze.l"
-
+#line 184 "hl/src/H5LTanalyze.l"
int my_yyinput(char *buf, int max_size)
{
@@ -2559,11 +2806,11 @@ int my_yyinput(char *buf, int max_size)
int H5LTyyerror(const char *msg)
{
- printf("ERROR: %s before \"%s\".\n", msg, H5LTyytext);
+ printf("ERROR: %s before \"%s\".\n", msg, yytext);
return 0;
}
-int H5LTyywrap()
+int yywrap()
{
return(1);
}
diff --git a/hl/src/H5LTanalyze.l b/hl/src/H5LTanalyze.l
index f16455b..5015053 100644
--- a/hl/src/H5LTanalyze.l
+++ b/hl/src/H5LTanalyze.l
@@ -26,7 +26,6 @@
/* Turn off suggest const & malloc attribute warnings in gcc */
#if defined __GNUC__ && 402 <= __GNUC__ * 100 + __GNUC_MINOR__
#pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
-#pragma GCC diagnostic ignored "-Wsuggest-attribute=malloc"
#endif
int my_yyinput(char *, int);
diff --git a/hl/src/H5LTparse.c b/hl/src/H5LTparse.c
index 193ba1f..a9b3dc3 100644
--- a/hl/src/H5LTparse.c
+++ b/hl/src/H5LTparse.c
@@ -20,12 +20,11 @@
#elif defined _MSC_VER
#pragma warning(push, 1)
#endif
-/* A Bison parser, made by GNU Bison 3.4.1. */
+/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison implementation for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
- Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -63,14 +62,11 @@
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
-/* Undocumented macros, especially those whose name start with YY_,
- are private implementation details. Do not rely on them. */
-
/* Identify Bison output. */
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "3.4.1"
+#define YYBISON_VERSION "3.0.4"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -95,8 +91,8 @@
#define yylval H5LTyylval
#define yychar H5LTyychar
-/* First part of user prologue. */
-#line 20 "hl/src/H5LTparse.y"
+/* Copy the first part of user declarations. */
+#line 20 "hl/src/H5LTparse.y" /* yacc.c:339 */
#include <stdio.h>
#include <string.h>
@@ -149,17 +145,13 @@ hbool_t is_opq_size = 0; /*flag to lexer for opaque type size*/
hbool_t is_opq_tag = 0; /*flag to lexer for opaque type tag*/
-#line 131 "hl/src/H5LTparse.c"
+#line 127 "hl/src/H5LTparse.c" /* yacc.c:339 */
# ifndef YY_NULLPTR
-# if defined __cplusplus
-# if 201103L <= __cplusplus
-# define YY_NULLPTR nullptr
-# else
-# define YY_NULLPTR 0
-# endif
+# if defined __cplusplus && 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
# else
-# define YY_NULLPTR ((void*)0)
+# define YY_NULLPTR 0
# endif
# endif
@@ -171,8 +163,8 @@ hbool_t is_opq_tag = 0; /*flag to lexer for opaque type tag*/
# define YYERROR_VERBOSE 0
#endif
-/* Use api.header.include to #include this header
- instead of duplicating it here. */
+/* In a future release of Bison, this section will be replaced
+ by #include "H5LTparse.h". */
#ifndef YY_H5LTYY_HL_SRC_H5LTPARSE_H_INCLUDED
# define YY_H5LTYY_HL_SRC_H5LTPARSE_H_INCLUDED
/* Debug traces. */
@@ -249,17 +241,18 @@ extern int H5LTyydebug;
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+
union YYSTYPE
{
-#line 72 "hl/src/H5LTparse.y"
+#line 72 "hl/src/H5LTparse.y" /* yacc.c:355 */
int ival; /*for integer token*/
char *sval; /*for name string*/
hid_t hid; /*for hid_t token*/
-#line 239 "hl/src/H5LTparse.c"
-
+#line 232 "hl/src/H5LTparse.c" /* yacc.c:355 */
};
+
typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
@@ -272,7 +265,9 @@ hid_t H5LTyyparse (void);
#endif /* !YY_H5LTYY_HL_SRC_H5LTPARSE_H_INCLUDED */
+/* Copy the second part of user declarations. */
+#line 249 "hl/src/H5LTparse.c" /* yacc.c:358 */
#ifdef short
# undef short
@@ -293,13 +288,13 @@ typedef signed char yytype_int8;
#ifdef YYTYPE_UINT16
typedef YYTYPE_UINT16 yytype_uint16;
#else
-typedef unsigned short yytype_uint16;
+typedef unsigned short int yytype_uint16;
#endif
#ifdef YYTYPE_INT16
typedef YYTYPE_INT16 yytype_int16;
#else
-typedef short yytype_int16;
+typedef short int yytype_int16;
#endif
#ifndef YYSIZE_T
@@ -311,7 +306,7 @@ typedef short yytype_int16;
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
-# define YYSIZE_T unsigned
+# define YYSIZE_T unsigned int
# endif
#endif
@@ -347,6 +342,15 @@ typedef short yytype_int16;
# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
#endif
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
+# endif
+#endif
+
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
# define YYUSE(E) ((void) (E))
@@ -354,7 +358,7 @@ typedef short yytype_int16;
# define YYUSE(E) /* empty */
#endif
-#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \
@@ -374,8 +378,6 @@ typedef short yytype_int16;
#endif
-#define YY_ASSERT(E) ((void) (0 && (E)))
-
#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -518,16 +520,16 @@ union yyalloc
/* YYNSTATES -- Number of states. */
#define YYNSTATES 143
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 313
-/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
- as returned by yylex, with out-of-bounds checking. */
#define YYTRANSLATE(YYX) \
- ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
- as returned by yylex. */
+ as returned by yylex, without out-of-bounds checking. */
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -823,22 +825,22 @@ static const yytype_uint8 yyr2[] =
#define YYRECOVERING() (!!yyerrstatus)
-#define YYBACKUP(Token, Value) \
- do \
- if (yychar == YYEMPTY) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- YYPOPSTACK (yylen); \
- yystate = *yyssp; \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
- while (0)
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (0)
/* Error token number */
#define YYTERROR 1
@@ -878,37 +880,37 @@ do { \
} while (0)
-/*-----------------------------------.
-| Print this symbol's value on YYO. |
-`-----------------------------------*/
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/
static void
-yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
{
- FILE *yyoutput = yyo;
- YYUSE (yyoutput);
+ FILE *yyo = yyoutput;
+ YYUSE (yyo);
if (!yyvaluep)
return;
# ifdef YYPRINT
if (yytype < YYNTOKENS)
- YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# endif
YYUSE (yytype);
}
-/*---------------------------.
-| Print this symbol on YYO. |
-`---------------------------*/
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
static void
-yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
{
- YYFPRINTF (yyo, "%s %s (",
+ YYFPRINTF (yyoutput, "%s %s (",
yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
- yy_symbol_value_print (yyo, yytype, yyvaluep);
- YYFPRINTF (yyo, ")");
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+ YYFPRINTF (yyoutput, ")");
}
/*------------------------------------------------------------------.
@@ -942,7 +944,7 @@ do { \
static void
yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
{
- unsigned long yylno = yyrline[yyrule];
+ unsigned long int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
@@ -953,7 +955,7 @@ yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr,
yystos[yyssp[yyi + 1 - yynrhs]],
- &yyvsp[(yyi + 1) - (yynrhs)]
+ &(yyvsp[(yyi + 1) - (yynrhs)])
);
YYFPRINTF (stderr, "\n");
}
@@ -1057,10 +1059,7 @@ yytnamerr (char *yyres, const char *yystr)
case '\\':
if (*++yyp != '\\')
goto do_not_strip_quotes;
- else
- goto append;
-
- append:
+ /* Fall through. */
default:
if (yyres)
yyres[yyn] = *yyp;
@@ -1078,7 +1077,7 @@ yytnamerr (char *yyres, const char *yystr)
if (! yyres)
return yystrlen (yystr);
- return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
+ return yystpcpy (yyres, yystr) - yyres;
}
# endif
@@ -1156,10 +1155,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yyarg[yycount++] = yytname[yyx];
{
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
- yysize = yysize1;
- else
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
+ yysize = yysize1;
}
}
}
@@ -1171,7 +1170,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
case N: \
yyformat = S; \
break
- default: /* Avoid compiler warnings. */
YYCASE_(0, YY_("syntax error"));
YYCASE_(1, YY_("syntax error, unexpected %s"));
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
@@ -1183,10 +1181,9 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
{
YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
- yysize = yysize1;
- else
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
+ yysize = yysize1;
}
if (*yymsg_alloc < yysize)
@@ -1312,33 +1309,23 @@ yyparse (void)
yychar = YYEMPTY; /* Cause a token to be read. */
goto yysetstate;
-
/*------------------------------------------------------------.
-| yynewstate -- push a new state, which is found in yystate. |
+| yynewstate -- Push a new state, which is found in yystate. |
`------------------------------------------------------------*/
-yynewstate:
+ yynewstate:
/* In all cases, when you get here, the value and location stacks
have just been pushed. So pushing a state here evens the stacks. */
yyssp++;
-
-/*--------------------------------------------------------------------.
-| yynewstate -- set current state (the top of the stack) to yystate. |
-`--------------------------------------------------------------------*/
-yysetstate:
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
- YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
- *yyssp = (yytype_int16) yystate;
+ yysetstate:
+ *yyssp = yystate;
if (yyss + yystacksize - 1 <= yyssp)
-#if !defined yyoverflow && !defined YYSTACK_RELOCATE
- goto yyexhaustedlab;
-#else
{
/* Get the current used size of the three stacks, in elements. */
- YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
+ YYSIZE_T yysize = yyssp - yyss + 1;
-# if defined yyoverflow
+#ifdef yyoverflow
{
/* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into
@@ -1354,10 +1341,14 @@ yysetstate:
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
&yystacksize);
+
yyss = yyss1;
yyvs = yyvs1;
}
-# else /* defined YYSTACK_RELOCATE */
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
goto yyexhaustedlab;
@@ -1373,33 +1364,35 @@ yysetstate:
goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss_alloc, yyss);
YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-# undef YYSTACK_RELOCATE
+# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
}
# endif
+#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long) yystacksize));
+ (unsigned long int) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
YYABORT;
}
-#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
if (yystate == YYFINAL)
YYACCEPT;
goto yybackup;
-
/*-----------.
| yybackup. |
`-----------*/
yybackup:
+
/* Do appropriate processing given the current state. Read a
lookahead token if we need one and don't already have one. */
@@ -1457,6 +1450,7 @@ yybackup:
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
+
goto yynewstate;
@@ -1471,7 +1465,7 @@ yydefault:
/*-----------------------------.
-| yyreduce -- do a reduction. |
+| yyreduce -- Do a reduction. |
`-----------------------------*/
yyreduce:
/* yyn is the number of a rule to reduce with. */
@@ -1491,246 +1485,246 @@ yyreduce:
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
- case 2:
-#line 105 "hl/src/H5LTparse.y"
+ case 2:
+#line 105 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ memset(arr_stack, 0, STACK_SIZE*sizeof(struct arr_info)); /*initialize here?*/ }
-#line 1476 "hl/src/H5LTparse.c"
+#line 1470 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 3:
-#line 106 "hl/src/H5LTparse.y"
+#line 106 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ return (yyval.hid);}
-#line 1482 "hl/src/H5LTparse.c"
+#line 1476 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 13:
-#line 120 "hl/src/H5LTparse.y"
+#line 120 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I8BE); }
-#line 1488 "hl/src/H5LTparse.c"
+#line 1482 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 14:
-#line 121 "hl/src/H5LTparse.y"
+#line 121 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I8LE); }
-#line 1494 "hl/src/H5LTparse.c"
+#line 1488 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 15:
-#line 122 "hl/src/H5LTparse.y"
+#line 122 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I16BE); }
-#line 1500 "hl/src/H5LTparse.c"
+#line 1494 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 16:
-#line 123 "hl/src/H5LTparse.y"
+#line 123 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I16LE); }
-#line 1506 "hl/src/H5LTparse.c"
+#line 1500 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 17:
-#line 124 "hl/src/H5LTparse.y"
+#line 124 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I32BE); }
-#line 1512 "hl/src/H5LTparse.c"
+#line 1506 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 18:
-#line 125 "hl/src/H5LTparse.y"
+#line 125 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I32LE); }
-#line 1518 "hl/src/H5LTparse.c"
+#line 1512 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 19:
-#line 126 "hl/src/H5LTparse.y"
+#line 126 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I64BE); }
-#line 1524 "hl/src/H5LTparse.c"
+#line 1518 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 20:
-#line 127 "hl/src/H5LTparse.y"
+#line 127 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I64LE); }
-#line 1530 "hl/src/H5LTparse.c"
+#line 1524 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 21:
-#line 128 "hl/src/H5LTparse.y"
+#line 128 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U8BE); }
-#line 1536 "hl/src/H5LTparse.c"
+#line 1530 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 22:
-#line 129 "hl/src/H5LTparse.y"
+#line 129 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U8LE); }
-#line 1542 "hl/src/H5LTparse.c"
+#line 1536 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 23:
-#line 130 "hl/src/H5LTparse.y"
+#line 130 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U16BE); }
-#line 1548 "hl/src/H5LTparse.c"
+#line 1542 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 24:
-#line 131 "hl/src/H5LTparse.y"
+#line 131 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U16LE); }
-#line 1554 "hl/src/H5LTparse.c"
+#line 1548 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 25:
-#line 132 "hl/src/H5LTparse.y"
+#line 132 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U32BE); }
-#line 1560 "hl/src/H5LTparse.c"
+#line 1554 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 26:
-#line 133 "hl/src/H5LTparse.y"
+#line 133 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U32LE); }
-#line 1566 "hl/src/H5LTparse.c"
+#line 1560 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 27:
-#line 134 "hl/src/H5LTparse.y"
+#line 134 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U64BE); }
-#line 1572 "hl/src/H5LTparse.c"
+#line 1566 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 28:
-#line 135 "hl/src/H5LTparse.y"
+#line 135 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U64LE); }
-#line 1578 "hl/src/H5LTparse.c"
+#line 1572 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 29:
-#line 136 "hl/src/H5LTparse.y"
+#line 136 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_CHAR); }
-#line 1584 "hl/src/H5LTparse.c"
+#line 1578 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 30:
-#line 137 "hl/src/H5LTparse.y"
+#line 137 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_SCHAR); }
-#line 1590 "hl/src/H5LTparse.c"
+#line 1584 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 31:
-#line 138 "hl/src/H5LTparse.y"
+#line 138 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_UCHAR); }
-#line 1596 "hl/src/H5LTparse.c"
+#line 1590 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 32:
-#line 139 "hl/src/H5LTparse.y"
+#line 139 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_SHORT); }
-#line 1602 "hl/src/H5LTparse.c"
+#line 1596 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 33:
-#line 140 "hl/src/H5LTparse.y"
+#line 140 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_USHORT); }
-#line 1608 "hl/src/H5LTparse.c"
+#line 1602 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 34:
-#line 141 "hl/src/H5LTparse.y"
+#line 141 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_INT); }
-#line 1614 "hl/src/H5LTparse.c"
+#line 1608 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 35:
-#line 142 "hl/src/H5LTparse.y"
+#line 142 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_UINT); }
-#line 1620 "hl/src/H5LTparse.c"
+#line 1614 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 36:
-#line 143 "hl/src/H5LTparse.y"
+#line 143 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_LONG); }
-#line 1626 "hl/src/H5LTparse.c"
+#line 1620 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 37:
-#line 144 "hl/src/H5LTparse.y"
+#line 144 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_ULONG); }
-#line 1632 "hl/src/H5LTparse.c"
+#line 1626 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 38:
-#line 145 "hl/src/H5LTparse.y"
+#line 145 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_LLONG); }
-#line 1638 "hl/src/H5LTparse.c"
+#line 1632 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 39:
-#line 146 "hl/src/H5LTparse.y"
+#line 146 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_ULLONG); }
-#line 1644 "hl/src/H5LTparse.c"
+#line 1638 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 40:
-#line 149 "hl/src/H5LTparse.y"
+#line 149 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F32BE); }
-#line 1650 "hl/src/H5LTparse.c"
+#line 1644 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 41:
-#line 150 "hl/src/H5LTparse.y"
+#line 150 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F32LE); }
-#line 1656 "hl/src/H5LTparse.c"
+#line 1650 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 42:
-#line 151 "hl/src/H5LTparse.y"
+#line 151 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F64BE); }
-#line 1662 "hl/src/H5LTparse.c"
+#line 1656 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 43:
-#line 152 "hl/src/H5LTparse.y"
+#line 152 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F64LE); }
-#line 1668 "hl/src/H5LTparse.c"
+#line 1662 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 44:
-#line 153 "hl/src/H5LTparse.y"
+#line 153 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_FLOAT); }
-#line 1674 "hl/src/H5LTparse.c"
+#line 1668 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 45:
-#line 154 "hl/src/H5LTparse.y"
+#line 154 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_DOUBLE); }
-#line 1680 "hl/src/H5LTparse.c"
+#line 1674 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 46:
-#line 155 "hl/src/H5LTparse.y"
+#line 155 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_LDOUBLE); }
-#line 1686 "hl/src/H5LTparse.c"
+#line 1680 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 47:
-#line 159 "hl/src/H5LTparse.y"
+#line 159 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ csindex++; cmpd_stack[csindex].id = H5Tcreate(H5T_COMPOUND, 1); /*temporarily set size to 1*/ }
-#line 1692 "hl/src/H5LTparse.c"
+#line 1686 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 48:
-#line 161 "hl/src/H5LTparse.y"
+#line 161 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = cmpd_stack[csindex].id;
cmpd_stack[csindex].id = 0;
cmpd_stack[csindex].first_memb = 1;
csindex--;
}
-#line 1702 "hl/src/H5LTparse.c"
+#line 1696 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 51:
-#line 170 "hl/src/H5LTparse.y"
+#line 170 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ cmpd_stack[csindex].is_field = 1; /*notify lexer a compound member is parsed*/ }
-#line 1708 "hl/src/H5LTparse.c"
+#line 1702 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 52:
-#line 172 "hl/src/H5LTparse.y"
+#line 172 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
size_t origin_size, new_size;
hid_t dtype_id = cmpd_stack[csindex].id;
@@ -1765,117 +1759,117 @@ yyreduce:
new_size = H5Tget_size(dtype_id);
}
-#line 1747 "hl/src/H5LTparse.c"
+#line 1741 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 53:
-#line 208 "hl/src/H5LTparse.y"
+#line 208 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
(yyval.sval) = strdup(yylval.sval);
free(yylval.sval);
yylval.sval = NULL;
}
-#line 1757 "hl/src/H5LTparse.c"
+#line 1751 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 54:
-#line 215 "hl/src/H5LTparse.y"
+#line 215 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.ival) = 0; }
-#line 1763 "hl/src/H5LTparse.c"
+#line 1757 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 55:
-#line 217 "hl/src/H5LTparse.y"
+#line 217 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.ival) = yylval.ival; }
-#line 1769 "hl/src/H5LTparse.c"
+#line 1763 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 57:
-#line 221 "hl/src/H5LTparse.y"
+#line 221 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ asindex++; /*pushd onto the stack*/ }
-#line 1775 "hl/src/H5LTparse.c"
+#line 1769 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 58:
-#line 223 "hl/src/H5LTparse.y"
+#line 223 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
(yyval.hid) = H5Tarray_create2((yyvsp[-1].hid), arr_stack[asindex].ndims, arr_stack[asindex].dims);
arr_stack[asindex].ndims = 0;
asindex--;
H5Tclose((yyvsp[-1].hid));
}
-#line 1786 "hl/src/H5LTparse.c"
+#line 1780 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 61:
-#line 233 "hl/src/H5LTparse.y"
+#line 233 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ arr_stack[asindex].is_dim = 1; /*notice lexer of dimension size*/ }
-#line 1792 "hl/src/H5LTparse.c"
+#line 1786 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 62:
-#line 234 "hl/src/H5LTparse.y"
+#line 234 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ unsigned ndims = arr_stack[asindex].ndims;
arr_stack[asindex].dims[ndims] = (hsize_t)yylval.ival;
arr_stack[asindex].ndims++;
arr_stack[asindex].is_dim = 0;
}
-#line 1802 "hl/src/H5LTparse.c"
+#line 1796 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 65:
-#line 245 "hl/src/H5LTparse.y"
+#line 245 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tvlen_create((yyvsp[-1].hid)); H5Tclose((yyvsp[-1].hid)); }
-#line 1808 "hl/src/H5LTparse.c"
+#line 1802 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 66:
-#line 250 "hl/src/H5LTparse.y"
+#line 250 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ is_opq_size = 1; }
-#line 1814 "hl/src/H5LTparse.c"
+#line 1808 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 67:
-#line 251 "hl/src/H5LTparse.y"
+#line 251 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
size_t size = (size_t)yylval.ival;
(yyval.hid) = H5Tcreate(H5T_OPAQUE, size);
is_opq_size = 0;
}
-#line 1824 "hl/src/H5LTparse.c"
+#line 1818 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 68:
-#line 256 "hl/src/H5LTparse.y"
+#line 256 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ is_opq_tag = 1; }
-#line 1830 "hl/src/H5LTparse.c"
+#line 1824 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 69:
-#line 257 "hl/src/H5LTparse.y"
+#line 257 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
H5Tset_tag((yyvsp[-6].hid), yylval.sval);
free(yylval.sval);
yylval.sval = NULL;
is_opq_tag = 0;
}
-#line 1841 "hl/src/H5LTparse.c"
+#line 1835 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 70:
-#line 263 "hl/src/H5LTparse.y"
+#line 263 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = (yyvsp[-8].hid); }
-#line 1847 "hl/src/H5LTparse.c"
+#line 1841 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 73:
-#line 271 "hl/src/H5LTparse.y"
+#line 271 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ is_str_size = 1; }
-#line 1853 "hl/src/H5LTparse.c"
+#line 1847 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 74:
-#line 272 "hl/src/H5LTparse.y"
+#line 272 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
if((yyvsp[-1].ival) == H5T_VARIABLE_TOKEN)
is_variable = 1;
@@ -1883,11 +1877,11 @@ yyreduce:
str_size = yylval.ival;
is_str_size = 0;
}
-#line 1865 "hl/src/H5LTparse.c"
+#line 1859 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 75:
-#line 280 "hl/src/H5LTparse.y"
+#line 280 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
if((yyvsp[-1].ival) == H5T_STR_NULLTERM_TOKEN)
str_pad = H5T_STR_NULLTERM;
@@ -1896,33 +1890,33 @@ yyreduce:
else if((yyvsp[-1].ival) == H5T_STR_SPACEPAD_TOKEN)
str_pad = H5T_STR_SPACEPAD;
}
-#line 1878 "hl/src/H5LTparse.c"
+#line 1872 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 76:
-#line 289 "hl/src/H5LTparse.y"
+#line 289 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
if((yyvsp[-1].ival) == H5T_CSET_ASCII_TOKEN)
str_cset = H5T_CSET_ASCII;
else if((yyvsp[-1].ival) == H5T_CSET_UTF8_TOKEN)
str_cset = H5T_CSET_UTF8;
}
-#line 1889 "hl/src/H5LTparse.c"
+#line 1883 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 77:
-#line 296 "hl/src/H5LTparse.y"
+#line 296 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
if((yyvsp[-1].hid) == H5T_C_S1_TOKEN)
(yyval.hid) = H5Tcopy(H5T_C_S1);
else if((yyvsp[-1].hid) == H5T_FORTRAN_S1_TOKEN)
(yyval.hid) = H5Tcopy(H5T_FORTRAN_S1);
}
-#line 1900 "hl/src/H5LTparse.c"
+#line 1894 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 78:
-#line 303 "hl/src/H5LTparse.y"
+#line 303 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
hid_t str_id = (yyvsp[-1].hid);
@@ -1939,71 +1933,71 @@ yyreduce:
(yyval.hid) = str_id;
}
-#line 1921 "hl/src/H5LTparse.c"
+#line 1915 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 79:
-#line 320 "hl/src/H5LTparse.y"
+#line 320 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.ival) = H5T_VARIABLE_TOKEN;}
-#line 1927 "hl/src/H5LTparse.c"
+#line 1921 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 81:
-#line 323 "hl/src/H5LTparse.y"
+#line 323 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.ival) = H5T_STR_NULLTERM_TOKEN;}
-#line 1933 "hl/src/H5LTparse.c"
+#line 1927 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 82:
-#line 324 "hl/src/H5LTparse.y"
+#line 324 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.ival) = H5T_STR_NULLPAD_TOKEN;}
-#line 1939 "hl/src/H5LTparse.c"
+#line 1933 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 83:
-#line 325 "hl/src/H5LTparse.y"
+#line 325 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.ival) = H5T_STR_SPACEPAD_TOKEN;}
-#line 1945 "hl/src/H5LTparse.c"
+#line 1939 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 84:
-#line 327 "hl/src/H5LTparse.y"
+#line 327 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.ival) = H5T_CSET_ASCII_TOKEN;}
-#line 1951 "hl/src/H5LTparse.c"
+#line 1945 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 85:
-#line 328 "hl/src/H5LTparse.y"
+#line 328 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.ival) = H5T_CSET_UTF8_TOKEN;}
-#line 1957 "hl/src/H5LTparse.c"
+#line 1951 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 86:
-#line 330 "hl/src/H5LTparse.y"
+#line 330 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.hid) = H5T_C_S1_TOKEN;}
-#line 1963 "hl/src/H5LTparse.c"
+#line 1957 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 87:
-#line 331 "hl/src/H5LTparse.y"
+#line 331 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.hid) = H5T_FORTRAN_S1_TOKEN;}
-#line 1969 "hl/src/H5LTparse.c"
+#line 1963 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 88:
-#line 335 "hl/src/H5LTparse.y"
+#line 335 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ is_enum = 1; enum_id = H5Tenum_create((yyvsp[-1].hid)); H5Tclose((yyvsp[-1].hid)); }
-#line 1975 "hl/src/H5LTparse.c"
+#line 1969 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 89:
-#line 337 "hl/src/H5LTparse.y"
+#line 337 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ is_enum = 0; /*reset*/ (yyval.hid) = enum_id; }
-#line 1981 "hl/src/H5LTparse.c"
+#line 1975 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 92:
-#line 342 "hl/src/H5LTparse.y"
+#line 342 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
is_enum_memb = 1; /*indicate member of enum*/
#ifdef H5_HAVE_WIN32_API
@@ -2014,11 +2008,11 @@ yyreduce:
free(yylval.sval);
yylval.sval = NULL;
}
-#line 1996 "hl/src/H5LTparse.c"
+#line 1990 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 93:
-#line 353 "hl/src/H5LTparse.y"
+#line 353 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
char char_val=(char)yylval.ival;
short short_val=(short)yylval.ival;
@@ -2061,12 +2055,11 @@ yyreduce:
H5Tclose(super);
H5Tclose(native);
}
-#line 2043 "hl/src/H5LTparse.c"
+#line 2037 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
-#line 2047 "hl/src/H5LTparse.c"
-
+#line 2041 "hl/src/H5LTparse.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -2091,13 +2084,14 @@ yyreduce:
/* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
- {
- const int yylhs = yyr1[yyn] - YYNTOKENS;
- const int yyi = yypgoto[yylhs] + *yyssp;
- yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
- ? yytable[yyi]
- : yydefgoto[yylhs]);
- }
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
goto yynewstate;
@@ -2180,10 +2174,12 @@ yyerrlab:
| yyerrorlab -- error raised explicitly by YYERROR. |
`---------------------------------------------------*/
yyerrorlab:
- /* Pacify compilers when the user code never invokes YYERROR and the
- label yyerrorlab therefore never appears in user code. */
- if (0)
- YYERROR;
+
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
+ goto yyerrorlab;
/* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
@@ -2245,7 +2241,6 @@ yyacceptlab:
yyresult = 0;
goto yyreturn;
-
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
@@ -2253,7 +2248,6 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-
#if !defined yyoverflow || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
@@ -2264,10 +2258,6 @@ yyexhaustedlab:
/* Fall through. */
#endif
-
-/*-----------------------------------------------------.
-| yyreturn -- parsing is finished, return the result. |
-`-----------------------------------------------------*/
yyreturn:
if (yychar != YYEMPTY)
{
diff --git a/hl/src/H5LTparse.h b/hl/src/H5LTparse.h
index 73a76e9..e38116a 100644
--- a/hl/src/H5LTparse.h
+++ b/hl/src/H5LTparse.h
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 3.4.1. */
+/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison interface for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
- Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -31,9 +30,6 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
-/* Undocumented macros, especially those whose name start with YY_,
- are private implementation details. Do not rely on them. */
-
#ifndef YY_H5LTYY_HL_SRC_H5LTPARSE_H_INCLUDED
# define YY_H5LTYY_HL_SRC_H5LTPARSE_H_INCLUDED
/* Debug traces. */
@@ -110,17 +106,18 @@ extern int H5LTyydebug;
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+
union YYSTYPE
{
-#line 72 "hl/src/H5LTparse.y"
+#line 72 "hl/src/H5LTparse.y" /* yacc.c:1909 */
int ival; /*for integer token*/
char *sval; /*for name string*/
hid_t hid; /*for hid_t token*/
-#line 122 "hl/src/H5LTparse.h"
-
+#line 119 "hl/src/H5LTparse.h" /* yacc.c:1909 */
};
+
typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
diff --git a/hl/tools/gif2h5/CMakeTests.cmake b/hl/tools/gif2h5/CMakeTests.cmake
index 8537d7c..094a7b5 100644
--- a/hl/tools/gif2h5/CMakeTests.cmake
+++ b/hl/tools/gif2h5/CMakeTests.cmake
@@ -27,12 +27,6 @@ HDFTEST_COPY_FILE("${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/testfiles/h52giftst.h5" "$
HDFTEST_COPY_FILE("${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/testfiles/ex_image2.h5" "${PROJECT_BINARY_DIR}/testfiles/ex_image2.h5" "gif2h5_files")
add_custom_target(gif2h5_files ALL COMMENT "Copying files needed by gif2h5 tests" DEPENDS ${gif2h5_files_list})
-if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
-else ()
- set (tgt_ext "-shared")
-endif ()
-
# Remove any output file left over from previous test run
add_test (
NAME HL_TOOLS-clear-objects
@@ -45,29 +39,29 @@ add_test (
)
set_tests_properties (HL_TOOLS-clear-objects PROPERTIES FIXTURES_SETUP clear_tools_hl)
-add_test (NAME HL_TOOLS_gif2h5 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:gif2h5${tgt_ext}> testfiles/image1.gif image1.h5)
+add_test (NAME HL_TOOLS_gif2h5 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:gif2h5${tgt_file_ext}> testfiles/image1.gif image1.h5)
set_tests_properties (HL_TOOLS_gif2h5 PROPERTIES
FIXTURES_REQUIRED clear_tools_hl
)
-add_test (NAME HL_TOOLS_h52gif COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h52gif${tgt_ext}> testfiles/h52giftst.h5 image1.gif -i image)
+add_test (NAME HL_TOOLS_h52gif COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h52gif${tgt_file_ext}> testfiles/h52giftst.h5 image1.gif -i image)
set_tests_properties (HL_TOOLS_h52gif PROPERTIES
FIXTURES_REQUIRED clear_tools_hl
)
-add_test (NAME HL_TOOLS_h52gif_none COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h52gif${tgt_ext}> testfiles/h52giftst.h5 image.gif -i nosuch_image)
+add_test (NAME HL_TOOLS_h52gif_none COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h52gif${tgt_file_ext}> testfiles/h52giftst.h5 image.gif -i nosuch_image)
set_tests_properties (HL_TOOLS_h52gif_none PROPERTIES
WILL_FAIL "true"
FIXTURES_REQUIRED clear_tools_hl
)
-#add_test (NAME HL_TOOLS_h52gifpal COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h52gif${tgt_ext}> testfiles/h52giftst.h5 image.gif -i palette)
+#add_test (NAME HL_TOOLS_h52gifpal COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h52gif${tgt_file_ext}> testfiles/h52giftst.h5 image.gif -i palette)
#set_tests_properties (HL_TOOLS_h52gifpal PROPERTIES
# WILL_FAIL "true"
# FIXTURES_REQUIRED clear_tools_hl
#)
-add_test (NAME HL_TOOLS_h52gif24bits COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h52gif${tgt_ext}> testfiles/ex_image2.h5 image24.gif -i image24bitpixel)
+add_test (NAME HL_TOOLS_h52gif24bits COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h52gif${tgt_file_ext}> testfiles/ex_image2.h5 image24.gif -i image24bitpixel)
set_tests_properties (HL_TOOLS_h52gif24bits PROPERTIES
WILL_FAIL "true"
FIXTURES_REQUIRED clear_tools_hl
diff --git a/hl/tools/gif2h5/decompress.c b/hl/tools/gif2h5/decompress.c
index 8cd8a8e..129fa60 100644
--- a/hl/tools/gif2h5/decompress.c
+++ b/hl/tools/gif2h5/decompress.c
@@ -57,12 +57,12 @@ GIFBYTE *Raster; /* The raster data stream, unblocked *
/* The hash table used by the decompressor */
-int Prefix[4096];
-int Suffix[4096];
+int *Prefix;
+int *Suffix;
/* An output array used by the decompressor */
-int OutCode[1025];
+int *OutCode;
/* The color map, read from the GIF header */
@@ -159,6 +159,19 @@ Decompress(GIFIMAGEDESC *GifImageDesc, GIFHEAD *GifHead)
{
int i;
+ if (!(Prefix = calloc(4096, sizeof(int)))) {
+ printf("Out of memory");
+ exit(EXIT_FAILURE);
+ }
+ if (!(Suffix = calloc(4096, sizeof(int)))) {
+ printf("Out of memory");
+ exit(EXIT_FAILURE);
+ }
+ if (!(OutCode = calloc(1024, sizeof(int)))) {
+ printf("Out of memory");
+ exit(EXIT_FAILURE);
+ }
+
XC = 0;
YC = 0;
Pass = 0;
@@ -309,5 +322,9 @@ Decompress(GIFIMAGEDESC *GifImageDesc, GIFHEAD *GifHead)
Code = ReadCode();
}
+ free(Prefix);
+ free(Suffix);
+ free(OutCode);
+
return Image;
}
diff --git a/hl/tools/gif2h5/hdfgifwr.c b/hl/tools/gif2h5/hdfgifwr.c
index ed3e9e9..d44ff7a 100644
--- a/hl/tools/gif2h5/hdfgifwr.c
+++ b/hl/tools/gif2h5/hdfgifwr.c
@@ -69,45 +69,6 @@ static void char_init(), char_out(), flush_char();
static byte pc2nc[256];
-/*************************************************************/
-int hdfWriteGIF(FILE *fp, byte *pic, int ptype, int w, int h, byte *rmap,
- byte *gmap, byte *bmap, byte *pc2ncmap, int numcols,
- int colorstyle, int BitsPerPixel)
-{
- int InitCodeSize;
- int i;
- byte *pic8 = pic;
-
- /* Shut compiler up... */
- ptype=ptype;
- rmap=rmap;
- gmap=gmap;
- bmap=bmap;
- numcols=numcols;
- colorstyle=colorstyle;
-
- for (i = 0; i < 256; i++) {
- pc2nc[i] = pc2ncmap[i];
- }
-
- if (BitsPerPixel <= 1)
- InitCodeSize = 2;
- else
- InitCodeSize = BitsPerPixel;
-
- if (!fp) {
- fprintf(stderr, "WriteGIF: file not open for writing\n" );
- return (1);
- }
-
- compress(InitCodeSize+1, fp, pic8, w*h);
-
- if (ferror(fp))
- return -1;
-
- return 0 ;
-}
-
/***********************************************************************/
static unsigned long cur_accum = 0;
static int cur_bits = 0;
@@ -123,8 +84,8 @@ static int maxbits = XV_BITS; /* user settable max # bits/code */
static int maxcode; /* maximum code, given n_bits */
static int maxmaxcode = 1 << XV_BITS; /* NEVER generate this */
-static count_int htab [HSIZE];
-static unsigned short codetab [HSIZE];
+static count_int *htab;
+static unsigned short *codetab;
#define HashTabOf(i) htab[i]
#define CodeTabOf(i) codetab[i]
@@ -173,6 +134,57 @@ static FILE *g_outfile;
static int ClearCode;
static int EOFCode;
+/*************************************************************/
+int hdfWriteGIF(FILE *fp, byte *pic, int ptype, int w, int h, byte *rmap,
+ byte *gmap, byte *bmap, byte *pc2ncmap, int numcols,
+ int colorstyle, int BitsPerPixel)
+{
+ int InitCodeSize;
+ int i;
+ byte *pic8 = pic;
+
+ if (!(htab = calloc(HSIZE, sizeof(count_int)))) {
+ fprintf(stderr, "Out of memory");
+ return 1;
+ }
+ if (!(codetab = calloc(HSIZE, sizeof(unsigned short)))) {
+ fprintf(stderr, "Out of memory");
+ return 1;
+ }
+
+ /* Shut compiler up... */
+ ptype=ptype;
+ rmap=rmap;
+ gmap=gmap;
+ bmap=bmap;
+ numcols=numcols;
+ colorstyle=colorstyle;
+
+ for (i = 0; i < 256; i++) {
+ pc2nc[i] = pc2ncmap[i];
+ }
+
+ if (BitsPerPixel <= 1)
+ InitCodeSize = 2;
+ else
+ InitCodeSize = BitsPerPixel;
+
+ if (!fp) {
+ fprintf(stderr, "WriteGIF: file not open for writing\n");
+ return 1;
+ }
+
+ compress(InitCodeSize+1, fp, pic8, w*h);
+
+ free(htab);
+ free(codetab);
+
+ if (ferror(fp))
+ return -1;
+
+ return 0 ;
+}
+
/********************************************************/
static void compress(int init_bits, FILE *outfile, byte *data, int len)
{
@@ -194,8 +206,6 @@ static void compress(int init_bits, FILE *outfile, byte *data, int len)
/* initialize 'compress' globals */
maxbits = XV_BITS;
maxmaxcode = 1<<XV_BITS;
- memset(htab, 0, sizeof(htab));
- memset(codetab, 0, sizeof(codetab));
hsize = HSIZE;
free_ent = 0;
clear_flg = 0;
diff --git a/hl/tools/h5watch/CMakeTests.cmake b/hl/tools/h5watch/CMakeTests.cmake
index 0424140..19d47cb 100644
--- a/hl/tools/h5watch/CMakeTests.cmake
+++ b/hl/tools/h5watch/CMakeTests.cmake
@@ -68,19 +68,13 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_H5_TEST resultfile resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5WATCH_ARGS-h5watch-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5watch${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5watch${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -102,7 +96,7 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes
NAME H5WATCH_ARGS-h5watch-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5watch${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5watch${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -131,7 +125,7 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes
NAME H5WATCH-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5watch${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5watch${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
diff --git a/java/examples/datasets/JavaDatasetExample.sh.in b/java/examples/datasets/JavaDatasetExample.sh.in
index f5c63cd..ae79416 100644
--- a/java/examples/datasets/JavaDatasetExample.sh.in
+++ b/java/examples/datasets/JavaDatasetExample.sh.in
@@ -324,16 +324,18 @@ else
nerrors="`expr $nerrors + 1`"
fi
-echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Gzip"
-TESTING examples.datasets.H5Ex_D_Gzip
-(
-$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Gzip > H5Ex_D_Gzip.out
-)
-if diff H5Ex_D_Gzip.out examples.datasets.H5Ex_D_Gzip.txt > /dev/null; then
- echo " PASSED datasets.H5Ex_D_Gzip"
-else
- echo "**FAILED** datasets.H5Ex_D_Gzip"
- nerrors="`expr $nerrors + 1`"
+if test $USE_FILTER_DEFLATE = "yes"; then
+ echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Gzip"
+ TESTING examples.datasets.H5Ex_D_Gzip
+ (
+ $RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Gzip > H5Ex_D_Gzip.out
+ )
+ if diff H5Ex_D_Gzip.out examples.datasets.H5Ex_D_Gzip.txt > /dev/null; then
+ echo " PASSED datasets.H5Ex_D_Gzip"
+ else
+ echo "**FAILED** datasets.H5Ex_D_Gzip"
+ nerrors="`expr $nerrors + 1`"
+ fi
fi
echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Hyperslab"
@@ -360,16 +362,18 @@ else
nerrors="`expr $nerrors + 1`"
fi
-echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Shuffle"
-TESTING examples.datasets.H5Ex_D_Shuffle
-(
-$RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Shuffle > H5Ex_D_Shuffle.out
-)
-if diff H5Ex_D_Shuffle.out examples.datasets.H5Ex_D_Shuffle.txt > /dev/null; then
- echo " PASSED datasets.H5Ex_D_Shuffle"
-else
- echo "**FAILED** datasets.H5Ex_D_Shuffle"
- nerrors="`expr $nerrors + 1`"
+if test $USE_FILTER_DEFLATE = "yes"; then
+ echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Shuffle"
+ TESTING examples.datasets.H5Ex_D_Shuffle
+ (
+ $RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.datasets.H5Ex_D_Shuffle > H5Ex_D_Shuffle.out
+ )
+ if diff H5Ex_D_Shuffle.out examples.datasets.H5Ex_D_Shuffle.txt > /dev/null; then
+ echo " PASSED datasets.H5Ex_D_Shuffle"
+ else
+ echo "**FAILED** datasets.H5Ex_D_Shuffle"
+ nerrors="`expr $nerrors + 1`"
+ fi
fi
if test $USE_FILTER_SZIP = "yes"; then
diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java
index 5b704dd..872fbc7 100644
--- a/java/src/hdf/hdf5lib/H5.java
+++ b/java/src/hdf/hdf5lib/H5.java
@@ -10895,9 +10895,11 @@ public class H5 implements java.io.Serializable {
/// VOL Connector Functionality
public synchronized static native long H5VLregister_connector_by_name(String connector_name, long vipl_id);
public synchronized static native long H5VLregister_connector_by_value(int connector_value, long vipl_id);
- public synchronized static native boolean H5VLis_connector_registered(String name);
+ public synchronized static native boolean H5VLis_connector_registered_by_name(String name);
+ public synchronized static native boolean H5VLis_connector_registered_by_value(int connector_value);
public synchronized static native long H5VLget_connector_id(long object_id);
public synchronized static native long H5VLget_connector_id_by_name(String name);
+ public synchronized static native long H5VLget_connector_id_by_value(int connector_value);
public synchronized static native String H5VLget_connector_name(long object_id);
public synchronized static native void H5VLclose(long connector_id);
public synchronized static native void H5VLunregister_connector(long connector_id);
diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c
index 77a5d18..8fdca35 100644
--- a/java/src/jni/h5Constants.c
+++ b/java/src/jni/h5Constants.c
@@ -26,9 +26,8 @@ extern "C" {
#include <stdlib.h>
#include "h5jni.h"
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-#pragma GCC diagnostic ignored "-Wunused-parameter"
+H5_GCC_DIAG_OFF(missing-prototypes)
+H5_GCC_DIAG_OFF(unused-parameter)
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1QUARTER_1HADDR_1MAX(JNIEnv *env, jclass cls) { return (hsize_t)HADDR_MAX/4; }
@@ -366,8 +365,7 @@ JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5ES_1STATUS_1CANCELED(JNIEnv *env, jclass cls) { return H5ES_STATUS_CANCELED; }
/* Java does not have unsigned native types */
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-conversion"
+H5_GCC_DIAG_OFF(sign-conversion)
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1CREAT(JNIEnv *env, jclass cls) { return H5F_ACC_CREAT; }
JNIEXPORT jint JNICALL
@@ -384,7 +382,7 @@ JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1SWMR_1READ(JNIEnv *env, jclass cls) { return H5F_ACC_SWMR_READ; }
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1SWMR_1WRITE(JNIEnv *env, jclass cls) { return H5F_ACC_SWMR_WRITE; }
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(sign-conversion)
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1CLOSE_1DEFAULT(JNIEnv *env, jclass cls) { return H5F_CLOSE_DEFAULT; }
@@ -1412,7 +1410,8 @@ Java_hdf_hdf5lib_HDF5Constants_H5Z_1SCALEOFFSET_1USER_1NPARMS(JNIEnv *env, jclas
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FILTER_1ALL(JNIEnv *env, jclass cls) { return H5Z_FILTER_ALL; }
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(missing-prototypes)
+H5_GCC_DIAG_ON(unused-parameter)
#ifdef __cplusplus
} /* end extern "C" */
diff --git a/java/src/jni/h5pDCPLImp.c b/java/src/jni/h5pDCPLImp.c
index c43079f..f5bbcb1 100644
--- a/java/src/jni/h5pDCPLImp.c
+++ b/java/src/jni/h5pDCPLImp.c
@@ -1237,7 +1237,7 @@ done:
*/
JNIEXPORT jstring JNICALL
Java_hdf_hdf5lib_H5_H5Pget_1virtual_1dsetname
- (JNIEnv *env, jclass clss, jlong dcpl_id, jlong index)
+ (JNIEnv *env, jclass clss, jlong dcpl_id, jlong idx)
{
ssize_t buf_size;
char *dname = NULL;
@@ -1246,13 +1246,13 @@ Java_hdf_hdf5lib_H5_H5Pget_1virtual_1dsetname
UNUSED(clss);
/* get the length of the filename */
- if ((buf_size = H5Pget_virtual_dsetname((hid_t)dcpl_id, (size_t)index, NULL, 0)) < 0)
+ if ((buf_size = H5Pget_virtual_dsetname((hid_t)dcpl_id, (size_t) idx, NULL, 0)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (dname = (char *) HDmalloc(sizeof(char) * (size_t)buf_size + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_virtual_dsetname: memory allocation failed");
- if (H5Pget_virtual_dsetname((hid_t)dcpl_id, (size_t)index, dname, (size_t)buf_size + 1) < 0)
+ if (H5Pget_virtual_dsetname((hid_t)dcpl_id, (size_t) idx, dname, (size_t)buf_size + 1) < 0)
H5_LIBRARY_ERROR(ENVONLY);
dname[buf_size] = '\0';
@@ -1275,7 +1275,7 @@ done:
*/
JNIEXPORT jstring JNICALL
Java_hdf_hdf5lib_H5_H5Pget_1virtual_1filename
- (JNIEnv *env, jclass clss, jlong dcpl_id, jlong index)
+ (JNIEnv *env, jclass clss, jlong dcpl_id, jlong idx)
{
ssize_t buf_size;
char *fname = NULL;
@@ -1284,13 +1284,13 @@ Java_hdf_hdf5lib_H5_H5Pget_1virtual_1filename
UNUSED(clss);
/* get the length of the filename */
- if ((buf_size = H5Pget_virtual_filename((hid_t)dcpl_id, (size_t)index, NULL, 0)) < 0)
+ if ((buf_size = H5Pget_virtual_filename((hid_t)dcpl_id, (size_t) idx, NULL, 0)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (fname = (char *) HDmalloc(sizeof(char) * (size_t)buf_size + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_virtual_filename: memory allocation failed");
- if (H5Pget_virtual_filename((hid_t)dcpl_id, (size_t)index, fname, (size_t)buf_size + 1) < 0)
+ if (H5Pget_virtual_filename((hid_t)dcpl_id, (size_t) idx, fname, (size_t)buf_size + 1) < 0)
H5_LIBRARY_ERROR(ENVONLY);
fname[buf_size] = '\0';
@@ -1313,13 +1313,13 @@ done:
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Pget_1virtual_1srcspace
- (JNIEnv *env, jclass clss, jlong dcpl_id, jlong index)
+ (JNIEnv *env, jclass clss, jlong dcpl_id, jlong idx)
{
hid_t space_id = H5I_INVALID_HID;
UNUSED(clss);
- if ((space_id = H5Pget_virtual_srcspace((hid_t)dcpl_id, (size_t)index)) < 0)
+ if ((space_id = H5Pget_virtual_srcspace((hid_t)dcpl_id, (size_t) idx)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
@@ -1333,13 +1333,13 @@ done:
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Pget_1virtual_1vspace
- (JNIEnv *env, jclass clss, jlong dcpl_id, jlong index)
+ (JNIEnv *env, jclass clss, jlong dcpl_id, jlong idx)
{
hid_t space_id = H5I_INVALID_HID;
UNUSED(clss);
- if ((space_id = H5Pget_virtual_vspace((hid_t)dcpl_id, (size_t)index)) < 0)
+ if ((space_id = H5Pget_virtual_vspace((hid_t)dcpl_id, (size_t) idx)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
diff --git a/java/src/jni/h5plImp.c b/java/src/jni/h5plImp.c
index b43b532..ce42842 100644
--- a/java/src/jni/h5plImp.c
+++ b/java/src/jni/h5plImp.c
@@ -129,7 +129,7 @@ done:
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5PLreplace
- (JNIEnv *env, jclass clss, jobjectArray plugin_path, jint index)
+ (JNIEnv *env, jclass clss, jobjectArray plugin_path, jint idx)
{
const char *newPath = NULL;
herr_t retVal = FAIL;
@@ -139,12 +139,12 @@ Java_hdf_hdf5lib_H5_H5PLreplace
if (NULL == plugin_path)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5PLreplace: new path is NULL");
- if (index < 0)
+ if (idx < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5PLreplace: index < 0");
PIN_JAVA_STRING(ENVONLY, plugin_path, newPath, NULL, "H5PLreplace: new path not pinned");
- if ((retVal = H5PLreplace(newPath, (unsigned) index)) < 0)
+ if ((retVal = H5PLreplace(newPath, (unsigned) idx)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
@@ -159,7 +159,7 @@ done:
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5PLinsert
- (JNIEnv *env, jclass clss, jobjectArray plugin_path, jint index)
+ (JNIEnv *env, jclass clss, jobjectArray plugin_path, jint idx)
{
const char *newPath = NULL;
herr_t retVal = FAIL;
@@ -169,12 +169,12 @@ Java_hdf_hdf5lib_H5_H5PLinsert
if (NULL == plugin_path)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5PLinsert: new path is NULL");
- if (index < 0)
+ if (idx < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5PLinsert: index < 0");
PIN_JAVA_STRING(ENVONLY, plugin_path, newPath, NULL, "H5PLinsert: new path not pinned");
- if ((retVal = H5PLinsert(newPath, (unsigned) index)) < 0)
+ if ((retVal = H5PLinsert(newPath, (unsigned) idx)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
@@ -189,14 +189,14 @@ done:
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5PLremove
- (JNIEnv *env, jclass clss, jint index)
+ (JNIEnv *env, jclass clss, jint idx)
{
UNUSED(clss);
- if (index < 0)
+ if (idx < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5PLremove: index < 0");
- if (H5PLremove((unsigned) index) < 0)
+ if (H5PLremove((unsigned) idx) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
@@ -210,7 +210,7 @@ done:
*/
JNIEXPORT jstring JNICALL
Java_hdf_hdf5lib_H5_H5PLget
- (JNIEnv *env, jclass clss, jint index)
+ (JNIEnv *env, jclass clss, jint idx)
{
jstring str = NULL;
ssize_t buf_size;
@@ -218,17 +218,17 @@ Java_hdf_hdf5lib_H5_H5PLget
UNUSED(clss);
- if (index < 0)
+ if (idx < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5PLget: index < 0");
/* Get the length of the name */
- if ((buf_size = H5PLget((unsigned) index, NULL, 0)) < 0)
+ if ((buf_size = H5PLget((unsigned) idx, NULL, 0)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (aName = (char *) HDmalloc(sizeof(char) * (size_t)buf_size + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5PLget: failed to allocate plugin name buffer");
- if ((H5PLget((unsigned) index, aName, (size_t)buf_size + 1)) < 0)
+ if ((H5PLget((unsigned) idx, aName, (size_t)buf_size + 1)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
aName[buf_size] = '\0';
diff --git a/java/src/jni/h5rImp.c b/java/src/jni/h5rImp.c
index def27f4..e24fc2a 100644
--- a/java/src/jni/h5rImp.c
+++ b/java/src/jni/h5rImp.c
@@ -50,7 +50,7 @@ Java_hdf_hdf5lib_H5_H5Rcreate_1object
PIN_JAVA_STRING(ENVONLY, name, refName, NULL, "H5Rcreate_object: reference name not pinned");
- if (NULL == (refBuf = (unsigned char *) HDcalloc((size_t) 1, H5R_REF_BUF_SIZE)))
+ if (NULL == (refBuf = HDcalloc(1, H5R_REF_BUF_SIZE)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Rcreate_object: failed to allocate reference buffer");
if ((status = H5Rcreate_object((hid_t)loc_id, refName, (hid_t)aid, (const H5R_ref_t *)refBuf)) < 0)
@@ -93,7 +93,7 @@ Java_hdf_hdf5lib_H5_H5Rcreate_1region
PIN_JAVA_STRING(ENVONLY, name, refName, NULL, "H5Rcreate_region: reference name not pinned");
- if (NULL == (refBuf = (unsigned char *) HDcalloc((size_t) 1, H5R_REF_BUF_SIZE)))
+ if (NULL == (refBuf = HDcalloc(1, H5R_REF_BUF_SIZE)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Rcreate_region: failed to allocate reference buffer");
if ((status = H5Rcreate_region((hid_t)loc_id, refName, space_id, (hid_t)aid, (const H5R_ref_t *)refBuf)) < 0)
@@ -140,7 +140,7 @@ Java_hdf_hdf5lib_H5_H5Rcreate_1attr
PIN_JAVA_STRING(ENVONLY, name, refName, NULL, "H5Rcreate_attr: reference name not pinned");
- if (NULL == (refBuf = (unsigned char *) HDcalloc((size_t) 1, H5R_REF_BUF_SIZE)))
+ if (NULL == (refBuf = HDcalloc(1, H5R_REF_BUF_SIZE)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Rcreate_attr: failed to allocate reference buffer");
if ((status = H5Rcreate_attr((hid_t)loc_id, refName, attrName, (hid_t)aid, (const H5R_ref_t *)refBuf)) < 0)
@@ -314,7 +314,7 @@ Java_hdf_hdf5lib_H5_H5Rcopy
PIN_BYTE_ARRAY(ENVONLY, src_ref, src_refBuf, &isCopy, "H5Rcopy: src reference buffer not pinned");
- if (NULL == (dst_refBuf = (unsigned char *) HDcalloc((size_t) 1, H5R_REF_BUF_SIZE)))
+ if (NULL == (dst_refBuf = HDcalloc(1, H5R_REF_BUF_SIZE)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Rcreate_attr: failed to allocate dst reference buffer");
if ((status = H5Rcopy((const H5R_ref_t *)src_refBuf, (const H5R_ref_t *)dst_refBuf)) < 0)
@@ -504,7 +504,7 @@ Java_hdf_hdf5lib_H5_H5Rget_1file_1name
if ((buf_size = H5Rget_file_name((const H5R_ref_t *)refBuf, NULL, 0)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
- if (NULL == (namePtr = (char *) HDmalloc(sizeof(char) * (size_t)buf_size + 1)))
+ if (NULL == (namePtr = HDmalloc(sizeof(char) * (size_t)buf_size + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Rget_file_name: malloc failed");
if ((check_size = H5Rget_file_name((const H5R_ref_t *)refBuf, namePtr, (size_t)buf_size + 1)) < 0)
@@ -550,7 +550,7 @@ Java_hdf_hdf5lib_H5_H5Rget_1obj_1name
if ((buf_size = H5Rget_obj_name((const H5R_ref_t *)refBuf, (hid_t)rapl_id, NULL, 0)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
- if (NULL == (namePtr = (char *) HDmalloc(sizeof(char) * (size_t)buf_size + 1)))
+ if (NULL == (namePtr = HDmalloc(sizeof(char) * (size_t)buf_size + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Rget_obj_name: malloc failed");
if ((check_size = H5Rget_obj_name((const H5R_ref_t *)refBuf, (hid_t)rapl_id, namePtr, (size_t)buf_size + 1)) < 0)
@@ -596,7 +596,7 @@ Java_hdf_hdf5lib_H5_H5Rget_1attr_1name
if ((buf_size = H5Rget_attr_name((const H5R_ref_t *)refBuf, NULL, 0)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
- if (NULL == (namePtr = (char *) HDmalloc(sizeof(char) * (size_t)buf_size + 1)))
+ if (NULL == (namePtr = HDmalloc(sizeof(char) * (size_t)buf_size + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Rget_attr_name: malloc failed");
if ((check_size = H5Rget_attr_name((const H5R_ref_t *)refBuf, namePtr, (size_t)buf_size + 1)) < 0)
@@ -862,7 +862,7 @@ Java_hdf_hdf5lib_H5_H5Rget_1name
PIN_BYTE_ARRAY(ENVONLY, ref, refBuf, &isCopy, "H5Rget_name: reference buffer not pinned");
- if (NULL == (aName = (char *) HDmalloc(sizeof(char) * (size_t)size + 1)))
+ if (NULL == (aName = HDmalloc(sizeof(char) * (size_t)size + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Rget_name: failed to allocate referenced object name buffer");
if ((ret_val = (jlong)H5Rget_name((hid_t)loc_id, (H5R_type_t)ref_type, refBuf, aName, (size_t)size + 1)) < 0)
diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c
index 55f7571..f45902f 100644
--- a/java/src/jni/h5util.c
+++ b/java/src/jni/h5util.c
@@ -28,6 +28,8 @@ extern "C" {
#include "hdf5.h"
#include "h5util.h"
+#define SKIP_UNUSED_DUMP_ROUTINES
+
/* size of hyperslab buffer when a dataset is bigger than H5TOOLS_MALLOCSIZE */
hsize_t H5TOOLS_BUFSIZE = (32 * 1024 * 1024); /* 32 MB */
int H5TOOLS_TEXT_BLOCK = 16; /* Number of elements on a line in a text export file */
@@ -52,8 +54,10 @@ void *edata;
/* Local Prototypes */
/********************/
+#ifndef SKIP_UNUSED_DUMP_ROUTINES
static int h5str_dump_region_blocks(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_obj);
static int h5str_dump_region_points(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_obj);
+#endif
static int h5str_is_zero(const void *_mem, size_t size);
static hid_t h5str_get_native_type(hid_t type);
static hid_t h5str_get_little_endian_type(hid_t type);
@@ -708,7 +712,6 @@ h5str_sprintf
unsigned char *ucptr = (unsigned char *) in_buf;
static char fmt_llong[8], fmt_ullong[8];
H5T_class_t tclass = H5T_NO_CLASS;
- H5T_str_t pad;
size_t typeSize = 0;
H5T_sign_t nsign = H5T_SGN_ERROR;
hid_t mtid = H5I_INVALID_HID;
@@ -814,7 +817,6 @@ h5str_sprintf
else {
tmp_str = cptr;
}
- pad = H5Tget_strpad(tid);
/* Check for NULL pointer for string */
if (!tmp_str) {
@@ -1482,6 +1484,7 @@ done:
return ret_value;
} /* end h5str_dump_region_blocks_data */
+#ifndef SKIP_UNUSED_DUMP_ROUTINES
static int
h5str_dump_region_blocks
(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_id)
@@ -1569,6 +1572,7 @@ done:
return ret_value;
} /* end h5str_dump_region_blocks */
+#endif
/*-------------------------------------------------------------------------
* Purpose: Print the data values from a dataset referenced by region points.
@@ -1701,6 +1705,7 @@ done:
return ret_value;
} /* end h5str_dump_region_points_data */
+#ifndef SKIP_UNUSED_DUMP_ROUTINES
static int
h5str_dump_region_points
(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_id)
@@ -1776,6 +1781,7 @@ done:
return ret_value;
} /* end h5str_dump_region_points */
+#endif
static int
h5str_is_zero
diff --git a/java/src/jni/h5vlImp.c b/java/src/jni/h5vlImp.c
index 0fee343..1ead30b 100644
--- a/java/src/jni/h5vlImp.c
+++ b/java/src/jni/h5vlImp.c
@@ -78,11 +78,11 @@ done:
/*
* Class: hdf_hdf5lib_H5
- * Method: H5VLis_connector_registered
+ * Method: H5VLis_connector_registered_by_name
* Signature: (Ljava/lang/String;)Z
*/
JNIEXPORT jboolean JNICALL
-Java_hdf_hdf5lib_H5_H5VLis_1connector_1registered
+Java_hdf_hdf5lib_H5_H5VLis_1connector_1registered_1by_1name
(JNIEnv *env, jclass clss, jobject connector_name)
{
const char *volName = NULL;
@@ -91,11 +91,11 @@ Java_hdf_hdf5lib_H5_H5VLis_1connector_1registered
UNUSED(clss);
if (NULL == connector_name)
- H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5VLis_connector_registered: VOL connector name is NULL");
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5VLis_connector_registered_by_name: VOL connector name is NULL");
- PIN_JAVA_STRING(ENVONLY, connector_name, volName, NULL, "H5VLis_connector_registered: VOL connector name not pinned");
+ PIN_JAVA_STRING(ENVONLY, connector_name, volName, NULL, "H5VLis_connector_registered_by_name: VOL connector name not pinned");
- if ((bval = H5VLis_connector_registered(volName)) < 0)
+ if ((bval = H5VLis_connector_registered_by_name(volName)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
bval = (bval > 0) ? JNI_TRUE : JNI_FALSE;
@@ -105,7 +105,32 @@ done:
UNPIN_JAVA_STRING(ENVONLY, connector_name, volName);
return (jboolean)bval;
-} /* end Java_hdf_hdf5lib_H5_H5VLis_1connector_1registered */
+} /* end Java_hdf_hdf5lib_H5_H5VLis_1connector_1registered_1by_1name */
+
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5VLis_connector_registered_by_value
+ * Signature: (I)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_hdf_hdf5lib_H5_H5VLis_1connector_1registered_1by_1value
+ (JNIEnv *env, jclass clss, jint connector_value)
+{
+ htri_t bval = JNI_FALSE;
+
+ UNUSED(clss);
+
+ if (connector_value < 0)
+ H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5VLis_connector_registered_by_value: VOL connector value < 0");
+
+ if ((bval = H5VLis_connector_registered_by_value((H5VL_class_value_t)connector_value)) < 0)
+ H5_LIBRARY_ERROR(ENVONLY);
+
+ bval = (bval > 0) ? JNI_TRUE : JNI_FALSE;
+
+done:
+ return (jboolean)bval;
+} /* end Java_hdf_hdf5lib_H5_H5VLis_1connector_1registered_1by_1value */
/*
* Class: hdf_hdf5lib_H5
@@ -158,6 +183,29 @@ done:
/*
* Class: hdf_hdf5lib_H5
+ * Method: H5VLget_connector_id_by_value
+ * Signature: (I)J
+ */
+JNIEXPORT jlong JNICALL
+Java_hdf_hdf5lib_H5_H5VLget_1connector_1id_1by_1value
+ (JNIEnv *env, jclass clss, jint connector_value)
+{
+ hid_t status = H5I_INVALID_HID;
+
+ UNUSED(clss);
+
+ if (connector_value < 0)
+ H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5VLget_connector_id_by_value: VOL connector value < 0");
+
+ if ((status = H5VLget_connector_id_by_value((H5VL_class_value_t)connector_value)) < 0)
+ H5_LIBRARY_ERROR(ENVONLY);
+
+done:
+ return (jlong)status;
+} /* end Java_hdf_hdf5lib_H5_H5VLget_1connector_1id_1by_1value */
+
+/*
+ * Class: hdf_hdf5lib_H5
* Method: H5VLget_connector_name
* Signature: (J)Ljava/lang/String;
*/
diff --git a/java/src/jni/h5vlImp.h b/java/src/jni/h5vlImp.h
index 6dd7529..a58abef 100644
--- a/java/src/jni/h5vlImp.h
+++ b/java/src/jni/h5vlImp.h
@@ -40,15 +40,24 @@ Java_hdf_hdf5lib_H5_H5VLregister_1connector_1by_1value
/*
* Class: hdf_hdf5lib_H5
- * Method: H5VLis_connector_registered
+ * Method: H5VLis_connector_registered_by_name
* Signature: (Ljava/lang/String;)Z
*/
JNIEXPORT jboolean JNICALL
-Java_hdf_hdf5lib_H5_H5VLis_1connector_1registered
+Java_hdf_hdf5lib_H5_H5VLis_1connector_1registered_1by_1name
(JNIEnv *, jclass, jobject);
/*
* Class: hdf_hdf5lib_H5
+ * Method: H5VLis_connector_registered_by_value
+ * Signature: (I)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_hdf_hdf5lib_H5_H5VLis_1connector_1registered_1by_1value
+ (JNIEnv *, jclass, jint);
+
+/*
+ * Class: hdf_hdf5lib_H5
* Method: H5VLget_connector_id
* Signature: (J)J
*/
@@ -67,6 +76,15 @@ Java_hdf_hdf5lib_H5_H5VLget_1connector_1id_1by_1name
/*
* Class: hdf_hdf5lib_H5
+ * Method: H5VLget_connector_id_by_value
+ * Signature: (I)J
+ */
+JNIEXPORT jlong JNICALL
+Java_hdf_hdf5lib_H5_H5VLget_1connector_1id_1by_1value
+ (JNIEnv *, jclass, jint);
+
+/*
+ * Class: hdf_hdf5lib_H5
* Method: H5VLget_connector_name
* Signature: (J)Ljava/lang/String;
*/
diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt
index de7dc62..6275227 100644
--- a/java/test/CMakeLists.txt
+++ b/java/test/CMakeLists.txt
@@ -142,4 +142,83 @@ if (HDF5_TEST_JAVA AND HDF5_TEST_SERIAL)
DEPENDS "JUnit-${test_file}-clearall-objects"
)
endforeach ()
+
+
+ ##############################################################################
+ ##############################################################################
+ ### V O L T E S T S ###
+ ##############################################################################
+ ##############################################################################
+
+ macro (DO_VOL_TEST voltest volname volinfo volclasspath)
+ #message(STATUS "${voltest}-${volname} with ${volinfo}")
+ add_test (
+ NAME JUnit-VOL-${volname}-${voltest}-clearall-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ JUnit-VOL-${volname}-${voltest}.out
+ JUnit-VOL-${volname}-${voltest}.out.err
+ WORKING_DIRECTORY ${HDF5_BINARY_DIR}/java/test/${volname}
+ )
+ add_test (NAME JUnit-VOL-${volname}-${voltest}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_TESTER=${CMAKE_Java_RUNTIME};${CMAKE_Java_RUNTIME_FLAGS}"
+ -D "TEST_CLASSPATH:STRING=${volclasspath}"
+ -D "TEST_ARGS:STRING=${CMD_ARGS}-ea;org.junit.runner.JUnitCore"
+ -D "TEST_PROGRAM=test.${voltest}"
+ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}"
+ -D "TEST_FOLDER=${HDF5_BINARY_DIR}/java/test/${volname}"
+ -D "TEST_VOL:STRING=${volinfo}"
+ -D "TEST_OUTPUT=JUnit-VOL-${volname}-${voltest}.out"
+# -D "TEST_LOG_LEVEL=trace"
+ -D "TEST_EXPECT=0"
+ -D "SKIP_APPEND=1"
+ -D "TEST_MASK_ERROR=TRUE"
+# -D "TEST_FILTER:STRING=${testfilter}"
+ -D "TEST_REFERENCE=JUnit-${volname}-${voltest}.txt"
+ -P "${HDF_RESOURCES_DIR}/jvolTest.cmake"
+ )
+ set_tests_properties (JUnit-VOL-${volname}-${voltest} PROPERTIES
+ ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir2"
+ DEPENDS "JUnit-VOL-${volname}-${voltest}-clearall-objects"
+ WORKING_DIRECTORY ${HDF5_BINARY_DIR}/java/test/${volname}
+ )
+ endmacro ()
+
+ if (HDF5_TEST_PASSTHROUGH_VOL)
+ set (VOL_LIST
+ vol_native
+ vol_pass_through1
+ vol_pass_through2
+ )
+
+ set (vol_native native)
+ set (vol_pass_through1 "pass_through under_vol=0\;under_info={}")
+ set (vol_pass_through2 "pass_through under_vol=505\;under_info={under_vol=0\;under_info={}}")
+
+ foreach (voltest ${VOL_LIST})
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${voltest}")
+ foreach (h5_file ${HDF5_JAVA_TEST_SOURCES})
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/JUnit-${h5_file}.txt" "${PROJECT_BINARY_DIR}/${voltest}/JUnit-${h5_file}.txt" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
+ endforeach ()
+
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/${voltest}/h5ex_g_iterate.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/${voltest}/h5ex_g_iterateL1.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/${voltest}/h5ex_g_iterateL2.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/${voltest}/h5ex_g_iterateO1.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/${voltest}/h5ex_g_iterateO2.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files")
+
+ add_custom_target(${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files ALL COMMENT "Copying files needed by ${HDF5_JAVA_TEST_LIB_TARGET} tests" DEPENDS ${${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files_list})
+
+ foreach (volinfo IN LISTS ${voltest})
+ foreach (h5_file ${HDF5_JAVA_TEST_SOURCES})
+ set (CMAKE_JAVA_CLASSPATH ".")
+ foreach (CMAKE_INCLUDE_PATH ${CMAKE_JAVA_INCLUDE_PATH})
+ set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${CMAKE_INCLUDE_PATH}")
+ endforeach ()
+ set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${HDF5_JAVA_TEST_LIB_TARGET}_${h5_file}_JAR_FILE}")
+ DO_VOL_TEST (${h5_file} ${voltest} "${volinfo}" ${CMAKE_JAVA_CLASSPATH})
+ endforeach ()
+ endforeach ()
+ endforeach ()
+ endif ()
endif ()
diff --git a/java/test/Makefile.am b/java/test/Makefile.am
index c375938..3f11933 100644
--- a/java/test/Makefile.am
+++ b/java/test/Makefile.am
@@ -84,6 +84,11 @@ noinst_DATA = $(jarfile)
.PHONY: classes
+# Test with just the native connector, with a single pass-through connector
+# and with a doubly-stacked pass-through.
+VOL_LIST = native "pass_through under_vol=0;under_info={}" \
+ "pass_through under_vol=505;under_info={under_vol=0;under_info={}}"
+
check_SCRIPTS = junit.sh
TEST_SCRIPT = $(check_SCRIPTS)
diff --git a/java/test/TestH5VL.java b/java/test/TestH5VL.java
index d774dbb..bd660d3 100644
--- a/java/test/TestH5VL.java
+++ b/java/test/TestH5VL.java
@@ -55,15 +55,18 @@ public class TestH5VL {
try {
boolean is_registered;
- is_registered = H5.H5VLis_connector_registered(HDF5Constants.H5VL_NATIVE_NAME);
- assertTrue("H5.H5VLis_connector_registered H5VL_NATIVE_NAME", is_registered);
+ is_registered = H5.H5VLis_connector_registered_by_name(HDF5Constants.H5VL_NATIVE_NAME);
+ assertTrue("H5.H5VLis_connector_registered_by_name H5VL_NATIVE_NAME", is_registered);
- is_registered = H5.H5VLis_connector_registered("FAKE_VOL_NAME");
- assertFalse("H5.H5VLis_connector_registered FAKE_VOL_NAME", is_registered);
+ is_registered = H5.H5VLis_connector_registered_by_name("FAKE_VOL_NAME");
+ assertFalse("H5.H5VLis_connector_registered_by_name FAKE_VOL_NAME", is_registered);
+
+ is_registered = H5.H5VLis_connector_registered_by_value(HDF5Constants.H5VL_NATIVE_VALUE);
+ assertTrue("H5.H5VLis_connector_registered_by_value H5VL_NATIVE_VALUE", is_registered);
}
catch (Throwable err) {
err.printStackTrace();
- fail("H5.H5VLis_connector_registered " + err);
+ fail("testH5VLnative_init(): " + err);
}
}
@@ -113,6 +116,19 @@ public class TestH5VL {
}
@Test
+ public void testH5VLget_connector_id_by_value() {
+ try {
+ long native_id = H5.H5VLget_connector_id_by_value(HDF5Constants.H5VL_NATIVE_VALUE);
+ assertTrue("H5.H5VLget_connector_id_by_value H5VL_NATIVE_VALUE", native_id >= 0);
+ assertEquals(HDF5Constants.H5VL_NATIVE, native_id);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("H5.H5VLget_connector_id_by_value " + err);
+ }
+ }
+
+ @Test
public void testH5VLget_connector_name() {
String H5_FILE = "testFvl.h5";
diff --git a/java/test/testfiles/JUnit-TestH5VL.txt b/java/test/testfiles/JUnit-TestH5VL.txt
index f646009..ff94969 100644
--- a/java/test/testfiles/JUnit-TestH5VL.txt
+++ b/java/test/testfiles/JUnit-TestH5VL.txt
@@ -1,5 +1,6 @@
JUnit version 4.11
.testH5VLget_connector_id_by_name
+.testH5VLget_connector_id_by_value
.testH5VLget_connector_id
.testH5VLnative_init
.testH5VLget_connector_name
@@ -8,5 +9,5 @@ JUnit version 4.11
Time: XXXX
-OK (6 tests)
+OK (7 tests)
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 33c2cb0..a915059 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -48,6 +48,13 @@ New Features
Configuration:
-------------
+ - Fixed CMake include properties for Fortran libraries
+
+ Corrected the library properties for Fortran to use the
+ correct path for the Fortran module files.
+
+ (ADB - 2020/02/04, HDFFV-11012)
+
- Added common warnings files for gnu and intel
Added warnings files to use one common set of flags
@@ -71,9 +78,18 @@ New Features
(ADB - 2020/01/15, HDFFV-11001)
- - Added Clang sanitizers to CMake for analyzer support
+ - Added Clang sanitizers to CMake for analyzer support if compiler is clang.
- Added CMake code and files to execute the Clang sanitizers.
+ Added CMake code and files to execute the Clang sanitizers if
+ HDF5_ENABLE_SANITIZERS is enabled and the USE_SANITIZER option
+ is set to one of the following:
+ Address
+ Memory
+ MemoryWithOrigins
+ Undefined
+ Thread
+ Leak
+ 'Address;Undefined'
(ADB - 2019/12/12, TRILAB-135)
@@ -240,6 +256,50 @@ New Features
Library:
--------
+ - Refactored public exposure of haddr_t type in favor of "object tokens"
+
+ To better accommodate HDF5 VOL connectors where "object addresses in a file"
+ may not make much sense, the following changes were made to the library:
+
+ * Introduced new H5O_token_t "object token" type, which represents a
+ unique and permanent identifier for referencing an HDF5 object within
+ a container; these "object tokens" are meant to replace object addresses.
+ Along with the new type, a new H5Oopen_by_token API call was introduced
+ to open an object by a token, similar to how object addresses were
+ previously used with H5Oopen_by_addr.
+
+ * Introduced new H5Lget_info2, H5Lget_info_by_idx2, H5Literate2, H5Literate_by_name2,
+ H5Lvisit2 and H5Lvisit_by_name2 API calls, along with their associated H5L_info2_t
+ struct and H5L_iterate2_t callback function, which work with the newly-introduced
+ object tokens, instead of object addresses. The original functions have been
+ renamed to version 1 functions and are deprecated in favor of the new version 2
+ functions. The H5L_info_t and H5L_iterate_t types have been renamed to version 1
+ types and are now deprecated in favor of their version 2 counterparts. For each of
+ the functions and types, compatibility macros take place of the original symbols.
+
+ * Introduced new H5Oget_info3, H5Oget_info_by_name3, H5Oget_info_by_idx3,
+ H5Ovisit3 and H5Ovisit_by_name3 API calls, along with their associated H5O_info2_t
+ struct and H5O_iterate2_t callback function, which work with the newly-introduced
+ object tokens, instead of object addresses. The version 2 functions are now
+ deprecated in favor of the version 3 functions. The H5O_info_t and H5O_iterate_t
+ types have been renamed to version 1 types and are now deprecated in favor of their
+ version 2 counterparts. For each, compatibility macros take place of the original
+ symbols.
+
+ * Introduced new H5Oget_native_info, H5Oget_native_info_by_name and
+ H5Oget_native_info_by_idx API calls, along with their associated H5O_native_info_t
+ struct, which are used to retrieve the native HDF5 file format-specific information
+ about an object. This information (such as object header info and B-tree/heap info)
+ has been removed from the new H5O_info2_t struct so that the more generic
+ H5Oget_info(_by_name/_by_idx)3 routines will not try to retrieve it for non-native
+ VOL connectors.
+
+ * Added new H5Otoken_cmp, H5Otoken_to_str and H5Otoken_from_str routines to compare
+ two object tokens, convert an object token into a nicely-readable string format and
+ to convert an object token string back into a real object token, respectively.
+
+ (DER, QAK, JTH - 2020/01/16)
+
- Add new public function H5Sselect_adjust.
This function shifts a dataspace selection by a specified logical offset
@@ -391,6 +451,12 @@ New Features
Java Library:
----------------
+ - Added ability to test java library with VOLs.
+
+ Created new CMake script that combines the java and vol test scripts.
+
+ (ADB - 2020/02/03, HDFFV-10996)
+
- Tests fail for non-English locale.
In the JUnit tests with a non-English locale, only the part before
@@ -422,6 +488,16 @@ New Features
Tools:
------
+ - h5repack was fixed to repack the reference attributes properly.
+ The code line that checks if the update of reference inside a compound
+ datatype is misplaced outside the code block loop that carries out the
+ check. In consequence, the next attribute that is not the reference
+ type was repacked again as the reference type and caused the failure of
+ repacking. The fix is to move the corresponding code line to the correct
+ code block.
+
+ (KY -2020/02/07, HDFFV-11014)
+
- h5diff was updated to use the new reference APIs.
h5diff uses the new reference APIs to compare references.
diff --git a/src/H5B.c b/src/H5B.c
index 4c1abfd..f909d90 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -2037,7 +2037,7 @@ H5B_valid(H5F_t *f, const H5B_class_t *type, haddr_t addr)
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, NULL)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
- HDassert((H5B_shared_t *)H5UC_GET_OBJ(rc_shared));
+ HDassert(H5UC_GET_OBJ(rc_shared) != NULL);
/*
* Load the tree node.
diff --git a/src/H5CS.c b/src/H5CS.c
index 0a3dcce..3fccce4 100644
--- a/src/H5CS.c
+++ b/src/H5CS.c
@@ -145,11 +145,7 @@ H5CS_print_stack(const H5CS_t *fstack, FILE *stream)
HDfprintf(stream, "HDF5-DIAG: Function stack from %s ", H5_lib_vers_info_g);
/* try show the process or thread id in multiple processes cases*/
-#ifdef H5_HAVE_THREADSAFE
- HDfprintf(stream, "thread %lu.", HDpthread_self_ulong());
-#else /* H5_HAVE_THREADSAFE */
- HDfprintf(stream, "thread 0.");
-#endif /* H5_HAVE_THREADSAFE */
+ HDfprintf(stream, "thread %" PRIu64 ".", H5TS_thread_id());
if(fstack && fstack->nused>0)
HDfprintf(stream, " Back trace follows.");
HDfputc('\n', stream);
diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c
index 1f55e86..cb1d0e2 100644
--- a/src/H5Cdbg.c
+++ b/src/H5Cdbg.c
@@ -319,9 +319,8 @@ H5C_dump_cache_skip_list(H5C_t * cache_ptr, char * calling_fcn)
(int)(entry_ptr->is_dirty),
entry_ptr->type->name);
- HDfprintf(stdout, " node_ptr = 0x%llx, item = %p\n",
- (unsigned long long)node_ptr,
- H5SL_item(node_ptr));
+ HDfprintf(stdout, " node_ptr = %p, item = %p\n",
+ node_ptr, H5SL_item(node_ptr));
/* increment node_ptr before we delete its target */
node_ptr = H5SL_next(node_ptr);
diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h
index cafc6d5..6608bc2 100644
--- a/src/H5Cpkg.h
+++ b/src/H5Cpkg.h
@@ -4694,7 +4694,7 @@ struct H5C_t {
uint32_t num_last_entries;
#if H5C_DO_SANITY_CHECKS
int32_t slist_len_increase;
- ssize_t slist_size_increase;
+ int64_t slist_size_increase;
#endif /* H5C_DO_SANITY_CHECKS */
/* Fields for maintaining list of tagged entries */
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 33950a4..556e367 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -74,12 +74,12 @@
/* Sanity check on chunk index types: commonly used by a lot of routines in this file */
#define H5D_CHUNK_STORAGE_INDEX_CHK(storage) \
- HDassert((H5D_CHUNK_IDX_EARRAY == storage->idx_type && H5D_COPS_EARRAY == storage->ops) || \
- (H5D_CHUNK_IDX_FARRAY == storage->idx_type && H5D_COPS_FARRAY == storage->ops) || \
- (H5D_CHUNK_IDX_BT2 == storage->idx_type && H5D_COPS_BT2 == storage->ops) || \
- (H5D_CHUNK_IDX_BTREE == storage->idx_type && H5D_COPS_BTREE == storage->ops) || \
- (H5D_CHUNK_IDX_SINGLE == storage->idx_type && H5D_COPS_SINGLE == storage->ops) || \
- (H5D_CHUNK_IDX_NONE == storage->idx_type && H5D_COPS_NONE == storage->ops));
+ HDassert((H5D_CHUNK_IDX_EARRAY == (storage)->idx_type && H5D_COPS_EARRAY == (storage)->ops) || \
+ (H5D_CHUNK_IDX_FARRAY == (storage)->idx_type && H5D_COPS_FARRAY == (storage)->ops) || \
+ (H5D_CHUNK_IDX_BT2 == (storage)->idx_type && H5D_COPS_BT2 == (storage)->ops) || \
+ (H5D_CHUNK_IDX_BTREE == (storage)->idx_type && H5D_COPS_BTREE == (storage)->ops) || \
+ (H5D_CHUNK_IDX_SINGLE == (storage)->idx_type && H5D_COPS_SINGLE == (storage)->ops) || \
+ (H5D_CHUNK_IDX_NONE == (storage)->idx_type && H5D_COPS_NONE == (storage)->ops));
/*
* Feature: If this constant is defined then every cache preemption and load
@@ -936,7 +936,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__chunk_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id)
+H5D__chunk_init(H5F_t *f, const H5D_t * const dset, hid_t dapl_id)
{
H5D_chk_idx_info_t idx_info; /* Chunked index info */
H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /* Convenience pointer to dataset's chunk cache */
@@ -1012,11 +1012,11 @@ H5D__chunk_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id)
idx_info.f = f;
idx_info.pline = &dset->shared->dcpl_cache.pline;
idx_info.layout = &dset->shared->layout.u.chunk;
- idx_info.storage = &dset->shared->layout.storage.u.chunk;
+ idx_info.storage = sc;
/* Allocate any indexing structures */
- if(dset->shared->layout.storage.u.chunk.ops->init && (dset->shared->layout.storage.u.chunk.ops->init)(&idx_info, dset->shared->space, dset->oloc.addr) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information")
+ if(sc->ops->init && (sc->ops->init)(&idx_info, dset->shared->space, dset->oloc.addr) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information")
/* Set the number of chunks in dataset, etc. */
if(H5D__chunk_set_info(dset) < 0)
@@ -1052,7 +1052,7 @@ H5D__chunk_is_space_alloc(const H5O_storage_t *storage)
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
/* Query index layer */
- ret_value = (storage->u.chunk.ops->is_space_alloc)(&storage->u.chunk);
+ ret_value = (sc->ops->is_space_alloc)(sc);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_is_space_alloc() */
@@ -2931,12 +2931,11 @@ H5D__chunk_dest(H5D_t *dset)
idx_info.f = dset->oloc.file;
idx_info.pline = &dset->shared->dcpl_cache.pline;
idx_info.layout = &dset->shared->layout.u.chunk;
- idx_info.storage = &dset->shared->layout.storage.u.chunk;
+ idx_info.storage = sc;
/* Free any index structures */
- if(dset->shared->layout.storage.u.chunk.ops->dest &&
- (dset->shared->layout.storage.u.chunk.ops->dest)(&idx_info) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info")
+ if(sc->ops->dest && (sc->ops->dest)(&idx_info) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info")
done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
@@ -3132,11 +3131,11 @@ H5D__chunk_create(const H5D_t *dset /*in,out*/)
idx_info.f = dset->oloc.file;
idx_info.pline = &dset->shared->dcpl_cache.pline;
idx_info.layout = &dset->shared->layout.u.chunk;
- idx_info.storage = &dset->shared->layout.storage.u.chunk;
+ idx_info.storage = sc;
/* Create the index for the chunks */
- if((dset->shared->layout.storage.u.chunk.ops->create)(&idx_info) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create chunk index")
+ if((sc->ops->create)(&idx_info) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create chunk index")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -3219,7 +3218,7 @@ H5D__chunk_lookup(const H5D_t *dset, const hsize_t *scaled,
/* Initialize the query information about the chunk we are looking for */
udata->common.layout = &(dset->shared->layout.u.chunk);
- udata->common.storage = &(dset->shared->layout.storage.u.chunk);
+ udata->common.storage = sc;
udata->common.scaled = scaled;
/* Reset information about the chunk we are looking for */
@@ -3269,7 +3268,7 @@ H5D__chunk_lookup(const H5D_t *dset, const hsize_t *scaled,
idx_info.f = dset->oloc.file;
idx_info.pline = &dset->shared->dcpl_cache.pline;
idx_info.layout = &dset->shared->layout.u.chunk;
- idx_info.storage = &dset->shared->layout.storage.u.chunk;
+ idx_info.storage = sc;
#ifdef H5_HAVE_PARALLEL
/* Disable collective metadata read for chunk indexes as it is
@@ -3281,7 +3280,7 @@ H5D__chunk_lookup(const H5D_t *dset, const hsize_t *scaled,
#endif /* H5_HAVE_PARALLEL */
/* Go get the chunk information */
- if((dset->shared->layout.storage.u.chunk.ops->get_addr)(&idx_info, udata) < 0)
+ if((sc->ops->get_addr)(&idx_info, udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query chunk address")
/*
@@ -3367,7 +3366,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
/* Set up user data for index callbacks */
udata.common.layout = &dset->shared->layout.u.chunk;
- udata.common.storage = &dset->shared->layout.storage.u.chunk;
+ udata.common.storage = sc;
udata.common.scaled = ent->scaled;
udata.chunk_block.offset = ent->chunk_block.offset;
udata.chunk_block.length = dset->shared->layout.u.chunk.size;
@@ -3452,7 +3451,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
idx_info.f = dset->oloc.file;
idx_info.pline = &dset->shared->dcpl_cache.pline;
idx_info.layout = &dset->shared->layout.u.chunk;
- idx_info.storage = &dset->shared->layout.storage.u.chunk;
+ idx_info.storage = sc;
/* Create the chunk it if it doesn't exist, or reallocate the chunk
* if its size changed.
@@ -3472,8 +3471,8 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write raw data to file")
/* Insert the chunk record into the index */
- if(need_insert && dset->shared->layout.storage.u.chunk.ops->insert)
- if((dset->shared->layout.storage.u.chunk.ops->insert)(&idx_info, &udata, dset) < 0)
+ if(need_insert && sc->ops->insert)
+ if((sc->ops->insert)(&idx_info, &udata, dset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk addr into index")
/* Cache the chunk's info, in case it's accessed again shortly */
@@ -4282,10 +4281,10 @@ H5D__chunk_allocated(const H5D_t *dset, hsize_t *nbytes)
idx_info.f = dset->oloc.file;
idx_info.pline = &dset->shared->dcpl_cache.pline;
idx_info.layout = &dset->shared->layout.u.chunk;
- idx_info.storage = &dset->shared->layout.storage.u.chunk;
+ idx_info.storage = sc;
/* Iterate over the chunks */
- if((dset->shared->layout.storage.u.chunk.ops->iterate)(&idx_info, H5D__chunk_allocated_cb, &chunk_bytes) < 0)
+ if((sc->ops->iterate)(&idx_info, H5D__chunk_allocated_cb, &chunk_bytes) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve allocated chunk information from index")
/* Set number of bytes for caller */
@@ -4484,7 +4483,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
idx_info.f = dset->oloc.file;
idx_info.pline = &dset->shared->dcpl_cache.pline;
idx_info.layout = &dset->shared->layout.u.chunk;
- idx_info.storage = &dset->shared->layout.storage.u.chunk;
+ idx_info.storage = sc;
/* Loop over all chunks */
/* The algorithm is:
@@ -4555,7 +4554,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
#ifndef NDEBUG
/* None of the chunks should be allocated */
- if(H5D_CHUNK_IDX_NONE != layout->storage.u.chunk.idx_type) {
+ if(H5D_CHUNK_IDX_NONE != sc->idx_type) {
HDassert(!H5F_addr_defined(udata.chunk_block.offset));
}
@@ -4630,7 +4629,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
/* Initialize the chunk information */
udata.common.layout = &layout->u.chunk;
- udata.common.storage = &layout->storage.u.chunk;
+ udata.common.storage = sc;
udata.common.scaled = scaled;
udata.chunk_block.offset = HADDR_UNDEF;
H5_CHECKED_ASSIGN(udata.chunk_block.length, uint32_t, chunk_size, size_t);
@@ -4780,7 +4779,6 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
hsize_t max_edge_chunk_sc[H5O_LAYOUT_NDIMS]; /* largest offset of chunks that might need to be modified in each dimension */
hbool_t new_full_dim[H5O_LAYOUT_NDIMS]; /* Whether the plane of chunks in this dimension needs to be modified */
const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
- const H5O_pline_t *pline = &(dset->shared->dcpl_cache.pline); /* I/O pipeline info */
hsize_t chunk_sc[H5O_LAYOUT_NDIMS]; /* Offset of current chunk */
const uint32_t *chunk_dim = layout->u.chunk.dim; /* Convenience pointer to chunk dimensions */
unsigned space_ndims; /* Dataset's space rank */
@@ -4791,7 +4789,6 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
H5D_storage_t chk_store; /* Chunk storage information */
void *chunk; /* The file chunk */
hbool_t carry; /* Flag to indicate that chunk increment carrys to higher dimension (sorta) */
- const H5O_storage_chunk_t *sc = &(layout->storage.u.chunk);
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -4799,8 +4796,8 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
/* Check args */
HDassert(dset && H5D_CHUNKED == layout->type);
HDassert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
- H5D_CHUNK_STORAGE_INDEX_CHK(sc);
- HDassert(pline->nused > 0);
+ H5D_CHUNK_STORAGE_INDEX_CHK(&layout->storage.u.chunk);
+ HDassert(dset->shared->dcpl_cache.pline.nused > 0);
HDassert(layout->u.chunk.flags
& H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
@@ -5393,7 +5390,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
/* Initialize the user data for the iteration */
HDmemset(&udata, 0, sizeof udata);
udata.common.layout = &layout->u.chunk;
- udata.common.storage = &layout->storage.u.chunk;
+ udata.common.storage = sc;
udata.common.scaled = scaled;
udata.io_info = &chk_io_info;
udata.idx_info = &idx_info;
@@ -5406,7 +5403,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
/* Initialize user data for removal */
idx_udata.layout = &layout->u.chunk;
- idx_udata.storage = &layout->storage.u.chunk;
+ idx_udata.storage = sc;
/* Determine if partial edge chunk filters are disabled */
disable_edge_filters = (layout->u.chunk.flags
@@ -5563,7 +5560,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
idx_udata.scaled = udata.common.scaled;
/* Remove the chunk from disk */
- if((layout->storage.u.chunk.ops->remove)(&idx_info, &idx_udata) < 0)
+ if((sc->ops->remove)(&idx_info, &idx_udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, "unable to remove chunk entry from index")
} /* end if */
} /* end else */
@@ -5693,17 +5690,17 @@ H5D__chunk_addrmap(const H5D_io_info_t *io_info, haddr_t chunk_addr[])
/* Set up user data for B-tree callback */
HDmemset(&udata, 0, sizeof(udata));
udata.common.layout = &dset->shared->layout.u.chunk;
- udata.common.storage = &dset->shared->layout.storage.u.chunk;
+ udata.common.storage = sc;
udata.chunk_addr = chunk_addr;
/* Compose chunked index info struct */
idx_info.f = dset->oloc.file;
idx_info.pline = &dset->shared->dcpl_cache.pline;
idx_info.layout = &dset->shared->layout.u.chunk;
- idx_info.storage = &dset->shared->layout.storage.u.chunk;
+ idx_info.storage = sc;
/* Iterate over chunks to build mapping of chunk addresses */
- if((dset->shared->layout.storage.u.chunk.ops->iterate)(&idx_info, H5D__chunk_addrmap_cb, &udata) < 0)
+ if((sc->ops->iterate)(&idx_info, H5D__chunk_addrmap_cb, &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to iterate over chunk index to build address map")
done:
@@ -5734,7 +5731,6 @@ H5D__chunk_delete(H5F_t *f, H5O_t *oh, H5O_storage_t *storage)
H5O_pline_t pline; /* I/O pipeline message */
hbool_t pline_read = FALSE; /* Whether the I/O pipeline message was read from the file */
htri_t exists; /* Flag if header message of interest exists */
- H5O_storage_chunk_t *sc = &(storage->u.chunk);
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -5743,7 +5739,7 @@ H5D__chunk_delete(H5F_t *f, H5O_t *oh, H5O_storage_t *storage)
HDassert(f);
HDassert(oh);
HDassert(storage);
- H5D_CHUNK_STORAGE_INDEX_CHK(sc);
+ H5D_CHUNK_STORAGE_INDEX_CHK(&storage->u.chunk);
/* Check for I/O pipeline message */
if((exists = H5O_msg_exists_oh(oh, H5O_PLINE_ID)) < 0)
@@ -6470,26 +6466,25 @@ H5D__chunk_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5O_layout_t *layout,
idx_info.f = loc->file;
idx_info.pline = &pline;
idx_info.layout = &layout->u.chunk;
- idx_info.storage = &layout->storage.u.chunk;
+ idx_info.storage = sc;
/* Get the dataspace for the dataset */
if(NULL == (space = H5S_read(loc)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to load dataspace info from dataset header")
/* Allocate any indexing structures */
- if(layout->storage.u.chunk.ops->init && (layout->storage.u.chunk.ops->init)(&idx_info, space, loc->addr) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information")
+ if(sc->ops->init && (sc->ops->init)(&idx_info, space, loc->addr) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information")
idx_info_init = TRUE;
/* Get size of index structure */
- if(layout->storage.u.chunk.ops->size && (layout->storage.u.chunk.ops->size)(&idx_info, index_size) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve chunk index info")
+ if(sc->ops->size && (sc->ops->size)(&idx_info, index_size) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve chunk index info")
done:
/* Free resources, if they've been initialized */
- if(idx_info_init && layout->storage.u.chunk.ops->dest &&
- (layout->storage.u.chunk.ops->dest)(&idx_info) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info")
+ if(idx_info_init && sc->ops->dest && (sc->ops->dest)(&idx_info) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info")
if(pline_read && H5O_msg_reset(H5O_PLINE_ID, &pline) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset I/O pipeline message")
if(space && H5S_close(space) < 0)
@@ -6576,14 +6571,14 @@ H5D__chunk_dump_index(H5D_t *dset, FILE *stream)
H5D_chunk_it_ud4_t udata; /* User data for callback */
/* Display info for index */
- if((dset->shared->layout.storage.u.chunk.ops->dump)(&dset->shared->layout.storage.u.chunk, stream) < 0)
+ if((sc->ops->dump)(sc, stream) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to dump chunk index info")
/* Compose chunked index info struct */
idx_info.f = dset->oloc.file;
idx_info.pline = &dset->shared->dcpl_cache.pline;
idx_info.layout = &dset->shared->layout.u.chunk;
- idx_info.storage = &dset->shared->layout.storage.u.chunk;
+ idx_info.storage = sc;
/* Set up user data for callback */
udata.stream = stream;
@@ -6592,7 +6587,7 @@ H5D__chunk_dump_index(H5D_t *dset, FILE *stream)
udata.chunk_dim = dset->shared->layout.u.chunk.dim;
/* Iterate over index and dump chunk info */
- if((dset->shared->layout.storage.u.chunk.ops->iterate)(&idx_info, H5D__chunk_dump_index_cb, &udata) < 0)
+ if((sc->ops->iterate)(&idx_info, H5D__chunk_dump_index_cb, &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk index to dump chunk info")
} /* end if */
diff --git a/src/H5Dint.c b/src/H5Dint.c
index c89c170..1624f7b 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -133,11 +133,10 @@ H5FL_EXTERN(H5D_chunk_info_t);
H5FL_BLK_EXTERN(type_conv);
/* Disable warning for intentional identical branches here -QAK */
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wlarger-than="
+H5_GCC_DIAG_OFF(larger-than=)
/* Define a static "default" dataset structure to use to initialize new datasets */
static H5D_shared_t H5D_def_dset;
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(larger-than=)
/* Dataset ID class */
static const H5I_class_t H5I_DATASET_CLS[1] = {{
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 0f4e703..3d49df7 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -1131,7 +1131,7 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset,
uint32_t global_no_collective_cause;
hbool_t local_error_message_previously_written = FALSE;
hbool_t global_error_message_previously_written = FALSE;
- size_t index;
+ size_t idx;
size_t cause_strings_len;
char local_no_collective_cause_string[512] = "";
char global_no_collective_cause_string[512] = "";
@@ -1153,8 +1153,11 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset,
/* Append each of the "reason for breaking collective I/O" error messages to the
* local and global no collective cause strings */
- for (cause = 1, index = 0; (cause < H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE) && (index < cause_strings_len); cause <<= 1, index++) {
- size_t cause_strlen = HDstrlen(cause_strings[index]);
+ for (cause = 1, idx = 0;
+ (cause < H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE) &&
+ (idx < cause_strings_len);
+ cause <<= 1, idx++) {
+ size_t cause_strlen = HDstrlen(cause_strings[idx]);
if (cause & local_no_collective_cause) {
/* Check if there were any previous error messages included. If so, prepend a semicolon
@@ -1163,7 +1166,8 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset,
if(local_error_message_previously_written)
HDstrncat(local_no_collective_cause_string, "; ", 2);
- HDstrncat(local_no_collective_cause_string, cause_strings[index], cause_strlen);
+ HDstrncat(local_no_collective_cause_string,
+ cause_strings[idx], cause_strlen);
local_error_message_previously_written = TRUE;
} /* end if */
@@ -1175,7 +1179,8 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset,
if(global_error_message_previously_written)
HDstrncat(global_no_collective_cause_string, "; ", 2);
- HDstrncat(global_no_collective_cause_string, cause_strings[index], cause_strlen);
+ HDstrncat(global_no_collective_cause_string,
+ cause_strings[idx], cause_strlen);
global_error_message_previously_written = TRUE;
} /* end if */
diff --git a/src/H5Eint.c b/src/H5Eint.c
index e76db82..2aedc17 100644
--- a/src/H5Eint.c
+++ b/src/H5Eint.c
@@ -37,6 +37,7 @@
#include "H5Epkg.h" /* Error handling */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
+#include "H5TSprivate.h" /* Thread stuff */
/****************/
@@ -259,10 +260,8 @@ H5E__walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
else
HDfprintf(stream, "thread 0");
} /* end block */
-#elif defined(H5_HAVE_THREADSAFE)
- HDfprintf(stream, "thread %lu", (unsigned long)HDpthread_self_ulong());
#else
- HDfprintf(stream, "thread 0");
+ HDfprintf(stream, "thread %" PRIu64, H5TS_thread_id());
#endif
HDfprintf(stream, ":\n");
} /* end if */
@@ -391,10 +390,8 @@ H5E__walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
else
HDfprintf(stream, "thread 0");
} /* end block */
-#elif defined(H5_HAVE_THREADSAFE)
- HDfprintf(stream, "thread %lu", (unsigned long)HDpthread_self_ulong());
#else
- HDfprintf(stream, "thread 0");
+ HDfprintf(stream, "thread %" PRIu64, H5TS_thread_id());
#endif
HDfprintf(stream, ":\n");
} /* end if */
@@ -883,12 +880,12 @@ H5E__clear_entries(H5E_t *estack, size_t nentries)
/* Release strings */
if(error->func_name)
- error->func_name = (const char *) H5MM_xfree((void *)error->func_name); /* Casting away const OK - QAK */
+ error->func_name = (const char *) H5MM_xfree_const(error->func_name);
if(error->file_name)
- error->file_name = (const char *) H5MM_xfree((void *)error->file_name); /* Casting away const OK - QAK */
+ error->file_name = (const char *) H5MM_xfree_const(error->file_name);
if(error->desc)
- error->desc = (const char *) H5MM_xfree((void *)error->desc); /* Casting away const OK - QAK */
- } /* end for */
+ error->desc = (const char *) H5MM_xfree_const(error->desc);
+ }
/* Decrement number of errors on stack */
estack->nused -= u;
diff --git a/src/H5F.c b/src/H5F.c
index 752530c..1a9bab5 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -1052,15 +1052,15 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Fget_fileno(hid_t file_id, unsigned long *fileno)
+H5Fget_fileno(hid_t file_id, unsigned long *fnumber)
{
herr_t ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
- H5TRACE2("e", "i*Ul", file_id, fileno);
+ H5TRACE2("e", "i*Ul", file_id, fnumber);
- /* If no fileno pointer was passed in, exit quietly */
- if(fileno) {
+ /* If no fnumber pointer was passed in, exit quietly */
+ if(fnumber) {
H5VL_object_t *vol_obj; /* File info */
/* Get the internal file structure */
@@ -1068,7 +1068,7 @@ H5Fget_fileno(hid_t file_id, unsigned long *fileno)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
/* Get the flags */
- if((ret_value = H5VL_file_get(vol_obj, H5VL_FILE_GET_FILENO, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, fileno)) < 0)
+ if((ret_value = H5VL_file_get(vol_obj, H5VL_FILE_GET_FILENO, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, fnumber)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file's 'file number'")
} /* end if */
diff --git a/src/H5FD.c b/src/H5FD.c
index 1a4ab4d..63112bd 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -202,7 +202,7 @@ H5FD__free_cls(H5FD_class_t *cls)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_free_cls() */
+} /* end H5FD__free_cls() */
/*-------------------------------------------------------------------------
@@ -566,22 +566,22 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_fapl_close
+ * Function: H5FD_free_driver_info
*
- * Purpose: Closes a driver for a dataset transfer property list
+ * Purpose: Frees a driver's info
*
* Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_fapl_close(hid_t driver_id, const void *driver_info)
+H5FD_free_driver_info(hid_t driver_id, const void *driver_info)
{
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- if(driver_id > 0) {
+ if(driver_id > 0 && driver_info) {
H5FD_class_t *driver;
/* Retrieve the driver for the ID */
@@ -589,19 +589,19 @@ H5FD_fapl_close(hid_t driver_id, const void *driver_info)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a driver ID")
/* Allow driver to free info or do it ourselves */
- if(driver_info) {
- if(driver->fapl_free) {
- if((driver->fapl_free)((void *)driver_info) < 0) /* Casting away const OK -QAK */
- HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "driver free request failed")
- } /* end if */
- else
- driver_info = H5MM_xfree((void *)driver_info); /* Casting away const OK -QAK */
- } /* end if */
- } /* end if */
+ if(driver->fapl_free) {
+ /* Free the const pointer */
+ /* Cast through uintptr_t to de-const memory */
+ if((driver->fapl_free)((void *)(uintptr_t)driver_info) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "driver free request failed")
+ }
+ else
+ driver_info = H5MM_xfree_const(driver_info);
+ }
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_fapl_close() */
+} /* end H5FD_free_driver_info() */
/*-------------------------------------------------------------------------
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c
index 33a0ef4..ce5e081 100644
--- a/src/H5FDdirect.c
+++ b/src/H5FDdirect.c
@@ -459,8 +459,8 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd
#endif
h5_stat_t sb;
H5P_genplist_t *plist; /* Property list */
- int *buf1, *buf2;
- H5FD_t *ret_value;
+ void *buf1, *buf2;
+ H5FD_t *ret_value = NULL;
FUNC_ENTER_NOAPI_NOINIT
@@ -525,13 +525,13 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd
/* NOTE: Use HDmalloc and HDfree here to ensure compatibility with
* HDposix_memalign.
*/
- buf1 = (int *)HDmalloc(sizeof(int));
+ buf1 = HDmalloc(sizeof(int));
if(HDposix_memalign(&buf2, file->fa.mboundary, file->fa.fbsize) != 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "HDposix_memalign failed")
if(o_flags & O_CREAT) {
- if(HDwrite(file->fd, (void*)buf1, sizeof(int))<0) {
- if(HDwrite(file->fd, (void*)buf2, file->fa.fbsize)<0)
+ if(HDwrite(file->fd, buf1, sizeof(int))<0) {
+ if(HDwrite(file->fd, buf2, file->fa.fbsize)<0)
HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, NULL, "file system may not support Direct I/O")
else
file->fa.must_align = TRUE;
@@ -540,8 +540,8 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd
HDftruncate(file->fd, (HDoff_t)0);
}
} else {
- if(HDread(file->fd, (void*)buf1, sizeof(int))<0) {
- if(HDread(file->fd, (void*)buf2, file->fa.fbsize)<0)
+ if(HDread(file->fd, buf1, sizeof(int))<0) {
+ if(HDread(file->fd, buf2, file->fa.fbsize)<0)
HGOTO_ERROR(H5E_FILE, H5E_READERROR, NULL, "file system may not support Direct I/O")
else
file->fa.must_align = TRUE;
@@ -549,7 +549,7 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd
if(o_flags & O_RDWR) {
if(HDlseek(file->fd, (HDoff_t)0, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, NULL, "unable to seek to proper position")
- if(HDwrite(file->fd, (void *)buf1, sizeof(int))<0)
+ if(HDwrite(file->fd, buf1, sizeof(int))<0)
file->fa.must_align = TRUE;
else
file->fa.must_align = FALSE;
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index bc00403..d110ef7 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -619,8 +619,7 @@ done:
* memb_name & temp in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+H5_GCC_DIAG_OFF(format-nonliteral)
static H5FD_t *
H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr)
@@ -771,7 +770,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_family_open() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(format-nonliteral)
/*-------------------------------------------------------------------------
@@ -957,8 +956,7 @@ H5FD_family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
* memb_name in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+H5_GCC_DIAG_OFF(format-nonliteral)
static herr_t
H5FD_family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa)
{
@@ -1025,7 +1023,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(format-nonliteral)
/*-------------------------------------------------------------------------
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index 800869d..d7fc88d 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -1961,8 +1961,7 @@ compute_next(H5FD_multi_t *file)
* tmp in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+H5_GCC_DIAG_OFF(format-nonliteral)
static int
open_members(H5FD_multi_t *file)
{
@@ -1996,7 +1995,7 @@ open_members(H5FD_multi_t *file)
return 0;
}
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(format-nonliteral)
#ifdef _H5private_H
diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h
index ac08f7f..2e3d3ce 100644
--- a/src/H5FDprivate.h
+++ b/src/H5FDprivate.h
@@ -115,7 +115,7 @@ H5_DLL hsize_t H5FD_sb_size(H5FD_t *file);
H5_DLL herr_t H5FD_sb_encode(H5FD_t *file, char *name/*out*/, uint8_t *buf);
H5_DLL herr_t H5FD_sb_load(H5FD_t *file, const char *name, const uint8_t *buf);
H5_DLL void *H5FD_fapl_get(H5FD_t *file);
-H5_DLL herr_t H5FD_fapl_close(hid_t driver_id, const void *fapl);
+H5_DLL herr_t H5FD_free_driver_info(hid_t driver_id, const void *driver_info);
H5_DLL hid_t H5FD_register(const void *cls, size_t size, hbool_t app_ref);
H5_DLL H5FD_t *H5FD_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr);
diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c
index f08e9d5..d9d4c88 100644
--- a/src/H5FDs3comms.c
+++ b/src/H5FDs3comms.c
@@ -1202,7 +1202,7 @@ H5FD_s3comms_s3r_open(const char *url,
if ((region != NULL && *region != '\0') ||
(id != NULL && *id != '\0') ||
- (signing_key != NULL && *signing_key != '\0'))
+ (signing_key != NULL))
{
/* if one exists, all three must exist
*/
@@ -1214,7 +1214,7 @@ H5FD_s3comms_s3r_open(const char *url,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
"secret id cannot be null.\n");
}
- if (signing_key == NULL || signing_key[0] == '\0') {
+ if (signing_key == NULL) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
"signing key cannot be null.\n");
}
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 74189c1..0000512 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -273,7 +273,7 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref)
done:
/* Release the copy of the driver info, if it was set up */
- if(driver_prop_copied && H5FD_fapl_close(driver_prop.driver_id, driver_prop.driver_info) < 0)
+ if(driver_prop_copied && H5FD_free_driver_info(driver_prop.driver_id, driver_prop.driver_info) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, H5I_INVALID_HID, "can't close copy of driver info")
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index f95f13d..f8a40b2 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -347,7 +347,7 @@ static herr_t
H5F__cache_superblock_get_final_load_size(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED image_len,
void *_udata, size_t *actual_len)
{
- const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
+ const uint8_t *image = _image; /* Pointer into raw data buffer */
H5F_superblock_cache_ud_t *udata = (H5F_superblock_cache_ud_t *)_udata; /* User data */
H5F_super_t sblock; /* Temporary file superblock */
htri_t ret_value = SUCCEED; /* Return value */
@@ -393,7 +393,7 @@ done:
static htri_t
H5F__cache_superblock_verify_chksum(const void *_image, size_t len, void *_udata)
{
- const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
+ const uint8_t *image = _image; /* Pointer into raw data buffer */
H5F_superblock_cache_ud_t *udata = (H5F_superblock_cache_ud_t *)_udata; /* User data */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
@@ -439,7 +439,7 @@ H5F__cache_superblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUS
{
H5F_super_t *sblock = NULL; /* File's superblock */
H5F_superblock_cache_ud_t *udata = (H5F_superblock_cache_ud_t *)_udata; /* User data */
- const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
+ const uint8_t *image = _image; /* Pointer into raw data buffer */
H5F_super_t *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@@ -664,7 +664,7 @@ H5F__cache_superblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNU
void *_thing)
{
H5F_super_t *sblock = (H5F_super_t *)_thing; /* Pointer to the object */
- uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */
+ uint8_t *image = _image; /* Pointer into raw data buffer */
haddr_t rel_eof; /* Relative EOF for file */
herr_t ret_value = SUCCEED; /* Return value */
@@ -870,7 +870,7 @@ static herr_t
H5F__cache_drvrinfo_get_final_load_size(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED image_len,
void *_udata, size_t *actual_len)
{
- const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
+ const uint8_t *image = _image; /* Pointer into raw data buffer */
H5F_drvrinfo_cache_ud_t *udata = (H5F_drvrinfo_cache_ud_t *)_udata; /* User data */
H5O_drvinfo_t drvrinfo; /* Driver info */
herr_t ret_value = SUCCEED; /* Return value */
@@ -916,7 +916,7 @@ H5F__cache_drvrinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
{
H5O_drvinfo_t *drvinfo = NULL; /* Driver info */
H5F_drvrinfo_cache_ud_t *udata = (H5F_drvrinfo_cache_ud_t *)_udata; /* User data */
- const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
+ const uint8_t *image = _image; /* Pointer into raw data buffer */
char drv_name[9]; /* Name of driver */
H5O_drvinfo_t *ret_value = NULL; /* Return value */
@@ -1010,7 +1010,7 @@ H5F__cache_drvrinfo_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBU
void *_thing)
{
H5O_drvinfo_t *drvinfo = (H5O_drvinfo_t *)_thing; /* Pointer to the object */
- uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */
+ uint8_t *image = _image; /* Pointer into raw data buffer */
uint8_t *dbuf; /* Pointer to beginning of driver info */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5MM.c b/src/H5MM.c
index ac3c26e..94bd542 100644
--- a/src/H5MM.c
+++ b/src/H5MM.c
@@ -566,6 +566,31 @@ H5MM_xfree(void *mem)
/*-------------------------------------------------------------------------
+ * Function: H5MM_xfree_const
+ *
+ * Purpose: H5MM_xfree() wrapper that handles const pointers without
+ * warnings. Used for freeing buffers that should be regarded
+ * as const in use but need to be freed when no longer needed.
+ *
+ * Return: Success: NULL
+ * Failure: never fails
+ *
+ *-------------------------------------------------------------------------
+ */
+void *
+H5MM_xfree_const(const void *mem)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ /* Cast through uintptr_t to de-const memory */
+ H5MM_xfree((void *)(uintptr_t)mem);
+
+ FUNC_LEAVE_NOAPI(NULL)
+} /* end H5MM_xfree_const() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5MM_memcpy
*
* Purpose: Like memcpy(3) but with sanity checks on the parameters,
diff --git a/src/H5MMprivate.h b/src/H5MMprivate.h
index 2053215..240b931 100644
--- a/src/H5MMprivate.h
+++ b/src/H5MMprivate.h
@@ -45,6 +45,7 @@ H5_DLL void *H5MM_realloc(void *mem, size_t size);
H5_DLL char *H5MM_xstrdup(const char *s);
H5_DLL char *H5MM_strdup(const char *s);
H5_DLL void *H5MM_xfree(void *mem);
+H5_DLL void *H5MM_xfree_const(const void *mem);
H5_DLL void *H5MM_memcpy(void *dest, const void *src, size_t n);
#if defined H5_MEMORY_ALLOC_SANITY_CHECK
H5_DLL void H5MM_sanity_check_all(void);
diff --git a/src/H5PL.c b/src/H5PL.c
index fc42554..0f0f88a 100644
--- a/src/H5PL.c
+++ b/src/H5PL.c
@@ -210,13 +210,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5PLreplace(const char *search_path, unsigned int index)
+H5PLreplace(const char *search_path, unsigned int idx)
{
unsigned num_paths; /* Current number of stored paths */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE2("e", "*sIu", search_path, index);
+ H5TRACE2("e", "*sIu", search_path, idx);
/* Check args */
if (NULL == search_path)
@@ -228,11 +228,11 @@ H5PLreplace(const char *search_path, unsigned int index)
num_paths = H5PL__get_num_paths();
if (0 == num_paths)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "path table is empty")
- else if (index >= num_paths)
+ else if (idx >= num_paths)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index path out of bounds for table - can't be more than %u", (num_paths - 1))
/* Insert the search path into the path table */
- if (H5PL__replace_path(search_path, index) < 0)
+ if (H5PL__replace_path(search_path, idx) < 0)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to replace search path")
done:
@@ -252,13 +252,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5PLinsert(const char *search_path, unsigned int index)
+H5PLinsert(const char *search_path, unsigned int idx)
{
unsigned num_paths; /* Current number of stored paths */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE2("e", "*sIu", search_path, index);
+ H5TRACE2("e", "*sIu", search_path, idx);
/* Check args */
if (NULL == search_path)
@@ -268,11 +268,11 @@ H5PLinsert(const char *search_path, unsigned int index)
/* Check index */
num_paths = H5PL__get_num_paths();
- if ((0 != num_paths) && (index >= num_paths))
+ if ((0 != num_paths) && (idx >= num_paths))
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index path out of bounds for table - can't be more than %u", (num_paths - 1))
/* Insert the search path into the path table */
- if (H5PL__insert_path(search_path, index) < 0)
+ if (H5PL__insert_path(search_path, idx) < 0)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to insert search path")
done:
@@ -294,23 +294,23 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5PLremove(unsigned int index)
+H5PLremove(unsigned int idx)
{
unsigned num_paths; /* Current number of stored paths */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE1("e", "Iu", index);
+ H5TRACE1("e", "Iu", idx);
/* Check index */
num_paths = H5PL__get_num_paths();
if (0 == num_paths)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "path table is empty")
- else if (index >= num_paths)
+ else if (idx >= num_paths)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index path out of bounds for table - can't be more than %u", (num_paths - 1))
/* Delete the search path from the path table */
- if (H5PL__remove_path(index) < 0)
+ if (H5PL__remove_path(idx) < 0)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTDELETE, FAIL, "unable to remove search path")
done:
@@ -343,7 +343,7 @@ done:
*-------------------------------------------------------------------------
*/
ssize_t
-H5PLget(unsigned int index, char *path_buf, size_t buf_size)
+H5PLget(unsigned int idx, char *path_buf, size_t buf_size)
{
unsigned num_paths; /* Current number of stored paths */
const char *path = NULL; /* path from table */
@@ -351,13 +351,13 @@ H5PLget(unsigned int index, char *path_buf, size_t buf_size)
ssize_t ret_value = 0; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE3("Zs", "Iu*sz", index, path_buf, buf_size);
+ H5TRACE3("Zs", "Iu*sz", idx, path_buf, buf_size);
/* Check index */
num_paths = H5PL__get_num_paths();
if (0 == num_paths)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "path table is empty")
- else if (index >= num_paths)
+ else if (idx >= num_paths)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index path out of bounds for table - can't be more than %u", (num_paths - 1))
/* Check if the search table is empty */
@@ -365,7 +365,7 @@ H5PLget(unsigned int index, char *path_buf, size_t buf_size)
HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, (-1), "plugin search path table is empty")
/* Get the path at the specified index and its length */
- if (NULL == (path = H5PL__get_path(index)))
+ if (NULL == (path = H5PL__get_path(idx)))
HGOTO_ERROR(H5E_PLUGIN, H5E_BADVALUE, (-1), "no path stored at that index")
path_len = HDstrlen(path);
diff --git a/src/H5PLint.c b/src/H5PLint.c
index 8dec14b..b69a788 100644
--- a/src/H5PLint.c
+++ b/src/H5PLint.c
@@ -304,8 +304,7 @@ done:
* get_plugin_info function pointer, but early (4.4.7, at least) gcc
* only allows diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
+H5_GCC_DIAG_OFF(pedantic)
herr_t
H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key,
hbool_t *success, const void **plugin_info)
@@ -417,7 +416,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__open() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(pedantic)
/*-------------------------------------------------------------------------
diff --git a/src/H5PLpath.c b/src/H5PLpath.c
index e270c73..ba23fd3 100644
--- a/src/H5PLpath.c
+++ b/src/H5PLpath.c
@@ -62,9 +62,9 @@
/* Local Prototypes */
/********************/
-static herr_t H5PL__insert_at(const char *path, unsigned int index);
-static herr_t H5PL__make_space_at(unsigned int index);
-static herr_t H5PL__replace_at(const char *path, unsigned int index);
+static herr_t H5PL__insert_at(const char *path, unsigned int idx);
+static herr_t H5PL__make_space_at(unsigned int idx);
+static herr_t H5PL__replace_at(const char *path, unsigned int idx);
static herr_t H5PL__expand_path_table(void);
static herr_t H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *found, const char *dir, const void **plugin_info);
@@ -105,7 +105,7 @@ static unsigned H5PL_path_capacity_g = H5PL_INITIAL_PATH_CAPACITY;
*-------------------------------------------------------------------------
*/
static herr_t
-H5PL__insert_at(const char *path, unsigned int index)
+H5PL__insert_at(const char *path, unsigned int idx)
{
char *path_copy = NULL; /* copy of path string (for storing) */
herr_t ret_value = SUCCEED; /* Return value */
@@ -132,12 +132,12 @@ H5PL__insert_at(const char *path, unsigned int index)
#endif /* H5_HAVE_WIN32_API */
/* If the table entry is in use, make some space */
- if (H5PL_paths_g[index])
- if (H5PL__make_space_at(index) < 0)
+ if (H5PL_paths_g[idx])
+ if (H5PL__make_space_at(idx) < 0)
HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "unable to make space in the table for the new entry")
/* Insert the copy of the search path into the table at the specified index */
- H5PL_paths_g[index] = path_copy;
+ H5PL_paths_g[idx] = path_copy;
H5PL_num_paths_g++;
done:
@@ -156,7 +156,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5PL__make_space_at(unsigned int index)
+H5PL__make_space_at(unsigned int idx)
{
unsigned u; /* iterator */
herr_t ret_value = SUCCEED; /* Return value */
@@ -164,13 +164,13 @@ H5PL__make_space_at(unsigned int index)
FUNC_ENTER_STATIC_NOERR
/* Check args - Just assert on package functions */
- HDassert(index < H5PL_path_capacity_g);
+ HDassert(idx < H5PL_path_capacity_g);
/* Copy the paths back to make a space */
- for (u = H5PL_num_paths_g; u > index; u--)
+ for (u = H5PL_num_paths_g; u > idx; u--)
H5PL_paths_g[u] = H5PL_paths_g[u-1];
- H5PL_paths_g[index] = NULL;
+ H5PL_paths_g[idx] = NULL;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__make_space_at() */
@@ -188,7 +188,7 @@ H5PL__make_space_at(unsigned int index)
*-------------------------------------------------------------------------
*/
static herr_t
-H5PL__replace_at(const char *path, unsigned int index)
+H5PL__replace_at(const char *path, unsigned int idx)
{
char *path_copy = NULL; /* copy of path string (for storing) */
herr_t ret_value = SUCCEED; /* Return value */
@@ -200,8 +200,8 @@ H5PL__replace_at(const char *path, unsigned int index)
HDassert(HDstrlen(path));
/* Check that the table entry is in use */
- if (!H5PL_paths_g[index])
- HGOTO_ERROR(H5E_PLUGIN, H5E_CANTFREE, FAIL, "path entry at index %u in the table is NULL", index)
+ if (!H5PL_paths_g[idx])
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTFREE, FAIL, "path entry at index %u in the table is NULL", idx)
/* Copy the path for storage so the caller can dispose of theirs */
if (NULL == (path_copy = H5MM_strdup(path)))
@@ -214,10 +214,10 @@ H5PL__replace_at(const char *path, unsigned int index)
#endif /* H5_HAVE_WIN32_API */
/* Free the existing path entry */
- H5PL_paths_g[index] = (char *)H5MM_xfree(H5PL_paths_g[index]);
+ H5PL_paths_g[idx] = (char *)H5MM_xfree(H5PL_paths_g[idx]);
/* Copy the search path into the table at the specified index */
- H5PL_paths_g[index] = path_copy;
+ H5PL_paths_g[idx] = path_copy;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -448,7 +448,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5PL__replace_path(const char *path, unsigned int index)
+H5PL__replace_path(const char *path, unsigned int idx)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -457,10 +457,10 @@ H5PL__replace_path(const char *path, unsigned int index)
/* Check args - Just assert on package functions */
HDassert(path);
HDassert(HDstrlen(path));
- HDassert(index < H5PL_path_capacity_g);
+ HDassert(idx < H5PL_path_capacity_g);
/* Insert the path at the requested index */
- if (H5PL__replace_at(path, index) < 0)
+ if (H5PL__replace_at(path, idx) < 0)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to replace search path")
done:
@@ -479,7 +479,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5PL__insert_path(const char *path, unsigned int index)
+H5PL__insert_path(const char *path, unsigned int idx)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -488,10 +488,10 @@ H5PL__insert_path(const char *path, unsigned int index)
/* Check args - Just assert on package functions */
HDassert(path);
HDassert(HDstrlen(path));
- HDassert(index < H5PL_path_capacity_g);
+ HDassert(idx < H5PL_path_capacity_g);
/* Insert the path at the requested index */
- if (H5PL__insert_at(path, index) < 0)
+ if (H5PL__insert_at(path, idx) < 0)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to insert search path")
done:
@@ -510,7 +510,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5PL__remove_path(unsigned int index)
+H5PL__remove_path(unsigned int idx)
{
unsigned u; /* iterator */
herr_t ret_value = SUCCEED; /* Return value */
@@ -518,18 +518,18 @@ H5PL__remove_path(unsigned int index)
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(index < H5PL_path_capacity_g);
+ HDassert(idx < H5PL_path_capacity_g);
/* Check if the path at that index is set */
- if (!H5PL_paths_g[index])
- HGOTO_ERROR(H5E_PLUGIN, H5E_CANTDELETE, FAIL, "search path at index %u is NULL", index)
+ if (!H5PL_paths_g[idx])
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTDELETE, FAIL, "search path at index %u is NULL", idx)
/* Delete the path */
H5PL_num_paths_g--;
- H5PL_paths_g[index] = (char *)H5MM_xfree(H5PL_paths_g[index]);
+ H5PL_paths_g[idx] = (char *)H5MM_xfree(H5PL_paths_g[idx]);
/* Shift the paths down to close the gap */
- for (u = index; u < H5PL_num_paths_g; u++)
+ for (u = idx; u < H5PL_num_paths_g; u++)
H5PL_paths_g[u] = H5PL_paths_g[u+1];
/* Set the (former) last path to NULL */
@@ -551,17 +551,17 @@ done:
*-------------------------------------------------------------------------
*/
const char *
-H5PL__get_path(unsigned int index)
+H5PL__get_path(unsigned int idx)
{
char *ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
/* Get the path at the requested index */
- if (index >= H5PL_num_paths_g)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "path index %u is out of range in table", index)
+ if (idx >= H5PL_num_paths_g)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "path index %u is out of range in table", idx)
- return H5PL_paths_g[index];
+ return H5PL_paths_g[idx];
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__replace_path() */
diff --git a/src/H5PLplugin_cache.c b/src/H5PLplugin_cache.c
index cd0b4d6..c58828f 100644
--- a/src/H5PLplugin_cache.c
+++ b/src/H5PLplugin_cache.c
@@ -253,8 +253,7 @@ done:
/* See the other use of H5PL_GET_LIB_FUNC() for an explanation
* for why we disable -Wpedantic here.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
+H5_GCC_DIAG_OFF(pedantic)
herr_t
H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *found, const void **plugin_info)
{
@@ -303,5 +302,5 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__find_plugin_in_cache() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(pedantic)
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index b83e2cf..09ba2ee 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -2353,7 +2353,7 @@ done:
*-------------------------------------------------------------------------
*/
hid_t
-H5Pget_virtual_vspace(hid_t dcpl_id, size_t index)
+H5Pget_virtual_vspace(hid_t dcpl_id, size_t idx)
{
H5P_genplist_t *plist; /* Property list pointer */
H5O_layout_t layout; /* Layout information */
@@ -2361,7 +2361,7 @@ H5Pget_virtual_vspace(hid_t dcpl_id, size_t index)
hid_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE2("i", "iz", dcpl_id, index);
+ H5TRACE2("i", "iz", dcpl_id, idx);
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
@@ -2374,10 +2374,10 @@ H5Pget_virtual_vspace(hid_t dcpl_id, size_t index)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout")
/* Get the virtual space */
- if(index >= layout.storage.u.virt.list_nused)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)")
+ if(idx >= layout.storage.u.virt.list_nused)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid idx (out of range)")
HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
- if(NULL == (space = H5S_copy(layout.storage.u.virt.list[index].source_dset.virtual_select, FALSE, TRUE)))
+ if(NULL == (space = H5S_copy(layout.storage.u.virt.list[idx].source_dset.virtual_select, FALSE, TRUE)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection")
/* Register ID */
@@ -2411,7 +2411,7 @@ done:
*-------------------------------------------------------------------------
*/
hid_t
-H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index)
+H5Pget_virtual_srcspace(hid_t dcpl_id, size_t idx)
{
H5P_genplist_t *plist; /* Property list pointer */
H5O_layout_t layout; /* Layout information */
@@ -2419,7 +2419,7 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index)
hid_t ret_value = FAIL; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE2("i", "iz", dcpl_id, index);
+ H5TRACE2("i", "iz", dcpl_id, idx);
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
@@ -2431,28 +2431,28 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index)
if(H5D_VIRTUAL != layout.type)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout")
- /* Check index */
- if(index >= layout.storage.u.virt.list_nused)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)")
+ /* Check idx */
+ if(idx >= layout.storage.u.virt.list_nused)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid idx (out of range)")
HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
/* Attempt to open source dataset and patch extent if extent status is not
* H5O_VIRTUAL_STATUS_CORRECT? -NAF */
/* If source space status is H5O_VIRTUAL_STATUS_INVALID, patch with bounds
* of selection */
- if((H5O_VIRTUAL_STATUS_INVALID == layout.storage.u.virt.list[index].source_space_status)
- && (layout.storage.u.virt.list[index].unlim_dim_source < 0)) {
+ if((H5O_VIRTUAL_STATUS_INVALID == layout.storage.u.virt.list[idx].source_space_status)
+ && (layout.storage.u.virt.list[idx].unlim_dim_source < 0)) {
hsize_t bounds_start[H5S_MAX_RANK];
hsize_t bounds_end[H5S_MAX_RANK];
int rank;
int i;
/* Get rank of source space */
- if((rank = H5S_GET_EXTENT_NDIMS(layout.storage.u.virt.list[index].source_select)) < 0)
+ if((rank = H5S_GET_EXTENT_NDIMS(layout.storage.u.virt.list[idx].source_select)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get source space rank")
/* Get bounds of selection */
- if(H5S_SELECT_BOUNDS(layout.storage.u.virt.list[index].source_select, bounds_start, bounds_end) < 0)
+ if(H5S_SELECT_BOUNDS(layout.storage.u.virt.list[idx].source_select, bounds_start, bounds_end) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get selection bounds")
/* Adjust bounds to extent */
@@ -2460,15 +2460,15 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index)
bounds_end[i]++;
/* Set extent */
- if(H5S_set_extent_simple(layout.storage.u.virt.list[index].source_select, (unsigned)rank, bounds_end, NULL) < 0)
+ if(H5S_set_extent_simple(layout.storage.u.virt.list[idx].source_select, (unsigned)rank, bounds_end, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set source space extent")
/* Update source space status */
- layout.storage.u.virt.list[index].source_space_status = H5O_VIRTUAL_STATUS_SEL_BOUNDS;
+ layout.storage.u.virt.list[idx].source_space_status = H5O_VIRTUAL_STATUS_SEL_BOUNDS;
} /* end if */
/* Get the source space */
- if(NULL == (space = H5S_copy(layout.storage.u.virt.list[index].source_select, FALSE, TRUE)))
+ if(NULL == (space = H5S_copy(layout.storage.u.virt.list[idx].source_select, FALSE, TRUE)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy source selection")
/* Register ID */
@@ -2515,7 +2515,7 @@ done:
*-------------------------------------------------------------------------
*/
ssize_t
-H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name/*out*/,
+H5Pget_virtual_filename(hid_t dcpl_id, size_t idx, char *name/*out*/,
size_t size)
{
H5P_genplist_t *plist; /* Property list pointer */
@@ -2523,7 +2523,7 @@ H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name/*out*/,
ssize_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE4("Zs", "izxz", dcpl_id, index, name, size);
+ H5TRACE4("Zs", "izxz", dcpl_id, idx, name, size);
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
@@ -2536,13 +2536,13 @@ H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name/*out*/,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout")
/* Get the virtual filename */
- if(index >= layout.storage.u.virt.list_nused)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)")
+ if(idx >= layout.storage.u.virt.list_nused)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid idx (out of range)")
HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
- HDassert(layout.storage.u.virt.list[index].source_file_name);
+ HDassert(layout.storage.u.virt.list[idx].source_file_name);
if(name && (size > 0))
- (void)HDstrncpy(name, layout.storage.u.virt.list[index].source_file_name, size);
- ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[index].source_file_name);
+ (void)HDstrncpy(name, layout.storage.u.virt.list[idx].source_file_name, size);
+ ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[idx].source_file_name);
done:
FUNC_LEAVE_API(ret_value)
@@ -2578,7 +2578,7 @@ done:
*-------------------------------------------------------------------------
*/
ssize_t
-H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name/*out*/,
+H5Pget_virtual_dsetname(hid_t dcpl_id, size_t idx, char *name/*out*/,
size_t size)
{
H5P_genplist_t *plist; /* Property list pointer */
@@ -2586,7 +2586,7 @@ H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name/*out*/,
ssize_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE4("Zs", "izxz", dcpl_id, index, name, size);
+ H5TRACE4("Zs", "izxz", dcpl_id, idx, name, size);
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
@@ -2599,13 +2599,13 @@ H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name/*out*/,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout")
/* Get the virtual filename */
- if(index >= layout.storage.u.virt.list_nused)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)")
+ if(idx >= layout.storage.u.virt.list_nused)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid idx (out of range)")
HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
- HDassert(layout.storage.u.virt.list[index].source_dset_name);
+ HDassert(layout.storage.u.virt.list[idx].source_dset_name);
if(name && (size > 0))
- (void)HDstrncpy(name, layout.storage.u.virt.list[index].source_dset_name, size);
- ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[index].source_dset_name);
+ (void)HDstrncpy(name, layout.storage.u.virt.list[idx].source_dset_name, size);
+ ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[idx].source_dset_name);
done:
FUNC_LEAVE_API(ret_value)
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index 3668229..9a04c3e 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -1158,27 +1158,17 @@ H5P__file_driver_free(void *value)
/* Copy the driver & info, if there is one */
if(info->driver_id > 0) {
- if(info->driver_info) {
- H5FD_class_t *driver; /* Pointer to driver */
-
- /* Retrieve the driver for the ID */
- if(NULL == (driver = (H5FD_class_t *)H5I_object(info->driver_id)))
- HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a driver ID")
- /* Allow driver to free info or do it ourselves */
- if(driver->fapl_free) {
- if((driver->fapl_free)((void *)info->driver_info) < 0) /* Casting away const OK -QAK */
- HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "driver info free request failed")
- } /* end if */
- else
- H5MM_xfree((void *)info->driver_info); /* Casting away const OK -QAK */
- } /* end if */
+ /* Free the driver info, if it exists */
+ if(info->driver_info)
+ if(H5FD_free_driver_info(info->driver_id, info->driver_info) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "driver info free request failed")
/* Decrement reference count for driver */
if(H5I_dec_ref(info->driver_id) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTDEC, FAIL, "can't decrement reference count for driver ID")
- } /* end if */
- } /* end if */
+ }
+ }
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -5407,7 +5397,7 @@ H5P_set_vol(H5P_genplist_t *plist, hid_t vol_id, const void *vol_info)
/* Prepare the VOL connector property */
vol_prop.connector_id = vol_id;
- vol_prop.connector_info = (void *)vol_info;
+ vol_prop.connector_info = vol_info;
/* Set the connector ID & info property */
if(H5P_set(plist, H5F_ACS_VOL_CONN_NAME, &vol_prop) < 0)
diff --git a/src/H5TS.c b/src/H5TS.c
index 10e14d5..7a801e2 100644
--- a/src/H5TS.c
+++ b/src/H5TS.c
@@ -37,6 +37,31 @@ H5TS_key_t H5TS_funcstk_key_g;
H5TS_key_t H5TS_apictx_key_g;
H5TS_key_t H5TS_cancel_key_g;
+#ifndef H5_HAVE_WIN_THREADS
+
+/* An h5_tid_t is a record of a thread identifier that is
+ * available for reuse.
+ */
+struct _tid;
+typedef struct _tid h5_tid_t;
+
+struct _tid {
+ h5_tid_t *next;
+ uint64_t id;
+};
+
+/* Pointer to first free thread ID record or NULL. */
+static h5_tid_t *tid_next_free = NULL;
+static uint64_t tid_next_id = 0;
+
+/* Mutual exclusion for access to tid_next_free and tid_next_id. */
+static pthread_mutex_t tid_mtx;
+
+/* Key for thread-local storage of the thread ID. */
+static H5TS_key_t tid_key;
+
+#endif /* H5_HAVE_WIN_THREADS */
+
/*--------------------------------------------------------------------------
* NAME
@@ -68,6 +93,89 @@ H5TS_key_destructor(void *key_val)
#ifndef H5_HAVE_WIN_THREADS
+/* When a thread shuts down, put its ID record on the free list. */
+static void
+tid_destructor(void *_v)
+{
+ h5_tid_t *tid = _v;
+
+ if (tid == NULL)
+ return;
+
+ /* XXX I can use mutexes in destructors, right? */
+ /* TBD use an atomic CAS */
+ pthread_mutex_lock(&tid_mtx);
+ tid->next = tid_next_free;
+ tid_next_free = tid;
+ pthread_mutex_unlock(&tid_mtx);
+}
+
+/* Initialize for integer thread identifiers. */
+static void
+tid_init(void)
+{
+ pthread_mutex_init(&tid_mtx, NULL);
+ pthread_key_create(&tid_key, tid_destructor);
+}
+
+/* Return an integer identifier, ID, for the current thread satisfying the
+ * following properties:
+ *
+ * 1 1 <= ID <= UINT64_MAX
+ * 2 ID is constant over the thread's lifetime.
+ * 3 No two threads share an ID during their lifetimes.
+ * 4 A thread's ID is available for reuse as soon as it is joined.
+ *
+ * ID 0 is reserved. H5TS_thread_id() returns 0 if the library was not built
+ * with thread safety or if an error prevents it from assigning an ID.
+ */
+uint64_t
+H5TS_thread_id(void)
+{
+ h5_tid_t *tid = pthread_getspecific(tid_key);
+ h5_tid_t proto_tid;
+
+ /* An ID is already assigned. */
+ if (tid != NULL)
+ return tid->id;
+
+ /* An ID is *not* already assigned: reuse an ID that's on the
+ * free list, or else generate a new ID.
+ *
+ * Allocating memory while holding a mutex is bad form, so
+ * point `tid` at `proto_tid` if we need to allocate some
+ * memory.
+ */
+ pthread_mutex_lock(&tid_mtx);
+ if ((tid = tid_next_free) != NULL)
+ tid_next_free = tid->next;
+ else if (tid_next_id != UINT64_MAX) {
+ tid = &proto_tid;
+ tid->id = ++tid_next_id;
+ }
+ pthread_mutex_unlock(&tid_mtx);
+
+ /* If a prototype ID record was established, copy it to the heap. */
+ if (tid == &proto_tid) {
+ if ((tid = HDmalloc(sizeof(*tid))) != NULL)
+ *tid = proto_tid;
+ }
+
+ if (tid == NULL)
+ return 0;
+
+ /* Finish initializing the ID record and set a thread-local pointer
+ * to it.
+ */
+ tid->next = NULL;
+ if (pthread_setspecific(tid_key, tid) != 0) {
+ tid_destructor(tid);
+ return 0;
+ }
+
+ return tid->id;
+}
+
/*--------------------------------------------------------------------------
* NAME
* H5TS_pthread_first_thread_init
@@ -104,6 +212,9 @@ H5TS_pthread_first_thread_init(void)
pthread_cond_init(&H5_g.init_lock.cond_var, NULL);
H5_g.init_lock.lock_count = 0;
+ /* Initialize integer thread identifiers. */
+ tid_init();
+
/* initialize key for thread-specific error stacks */
pthread_key_create(&H5TS_errstk_key_g, H5TS_key_destructor);
@@ -528,5 +639,13 @@ H5TS_create_thread(void *(*func)(void *), H5TS_attr_t *attr, void *udata)
} /* H5TS_create_thread */
+#else /* H5_HAVE_THREADSAFE */
+
+uint64_t
+H5TS_thread_id(void)
+{
+ return 0;
+}
+
#endif /* H5_HAVE_THREADSAFE */
diff --git a/src/H5TSprivate.h b/src/H5TSprivate.h
index 9e093a6..887f001 100644
--- a/src/H5TSprivate.h
+++ b/src/H5TSprivate.h
@@ -26,6 +26,7 @@
#ifndef H5TSprivate_H_
#define H5TSprivate_H_
+#ifdef H5_HAVE_THREADSAFE
/* Public headers needed by this file */
#ifdef LATER
#include "H5TSpublic.h" /*Public API prototypes */
@@ -68,7 +69,7 @@ H5_DLL void H5TS_win32_process_exit(void);
H5_DLL herr_t H5TS_win32_thread_enter(void);
H5_DLL herr_t H5TS_win32_thread_exit(void);
-
+#define H5TS_thread_id() ((uint64_t)GetCurrentThreadId())
#else /* H5_HAVE_WIN_THREADS */
@@ -102,6 +103,7 @@ typedef pthread_once_t H5TS_once_t;
#define H5TS_mutex_init(mutex) pthread_mutex_init(mutex, NULL)
#define H5TS_mutex_lock_simple(mutex) pthread_mutex_lock(mutex)
#define H5TS_mutex_unlock_simple(mutex) pthread_mutex_unlock(mutex)
+H5_DLL uint64_t H5TS_thread_id(void);
#endif /* H5_HAVE_WIN_THREADS */
@@ -127,5 +129,11 @@ H5_DLL H5TS_thread_t H5TS_create_thread(void *(*func)(void *), H5TS_attr_t * att
}
#endif /* c_plusplus || __cplusplus */
+#else /* H5_HAVE_THREADSAFE */
+
+#define H5TS_thread_id() ((uint64_t)0)
+
+#endif /* H5_HAVE_THREADSAFE */
+
#endif /* H5TSprivate_H_ */
diff --git a/src/H5Tnative.c b/src/H5Tnative.c
index 178d1a0..357bb08 100644
--- a/src/H5Tnative.c
+++ b/src/H5Tnative.c
@@ -530,8 +530,7 @@ done:
* the code below, but early (4.4.7, at least) gcc only allows
* diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wduplicated-branches"
+H5_GCC_DIAG_OFF(duplicated-branches)
/*-------------------------------------------------------------------------
* Function: H5T__get_native_integer
@@ -672,7 +671,7 @@ H5T__get_native_integer(size_t prec, H5T_sign_t sign, H5T_direction_t direction,
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__get_native_integer() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(duplicated-branches)
/* Disable warning for intentional identical branches here -QAK */
/*
@@ -680,8 +679,7 @@ done:
* the code below, but early (4.4.7, at least) gcc only allows
* diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wduplicated-branches"
+H5_GCC_DIAG_OFF(duplicated-branches)
/*-------------------------------------------------------------------------
* Function: H5T__get_native_float
@@ -806,7 +804,7 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__get_native_float() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(duplicated-branches)
/* Disable warning for intentional identical branches here -QAK */
/*
@@ -814,8 +812,7 @@ done:
* the code below, but early (4.4.7, at least) gcc only allows
* diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wduplicated-branches"
+H5_GCC_DIAG_OFF(duplicated-branches)
/*-------------------------------------------------------------------------
* Function: H5T__get_native_bitfield
@@ -901,7 +898,7 @@ H5T__get_native_bitfield(size_t prec, H5T_direction_t direction,
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__get_native_bitfield() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(duplicated-branches)
/*-------------------------------------------------------------------------
diff --git a/src/H5VL.c b/src/H5VL.c
index 0e36bcd..18fd3d6 100644
--- a/src/H5VL.c
+++ b/src/H5VL.c
@@ -216,9 +216,10 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5VLis_connector_registered
+ * Function: H5VLis_connector_registered_by_name
*
* Purpose: Tests whether a VOL class has been registered or not
+ * according to a supplied connector name.
*
* Return: >0 if a VOL connector with that name has been registered
* 0 if a VOL connector with that name has NOT been registered
@@ -230,7 +231,7 @@ done:
*-------------------------------------------------------------------------
*/
htri_t
-H5VLis_connector_registered(const char *name)
+H5VLis_connector_registered_by_name(const char *name)
{
htri_t ret_value = FALSE; /* Return value */
@@ -238,12 +239,41 @@ H5VLis_connector_registered(const char *name)
H5TRACE1("t", "*s", name);
/* Check if connector with this name is registered */
- if((ret_value = H5VL__is_connector_registered(name)) < 0)
+ if((ret_value = H5VL__is_connector_registered_by_name(name)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't check for VOL")
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5VLis_connector_registered() */
+} /* end H5VLis_connector_registered_by_name() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5VLis_connector_registered_by_value
+ *
+ * Purpose: Tests whether a VOL class has been registered or not
+ * according to a supplied connector value (ID).
+ *
+ * Return: >0 if a VOL connector with that value has been registered
+ * 0 if a VOL connector with that value hasn't been registered
+ * <0 on errors
+ *
+ *-------------------------------------------------------------------------
+ */
+htri_t
+H5VLis_connector_registered_by_value(H5VL_class_value_t connector_value)
+{
+ htri_t ret_value = FALSE;
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE1("t", "VC", connector_value);
+
+ /* Check if connector with this value is registered */
+ if((ret_value = H5VL__is_connector_registered_by_value(connector_value)) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't check for VOL")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5VLis_connector_registered_by_value() */
/*-------------------------------------------------------------------------
@@ -313,7 +343,38 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5VLpeek_connector_id
+ * Function: H5VLget_connector_id_by_value
+ *
+ * Purpose: Retrieves the ID for a registered VOL connector.
+ *
+ * Return: A valid VOL connector ID if a connector with that value has
+ * been registered. This ID will need to be closed using
+ * H5VLclose().
+ *
+ * H5I_INVALID_HID on error or if a VOL connector with that
+ * value has not been registered.
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5VLget_connector_id_by_value(H5VL_class_value_t connector_value)
+{
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
+
+ FUNC_ENTER_API(H5I_INVALID_HID)
+ H5TRACE1("i", "VC", connector_value);
+
+ /* Get connector ID with this value */
+ if((ret_value = H5VL__get_connector_id_by_value(connector_value, TRUE)) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL id")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5VLget_connector_id_by_value() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5VLpeek_connector_id_by_name
*
* Purpose: Retrieves the ID for a registered VOL connector.
*
@@ -328,7 +389,7 @@ done:
*-------------------------------------------------------------------------
*/
hid_t
-H5VLpeek_connector_id(const char *name)
+H5VLpeek_connector_id_by_name(const char *name)
{
hid_t ret_value = H5I_INVALID_HID; /* Return value */
@@ -336,12 +397,44 @@ H5VLpeek_connector_id(const char *name)
H5TRACE1("i", "*s", name);
/* Get connector ID with this name */
- if((ret_value = H5VL__peek_connector_id(name)) < 0)
+ if((ret_value = H5VL__peek_connector_id_by_name(name)) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL id")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5VLpeek_connector_id_by_name() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5VLpeek_connector_id_by_value
+ *
+ * Purpose: Retrieves the ID for a registered VOL connector.
+ *
+ * Return: A valid VOL connector ID if a connector with that value
+ * has been registered. This ID is *not* owned by the caller
+ * and H5VLclose() should not be called. Intended for use by
+ * VOL connectors to find their own ID.
+ *
+ * H5I_INVALID_HID on error or if a VOL connector with that
+ * value has not been registered.
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5VLpeek_connector_id_by_value(H5VL_class_value_t value)
+{
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
+
+ FUNC_ENTER_API(H5I_INVALID_HID)
+ H5TRACE1("i", "VC", value);
+
+ /* Get connector ID with this value */
+ if((ret_value = H5VL__peek_connector_id_by_value(value)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL id")
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5VLpeek_connector_id() */
+} /* end H5VLpeek_connector_id_by_value() */
/*-------------------------------------------------------------------------
diff --git a/src/H5VLcallback.c b/src/H5VLcallback.c
index e4ebb95..5c54b5b 100644
--- a/src/H5VLcallback.c
+++ b/src/H5VLcallback.c
@@ -525,7 +525,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5VL_free_connector_info(hid_t connector_id, void *info)
+H5VL_free_connector_info(hid_t connector_id, const void *info)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
@@ -543,12 +543,13 @@ H5VL_free_connector_info(hid_t connector_id, void *info)
if(info) {
/* Allow the connector to free info or do it ourselves */
if(cls->info_cls.free) {
- if((cls->info_cls.free)(info) < 0)
+ /* Cast through uintptr_t to de-const memory */
+ if((cls->info_cls.free)((void *)(uintptr_t)info) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "connector info free request failed")
- } /* end if */
+ }
else
- H5MM_xfree(info);
- } /* end if */
+ H5MM_xfree_const(info);
+ }
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5VLconnector.h b/src/H5VLconnector.h
index 9bc3a7b..baa4cca 100644
--- a/src/H5VLconnector.h
+++ b/src/H5VLconnector.h
@@ -512,7 +512,8 @@ H5_DLL hid_t H5VLregister_connector(const H5VL_class_t *cls, hid_t vipl_id);
H5_DLL void *H5VLobject(hid_t obj_id);
H5_DLL hid_t H5VLget_file_type(void *file_obj, hid_t connector_id,
hid_t dtype_id);
-H5_DLL hid_t H5VLpeek_connector_id(const char *name);
+H5_DLL hid_t H5VLpeek_connector_id_by_name(const char *name);
+H5_DLL hid_t H5VLpeek_connector_id_by_value(H5VL_class_value_t value);
#ifdef __cplusplus
}
diff --git a/src/H5VLint.c b/src/H5VLint.c
index 9038d38..6572faa 100644
--- a/src/H5VLint.c
+++ b/src/H5VLint.c
@@ -318,7 +318,7 @@ H5VL__free_cls(H5VL_class_t *cls)
HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "VOL connector did not terminate cleanly")
/* Release the class */
- H5MM_xfree((void *)cls->name); /* Casting away const OK -QAK */
+ H5MM_xfree_const(cls->name);
H5FL_FREE(H5VL_class_t, cls);
done:
@@ -421,7 +421,7 @@ H5VL__set_def_conn(void)
HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "VOL connector environment variable set empty?")
/* First, check to see if the connector is already registered */
- if((connector_is_registered = H5VL__is_connector_registered(tok)) < 0)
+ if((connector_is_registered = H5VL__is_connector_registered_by_name(tok)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't check if VOL connector already registered")
else if(connector_is_registered) {
/* Retrieve the ID of the already-registered VOL connector */
@@ -682,14 +682,14 @@ H5VL_conn_free(const H5VL_connector_prop_t *connector_prop)
if(connector_prop->connector_id > 0) {
if(connector_prop->connector_info)
/* Free the connector info */
- if(H5VL_free_connector_info(connector_prop->connector_id, (void *)connector_prop->connector_info) < 0) /* Casting away const OK - QAK */
+ if(H5VL_free_connector_info(connector_prop->connector_id, connector_prop->connector_info) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "unable to release VOL connector info object")
/* Decrement reference count for connector ID */
if(H5I_dec_ref(connector_prop->connector_id) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "can't decrement reference count for connector ID")
- } /* end if */
- } /* end if */
+ }
+ }
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1144,7 +1144,7 @@ H5VL_register_connector(const void *_cls, hbool_t app_ref, hid_t vipl_id)
done:
if(ret_value < 0 && saved) {
if(saved->name)
- H5MM_xfree((void *)(saved->name)); /* Casting away const OK -QAK */
+ H5MM_xfree_const(saved->name);
H5FL_FREE(H5VL_class_t, saved);
} /* end if */
@@ -1325,7 +1325,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5VL__is_connector_registered
+ * Function: H5VL__is_connector_registered_by_name
*
* Purpose: Checks if a connector with a particular name is registered.
*
@@ -1338,7 +1338,7 @@ done:
*-------------------------------------------------------------------------
*/
htri_t
-H5VL__is_connector_registered(const char *name)
+H5VL__is_connector_registered_by_name(const char *name)
{
H5VL_get_connector_ud_t op_data; /* Callback info for connector search */
htri_t ret_value = FALSE; /* Return value */
@@ -1360,7 +1360,44 @@ H5VL__is_connector_registered(const char *name)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5VL__is_connector_registered() */
+} /* end H5VL__is_connector_registered_by_name() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5VL__is_connector_registered_by_value
+ *
+ * Purpose: Checks if a connector with a particular value (ID) is
+ * registered.
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ *-------------------------------------------------------------------------
+ */
+htri_t
+H5VL__is_connector_registered_by_value(H5VL_class_value_t value)
+{
+ H5VL_get_connector_ud_t op_data; /* Callback info for connector search */
+ htri_t ret_value = FALSE; /* Return value */
+
+ FUNC_ENTER_PACKAGE
+
+ /* Set up op data for iteration */
+ op_data.kind = H5VL_GET_CONNECTOR_BY_VALUE;
+ op_data.u.value = value;
+ op_data.found_id = H5I_INVALID_HID;
+
+ /* Find connector with value */
+ if(H5I_iterate(H5I_VOL, H5VL__get_connector_cb, &op_data, TRUE) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_BADITER, FAIL, "can't iterate over VOL connectors")
+
+ /* Found a connector with that name */
+ if(op_data.found_id != H5I_INVALID_HID)
+ ret_value = TRUE;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5VL__is_connector_registered_by_value() */
/*-------------------------------------------------------------------------
@@ -1419,7 +1456,7 @@ H5VL__get_connector_id_by_name(const char *name, hbool_t is_api)
FUNC_ENTER_PACKAGE
/* Find connector with name */
- if((ret_value = H5VL__peek_connector_id(name)) < 0)
+ if((ret_value = H5VL__peek_connector_id_by_name(name)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_BADITER, H5I_INVALID_HID, "can't find VOL connector")
/* Found a connector with that name */
@@ -1432,18 +1469,50 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5VL__peek_connector_id
+ * Function: H5VL__get_connector_id_by_value
+ *
+ * Purpose: Retrieves the ID for a registered VOL connector.
+ *
+ * Return: Positive if the VOL class has been registered
+ * Negative on error (if the class is not a valid class or
+ * not registered)
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5VL__get_connector_id_by_value(H5VL_class_value_t value, hbool_t is_api)
+{
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
+
+ FUNC_ENTER_PACKAGE
+
+ /* Find connector with value */
+ if((ret_value = H5VL__peek_connector_id_by_value(value)) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_BADITER, H5I_INVALID_HID, "can't find VOL connector")
+
+ /* Found a connector with that value */
+ if(H5I_inc_ref(ret_value, is_api) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VOL connector")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5VL__get_connector_id_by_value() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5VL__peek_connector_id_by_name
*
* Purpose: Retrieves the ID for a registered VOL connector. Does not
* increment the ref count
*
* Return: Positive if the VOL class has been registered
- * Negative on error (if the class is not a valid class or not registered)
+ * Negative on error (if the class is not a valid class or
+ * not registered)
*
*-------------------------------------------------------------------------
*/
hid_t
-H5VL__peek_connector_id(const char *name)
+H5VL__peek_connector_id_by_name(const char *name)
{
H5VL_get_connector_ud_t op_data; /* Callback info for connector search */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
@@ -1464,7 +1533,44 @@ H5VL__peek_connector_id(const char *name)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5VL__peek_connector_id() */
+} /* end H5VL__peek_connector_id_by_name() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5VL__peek_connector_id_by_value
+ *
+ * Purpose: Retrieves the ID for a registered VOL connector. Does not
+ * increment the ref count
+ *
+ * Return: Positive if the VOL class has been registered
+ * Negative on error (if the class is not a valid class or
+ * not registered)
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5VL__peek_connector_id_by_value(H5VL_class_value_t value)
+{
+ H5VL_get_connector_ud_t op_data; /* Callback info for connector search */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
+
+ FUNC_ENTER_PACKAGE
+
+ /* Set up op data for iteration */
+ op_data.kind = H5VL_GET_CONNECTOR_BY_VALUE;
+ op_data.u.value = value;
+ op_data.found_id = H5I_INVALID_HID;
+
+ /* Find connector with value */
+ if(H5I_iterate(H5I_VOL, H5VL__get_connector_cb, &op_data, TRUE) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_BADITER, H5I_INVALID_HID, "can't iterate over VOL connectors")
+
+ /* Set return value */
+ ret_value = op_data.found_id;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5VL__peek_connector_id_by_value() */
/*-------------------------------------------------------------------------
diff --git a/src/H5VLnative_file.c b/src/H5VLnative_file.c
index 23ea37b..1f213dd 100644
--- a/src/H5VLnative_file.c
+++ b/src/H5VLnative_file.c
@@ -207,12 +207,12 @@ H5VL__native_file_get(void *obj, H5VL_file_get_t get_type,
/* H5Fget_fileno */
case H5VL_FILE_GET_FILENO:
{
- unsigned long *fileno = HDva_arg(arguments, unsigned long *);
+ unsigned long *fno = HDva_arg(arguments, unsigned long *);
unsigned long my_fileno = 0;
f = (H5F_t *)obj;
H5F_GET_FILENO(f, my_fileno);
- *fileno = my_fileno; /* sigh */
+ *fno = my_fileno; /* sigh */
break;
}
diff --git a/src/H5VLpassthru.c b/src/H5VLpassthru.c
index 5c9f28c..8b3dc62 100644
--- a/src/H5VLpassthru.c
+++ b/src/H5VLpassthru.c
@@ -2788,22 +2788,24 @@ H5VL_pass_through_request_specific(void *obj, H5VL_request_specific_t specific_t
/* Release requests that have completed */
if(H5VL_REQUEST_WAITANY == specific_type) {
- size_t *index; /* Pointer to the index of completed request */
+ size_t *idx; /* Pointer to the index of completed request */
H5ES_status_t *status; /* Pointer to the request's status */
/* Retrieve the remaining arguments */
- index = va_arg(tmp_arguments, size_t *);
- assert(*index <= req_count);
+ idx = va_arg(tmp_arguments, size_t *);
+ assert(*idx <= req_count);
status = va_arg(tmp_arguments, H5ES_status_t *);
/* Reissue the WAITANY 'request specific' call */
- ret_value = H5VL_pass_through_request_specific_reissue(o->under_object, o->under_vol_id, specific_type, req_count, under_req_array, timeout, index, status);
+ ret_value = H5VL_pass_through_request_specific_reissue(o->under_object, o->under_vol_id, specific_type, req_count, under_req_array, timeout,
+ idx,
+ status);
/* Release the completed request, if it completed */
if(ret_value >= 0 && *status != H5ES_STATUS_IN_PROGRESS) {
H5VL_pass_through_t *tmp_o;
- tmp_o = (H5VL_pass_through_t *)req_array[*index];
+ tmp_o = (H5VL_pass_through_t *)req_array[*idx];
H5VL_pass_through_free_obj(tmp_o);
} /* end if */
} /* end if */
diff --git a/src/H5VLpkg.h b/src/H5VLpkg.h
index 5965adc..4174732 100644
--- a/src/H5VLpkg.h
+++ b/src/H5VLpkg.h
@@ -53,10 +53,13 @@ H5_DLL hid_t H5VL__register_connector_by_name(const char *name, hbool_t app_ref,
hid_t vipl_id);
H5_DLL hid_t H5VL__register_connector_by_value(H5VL_class_value_t value,
hbool_t app_ref, hid_t vipl_id);
-H5_DLL htri_t H5VL__is_connector_registered(const char *name);
+H5_DLL htri_t H5VL__is_connector_registered_by_name(const char *name);
+H5_DLL htri_t H5VL__is_connector_registered_by_value(H5VL_class_value_t value);
H5_DLL hid_t H5VL__get_connector_id(hid_t obj_id, hbool_t is_api);
H5_DLL hid_t H5VL__get_connector_id_by_name(const char *name, hbool_t is_api);
-H5_DLL hid_t H5VL__peek_connector_id(const char *name);
+H5_DLL hid_t H5VL__get_connector_id_by_value(H5VL_class_value_t value, hbool_t is_api);
+H5_DLL hid_t H5VL__peek_connector_id_by_name(const char *name);
+H5_DLL hid_t H5VL__peek_connector_id_by_value(H5VL_class_value_t value);
H5_DLL herr_t H5VL__connector_str_to_info(const char *str, hid_t connector_id,
void **info);
H5_DLL ssize_t H5VL__get_connector_name(hid_t id, char *name/*out*/, size_t size);
diff --git a/src/H5VLprivate.h b/src/H5VLprivate.h
index 24ae1f3..3235357 100644
--- a/src/H5VLprivate.h
+++ b/src/H5VLprivate.h
@@ -44,7 +44,7 @@ typedef struct H5VL_object_t {
/* Internal structure to hold the connector ID & info for FAPLs */
typedef struct H5VL_connector_prop_t {
hid_t connector_id; /* VOL connector's ID */
- void *connector_info; /* VOL connector info, for open callbacks */
+ const void *connector_info; /* VOL connector info, for open callbacks */
} H5VL_connector_prop_t;
/* Which kind of VOL connector field to use for searching */
@@ -128,7 +128,7 @@ H5_DLL int H5VL_copy_connector_info(const H5VL_class_t *connector, void **dst_in
const void *src_info);
H5_DLL herr_t H5VL_cmp_connector_info(const H5VL_class_t *connector, int *cmp_value,
const void *info1, const void *info2);
-H5_DLL herr_t H5VL_free_connector_info(hid_t connector_id, void *info);
+H5_DLL herr_t H5VL_free_connector_info(hid_t connector_id, const void *info);
/* Attribute functions */
H5_DLL void *H5VL_attr_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req);
diff --git a/src/H5VLpublic.h b/src/H5VLpublic.h
index 883aac8..006c3ea 100644
--- a/src/H5VLpublic.h
+++ b/src/H5VLpublic.h
@@ -42,7 +42,7 @@
/*
* VOL connector identifiers. Values 0 through 255 are for connectors defined
* by the HDF5 library. Values 256 through 511 are available for testing new
- * filters. Subsequent values should be obtained from the HDF5 development
+ * connectors. Subsequent values should be obtained from the HDF5 development
* team at help@hdfgroup.org.
*/
typedef int H5VL_class_value_t;
@@ -60,14 +60,13 @@ typedef int H5VL_class_value_t;
extern "C" {
#endif
-/* The H5VL types uses in the API calls are not opaque - they are defined in
- * H5VLconnector.h, which is included at the top of this file.
- */
H5_DLL hid_t H5VLregister_connector_by_name(const char *connector_name, hid_t vipl_id);
H5_DLL hid_t H5VLregister_connector_by_value(H5VL_class_value_t connector_value, hid_t vipl_id);
-H5_DLL htri_t H5VLis_connector_registered(const char *name);
+H5_DLL htri_t H5VLis_connector_registered_by_name(const char *name);
+H5_DLL htri_t H5VLis_connector_registered_by_value(H5VL_class_value_t connector_value);
H5_DLL hid_t H5VLget_connector_id(hid_t obj_id);
H5_DLL hid_t H5VLget_connector_id_by_name(const char *name);
+H5_DLL hid_t H5VLget_connector_id_by_value(H5VL_class_value_t connector_value);
H5_DLL ssize_t H5VLget_connector_name(hid_t id, char *name/*out*/, size_t size);
H5_DLL herr_t H5VLclose(hid_t connector_id);
H5_DLL herr_t H5VLunregister_connector(hid_t connector_id);
diff --git a/src/H5Z.c b/src/H5Z.c
index b703958..53186f1 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -215,8 +215,10 @@ herr_t
H5Zregister(const void *cls)
{
const H5Z_class2_t *cls_real = (const H5Z_class2_t *) cls; /* "Real" class pointer */
- H5Z_class2_t cls_new; /* Translated class struct */
herr_t ret_value = SUCCEED; /* Return value */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+ H5Z_class2_t cls_new; /* Translated class struct */
+#endif
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "*x", cls);
diff --git a/src/H5detect.c b/src/H5detect.c
index d01ee9f..655b05c 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -49,7 +49,7 @@ static const char *FileHeader = "\n\
/* Disable warning about cast increasing the alignment of the target type,
* that's _exactly_ what this code is probing. -QAK
*/
-#pragma GCC diagnostic ignored "-Wcast-align"
+H5_GCC_DIAG_OFF(cast-align)
#if defined(__has_attribute)
# if __has_attribute(no_sanitize_address)
@@ -1707,3 +1707,4 @@ main(int argc, char *argv[])
return EXIT_SUCCESS;
}
+H5_GCC_DIAG_ON(cast-align)
diff --git a/src/H5private.h b/src/H5private.h
index 41cef16..f0f3687 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1549,11 +1549,6 @@ extern char *strdup(const char *s);
#define HDpthread_self() pthread_self()
#endif /* HDpthread_self */
-/* Use this version of pthread_self for printing the thread ID */
-#ifndef HDpthread_self_ulong
- #define HDpthread_self_ulong() ((unsigned long)pthread_self())
-#endif /* HDpthread_self_ulong */
-
/* Macro for "stringizing" an integer in the C preprocessor (use H5_TOSTRING) */
/* (use H5_TOSTRING, H5_STRINGIZE is just part of the implementation) */
#define H5_STRINGIZE(x) #x
diff --git a/src/H5system.c b/src/H5system.c
index 9310243..dd1f10d 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -107,8 +107,7 @@ static hbool_t H5_ntzset = FALSE;
* format_templ in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+H5_GCC_DIAG_OFF(format-nonliteral)
int
HDfprintf(FILE *stream, const char *fmt, ...)
{
@@ -460,7 +459,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
HDva_end(ap);
return nout;
} /* end HDfprintf() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(format-nonliteral)
/*-------------------------------------------------------------------------
diff --git a/src/H5win32defs.h b/src/H5win32defs.h
index 29533dd..00df56d 100644
--- a/src/H5win32defs.h
+++ b/src/H5win32defs.h
@@ -40,6 +40,12 @@ typedef __int64 h5_stat_size_t;
#define HDfileno(F) _fileno(F)
#define HDfstat(F,B) _fstati64(F,B)
#define HDisatty(F) _isatty(F)
+
+/* The isnan function needs underscore in VS2012 and earlier */
+#if (_MSC_VER <= 1700)
+ #define HDisnan(X) _isnan(X)
+#endif /* MSC_VER < 1700 */
+
#define HDgetcwd(S,Z) _getcwd(S,Z)
#define HDgetdcwd(D,S,Z) _getdcwd(D,S,Z)
#define HDgetdrive() _getdrive()
@@ -157,10 +163,6 @@ extern "C" {
/* Non-POSIX functions */
-/* Don't use actual pthread_self on Windows because the return
- * type cannot be cast as a ulong like other systems. */
-#define HDpthread_self_ulong() ((unsigned long)GetCurrentThreadId())
-
#ifndef H5_HAVE_MINGW
#define HDftruncate(F,L) _chsize_s(F,L)
#define HDfseek(F,O,W) _fseeki64(F,O,W)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 77f9191..a2fb31d 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -287,6 +287,7 @@ set (H5_TESTS
cache_logging
cork
swmr
+ thread_id
vol
)
diff --git a/test/H5srcdir.h b/test/H5srcdir.h
index 32fe8c9..b02d432 100644
--- a/test/H5srcdir.h
+++ b/test/H5srcdir.h
@@ -21,50 +21,19 @@
#define _H5SRCDIR_H
/* Include the header file with the correct relative path for the srcdir string */
-#include "H5srcdir_str.h"
-
-/* Buffer to construct path in and return pointer to */
-static char srcdir_path[1024] = "";
-
-/* Buffer to construct file in and return pointer to */
-static char srcdir_testpath[1024] = "";
+#ifdef __cplusplus
+extern "C" {
+#endif
/* Just return the srcdir path */
-static const char *
-H5_get_srcdir(void)
-{
- const char *srcdir = HDgetenv("srcdir");
-
- /* Check for using the srcdir from configure time */
- if(NULL == srcdir)
- srcdir = config_srcdir;
-
- /* Build path to all test files */
- if((HDstrlen(srcdir) + 2) < sizeof(srcdir_path)) {
- HDsnprintf(srcdir_path, sizeof(srcdir_path), "%s/", srcdir);
- return(srcdir_path);
- } /* end if */
- else
- return(NULL);
-} /* end H5_get_srcdir() */
+H5TEST_DLL const char *H5_get_srcdir(void);
/* Append the test file name to the srcdir path and return the whole string */
-static const char *H5_get_srcdir_filename(const char *filename)
-{
- const char *srcdir = H5_get_srcdir();
+H5TEST_DLL const char *H5_get_srcdir_filename(const char *filename);
+
+#ifdef __cplusplus
+}
+#endif
- /* Check for error */
- if(NULL == srcdir)
- return(NULL);
- else {
- /* Build path to test file */
- if((HDstrlen(srcdir) + HDstrlen(filename) + 1) < sizeof(srcdir_testpath)) {
- HDsnprintf(srcdir_testpath, sizeof(srcdir_testpath), "%s%s", srcdir, filename);
- return(srcdir_testpath);
- } /* end if */
- else
- return(NULL);
- } /* end else */
-} /* end H5_get_srcdir_filename() */
#endif /* _H5SRCDIR_H */
diff --git a/test/Makefile.am b/test/Makefile.am
index 57080aa..dd0a579 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -63,7 +63,7 @@ TEST_PROG= testhdf5 \
flush1 flush2 app_ref enum set_extent ttsafe enc_dec_plist \
enc_dec_plist_cross_platform getname vfd ros3 s3comms hdfs ntypes \
dangle dtransform reserved cross_read freespace mf vds file_image \
- unregister cache_logging cork swmr vol
+ unregister cache_logging cork swmr thread_id vol
# List programs to be built when testing here.
# error_test and err_compat are built at the same time as the other tests, but executed by testerror.sh.
diff --git a/test/big.c b/test/big.c
index 46acc5e..481da58 100644
--- a/test/big.c
+++ b/test/big.c
@@ -281,8 +281,7 @@ error:
* 'name' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+H5_GCC_DIAG_OFF(format-nonliteral)
static int
enough_room(hid_t fapl)
{
@@ -323,7 +322,7 @@ done:
return ret_value;
}
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(format-nonliteral)
/*-------------------------------------------------------------------------
diff --git a/test/cache_common.h b/test/cache_common.h
index 969cc2a..785dc21 100644
--- a/test/cache_common.h
+++ b/test/cache_common.h
@@ -25,6 +25,7 @@
/* Include library header files */
#include "H5ACprivate.h"
+#include "H5MFprivate.h"
#include "H5Cpkg.h"
#include "H5Fpkg.h"
#include "H5Iprivate.h"
diff --git a/test/dsets.c b/test/dsets.c
index 9926f10..2201d89 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -2331,9 +2331,9 @@ H5_ATTR_UNUSED
hsize_t shuffle_size; /* Size of dataset with shuffle filter */
-#if(defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_SZIP)
+#if defined(H5_HAVE_FILTER_DEFLATE) || defined(H5_HAVE_FILTER_SZIP)
hsize_t combo_size; /* Size of dataset with multiple filters */
-#endif /* defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_SZIP */
+#endif /* defined(H5_HAVE_FILTER_DEFLATE) || defined(H5_HAVE_FILTER_SZIP) */
/* test the H5Zget_filter_info function */
if(test_get_filter_info() < 0) goto error;
diff --git a/test/dt_arith.c b/test/dt_arith.c
index 7e1adf5..8d04770 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -770,7 +770,7 @@ static int test_particular_fp_integer(void)
/* Print errors */
if(dst_c != SCHAR_MAX) {
- double x;
+ double x = 0.;
signed char y;
if(0 == fails_this_test++)
@@ -814,7 +814,7 @@ static int test_particular_fp_integer(void)
/* Print errors */
if(dst_i != fill_value) {
- float x;
+ float x = 0.;
int y;
if(0 == fails_this_test++)
@@ -2723,16 +2723,16 @@ my_isnan(dtype_t type, void *val)
char s[256];
if (FLT_FLOAT==type) {
- float x;
+ float x = 0.;
HDmemcpy(&x, val, sizeof(float));
retval = (x!=x);
} else if (FLT_DOUBLE==type) {
- double x;
+ double x = 0.;
HDmemcpy(&x, val, sizeof(double));
retval = (x!=x);
#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
} else if (FLT_LDOUBLE==type) {
- long double x;
+ long double x = 0.;
HDmemcpy(&x, val, sizeof(long double));
retval = (x!=x);
#endif
@@ -2746,18 +2746,18 @@ my_isnan(dtype_t type, void *val)
*/
if (!retval) {
if (FLT_FLOAT==type) {
- float x;
+ float x = 0.;
HDmemcpy(&x, val, sizeof(float));
HDsnprintf(s, sizeof(s), "%g", (double)x);
} else if (FLT_DOUBLE==type) {
- double x;
+ double x = 0.;
HDmemcpy(&x, val, sizeof(double));
HDsnprintf(s, sizeof(s), "%g", x);
#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
} else if (FLT_LDOUBLE==type) {
- long double x;
+ long double x = 0.;
HDmemcpy(&x, val, sizeof(long double));
HDsnprintf(s, sizeof(s), "%Lg", x);
@@ -3197,7 +3197,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
int check_expo[2];
if (FLT_FLOAT==dst_type) {
- float x;
+ float x = 0.;
HDmemcpy(&x, &buf[j*dst_size], sizeof(float));
if (underflow &&
HDfabsf(x) <= FLT_MIN && HDfabsf(hw_f) <= FLT_MIN)
@@ -3208,7 +3208,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
check_mant[0] = HDfrexpf(x, check_expo+0);
check_mant[1] = HDfrexpf(hw_f, check_expo+1);
} else if (FLT_DOUBLE==dst_type) {
- double x;
+ double x = 0.;
HDmemcpy(&x, &buf[j*dst_size], sizeof(double));
if (underflow &&
HDfabs(x) <= DBL_MIN && HDfabs(hw_d) <= DBL_MIN)
@@ -3220,7 +3220,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
check_mant[1] = HDfrexp(hw_d, check_expo+1);
#if H5_SIZEOF_LONG_DOUBLE !=0 && (H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE)
} else {
- long double x;
+ long double x = 0.;
HDmemcpy(&x, &buf[j*dst_size], sizeof(long double));
/* dst is largest float, no need to check underflow. */
check_mant[0] = (double)HDfrexpl(x, check_expo+0);
@@ -3265,16 +3265,16 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
HDprintf(" %02x", saved[j*src_size+ENDIAN(src_size,k,sendian)]);
HDprintf("%*s", (int)(3*MAX(0, (ssize_t)dst_size-(ssize_t)src_size)), "");
if (FLT_FLOAT==src_type) {
- float x;
+ float x = 0.;
HDmemcpy(&x, &saved[j*src_size], sizeof(float));
HDprintf(" %29.20e\n", (double)x);
} else if (FLT_DOUBLE==src_type) {
- double x;
+ double x = 0.;
HDmemcpy(&x, &saved[j*src_size], sizeof(double));
HDprintf(" %29.20e\n", x);
#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
} else {
- long double x;
+ long double x = 0.;
HDmemcpy(&x, &saved[j*src_size], sizeof(long double));
HDfprintf(stdout," %29.20Le\n", x);
#endif
@@ -3285,16 +3285,16 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
HDprintf(" %02x", buf[j*dst_size+ENDIAN(dst_size,k,dendian)]);
HDprintf("%*s", (int)(3*MAX(0, (ssize_t)src_size-(ssize_t)dst_size)), "");
if (FLT_FLOAT==dst_type) {
- float x;
+ float x = 0.;
HDmemcpy(&x, &buf[j*dst_size], sizeof(float));
HDprintf(" %29.20e\n", (double)x);
} else if (FLT_DOUBLE==dst_type) {
- double x;
+ double x = 0.;
HDmemcpy(&x, &buf[j*dst_size], sizeof(double));
HDprintf(" %29.20e\n", x);
#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
} else {
- long double x;
+ long double x = 0.;
HDmemcpy(&x, &buf[j*dst_size], sizeof(long double));
HDfprintf(stdout," %29.20Le\n", x);
#endif
diff --git a/test/error_test.c b/test/error_test.c
index e99a82f..7c6cf9f 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -329,8 +329,7 @@ long_desc_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *clie
* 'full_desc' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+H5_GCC_DIAG_OFF(format-nonliteral)
static herr_t
test_long_desc(void)
{
@@ -385,7 +384,7 @@ error:
return -1;
} /* end test_long_desc() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(format-nonliteral)
/*-------------------------------------------------------------------------
diff --git a/test/fheap.c b/test/fheap.c
index b8c54d6..7772ff7 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -545,8 +545,7 @@ get_fill_size(const fheap_test_param_t *tparam)
* test_desc in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+H5_GCC_DIAG_OFF(format-nonliteral)
static int
begin_test(fheap_test_param_t *tparam, const char *base_desc,
fheap_heap_ids_t *keep_ids, size_t *fill_size)
@@ -575,7 +574,7 @@ begin_test(fheap_test_param_t *tparam, const char *base_desc,
/* Success */
return(0);
} /* end begin_test() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(format-nonliteral)
/*-------------------------------------------------------------------------
diff --git a/test/file_image.c b/test/file_image.c
index ddbec80..dfb3ae8 100644
--- a/test/file_image.c
+++ b/test/file_image.c
@@ -678,8 +678,7 @@ error:
* 'member_file_name' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+H5_GCC_DIAG_OFF(format-nonliteral)
static int
test_get_file_image(const char * test_banner,
const int file_name_num,
@@ -946,7 +945,7 @@ test_get_file_image(const char * test_banner,
error:
return 1;
} /* end test_get_file_image() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(format-nonliteral)
/******************************************************************************
diff --git a/test/fillval.c b/test/fillval.c
index b3e2e88..019744a 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -762,6 +762,11 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
comp_datatype *buf_c=NULL;
H5D_space_status_t allocation;
+ fill_c.a = 0;
+ fill_c.x = 0;
+ fill_c.y = 0;
+ fill_c.z = 0;
+
if(datatype == H5T_INTEGER) {
fillval = *(int*)_fillval;
}
diff --git a/test/h5test.c b/test/h5test.c
index ab859a5..03731c6 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -23,6 +23,7 @@
#include "h5test.h"
#include "H5srcdir.h"
+#include "H5srcdir_str.h"
/* Necessary for h5_verify_cached_stabs() */
#define H5G_FRIEND /*suppress error about including H5Gpkg */
@@ -100,6 +101,12 @@ static const char *multi_letters = "msbrglo";
/* The # of seconds to wait for the message file--used by h5_wait_message() */
#define MESSAGE_TIMEOUT 300 /* Timeout in seconds */
+/* Buffer to construct path in and return pointer to */
+static char srcdir_path[1024] = "";
+
+/* Buffer to construct file in and return pointer to */
+static char srcdir_testpath[1024] = "";
+
/* The strings that correspond to library version bounds H5F_libver_t in H5Fpublic.h */
/* This is used by h5_get_version_string() */
const char *LIBVER_NAMES[] = {
@@ -196,8 +203,7 @@ h5_clean_files(const char *base_name[], hid_t fapl)
* sub_filename in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+H5_GCC_DIAG_OFF(format-nonliteral)
void
h5_delete_test_file(const char *base_name, hid_t fapl)
{
@@ -247,7 +253,7 @@ h5_delete_test_file(const char *base_name, hid_t fapl)
return;
} /* end h5_delete_test_file() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(format-nonliteral)
/*-------------------------------------------------------------------------
@@ -1166,10 +1172,8 @@ h5_show_hostname(void)
else
HDprintf("thread 0.");
}
-#elif defined(H5_HAVE_THREADSAFE)
- HDprintf("thread %lu.", HDpthread_self_ulong());
#else
- HDprintf("thread 0.");
+ HDprintf("thread %" PRIu64 ".", H5TS_thread_id());
#endif
#ifdef H5_HAVE_WIN32_API
@@ -1358,8 +1362,7 @@ h5_dump_info_object(MPI_Info info)
* temp in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+H5_GCC_DIAG_OFF(format-nonliteral)
h5_stat_size_t
h5_get_file_size(const char *filename, hid_t fapl)
{
@@ -1461,7 +1464,7 @@ h5_get_file_size(const char *filename, hid_t fapl)
return(-1);
} /* end get_file_size() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(format-nonliteral)
/*
* This routine is designed to provide equivalent functionality to 'printf'
@@ -2038,3 +2041,56 @@ h5_get_version_string(H5F_libver_t libver)
{
return(LIBVER_NAMES[libver]);
} /* end of h5_get_version_string */
+
+/*-------------------------------------------------------------------------
+ * Function: H5_get_srcdir_filename
+ *
+ * Purpose: Append the test file name to the srcdir path and return the whole string
+ *
+ * Return: The string
+ *
+ *-------------------------------------------------------------------------
+ */
+const char *H5_get_srcdir_filename(const char *filename)
+{
+ const char *srcdir = H5_get_srcdir();
+
+ /* Check for error */
+ if(NULL == srcdir)
+ return(NULL);
+ else {
+ /* Build path to test file */
+ if((HDstrlen(srcdir) + HDstrlen(filename) + 1) < sizeof(srcdir_testpath)) {
+ HDsnprintf(srcdir_testpath, sizeof(srcdir_testpath), "%s%s", srcdir, filename);
+ return(srcdir_testpath);
+ } /* end if */
+ else
+ return(NULL);
+ } /* end else */
+} /* end H5_get_srcdir_filename() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5_get_srcdir
+ *
+ * Purpose: Just return the srcdir path
+ *
+ * Return: The string
+ *
+ *-------------------------------------------------------------------------
+ */
+const char *H5_get_srcdir(void)
+{
+ const char *srcdir = HDgetenv("srcdir");
+
+ /* Check for using the srcdir from configure time */
+ if(NULL == srcdir)
+ srcdir = config_srcdir;
+
+ /* Build path to all test files */
+ if((HDstrlen(srcdir) + 2) < sizeof(srcdir_path)) {
+ HDsnprintf(srcdir_path, sizeof(srcdir_path), "%s/", srcdir);
+ return(srcdir_path);
+ } /* end if */
+ else
+ return(NULL);
+} /* end H5_get_srcdir() */
diff --git a/test/thread_id.c b/test/thread_id.c
new file mode 100644
index 0000000..9b289fa
--- /dev/null
+++ b/test/thread_id.c
@@ -0,0 +1,162 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/* Check that a thread ID returned by H5TS_thread_id() possesses the
+ * following properties:
+ *
+ * 1 ID >= 1.
+ * 2 The ID is constant over the thread's lifetime.
+ * 3 No two threads share an ID during their lifetimes.
+ * 4 A thread's ID is available for reuse as soon as it is joined.
+ */
+#include <err.h>
+
+/*
+ * Include required headers. This file tests internal library functions,
+ * so we include the private headers here.
+ */
+#include "testhdf5.h"
+
+#if defined(H5_HAVE_THREADSAFE) && !defined(H5_HAVE_WIN_THREADS)
+
+#define threads_failure(_call, _result) do { \
+ errx(EXIT_FAILURE, "%s.%d: " #_call ": %s", __func__, \
+ __LINE__, strerror(_result)); \
+} while (false)
+
+#define NTHREADS 5
+
+static volatile bool failed = false;
+static pthread_barrier_t barrier;
+static bool used[NTHREADS];
+static pthread_mutex_t used_lock;
+
+static void
+atomic_printf(const char *fmt, ...)
+{
+ char buf[80];
+ va_list ap;
+ ssize_t nprinted, nwritten;
+
+ va_start(ap, fmt);
+ nprinted = vsnprintf(buf, sizeof(buf), fmt, ap);
+ va_end(ap);
+
+ if (nprinted == -1)
+ err(EXIT_FAILURE, "%s.%d: vsnprintf", __func__, __LINE__);
+ else if (nprinted >= (ssize_t)sizeof(buf))
+ errx(EXIT_FAILURE, "%s.%d: vsnprintf overflowed", __func__, __LINE__);
+
+ nwritten = write(STDOUT_FILENO, buf, (size_t)nprinted);
+ if (nwritten < nprinted) {
+ errx(EXIT_FAILURE, "%s.%d: write error or short write",
+ __func__, __LINE__);
+ }
+}
+
+/* Each thread runs this routine. The routine fetches the current
+ * thread's ID, makes sure that it is in the expected range, makes
+ * sure that in this round of testing, no two threads shared the
+ * same ID,
+ */
+static void *
+thread_main(void H5_ATTR_UNUSED *arg)
+{
+ uint64_t ntid, tid;
+
+ tid = H5TS_thread_id();
+
+ if (tid < 1 || NTHREADS < tid) {
+ atomic_printf("unexpected tid %" PRIu64 " FAIL\n", tid);
+ goto pre_barrier_error;
+ }
+ pthread_mutex_lock(&used_lock);
+ if (used[tid - 1]) {
+ atomic_printf("reused tid %" PRIu64 " FAIL\n", tid);
+ pthread_mutex_unlock(&used_lock);
+ goto pre_barrier_error;
+ }
+ used[tid - 1] = true;
+ pthread_mutex_unlock(&used_lock);
+
+ atomic_printf("tid %" PRIu64 " in [1, %d] PASS\n", tid, NTHREADS);
+ pthread_barrier_wait(&barrier);
+
+ ntid = H5TS_thread_id();
+ if (ntid != tid) {
+ atomic_printf("tid changed from %" PRIu64 " to %" PRIu64 " FAIL\n",
+ tid, ntid);
+ failed = true;
+ }
+ return NULL;
+pre_barrier_error:
+ pthread_barrier_wait(&barrier);
+ failed = true;
+ return NULL;
+}
+
+int
+main(void)
+{
+ int i, rc, times;
+ pthread_t threads[NTHREADS];
+
+ /* Run H5open() to initialize the library's thread-ID freelist,
+ * mutex, etc.
+ */
+ if (H5open() != SUCCEED)
+ errx(EXIT_FAILURE, "%s.%d: H5open failed", __func__, __LINE__);
+
+ if ((rc = pthread_mutex_init(&used_lock, NULL)) == -1)
+ threads_failure(pthread_mutex_init, rc);
+
+ if ((rc = pthread_barrier_init(&barrier, NULL, NTHREADS)) != 0)
+ threads_failure(pthread_barrier_init, rc);
+
+ /* Start the test threads and join them twice to make sure that
+ * the thread IDs are recycled in the second round.
+ */
+ for (times = 0; times < 2; times++) {
+
+ for (i = 0; i < NTHREADS; i++)
+ used[i] = false; // access synchronized by thread create/join
+
+ for (i = 0; i < NTHREADS; i++) {
+ rc = pthread_create(&threads[i], NULL, thread_main, NULL);
+ if (rc != 0)
+ threads_failure(pthread_create, rc);
+ }
+
+ for (i = 0; i < NTHREADS; i++) {
+ rc = pthread_join(threads[i], NULL);
+ if (rc != 0)
+ threads_failure(pthread_join, rc);
+ }
+
+ for (i = 0; i < NTHREADS; i++) {
+ if (!used[i]) // access synchronized by thread create/join
+ errx(EXIT_FAILURE, "thread ID %d did not run.", i + 1);
+ }
+ }
+ if ((rc = pthread_barrier_destroy(&barrier)) != 0)
+ threads_failure(pthread_barrier_destroy, rc);
+ return failed ? EXIT_FAILURE : EXIT_SUCCESS;
+}
+
+#else /*H5_HAVE_THREADSAFE && !H5_HAVE_WIN_THREADS*/
+int
+main(void)
+{
+ HDfprintf(stderr, "not implemented in this configuration.\n");
+ return EXIT_SUCCESS;
+}
+#endif /*H5_HAVE_THREADSAFE && !H5_HAVE_WIN_THREADS*/
diff --git a/test/trefer.c b/test/trefer.c
index fe237d7..32caf5e 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -2123,7 +2123,7 @@ test_reference_compat_conv(void)
/* Allocate write & read buffers */
wbuf_obj = (hobj_ref_t *)HDcalloc(sizeof(hobj_ref_t), SPACE1_DIM1);
rbuf_obj = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- wbuf_reg = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
+ wbuf_reg = HDcalloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
rbuf_reg = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
/* Create file */
diff --git a/test/tvltypes.c b/test/tvltypes.c
index a6ed60e..e8c69b4 100644
--- a/test/tvltypes.c
+++ b/test/tvltypes.c
@@ -2398,17 +2398,17 @@ test_vltypes_fill_value(void)
typedef struct dtype1_struct {
unsigned int gui;
unsigned int pgui;
- char *str_id;
- char *str_name;
- char *str_desc;
- char *str_orig;
- char *str_stat;
+ const char *str_id;
+ const char *str_name;
+ const char *str_desc;
+ const char *str_orig;
+ const char *str_stat;
unsigned int ver;
double val;
double ma;
double mi;
- char *str_form;
- char *str_unit;
+ const char *str_form;
+ const char *str_unit;
} dtype1_struct;
herr_t ret;
diff --git a/test/vfd.c b/test/vfd.c
index c033de5..e88d9bb 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -562,6 +562,7 @@ test_direct(void)
size_t mbound;
size_t fbsize;
size_t cbsize;
+ void *proto_points = NULL, *proto_check = NULL;
int *points = NULL, *check = NULL, *p1 = NULL, *p2 = NULL;
int wdata2[DSET2_DIM] = {11,12,13,14};
int rdata2[DSET2_DIM];
@@ -633,10 +634,12 @@ test_direct(void)
/* Allocate aligned memory for data set 1. For data set 1, everything is aligned including
* memory address, size of data, and file address. */
- if(0 != HDposix_memalign(&points, (size_t)FBSIZE, (size_t)(DSET1_DIM1 * DSET1_DIM2 * sizeof(int))))
+ if(0 != HDposix_memalign(&proto_points, (size_t)FBSIZE, (size_t)(DSET1_DIM1 * DSET1_DIM2 * sizeof(int))))
TEST_ERROR;
- if(0 != HDposix_memalign(&check, (size_t)FBSIZE, (size_t)(DSET1_DIM1 * DSET1_DIM2 * sizeof(int))))
+ points = proto_points;
+ if(0 != HDposix_memalign(&proto_check, (size_t)FBSIZE, (size_t)(DSET1_DIM1 * DSET1_DIM2 * sizeof(int))))
TEST_ERROR;
+ check = proto_check;
/* Initialize the dset1 */
p1 = points;
@@ -746,10 +749,10 @@ error:
H5Fclose(file);
} H5E_END_TRY;
- if(points)
- HDfree(points);
- if(check)
- HDfree(check);
+ if(proto_points)
+ HDfree(proto_points);
+ if(proto_check)
+ HDfree(proto_check);
return -1;
#endif /*H5_HAVE_DIRECT*/
@@ -776,8 +779,7 @@ error:
* 'first_name' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+H5_GCC_DIAG_OFF(format-nonliteral)
static herr_t
test_family_opens(char *fname, hid_t fa_pl)
{
@@ -834,7 +836,7 @@ test_family_opens(char *fname, hid_t fa_pl)
error:
return -1;
} /* end test_family_opens() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(format-nonliteral)
/*-------------------------------------------------------------------------
@@ -1058,8 +1060,7 @@ error:
* 'newname_individual', etc. in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+H5_GCC_DIAG_OFF(format-nonliteral)
static herr_t
test_family_compat(void)
{
@@ -1143,7 +1144,7 @@ error:
return -1;
} /* end test_family_compat() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(format-nonliteral)
/*-------------------------------------------------------------------------
@@ -1282,8 +1283,7 @@ error:
* 'sf_name' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+H5_GCC_DIAG_OFF(format-nonliteral)
static herr_t
test_multi_opens(char *fname)
{
@@ -1301,7 +1301,7 @@ test_multi_opens(char *fname)
return(fid >= 0 ? FAIL : SUCCEED);
} /* end test_multi_opens() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(format-nonliteral)
/*-------------------------------------------------------------------------
diff --git a/test/vol.c b/test/vol.c
index d26499e..88354e1 100644
--- a/test/vol.c
+++ b/test/vol.c
@@ -38,13 +38,14 @@ const char *FILENAME[] = {
#define N_ELEMENTS 10
#define FAKE_VOL_NAME "fake"
+#define FAKE_VOL_VALUE ((H5VL_class_value_t)501)
/* A VOL class struct that describes a VOL class with no
* functionality.
*/
static const H5VL_class_t fake_vol_g = {
0, /* version */
- (H5VL_class_value_t)501, /* value */
+ FAKE_VOL_VALUE, /* value */
FAKE_VOL_NAME, /* name */
0, /* capability flags */
NULL, /* initialize */
@@ -174,7 +175,11 @@ test_vol_registration(void)
TESTING("VOL registration");
/* The test/fake VOL connector should not be registered at the start of the test */
- if ((is_registered = H5VLis_connector_registered(FAKE_VOL_NAME)) < 0)
+ if ((is_registered = H5VLis_connector_registered_by_name(FAKE_VOL_NAME)) < 0)
+ TEST_ERROR;
+ if (is_registered > 0)
+ FAIL_PUTS_ERROR("VOL connector is inappropriately registered");
+ if ((is_registered = H5VLis_connector_registered_by_value(FAKE_VOL_VALUE)) < 0)
TEST_ERROR;
if (is_registered > 0)
FAIL_PUTS_ERROR("VOL connector is inappropriately registered");
@@ -203,7 +208,11 @@ test_vol_registration(void)
TEST_ERROR;
/* The test/fake VOL connector should be registered now */
- if ((is_registered = H5VLis_connector_registered(FAKE_VOL_NAME)) < 0)
+ if ((is_registered = H5VLis_connector_registered_by_name(FAKE_VOL_NAME)) < 0)
+ TEST_ERROR;
+ if (0 == is_registered)
+ FAIL_PUTS_ERROR("VOL connector is un-registered");
+ if ((is_registered = H5VLis_connector_registered_by_value(FAKE_VOL_VALUE)) < 0)
TEST_ERROR;
if (0 == is_registered)
FAIL_PUTS_ERROR("VOL connector is un-registered");
@@ -213,7 +222,11 @@ test_vol_registration(void)
TEST_ERROR;
/* The test/fake VOL connector should still be registered now */
- if ((is_registered = H5VLis_connector_registered(FAKE_VOL_NAME)) < 0)
+ if ((is_registered = H5VLis_connector_registered_by_name(FAKE_VOL_NAME)) < 0)
+ TEST_ERROR;
+ if (0 == is_registered)
+ FAIL_PUTS_ERROR("VOL connector is un-registered");
+ if ((is_registered = H5VLis_connector_registered_by_value(FAKE_VOL_VALUE)) < 0)
TEST_ERROR;
if (0 == is_registered)
FAIL_PUTS_ERROR("VOL connector is un-registered");
@@ -223,7 +236,11 @@ test_vol_registration(void)
TEST_ERROR;
/* The test/fake VOL connector should still be registered now */
- if ((is_registered = H5VLis_connector_registered(FAKE_VOL_NAME)) < 0)
+ if ((is_registered = H5VLis_connector_registered_by_name(FAKE_VOL_NAME)) < 0)
+ TEST_ERROR;
+ if (0 == is_registered)
+ FAIL_PUTS_ERROR("VOL connector is un-registered");
+ if ((is_registered = H5VLis_connector_registered_by_value(FAKE_VOL_VALUE)) < 0)
TEST_ERROR;
if (0 == is_registered)
FAIL_PUTS_ERROR("VOL connector is un-registered");
@@ -272,7 +289,12 @@ test_native_vol_init(void)
TESTING("Native VOL connector initialization");
/* The native VOL connector should always be registered */
- if ((is_registered = H5VLis_connector_registered(H5VL_NATIVE_NAME)) < 0)
+ if ((is_registered = H5VLis_connector_registered_by_name(H5VL_NATIVE_NAME)) < 0)
+ TEST_ERROR;
+ if (0 == is_registered)
+ FAIL_PUTS_ERROR("native VOL connector is un-registered");
+
+ if ((is_registered = H5VLis_connector_registered_by_value(H5VL_NATIVE_VALUE)) < 0)
TEST_ERROR;
if (0 == is_registered)
FAIL_PUTS_ERROR("native VOL connector is un-registered");
diff --git a/test/vol_plugin.c b/test/vol_plugin.c
index e4f171b..565c847 100644
--- a/test/vol_plugin.c
+++ b/test/vol_plugin.c
@@ -43,7 +43,7 @@ test_registration_by_value(void)
TESTING("VOL registration by value");
/* The null VOL connector should not be registered at the start of the test */
- if((is_registered = H5VLis_connector_registered(NULL_VOL_CONNECTOR_NAME)) < 0)
+ if((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
TEST_ERROR;
if(TRUE == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
@@ -53,7 +53,7 @@ test_registration_by_value(void)
TEST_ERROR;
/* The connector should be registered now */
- if((is_registered = H5VLis_connector_registered(NULL_VOL_CONNECTOR_NAME)) < 0)
+ if((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
TEST_ERROR;
if(FALSE == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector was not registered");
@@ -63,7 +63,7 @@ test_registration_by_value(void)
TEST_ERROR;
/* The connector should not be registered now */
- if((is_registered = H5VLis_connector_registered(NULL_VOL_CONNECTOR_NAME)) < 0)
+ if((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
TEST_ERROR;
if(TRUE == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
@@ -99,7 +99,7 @@ test_registration_by_name(void)
TESTING("VOL registration by name");
/* The null VOL connector should not be registered at the start of the test */
- if((is_registered = H5VLis_connector_registered(NULL_VOL_CONNECTOR_NAME)) < 0)
+ if((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
if(TRUE == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
@@ -109,7 +109,7 @@ test_registration_by_name(void)
TEST_ERROR;
/* The connector should be registered now */
- if((is_registered = H5VLis_connector_registered(NULL_VOL_CONNECTOR_NAME)) < 0)
+ if((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
if(FALSE == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector was not registered");
@@ -119,7 +119,7 @@ test_registration_by_name(void)
TEST_ERROR;
/* The connector should not be registered now */
- if((is_registered = H5VLis_connector_registered(NULL_VOL_CONNECTOR_NAME)) < 0)
+ if((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
if(TRUE == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
@@ -156,7 +156,7 @@ test_multiple_registration(void)
TESTING("registering a VOL connector multiple times");
/* The null VOL connector should not be registered at the start of the test */
- if((is_registered = H5VLis_connector_registered(NULL_VOL_CONNECTOR_NAME)) < 0)
+ if((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
if(TRUE == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
@@ -168,7 +168,7 @@ test_multiple_registration(void)
}
/* The connector should be registered now */
- if((is_registered = H5VLis_connector_registered(NULL_VOL_CONNECTOR_NAME)) < 0)
+ if((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
if(FALSE == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector was not registered");
@@ -186,7 +186,43 @@ test_multiple_registration(void)
}
/* The connector should not be registered now */
- if((is_registered = H5VLis_connector_registered(NULL_VOL_CONNECTOR_NAME)) < 0)
+ if((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
+ TEST_ERROR;
+ if(TRUE == is_registered)
+ FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
+
+ /* Repeat testing with the _by_value routines */
+ if((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
+ TEST_ERROR;
+ if(TRUE == is_registered)
+ FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
+
+ /* Register the connector multiple times */
+ for(i = 0; i < N_REGISTRATIONS; i++) {
+ if((vol_ids[i] = H5VLregister_connector_by_value(NULL_VOL_CONNECTOR_VALUE, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+ }
+
+ /* The connector should be registered now */
+ if((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
+ TEST_ERROR;
+ if(FALSE == is_registered)
+ FAIL_PUTS_ERROR("NULL VOL connector was not registered");
+
+ /* Unregister the connector */
+ for(i = 0; i < N_REGISTRATIONS; i++) {
+ if(H5VLunregister_connector(vol_ids[i]) < 0)
+ TEST_ERROR;
+ /* Also test close on some of the IDs. This call currently works
+ * identically to unregister.
+ */
+ i++;
+ if(H5VLclose(vol_ids[i]) < 0)
+ TEST_ERROR;
+ }
+
+ /* The connector should not be registered now */
+ if((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
TEST_ERROR;
if(TRUE == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
@@ -223,7 +259,7 @@ test_getters(void)
TESTING("VOL getters");
/* The null VOL connector should not be registered at the start of the test */
- if((is_registered = H5VLis_connector_registered(NULL_VOL_CONNECTOR_NAME)) < 0)
+ if((is_registered = H5VLis_connector_registered_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
if(TRUE == is_registered)
FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
@@ -232,11 +268,35 @@ test_getters(void)
if((vol_id = H5VLregister_connector_by_name(NULL_VOL_CONNECTOR_NAME, H5P_DEFAULT)) < 0)
TEST_ERROR;
- /* Get the connector's ID */
+ /* Get the connector's ID by name */
if((vol_id_out = H5VLget_connector_id_by_name(NULL_VOL_CONNECTOR_NAME)) < 0)
TEST_ERROR;
if(vol_id != vol_id_out)
FAIL_PUTS_ERROR("VOL connector IDs don't match");
+ if(H5VLclose(vol_id_out) < 0)
+ TEST_ERROR;
+
+ /* Unregister the connector */
+ if(H5VLunregister_connector(vol_id) < 0)
+ TEST_ERROR;
+
+ /* Repeat testing with the _by_value routines */
+ if((is_registered = H5VLis_connector_registered_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
+ TEST_ERROR;
+ if(TRUE == is_registered)
+ FAIL_PUTS_ERROR("NULL VOL connector is inappropriately registered");
+
+ /* Register the connector by value */
+ if((vol_id = H5VLregister_connector_by_value(NULL_VOL_CONNECTOR_VALUE, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* Get the connector's ID by value */
+ if((vol_id_out = H5VLget_connector_id_by_value(NULL_VOL_CONNECTOR_VALUE)) < 0)
+ TEST_ERROR;
+ if(vol_id != vol_id_out)
+ FAIL_PUTS_ERROR("VOL connector IDs don't match");
+ if(H5VLclose(vol_id_out) < 0)
+ TEST_ERROR;
/* Unregister the connector */
if(H5VLunregister_connector(vol_id) < 0)
@@ -247,6 +307,7 @@ test_getters(void)
error:
H5E_BEGIN_TRY {
+ H5VLclose(vol_id_out);
H5VLunregister_connector(vol_id);
} H5E_END_TRY;
return FAIL;
diff --git a/testpar/t_2Gio.c b/testpar/t_2Gio.c
index 28f5f47..e5ab280 100644
--- a/testpar/t_2Gio.c
+++ b/testpar/t_2Gio.c
@@ -625,7 +625,7 @@ static int MpioTest2G( MPI_Comm comm )
VRFY((dcpl_id >= 0), "H5P_DATASET_CREATE");
chunk[0] = 4;
chunk[1] = shape[1];
- shape[2] = shape[2];
+ chunk[2] = shape[2];
status = H5Pset_chunk(dcpl_id, 3, chunk);
VRFY((status >= 0), "H5Pset_chunk succeeded");
diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c
index ada832c..f86852a 100644
--- a/testpar/t_bigio.c
+++ b/testpar/t_bigio.c
@@ -15,7 +15,7 @@ const char *FILENAME[3]={ "bigio_test.h5",
/* Define some handy debugging shorthands, routines, ... */
/* debugging tools */
-#define MAIN_PROCESS (!mpi_rank_g) /* define process 0 as main process */
+#define MAIN_PROCESS (mpi_rank_g == 0) /* define process 0 as main process */
/* Constants definitions */
#define RANK 2
@@ -1131,7 +1131,7 @@ single_rank_independent_io(void)
void *data = NULL;
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
- VRFY_G((fapl_id >= 0), "H5P_FILE_ACCESS");
+ VRFY_G((fapl_id >= 0), "H5P_FILE_ACCESS");
H5Pset_fapl_mpio(fapl_id, MPI_COMM_SELF, MPI_INFO_NULL);
file_id = H5Fcreate(FILENAME[1], H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
diff --git a/testpar/testpar.h b/testpar/testpar.h
index e3d68e0..2c1bce2 100644
--- a/testpar/testpar.h
+++ b/testpar/testpar.h
@@ -44,12 +44,12 @@
* This will allow program to continue and can be used for debugging.
* (The "do {...} while(0)" is to group all the statements as one unit.)
*/
-#define VRFY_IMPL(val, mesg, rankvar) do { \
+#define VRFY_IMPL(val, mesg, rankvar) do { \
if (val) { \
MESG(mesg); \
} \
else { \
- HDprintf("Proc %d: ", rankvar); \
+ HDprintf("Proc %d: ", rankvar); \
HDprintf("*** Parallel ERROR ***\n"); \
HDprintf(" VRFY (%s) failed at line %4d in %s\n", \
mesg, (int)__LINE__, __FILE__); \
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 6450745..52bae51 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -155,7 +155,7 @@ static void print_char_pos(int *ph, int pp, hsize_t curr_pos, size_t u,
hsize_t *acc, hsize_t *pos, int rank, hsize_t *dims, const char *obj1,
const char *obj2);
static void h5diff_print_char(char ch);
-static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
+static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t idx,
int rank, hsize_t *dims, hsize_t *acc, hsize_t *pos,
diff_opt_t *opts, const char *obj1, const char *obj2,
hid_t container1_id, hid_t container2_id, /*where the reference came from*/
@@ -371,9 +371,7 @@ hsize_t diff_array(void *_mem1, void *_mem2, hsize_t nelmts, hsize_t hyper_start
} /* i */
close_member_types(&members);
} /* switch */
- H5TOOLS_DEBUG("diff_array finish:%d - errstat:%d", nfound, opts->err_stat);
-
- H5TOOLS_ENDDEBUG(": %d", nfound);
+ H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat);
return nfound;
}
@@ -410,9 +408,11 @@ hsize_t diff_array(void *_mem1, void *_mem2, hsize_t nelmts, hsize_t hyper_start
* Dereference the object and compare the type (basic object type).
*-------------------------------------------------------------------------
*/
-static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index, int rank,
- hsize_t *dims, hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2,
- hid_t container1_id, hid_t container2_id,
+static hsize_t
+diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t idx, int rank,
+ hsize_t *dims, hsize_t *acc, hsize_t *pos, diff_opt_t *opts,
+ const char *obj1, const char *obj2,
+ hid_t container1_id, hid_t container2_id,
int *ph, /*print header */
mcomp_t *members) /*compound members */
{
@@ -472,7 +472,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
offset = members->offsets[j];
memb_type = members->ids[j];
- nfound += diff_datum(mem1 + offset, mem2 + offset, memb_type, index,
+ nfound += diff_datum(mem1 + offset, mem2 + offset, memb_type, idx,
rank, dims, acc, pos, opts, obj1, obj2, container1_id, container2_id, ph, members->m[j]);
}
}
@@ -576,11 +576,11 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (size1 != size2)
if (print_data(opts))
for (u = size; u < sizex; u++)
- character_compare(s + u, sx + u, index, u, rank, dims, acc, pos, opts, obj1, obj2, ph);
+ character_compare(s + u, sx + u, idx, u, rank, dims, acc, pos, opts, obj1, obj2, ph);
}
else
for (u = 0; u < size; u++)
- nfound += character_compare(s + u, sx + u, index, u, rank, dims, acc, pos, opts, obj1, obj2, ph);
+ nfound += character_compare(s + u, sx + u, idx, u, rank, dims, acc, pos, opts, obj1, obj2, ph);
} /* end check for NULL pointer for string */
}
break;
@@ -593,7 +593,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
H5TOOLS_DEBUG("diff_datum H5T_BITFIELD");
/* byte-by-byte comparison */
for (u = 0; u < type_size; u++)
- nfound += character_compare_opt(mem1 + u, mem2 + u, index, rank, dims, acc, pos, opts, obj1, obj2, ph);
+ nfound += character_compare_opt(mem1 + u, mem2 + u, idx, rank, dims, acc, pos, opts, obj1, obj2, ph);
break;
/*-------------------------------------------------------------------------
@@ -604,7 +604,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
H5TOOLS_DEBUG("diff_datum H5T_OPAQUE");
/* byte-by-byte comparison */
for (u = 0; u < type_size; u++)
- nfound += character_compare_opt(mem1 + u, mem2 + u, index, rank, dims, acc, pos, opts, obj1, obj2, ph);
+ nfound += character_compare_opt(mem1 + u, mem2 + u, idx, rank, dims, acc, pos, opts, obj1, obj2, ph);
break;
/*-------------------------------------------------------------------------
@@ -645,7 +645,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
*/
nfound += 1;
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(S_FORMAT, enum_name1, enum_name2);
}
@@ -655,14 +655,14 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (HDstrcmp(enum_name1, enum_name2) != 0) {
nfound = 1;
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(S_FORMAT, enum_name1, enum_name2);
}
}
else {
for (u = 0; u < type_size; u++)
- nfound += character_compare_opt(mem1 + u, mem2 + u, index, rank, dims, acc, pos, opts, obj1, obj2, ph);
+ nfound += character_compare_opt(mem1 + u, mem2 + u, idx, rank, dims, acc, pos, opts, obj1, obj2, ph);
}
}
/* enable error reporting */
@@ -692,7 +692,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
for (u = 0, nelmts = 1; u < (unsigned) ndims; u++)
nelmts *= adims[u];
for (u = 0; u < nelmts; u++) {
- nfound += diff_datum(mem1 + u * size, mem2 + u * size, memb_type, index,
+ nfound += diff_datum(mem1 + u * size, mem2 + u * size, memb_type, idx,
rank, dims, acc, pos, opts, obj1, obj2, container1_id, container2_id, ph, members);
}
H5Tclose(memb_type);
@@ -1102,7 +1102,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
nelmts = ((hvl_t *)((void *)mem1))->len;
for (j = 0; j < nelmts; j++)
- nfound += diff_datum(((char *) (((hvl_t *)((void *)mem1))->p)) + j * size, ((char *) (((hvl_t *)((void *)mem2))->p)) + j * size, memb_type, index, /* Extra (void *) cast to quiet "cast to create alignment" warning - 2019/07/05, QAK */
+ nfound += diff_datum(((char *) (((hvl_t *)((void *)mem1))->p)) + j * size, ((char *) (((hvl_t *)((void *)mem2))->p)) + j * size, memb_type, idx, /* Extra (void *) cast to quiet "cast to create alignment" warning - 2019/07/05, QAK */
rank, dims, acc, pos, opts, obj1, obj2, container1_id, container2_id, ph, members);
H5Tclose(memb_type);
@@ -1132,7 +1132,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (opts->d && !opts->p) {
if (ABS(temp1_char-temp2_char) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT, temp1_char, temp2_char, ABS(temp1_char - temp2_char));
}
@@ -1145,7 +1145,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT_P_NOTCOMP, temp1_char, temp2_char, ABS(temp1_char - temp2_char));
}
@@ -1153,7 +1153,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT_P, temp1_char, temp2_char, ABS(temp1_char - temp2_char), per);
}
@@ -1166,7 +1166,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT_P_NOTCOMP, temp1_char, temp2_char, ABS(temp1_char - temp2_char));
}
@@ -1174,7 +1174,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent && ABS(temp1_char - temp2_char) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT_P, temp1_char, temp2_char, ABS(temp1_char - temp2_char), per);
}
@@ -1183,7 +1183,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (temp1_char != temp2_char) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT, temp1_char, temp2_char, ABS(temp1_char - temp2_char));
}
@@ -1208,7 +1208,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (opts->d && !opts->p) {
if (PDIFF(temp1_uchar, temp2_uchar) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar));
}
@@ -1221,7 +1221,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT_P_NOTCOMP, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar));
}
@@ -1229,7 +1229,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per);
}
@@ -1242,7 +1242,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT_P_NOTCOMP, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar));
}
@@ -1250,7 +1250,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent && PDIFF(temp1_uchar, temp2_uchar) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per);
}
@@ -1259,7 +1259,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (temp1_uchar != temp2_uchar) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar));
}
@@ -1284,7 +1284,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (opts->d && !opts->p) {
if (ABS(temp1_short - temp2_short) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT, temp1_short, temp2_short, ABS(temp1_short - temp2_short));
}
@@ -1297,7 +1297,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT_P_NOTCOMP, temp1_short, temp2_short, ABS(temp1_short - temp2_short));
}
@@ -1305,7 +1305,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT_P, temp1_short, temp2_short, ABS(temp1_short - temp2_short), per);
}
@@ -1318,7 +1318,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT_P_NOTCOMP, temp1_short, temp2_short, ABS(temp1_short - temp2_short));
}
@@ -1326,7 +1326,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent && ABS(temp1_short - temp2_short) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT_P, temp1_short, temp2_short, ABS(temp1_short - temp2_short), per);
}
@@ -1335,7 +1335,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (temp1_short != temp2_short) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT, temp1_short, temp2_short, ABS(temp1_short - temp2_short));
}
@@ -1360,7 +1360,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (opts->d && !opts->p) {
if (PDIFF(temp1_ushort, temp2_ushort) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort));
}
@@ -1373,7 +1373,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT_P_NOTCOMP, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort));
}
@@ -1381,7 +1381,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT_P, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort), per);
}
@@ -1394,7 +1394,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT_P_NOTCOMP, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort));
}
@@ -1402,7 +1402,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent && PDIFF(temp1_ushort, temp2_ushort) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT_P, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort), per);
}
@@ -1411,7 +1411,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (temp1_ushort != temp2_ushort) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort));
}
@@ -1436,7 +1436,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (opts->d && !opts->p) {
if (ABS(temp1_int-temp2_int) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT, temp1_int, temp2_int, ABS(temp1_int - temp2_int));
}
@@ -1449,7 +1449,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT_P_NOTCOMP, temp1_int, temp2_int, ABS(temp1_int - temp2_int));
}
@@ -1457,7 +1457,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT_P, temp1_int, temp2_int, ABS(temp1_int - temp2_int), per);
}
@@ -1470,7 +1470,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT_P_NOTCOMP, temp1_int, temp2_int, ABS(temp1_int - temp2_int));
}
@@ -1478,7 +1478,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent && ABS(temp1_int - temp2_int) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT_P, temp1_int, temp2_int, ABS(temp1_int - temp2_int), per);
}
@@ -1487,7 +1487,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (temp1_int != temp2_int) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(I_FORMAT, temp1_int, temp2_int, ABS(temp1_int - temp2_int));
}
@@ -1512,7 +1512,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (opts->d && !opts->p) {
if (PDIFF(temp1_uint, temp2_uint) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(UI_FORMAT, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint));
}
@@ -1525,7 +1525,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(UI_FORMAT_P_NOTCOMP, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint));
}
@@ -1533,7 +1533,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(UI_FORMAT_P, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint), per);
}
@@ -1546,7 +1546,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(UI_FORMAT_P_NOTCOMP, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint));
}
@@ -1554,7 +1554,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent && PDIFF(temp1_uint,temp2_uint) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(UI_FORMAT_P, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint), per);
}
@@ -1563,7 +1563,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (temp1_uint != temp2_uint) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(UI_FORMAT, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint));
}
@@ -1588,7 +1588,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (opts->d && !opts->p) {
if (ABS(temp1_long-temp2_long) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(LI_FORMAT, temp1_long, temp2_long, ABS(temp1_long - temp2_long));
}
@@ -1601,7 +1601,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(LI_FORMAT_P_NOTCOMP, temp1_long, temp2_long, ABS(temp1_long - temp2_long));
}
@@ -1609,7 +1609,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(LI_FORMAT_P, temp1_long, temp2_long, ABS(temp1_long - temp2_long), per);
}
@@ -1622,7 +1622,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(LI_FORMAT_P_NOTCOMP, temp1_long, temp2_long, ABS(temp1_long - temp2_long));
}
@@ -1630,7 +1630,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent && ABS(temp1_long-temp2_long) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(LI_FORMAT_P, temp1_long, temp2_long, ABS(temp1_long - temp2_long), per);
}
@@ -1639,7 +1639,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (temp1_long != temp2_long) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(LI_FORMAT, temp1_long, temp2_long, ABS(temp1_long - temp2_long));
}
@@ -1664,7 +1664,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (opts->d && !opts->p) {
if (PDIFF(temp1_ulong, temp2_ulong) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(ULI_FORMAT, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong));
}
@@ -1677,7 +1677,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(ULI_FORMAT_P_NOTCOMP, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong));
}
@@ -1685,7 +1685,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(ULI_FORMAT_P, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong), per);
}
@@ -1698,7 +1698,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(ULI_FORMAT_P_NOTCOMP, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong));
}
@@ -1706,7 +1706,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent && PDIFF(temp1_ulong,temp2_ulong) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(ULI_FORMAT_P, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong), per);
}
@@ -1715,7 +1715,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (temp1_ulong != temp2_ulong) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(ULI_FORMAT, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong));
}
@@ -1766,7 +1766,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (!isnan1 && !isnan2) {
if (ABS(temp1_float-temp2_float) > (float) opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
}
@@ -1776,7 +1776,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
/* only one is NaN, assume difference */
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
}
@@ -1803,7 +1803,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT_P_NOTCOMP, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
}
@@ -1811,7 +1811,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent && (double) ABS(temp1_float - temp2_float) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT_P, (double) temp1_float, (double) temp2_float,
(double) ABS(temp1_float - temp2_float), (double) ABS(1 - temp2_float / temp1_float));
@@ -1822,7 +1822,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
/* only one is NaN, assume difference */
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
}
@@ -1849,7 +1849,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT_P_NOTCOMP, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
}
@@ -1857,7 +1857,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT_P, (double) temp1_float, (double) temp2_float,
(double) ABS(temp1_float - temp2_float), (double) ABS(1 - temp2_float / temp1_float));
@@ -1868,7 +1868,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
/* only one is NaN, assume difference */
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
}
@@ -1881,7 +1881,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
*/
else if (equal_float(temp1_float, temp2_float, opts) == FALSE) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
}
@@ -1924,7 +1924,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (!isnan1 && !isnan2) {
if (ABS(temp1_double-temp2_double) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -1934,7 +1934,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
/* only one is NaN, assume difference */
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -1961,7 +1961,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -1969,7 +1969,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double));
}
@@ -1979,7 +1979,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
/* only one is NaN, assume difference */
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -2006,7 +2006,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -2015,7 +2015,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
else if (per > opts->percent &&
ABS(temp1_double-temp2_double) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double));
}
@@ -2025,7 +2025,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
/* only one is NaN, assume difference */
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -2038,7 +2038,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
*/
else if (equal_double(temp1_double, temp2_double, opts) == FALSE) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -2085,7 +2085,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (!isnan1 && !isnan2) {
if (ABS(temp1_double-temp2_double) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(LD_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -2095,7 +2095,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
/* only one is NaN, assume difference */
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -2122,7 +2122,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(LD_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -2130,7 +2130,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(LD_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double));
}
@@ -2140,7 +2140,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
/* only one is NaN, assume difference */
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -2167,7 +2167,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
if (not_comparable && !both_zero) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(LD_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -2175,7 +2175,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
}
else if (per > opts->percent && ABS(temp1_double-temp2_double) > opts->delta) {
if (print_data(opts)) {
- print_pos(ph, 1, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 1, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(LD_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double));
}
@@ -2185,7 +2185,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
/* only one is NaN, assume difference */
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -2198,7 +2198,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
*/
else if (equal_ldouble(temp1_double, temp2_double, opts) == FALSE) {
if (print_data(opts)) {
- print_pos(ph, 0, index, acc, pos, rank, dims, obj1, obj2);
+ print_pos(ph, 0, idx, acc, pos, rank, dims, obj1, obj2);
parallel_print(SPACES);
parallel_print(LD_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -2214,9 +2214,7 @@ static hsize_t diff_datum(void *_mem1, void *_mem2, hid_t m_type, hsize_t index,
done:
opts->err_stat = opts->err_stat | ret_value;
- H5TOOLS_DEBUG("diff_datum finish:%d - errstat:%d", nfound, opts->err_stat);
-
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat);
return nfound;
}
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 087414d..5ad29fc 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -152,7 +152,6 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
unsigned i;
herr_t ret_value = SUCCEED;
-
H5TOOLS_START_DEBUG(" - errstat:%d", opts->err_stat);
if(H5Oget_info3(loc1_id, &oinfo1, H5O_INFO_NUM_ATTRS) < 0) {
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 47f6e3f..33f1e11 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -12,8 +12,8 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Purpose: A library for displaying the values of a dataset in a human
- * readable format.
+ * Purpose: A library for routines that are common
+ * amongst the various HDF5 tools.
*/
#include "h5tools.h"
diff --git a/tools/lib/h5tools_utils.h b/tools/lib/h5tools_utils.h
index 366800a..598930c 100644
--- a/tools/lib/h5tools_utils.h
+++ b/tools/lib/h5tools_utils.h
@@ -129,7 +129,7 @@ H5TOOLS_DLL void warn_msg(const char *fmt, ...);
H5TOOLS_DLL void help_ref_msg(FILE *output);
H5TOOLS_DLL void free_table(table_t *table);
#ifdef H5DUMP_DEBUG
-H5TOOLS_DLL void dump_tables(find_objs_t *info)
+H5TOOLS_DLL void dump_tables(find_objs_t *info);
#endif /* H5DUMP_DEBUG */
H5TOOLS_DLL herr_t init_objs(hid_t fid, find_objs_t *info, table_t **group_table, table_t **dset_table, table_t **type_table);
H5TOOLS_DLL obj_t *search_obj(table_t *temp, const H5O_token_t *obj_token);
diff --git a/tools/src/h5diff/CMakeLists.txt b/tools/src/h5diff/CMakeLists.txt
index c1021e4..2009a14 100644
--- a/tools/src/h5diff/CMakeLists.txt
+++ b/tools/src/h5diff/CMakeLists.txt
@@ -10,7 +10,7 @@ if (NOT ONLY_SHARED_LIBS)
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_main.c
)
target_include_directories (h5diff PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- #target_compile_definitions(h5diff PRIVATE H5_TOOLS_DEBUG)
+ #target_compile_definitions (h5diff PRIVATE H5_TOOLS_DEBUG)
TARGET_C_PROPERTIES (h5diff STATIC)
target_link_libraries (h5diff PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5diff PROPERTIES FOLDER tools)
@@ -24,7 +24,7 @@ if (BUILD_SHARED_LIBS)
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_main.c
)
target_include_directories (h5diff-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- #target_compile_definitions(h5diff-shared PRIVATE H5_TOOLS_DEBUG)
+ #target_compile_definitions (h5diff-shared PRIVATE H5_TOOLS_DEBUG)
TARGET_C_PROPERTIES (h5diff-shared SHARED)
target_link_libraries (h5diff-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (h5diff-shared PROPERTIES FOLDER tools)
diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c
index fc4d431..b11fe7f 100644
--- a/tools/src/h5import/h5import.c
+++ b/tools/src/h5import/h5import.c
@@ -1431,7 +1431,7 @@ static int processConfigurationFile(char *infile, struct Input *in)
/* Initialize machine endian */
volatile uint32_t ibyte=0x01234567;
/* 0 for big endian, 1 for little endian. */
- if ((*((uint8_t*)(&ibyte))) == 0x67) {
+ if ((*((volatile uint8_t*)(&ibyte))) == 0x67) {
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
(void) HDfprintf(stderr, "%s", err11e);
return (-1);
diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c
index c0c8a2a..16899a3 100644
--- a/tools/src/h5repack/h5repack_main.c
+++ b/tools/src/h5repack/h5repack_main.c
@@ -412,7 +412,7 @@ set_sort_order(const char *form)
static
int parse_command_line(int argc, const char **argv, pack_opt_t* options)
{
- int opt;
+ int bound, opt;
int ret_value = 0;
/* parse command line options */
@@ -492,19 +492,21 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options)
break;
case 'j':
- options->low_bound = (H5F_libver_t)HDatoi(opt_arg);
- if (options->low_bound < H5F_LIBVER_EARLIEST || options->low_bound > H5F_LIBVER_LATEST) {
+ bound = HDatoi(opt_arg);
+ if (bound < H5F_LIBVER_EARLIEST || bound > H5F_LIBVER_LATEST) {
error_msg("in parsing low bound\n");
goto done;
}
+ options->low_bound = bound;
break;
case 'k':
- options->high_bound = (H5F_libver_t)HDatoi(opt_arg);
- if (options->high_bound < H5F_LIBVER_EARLIEST || options->high_bound > H5F_LIBVER_LATEST) {
+ bound = HDatoi(opt_arg);
+ if (bound < H5F_LIBVER_EARLIEST || bound > H5F_LIBVER_LATEST) {
error_msg("in parsing high bound\n");
goto done;
}
+ options->high_bound = bound;
break;
case 'c':
diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c
index e6a747d..54fe1f2 100644
--- a/tools/src/h5repack/h5repack_refs.c
+++ b/tools/src/h5repack/h5repack_refs.c
@@ -530,9 +530,16 @@ static int copy_refs_attr(hid_t loc_in,
ref_comp_size = NULL;
}
}
+ /* This line below needs to be moved in this loop instead of inserting outside. Otherwise,
+ ref_comp_field_n may be >0 for the next attribute, which may not be
+ the reference type and will be accidently treated as the reference type.
+ It will then cause the H5Acreate2 failed since that attribute is already created.
+ KY 2020-02-07
+ */
+ is_ref_comp = (ref_comp_field_n > 0);
+
}
- is_ref_comp = (ref_comp_field_n > 0);
if (!(is_ref || is_ref_vlen || is_ref_array || is_ref_comp)) {
if (H5Tclose(mtype_id) < 0)
diff --git a/tools/test/h5copy/CMakeTests.cmake b/tools/test/h5copy/CMakeTests.cmake
index b0d1615..4ce0318 100644
--- a/tools/test/h5copy/CMakeTests.cmake
+++ b/tools/test/h5copy/CMakeTests.cmake
@@ -45,12 +45,6 @@
endforeach ()
add_custom_target(h5copy_files ALL COMMENT "Copying files needed by h5copy tests" DEPENDS ${h5copy_files_list})
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
@@ -71,7 +65,7 @@
add_test (
NAME H5COPY_F-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_ext}> -f ${fparam} -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -f ${fparam} -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
if (HDF5_ENABLE_USING_MEMCHECKER)
if (last_test)
@@ -85,7 +79,7 @@
if (NOT ${resultcode} EQUAL 2)
add_test (
NAME H5COPY_F-${testname}-DIFF
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
set_tests_properties (H5COPY_F-${testname}-DIFF PROPERTIES DEPENDS H5COPY_F-${testname})
if (${resultcode} EQUAL 1)
@@ -105,7 +99,7 @@
add_test (
NAME H5COPY-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
if (HDF5_ENABLE_USING_MEMCHECKER)
if (last_test)
@@ -119,7 +113,7 @@
if (NOT ${resultcode} EQUAL 2)
add_test (
NAME H5COPY-${testname}-DIFF
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
if (${resultcode} EQUAL 1)
@@ -149,7 +143,7 @@
add_test (
NAME H5COPY-${testname}-prefill
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
)
if (HDF5_ENABLE_USING_MEMCHECKER)
if (last_test)
@@ -161,14 +155,14 @@
add_test (
NAME H5COPY-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
set_tests_properties (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-prefill)
# resultcode=2 will cause the test to skip the diff test
if (NOT ${resultcode} EQUAL 2)
add_test (
NAME H5COPY-${testname}-DIFF
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
if (${resultcode} EQUAL 1)
@@ -188,7 +182,7 @@
add_test (
NAME H5COPY_SAME-${testname}-prefill
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_ext}> -i ./testfiles/${pfile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -i ./testfiles/${pfile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
)
if (HDF5_ENABLE_USING_MEMCHECKER)
if (last_test)
@@ -200,14 +194,14 @@
add_test (
NAME H5COPY_SAME-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_ext}> -i ./testfiles/${testname}.out.h5 -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -i ./testfiles/${testname}.out.h5 -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
set_tests_properties (H5COPY_SAME-${testname} PROPERTIES DEPENDS H5COPY_SAME-${testname}-prefill)
# resultcode=2 will cause the test to skip the diff test
if (NOT ${resultcode} EQUAL 2)
add_test (
NAME H5COPY_SAME-${testname}-DIFF
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> -v ./testfiles/${testname}.out.h5 ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> -v ./testfiles/${testname}.out.h5 ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
set_tests_properties (H5COPY_SAME-${testname}-DIFF PROPERTIES DEPENDS H5COPY_SAME-${testname})
if (${resultcode} EQUAL 1)
@@ -223,7 +217,7 @@
macro (ADD_H5_CMP_TEST testname resultcode infile vparam sparam srcname dparam dstname)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5COPY-CMP-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN})
+ add_test (NAME H5COPY-CMP-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN})
if (${resultcode} EQUAL 1)
set_tests_properties (H5COPY-CMP-${testname} PROPERTIES WILL_FAIL "true")
endif ()
@@ -240,7 +234,7 @@
NAME H5COPY-CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5copy${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5copy${tgt_file_ext}>"
-D "TEST_ARGS=-i;./testfiles/${infile};-o;./testfiles/${testname}.out.h5;${vparam};${sparam};${srcname};${dparam};${dstname}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=./testfiles/${testname}.out.out"
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index 88ed62c..3d9c6f5 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -363,12 +363,6 @@
endif ()
add_custom_target(h5diff_files ALL COMMENT "Copying files needed by h5diff tests" DEPENDS ${h5diff_files_list})
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
@@ -379,7 +373,7 @@
if (HDF5_TEST_SERIAL)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DIFF-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> ${ARGN})
+ add_test (NAME H5DIFF-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> ${ARGN})
set_tests_properties (H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (${resultcode})
set_tests_properties (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -392,7 +386,7 @@
NAME H5DIFF-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -414,7 +408,7 @@
macro (ADD_PH5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME MPI_TEST_H5DIFF-${resultfile} COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:ph5diff> ${MPIEXEC_POSTFLAGS} ${ARGN})
+ add_test (NAME MPI_TEST_H5DIFF-${resultfile} COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:ph5diff${tgt_file_ext}> ${MPIEXEC_POSTFLAGS} ${ARGN})
set_tests_properties (MPI_TEST_H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/PAR/testfiles")
if (${resultcode})
set_tests_properties (MPI_TEST_H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -426,7 +420,7 @@
add_test (
NAME MPI_TEST_H5DIFF-${resultfile}
COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=${MPIEXEC_EXECUTABLE};${MPIEXEC_NUMPROC_FLAG};${MPIEXEC_MAX_NUMPROCS};${MPIEXEC_PREFLAGS};$<TARGET_FILE:ph5diff>;${MPIEXEC_POSTFLAGS}"
+ -D "TEST_PROGRAM=${MPIEXEC_EXECUTABLE};${MPIEXEC_NUMPROC_FLAG};${MPIEXEC_MAX_NUMPROCS};${MPIEXEC_PREFLAGS};$<TARGET_FILE:ph5diff${tgt_file_ext}>;${MPIEXEC_POSTFLAGS}"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/PAR/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake
index 2e731f3..187328e 100644
--- a/tools/test/h5dump/CMakeTests.cmake
+++ b/tools/test/h5dump/CMakeTests.cmake
@@ -420,16 +420,10 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_HELP_TEST testname resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DUMP-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> ${ARGN})
+ add_test (NAME H5DUMP-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN})
set_tests_properties (H5DUMP-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
if (last_test)
set_tests_properties (H5DUMP-${testname} PROPERTIES DEPENDS ${last_test})
@@ -440,7 +434,7 @@
NAME H5DUMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=h5dump-${testname}.out"
@@ -471,7 +465,7 @@
macro (ADD_H5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> ${ARGN})
+ add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -489,7 +483,7 @@
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -504,7 +498,7 @@
macro (ADD_H5_TEST_N resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DUMP-N-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> ${ARGN})
+ add_test (NAME H5DUMP-N-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN})
set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
if (${resultcode})
set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -522,7 +516,7 @@
NAME H5DUMP-N-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}-N.out"
@@ -537,7 +531,7 @@
macro (ADD_H5_TEST_EXPORT resultfile targetfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> ${ARGN} ${resultfile}.txt ${targetfile})
+ add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN} ${resultfile}.txt ${targetfile})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -555,7 +549,7 @@
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN};${resultfile}.txt;${targetfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -578,7 +572,7 @@
macro (ADD_H5_TEST_EXPORT_DDL resultfile targetfile resultcode ddlfile)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> --ddl=${ddlfile}.txt ${ARGN} ${resultfile}.txt ${targetfile})
+ add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> --ddl=${ddlfile}.txt ${ARGN} ${resultfile}.txt ${targetfile})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -598,7 +592,7 @@
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=--ddl=${ddlfile}.txt;${ARGN};${resultfile}.txt;${targetfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -633,7 +627,7 @@
set_tests_properties (H5DUMP-output-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
add_test (
NAME H5DUMP-output-${resultfile}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> ${ARGN} ${resultfile}.txt ${targetfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN} ${resultfile}.txt ${targetfile}
)
set_tests_properties (H5DUMP-output-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
set_tests_properties (H5DUMP-output-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile}-clear-objects)
@@ -654,7 +648,7 @@
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -672,7 +666,7 @@
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -689,7 +683,7 @@
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -707,7 +701,7 @@
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -735,7 +729,7 @@
NAME H5DUMP-IMPORT-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN};-o;${resultfile}.bin;${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${conffile}.out"
@@ -744,10 +738,10 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DUMP-IMPORT-${resultfile} PROPERTIES DEPENDS "H5DUMP-IMPORT-${resultfile}-clear-objects")
- add_test (NAME H5DUMP-IMPORT-h5import-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5import> ${resultfile}.bin -c ${conffile}.out -o ${resultfile}.h5)
+ add_test (NAME H5DUMP-IMPORT-h5import-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5import${tgt_file_ext}> ${resultfile}.bin -c ${conffile}.out -o ${resultfile}.h5)
set_tests_properties (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
set_tests_properties (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-${resultfile})
- add_test (NAME H5DUMP-IMPORT-h5diff-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff> ${testfile} ${resultfile}.h5 /integer /integer)
+ add_test (NAME H5DUMP-IMPORT-h5diff-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> ${testfile} ${resultfile}.h5 /integer /integer)
set_tests_properties (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
set_tests_properties (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-h5import-${resultfile})
endif ()
@@ -759,7 +753,7 @@
NAME H5DUMP_UD-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}.out"
diff --git a/tools/test/h5dump/CMakeTestsPBITS.cmake b/tools/test/h5dump/CMakeTestsPBITS.cmake
index a6be9ae..1e16875 100644
--- a/tools/test/h5dump/CMakeTestsPBITS.cmake
+++ b/tools/test/h5dump/CMakeTestsPBITS.cmake
@@ -119,16 +119,10 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_H5_PBITS_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> ${ARGN})
+ add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -141,7 +135,7 @@
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/pbits"
-D "TEST_OUTPUT=${resultfile}.out"
diff --git a/tools/test/h5dump/CMakeTestsVDS.cmake b/tools/test/h5dump/CMakeTestsVDS.cmake
index 036609c..ae7193c 100644
--- a/tools/test/h5dump/CMakeTestsVDS.cmake
+++ b/tools/test/h5dump/CMakeTestsVDS.cmake
@@ -115,16 +115,10 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_H5_VDS_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> ${ARGN})
+ add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -137,7 +131,7 @@
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/vds"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -151,7 +145,7 @@
macro (ADD_H5_VDS_PREFIX_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DUMP_PREFIX-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> ${ARGN})
+ add_test (NAME H5DUMP_PREFIX-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN})
set_tests_properties (H5DUMP_PREFIX-${resultfile} PROPERTIES
ENVIRONMENT "HDF5_VDS_PREFIX=${PROJECT_BINARY_DIR}/testfiles/vds/"
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds/prefix"
@@ -167,7 +161,7 @@
NAME H5DUMP_PREFIX-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/vds/prefix"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -183,7 +177,7 @@
macro (ADD_H5_VDS_LAYOUT resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> -p ${ARGN})
+ add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> -p ${ARGN})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -196,7 +190,7 @@
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-p;${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/vds"
-D "TEST_OUTPUT=${resultfile}.out"
diff --git a/tools/test/h5dump/CMakeTestsXML.cmake b/tools/test/h5dump/CMakeTestsXML.cmake
index 6d73cb1..985d940 100644
--- a/tools/test/h5dump/CMakeTestsXML.cmake
+++ b/tools/test/h5dump/CMakeTestsXML.cmake
@@ -160,12 +160,6 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_XML_SKIP_H5_TEST skipresultfile skipresultcode testtype)
if ("${testtype}" STREQUAL "SKIP")
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -182,7 +176,7 @@
macro (ADD_XML_H5_TEST resultfile resultcode)
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DUMP_XML-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> --xml ${ARGN})
+ add_test (NAME H5DUMP_XML-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> --xml ${ARGN})
set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
if (${resultcode})
set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -195,7 +189,7 @@
NAME H5DUMP_XML-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=--xml;${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/xml"
-D "TEST_OUTPUT=${resultfile}.out"
diff --git a/tools/test/h5dump/CMakeVFDTests.cmake b/tools/test/h5dump/CMakeVFDTests.cmake
index 0a345ef..337cfe2 100644
--- a/tools/test/h5dump/CMakeVFDTests.cmake
+++ b/tools/test/h5dump/CMakeVFDTests.cmake
@@ -53,19 +53,13 @@ add_custom_target(HDF5_VFD_H5DUMP_files ALL COMMENT "Copying files needed by HDF
##############################################################################
##############################################################################
-if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
-else ()
- set (tgt_ext "-shared")
-endif ()
-
macro (ADD_VFD_H5DUMP_TEST vfdname resultfile resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5DUMP_VFD-${vfdname}-${resultfile}-h5dump
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
diff --git a/tools/test/h5format_convert/CMakeTests.cmake b/tools/test/h5format_convert/CMakeTests.cmake
index 398866c..7bc33ce 100644
--- a/tools/test/h5format_convert/CMakeTests.cmake
+++ b/tools/test/h5format_convert/CMakeTests.cmake
@@ -97,12 +97,6 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_H5_OUTPUT testname resultfile resultcode testfile)
# If using memchecker add tests without using scripts
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -123,7 +117,7 @@
NAME H5FC-${testname}-${testfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN};outtmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}.out"
@@ -139,7 +133,7 @@
NAME H5FC-${testname}-NA
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}.out"
@@ -172,7 +166,7 @@
NAME H5FC-${testname}-${testfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN};outtmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}.out"
@@ -204,7 +198,7 @@
NAME H5FC-${testname}-${testfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN};outtmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}.out"
@@ -237,7 +231,7 @@
NAME H5FC-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN};./testfiles/tmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=testfiles/${testname}.out"
@@ -280,7 +274,7 @@
NAME H5FC-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
-D "TEST_ARGS=-d;${ARGN};./testfiles/chktmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=testfiles/${testname}.out"
@@ -317,7 +311,7 @@
NAME H5FC-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN};./testfiles/dmptmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=testfiles/${testname}.out"
@@ -330,7 +324,7 @@
NAME H5FC_CHECK_DUMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-BH;./testfiles/dmptmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=testfiles/${testname}_chk.out"
diff --git a/tools/test/h5import/CMakeTests.cmake b/tools/test/h5import/CMakeTests.cmake
index 22ab848..00d5009 100644
--- a/tools/test/h5import/CMakeTests.cmake
+++ b/tools/test/h5import/CMakeTests.cmake
@@ -96,16 +96,10 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_H5_TEST testname importfile conffile testfile)
# If using memchecker skip macro based tests
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5IMPORT-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5import${tgt_ext}> ${importfile} -c ${conffile} -o ${testfile})
+ add_test (NAME H5IMPORT-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5import${tgt_file_ext}> ${importfile} -c ${conffile} -o ${testfile})
set_tests_properties (H5IMPORT-${testname} PROPERTIES
FIXTURES_REQUIRED set_h5importtest
)
@@ -118,7 +112,7 @@
FIXTURES_REQUIRED set_h5importtest
)
- add_test (NAME H5IMPORT-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5import${tgt_ext}> ${importfile} -c ${conffile} -o ${testfile})
+ add_test (NAME H5IMPORT-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5import${tgt_file_ext}> ${importfile} -c ${conffile} -o ${testfile})
set_tests_properties (H5IMPORT-${testname} PROPERTIES
DEPENDS H5IMPORT-${testname}-clear-objects
)
@@ -127,7 +121,7 @@
NAME H5IMPORT-${testname}-H5DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${testfile}.new"
@@ -143,7 +137,7 @@
NAME H5IMPORT-${testname}-H5DMP_CMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=testfiles/${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${testfile}.out"
@@ -176,7 +170,7 @@
NAME H5IMPORT-DUMP-${testname}-H5DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-p;-d;${datasetname};-o;d${testfile}.bin;-b;NATIVE;testfiles/${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=d${testfile}.dmp"
@@ -189,7 +183,7 @@
NAME H5IMPORT-DUMP-${testname}-H5DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-p;-d;${datasetname};-o;d${testfile}.bin;-y;--width=1;testfiles/${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=d${testfile}.dmp"
@@ -206,7 +200,7 @@
NAME H5IMPORT-DUMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5import${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5import${tgt_file_ext}>"
-D "TEST_ARGS:STRING=d${testfile}.bin;-c;d${testfile}.dmp;-o;d${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=d${testfile}.imp"
@@ -222,7 +216,7 @@
NAME H5IMPORT-DUMP-${testname}-H5DFF
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-r;d${testfile};testfiles/${testfile};${datasetname};${datasetname}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=d${testfile}.dff"
@@ -254,7 +248,7 @@
NAME H5IMPORT_SUB-DUMP-${testname}-H5DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-p;-d;${datasetname};${ARGN};-o;${testname}.bin;-b;NATIVE;testfiles/${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${testname}.dmp"
@@ -270,7 +264,7 @@
NAME H5IMPORT_SUB-DUMP-${testname}-H5IMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5import${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5import${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${testname}.bin;-c;${testname}.dmp;-o;d-${testname}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${testname}.imp"
@@ -285,7 +279,7 @@
NAME H5IMPORT_SUB-DUMP-${testname}-CMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-p;d-${testname}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=d-${testname}.dmp"
diff --git a/tools/test/h5jam/CMakeTests.cmake b/tools/test/h5jam/CMakeTests.cmake
index f108afc..aaa9a5c 100644
--- a/tools/test/h5jam/CMakeTests.cmake
+++ b/tools/test/h5jam/CMakeTests.cmake
@@ -47,12 +47,6 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
# ============================================================
# TEST_H5JAM_OUTPUT
# For the purpose to verify only output & exitcode from h5jam
@@ -60,7 +54,7 @@
macro (TEST_H5JAM_OUTPUT expectfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5JAM-${expectfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5jam${tgt_ext}> ${ARGN})
+ add_test (NAME H5JAM-${expectfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5jam${tgt_file_ext}> ${ARGN})
if (${resultcode})
set_tests_properties (H5JAM-${expectfile} PROPERTIES WILL_FAIL "true")
endif ()
@@ -69,7 +63,7 @@
NAME H5JAM-${expectfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5jam${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5jam${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${expectfile}.out"
@@ -89,7 +83,7 @@
macro (TEST_H5UNJAM_OUTPUT expectfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5JAM-UNJAM-${expectfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5unjam${tgt_ext}> ${ARGN})
+ add_test (NAME H5JAM-UNJAM-${expectfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5unjam${tgt_file_ext}> ${ARGN})
if (${resultcode})
set_tests_properties (H5JAM-UNJAM-${expectfile} PROPERTIES WILL_FAIL "true")
endif ()
@@ -98,7 +92,7 @@
NAME H5JAM-UNJAM-${expectfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5unjam${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5unjam${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${expectfile}.out"
@@ -116,7 +110,7 @@
NAME H5JAM-${testname}-CHECKFILE-H5DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=testfiles/${expected}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${actual}.new"
@@ -130,7 +124,7 @@
NAME H5JAM-${testname}-CHECKFILE-H5DMP_CMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${actual}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${actual}.out"
@@ -165,7 +159,7 @@
COMMAND ${CMAKE_COMMAND} -E remove ${ufile}
)
set_tests_properties (H5JAM-${testname}-UNJAM_D-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
- add_test (NAME H5JAM-${testname}-UNJAM COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5unjam${tgt_ext}> -i ${infile} -u ${ufile} -o ${outfile})
+ add_test (NAME H5JAM-${testname}-UNJAM COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5unjam${tgt_file_ext}> -i ${infile} -u ${ufile} -o ${outfile})
set_tests_properties (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects)
set (compare_test ${ufile})
else ()
@@ -174,7 +168,7 @@
NAME H5JAM-${testname}-UNJAM
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5unjam${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5unjam${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-i;${infile};-o;${outfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${outfile}.ufile.txt"
@@ -185,7 +179,7 @@
set_tests_properties (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
set (compare_test "${outfile}.ufile.txt")
else ()
- add_test (NAME H5JAM-${testname}-UNJAM COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5unjam${tgt_ext}> -i ${infile} -o ${outfile})
+ add_test (NAME H5JAM-${testname}-UNJAM COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5unjam${tgt_file_ext}> -i ${infile} -o ${outfile})
set_tests_properties (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
set (compare_test "")
endif ()
@@ -247,7 +241,7 @@
COMMAND ${CMAKE_COMMAND} -E remove ${outfile} ${infile}.cpy.h5
)
endif ()
- add_test (NAME H5JAM-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5jam${tgt_ext}> -u testfiles/${jamfile} -i testfiles/${infile} -o ${outfile} ${ARGN})
+ add_test (NAME H5JAM-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5jam${tgt_file_ext}> -u testfiles/${jamfile} -i testfiles/${infile} -o ${outfile} ${ARGN})
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
set_tests_properties (H5JAM-${testname} PROPERTIES DEPENDS H5JAM-${testname}-clear-objects)
set (compare_test ${outfile})
@@ -302,7 +296,7 @@
)
set_tests_properties (H5JAM-${testname}_NONE_COPY PROPERTIES DEPENDS H5JAM-${testname}_NONE-SETUP)
- add_test (NAME H5JAM-${testname}_NONE COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5jam${tgt_ext}> -u testfiles/${jamfile} -i ${chkfile} ${ARGN})
+ add_test (NAME H5JAM-${testname}_NONE COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5jam${tgt_file_ext}> -u testfiles/${jamfile} -i ${chkfile} ${ARGN})
set_tests_properties (H5JAM-${testname}_NONE PROPERTIES DEPENDS H5JAM-${testname}_NONE_COPY)
set (compare_test ${chkfile})
diff --git a/tools/test/h5ls/CMakeTests.cmake b/tools/test/h5ls/CMakeTests.cmake
index 7ff17ff..2b7aa96 100644
--- a/tools/test/h5ls/CMakeTests.cmake
+++ b/tools/test/h5ls/CMakeTests.cmake
@@ -134,16 +134,10 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_H5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_ext}> ${ARGN})
+ add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_file_ext}> ${ARGN})
set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (${resultcode} EQUAL 1)
set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -154,7 +148,7 @@
NAME H5LS-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -168,7 +162,7 @@
macro (ADD_H5_ERR_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_ext}> ${ARGN})
+ add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_file_ext}> ${ARGN})
set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (${resultcode} EQUAL 1)
set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -178,7 +172,7 @@
NAME H5LS-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -196,7 +190,7 @@
NAME H5LS_UD-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
diff --git a/tools/test/h5ls/CMakeTestsVDS.cmake b/tools/test/h5ls/CMakeTestsVDS.cmake
index cf5b6d7..3fc8aab 100644
--- a/tools/test/h5ls/CMakeTestsVDS.cmake
+++ b/tools/test/h5ls/CMakeTestsVDS.cmake
@@ -80,16 +80,10 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_H5_VDS_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_ext}> ${ARGN})
+ add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_file_ext}> ${ARGN})
set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
if (${resultcode} EQUAL 1)
set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -99,7 +93,7 @@
NAME H5LS-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/vds"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -113,7 +107,7 @@
macro (ADD_H5_VDS_PREFIX_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5LS_PREFIX-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_ext}> ${ARGN})
+ add_test (NAME H5LS_PREFIX-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_file_ext}> ${ARGN})
set_tests_properties (H5LS_PREFIX-${resultfile} PROPERTIES
ENVIRONMENT "HDF5_VDS_PREFIX=\${ORIGIN}"
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
@@ -126,7 +120,7 @@
NAME H5LS_PREFIX-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=vds/prefix/${resultfile}.out"
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index aa99d04..e654bce 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -182,16 +182,10 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_HELP_TEST testname resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5REPACK-h5repack-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN})
+ add_test (NAME H5REPACK-h5repack-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN})
set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
)
@@ -200,7 +194,7 @@
NAME H5REPACK-h5repack-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5repack${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5repack${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=h5repack-${testname}.out"
@@ -232,14 +226,14 @@
)
add_test (
NAME H5REPACK_OLD-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK_OLD-${testname} PROPERTIES
DEPENDS H5REPACK_OLD-${testname}-clear-objects
)
add_test (
NAME H5REPACK_OLD-${testname}_DFF
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK_OLD-${testname}_DFF PROPERTIES
DEPENDS H5REPACK_OLD-${testname}
@@ -267,14 +261,14 @@
)
add_test (
NAME H5REPACK-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> --enable-error-stack ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> --enable-error-stack ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK-${testname} PROPERTIES
DEPENDS H5REPACK-${testname}-clear-objects
)
add_test (
NAME H5REPACK-${testname}_DFF
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK-${testname}_DFF PROPERTIES
DEPENDS H5REPACK-${testname}
@@ -296,7 +290,7 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5REPACK_CMP-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}
)
else ()
add_test (
@@ -310,7 +304,7 @@
NAME H5REPACK_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5repack${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5repack${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN};${resultfile};out-${testname}.${resultfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}-${testname}.out"
@@ -340,7 +334,7 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5REPACK_MASK-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}
)
set_tests_properties (H5REPACK_MASK-${testname} PROPERTIES
FIXTURES_REQUIRED clear_h5repack
@@ -357,7 +351,7 @@
NAME H5REPACK_MASK-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5repack${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5repack${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN};${resultfile};out-${testname}.${resultfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}-${testname}.out"
@@ -391,7 +385,7 @@
)
add_test (
NAME H5REPACK_DMP-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}
)
set_tests_properties (H5REPACK_DMP-${testname} PROPERTIES
DEPENDS H5REPACK_DMP-${testname}-clear-objects
@@ -401,7 +395,7 @@
NAME H5REPACK_DMP-h5dump-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-q;creation_order;-pH;out-${testname}.${resultfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}-${testname}.out"
@@ -435,7 +429,7 @@
)
add_test (
NAME H5REPACK_STAT-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${statarg}.${resultfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${statarg}.${resultfile}
)
set_tests_properties (H5REPACK_STAT-${testname} PROPERTIES
DEPENDS H5REPACK_STAT-${testname}-clear-objects
@@ -445,7 +439,7 @@
NAME H5REPACK_STAT-h5stat-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5stat${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5stat${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-S;-s;out-${statarg}.${resultfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}-${testname}.out"
@@ -480,14 +474,14 @@
)
add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES
DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects
)
add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DFF
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DFF PROPERTIES
DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}
@@ -497,7 +491,7 @@
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-d;${testdset};-pH;out-${testname}.${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testfile}-${testname}-v.out"
@@ -523,7 +517,7 @@
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-pH;out-${testname}.${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testfile}-${testname}-v.out"
@@ -561,7 +555,7 @@
)
add_test (
NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname} PROPERTIES
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
@@ -571,7 +565,7 @@
NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-d;${testdset};-p;out-${testname}.${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testfile}-${testname}-v.out"
@@ -599,7 +593,7 @@
)
add_test (
NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname} PROPERTIES
DEPENDS H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects
@@ -608,7 +602,7 @@
NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-H;-B;out-${testname}.${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testfile}-${testname}-v.out"
@@ -633,7 +627,7 @@
)
add_test (
NAME ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname} PROPERTIES
DEPENDS ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects
@@ -654,20 +648,20 @@
)
add_test (
NAME H5REPACK_META-${testname}_N
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5
)
set_tests_properties (H5REPACK_META-${testname}_N PROPERTIES
DEPENDS H5REPACK_META-${testname}_N-clear-objects
)
add_test (
NAME H5REPACK_META-${testname}_M
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5
)
set_tests_properties (H5REPACK_META-${testname}_M PROPERTIES
DEPENDS H5REPACK_META-${testname}_N
)
- add_test (NAME H5REPACK_META-${testname} COMMAND ${CMAKE_COMMAND} -E compare_files ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5)
+ add_test (NAME H5REPACK_META-${testname} COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5)
set_tests_properties (H5REPACK_META-${testname} PROPERTIES
WILL_FAIL "true"
DEPENDS H5REPACK_META-${testname}_M
@@ -758,7 +752,7 @@
# comparison of known files
add_test (
NAME H5REPACK_EXTERNAL-${testname}_DFF1
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5
)
set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF1 PROPERTIES
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
@@ -767,7 +761,7 @@
# repack the external file to the repacked file
add_test (
NAME H5REPACK_EXTERNAL-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> --enable-error-stack ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> --enable-error-stack ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5
)
set_tests_properties (H5REPACK_EXTERNAL-${testname} PROPERTIES
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
@@ -776,7 +770,7 @@
# comparison of repacked file to known files
add_test (
NAME H5REPACK_EXTERNAL-${testname}_DFF2
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}.h5
)
set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF2 PROPERTIES
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
@@ -784,7 +778,7 @@
)
add_test (
NAME H5REPACK_EXTERNAL-${testname}_DFF3
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5
)
set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF3 PROPERTIES
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
@@ -802,7 +796,7 @@
# verify comparison of repacked file to known file
add_test (
NAME H5REPACK_EXTERNAL-${testname}_DFF4
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}.h5
)
set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF4 PROPERTIES
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
@@ -811,7 +805,7 @@
# verify comparison of repacked file to known external file fails
add_test (
NAME H5REPACK_EXTERNAL-${testname}_DFF_FAIL
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5
)
set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF_FAIL PROPERTIES
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
diff --git a/tools/test/h5stat/CMakeTests.cmake b/tools/test/h5stat/CMakeTests.cmake
index 9674a77..0c07418 100644
--- a/tools/test/h5stat/CMakeTests.cmake
+++ b/tools/test/h5stat/CMakeTests.cmake
@@ -93,16 +93,10 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_H5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5STAT-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5stat${tgt_ext}> ${ARGN})
+ add_test (NAME H5STAT-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5stat${tgt_file_ext}> ${ARGN})
if (${resultcode})
set_tests_properties (H5STAT-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
@@ -111,7 +105,7 @@
NAME H5STAT-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5stat${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5stat${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -125,7 +119,7 @@
macro (ADD_H5_ERR_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5STAT-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5stat${tgt_ext}> ${ARGN})
+ add_test (NAME H5STAT-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5stat${tgt_file_ext}> ${ARGN})
if (${resultcode})
set_tests_properties (H5STAT-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
@@ -134,7 +128,7 @@
NAME H5STAT-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5stat${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5stat${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${resultfile}.out"
diff --git a/tools/test/misc/CMakeTestsClear.cmake b/tools/test/misc/CMakeTestsClear.cmake
index a2c494d..cb285e4 100644
--- a/tools/test/misc/CMakeTestsClear.cmake
+++ b/tools/test/misc/CMakeTestsClear.cmake
@@ -83,12 +83,6 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
# Need special dependencies for tests that use the same reference file
# This is an issue on Windows
macro (ADD_H5_CMP testname resultfile resultcode)
@@ -97,7 +91,7 @@
NAME H5CLEAR_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}.out"
@@ -114,7 +108,7 @@
NAME H5CLEAR_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}.out"
@@ -144,7 +138,7 @@
NAME H5CLEAR_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN};${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}.out"
@@ -176,7 +170,7 @@
NAME H5CLEAR_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN};${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}.out"
@@ -195,7 +189,7 @@
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5CLEAR_RET-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> ${ARGN}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_file_ext}> ${ARGN}
)
set_tests_properties (H5CLEAR_RET-${testname} PROPERTIES
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
@@ -222,7 +216,7 @@
NAME H5CLEAR_FILESIZE_CMP-${testname}_before_size
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_file_ext}>"
-D "TEST_ARGS:STRING=--filesize;${testname}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}_before_size.out"
@@ -236,12 +230,12 @@
if (NOT ${incr_size} MATCHES "NONE")
add_test (
NAME H5CLEAR_FILESIZE_INCR-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> --increment=${incr_size} ${testname}.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_file_ext}> --increment=${incr_size} ${testname}.h5
)
else ()
add_test (
NAME H5CLEAR_FILESIZE_INCR-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> --increment ${testname}.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_file_ext}> --increment ${testname}.h5
)
endif ()
set_tests_properties (H5CLEAR_FILESIZE_INCR-${testname} PROPERTIES
@@ -253,7 +247,7 @@
NAME H5CLEAR_FILESIZE_CMP-${testname}_after_size
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_file_ext}>"
-D "TEST_ARGS:STRING=--filesize;${testname}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}_after_size.out"
@@ -285,7 +279,7 @@
NAME H5CLEAR_FILESIZE_FAIL_CMP-${testname}_before_size
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_file_ext}>"
-D "TEST_ARGS:STRING=--filesize;${testname}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}_before_size.out"
@@ -299,12 +293,12 @@
if (NOT ${incr_size} MATCHES "NONE")
add_test (
NAME H5CLEAR_FILESIZE_FAIL_INCR-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> -s --increment=${incr_size} ${testname}.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_file_ext}> -s --increment=${incr_size} ${testname}.h5
)
else ()
add_test (
NAME H5CLEAR_FILESIZE_FAIL_INCR-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> -s --increment ${testname}.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_file_ext}> -s --increment ${testname}.h5
)
endif ()
set_tests_properties (H5CLEAR_FILESIZE_FAIL_INCR-${testname} PROPERTIES
@@ -315,7 +309,7 @@
NAME H5CLEAR_FILESIZE_FAIL_CMP-${testname}_after_size
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_file_ext}>"
-D "TEST_ARGS:STRING=--filesize;${testname}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}_after_size.out"
@@ -352,7 +346,7 @@
# After "h5clear" the file, the subsequent file open succeeds
add_test (
NAME H5CLEAR-h5clr-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> -s ${testfile}.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_file_ext}> -s ${testfile}.h5
)
set_tests_properties (H5CLEAR-h5clr-${testname} PROPERTIES
DEPENDS H5CLEAR-clr_open_chk-${testname}_${resultcode}
diff --git a/tools/test/misc/CMakeTestsMkgrp.cmake b/tools/test/misc/CMakeTestsMkgrp.cmake
index 75cafb7..fb9e5ba 100644
--- a/tools/test/misc/CMakeTestsMkgrp.cmake
+++ b/tools/test/misc/CMakeTestsMkgrp.cmake
@@ -54,17 +54,11 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_H5_TEST resultfile resultcode resultoption)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5MKGRP-${resultfile}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5mkgrp${tgt_ext}> ${resultoption} ${resultfile}.h5 ${ARGN}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5mkgrp${tgt_file_ext}> ${resultoption} ${resultfile}.h5 ${ARGN}
)
else ()
add_test (
@@ -76,7 +70,7 @@
)
add_test (
NAME H5MKGRP-${resultfile}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5mkgrp${tgt_ext}> ${resultoption} ${resultfile}.h5 ${ARGN}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5mkgrp${tgt_file_ext}> ${resultoption} ${resultfile}.h5 ${ARGN}
)
set_tests_properties (H5MKGRP-${resultfile} PROPERTIES
DEPENDS H5MKGRP-${resultfile}-clear-objects
@@ -86,7 +80,7 @@
NAME H5MKGRP-${resultfile}-h5ls
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-v;-r;${resultfile}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -101,7 +95,7 @@
macro (ADD_H5_CMP resultfile resultcode)
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5MKGRP_CMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5mkgrp${tgt_ext}> ${ARGN})
+ add_test (NAME H5MKGRP_CMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5mkgrp${tgt_file_ext}> ${ARGN})
else ()
add_test (
NAME H5MKGRP_CMP-${resultfile}-clear-objects
@@ -114,7 +108,7 @@
NAME H5MKGRP_CMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5mkgrp${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5mkgrp${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
diff --git a/tools/test/misc/CMakeTestsRepart.cmake b/tools/test/misc/CMakeTestsRepart.cmake
index fa49c53..14b349c 100644
--- a/tools/test/misc/CMakeTestsRepart.cmake
+++ b/tools/test/misc/CMakeTestsRepart.cmake
@@ -58,12 +58,6 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
# Remove any output file left over from previous test run
add_test (
NAME H5REPART-clearall-objects
@@ -82,7 +76,7 @@
# repartition family member size to 20,000 bytes.
add_test (
NAME H5REPART-h5repart_20K
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_ext}> -m 20000 family_file%05d.h5 fst_family%05d.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_file_ext}> -m 20000 family_file%05d.h5 fst_family%05d.h5
)
set_tests_properties (H5REPART-h5repart_20K PROPERTIES
FIXTURES_REQUIRED clear_testrepart
@@ -91,7 +85,7 @@
# repartition family member size to 5 KB.
add_test (
NAME H5REPART-h5repart_5K
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_ext}> -m 5k family_file%05d.h5 scd_family%05d.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_file_ext}> -m 5k family_file%05d.h5 scd_family%05d.h5
)
set_tests_properties (H5REPART-h5repart_5K PROPERTIES
FIXTURES_REQUIRED clear_testrepart
@@ -100,7 +94,7 @@
# convert family file to sec2 file of 20,000 bytes
add_test (
NAME H5REPART-h5repart_single
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_ext}> -m 20000 -family_to_single family_file%05d.h5 family_to_single.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_file_ext}> -m 20000 -family_to_single family_file%05d.h5 family_to_single.h5
)
set_tests_properties (H5REPART-h5repart_single PROPERTIES
FIXTURES_REQUIRED clear_testrepart
@@ -109,7 +103,7 @@
# convert family file to sec2 file of 20,000 bytes (old argument)
add_test (
NAME H5REPART-h5repart_sec2
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_ext}> -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_file_ext}> -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5
)
set_tests_properties (H5REPART-h5repart_sec2 PROPERTIES
FIXTURES_REQUIRED clear_testrepart
diff --git a/tools/test/perform/pio_engine.c b/tools/test/perform/pio_engine.c
index 3863550..cdd698e 100644
--- a/tools/test/perform/pio_engine.c
+++ b/tools/test/perform/pio_engine.c
@@ -129,6 +129,7 @@ static herr_t do_fopen(parameters *param, char *fname, file_descr *fd /*out*/,
int flags);
static herr_t do_fclose(iotype iot, file_descr *fd);
static void do_cleanupfile(iotype iot, char *fname);
+static off_t sqrto(off_t);
/*
* Function: do_pio
@@ -199,7 +200,7 @@ do_pio(parameters param)
bsize = buf_size; /* Actual buffer size */
}
else {
- snbytes = (off_t)sqrt((double)nbytes); /* General dataset size */
+ snbytes = sqrto(nbytes); /* General dataset size */
bsize = buf_size * blk_size; /* Actual buffer size */
}
@@ -596,7 +597,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
/* nbytes is always the number of bytes per dataset (1D or 2D). If the
dataspace is 2D, snbytes is the size of a side of the dataset square.
*/
- snbytes = (off_t)sqrt((double)nbytes);
+ snbytes = sqrto(nbytes);
/* Contiguous Pattern: */
if (!parms->interleaved) {
@@ -1489,6 +1490,13 @@ done:
return ret_code;
}
+static off_t
+sqrto(off_t x)
+{
+ double root_x = sqrt((double)x);
+ return (off_t)root_x;
+}
+
/*
* Function: do_read
* Purpose: read the required amount of data from the file.
@@ -1581,7 +1589,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
/* nbytes is always the number of bytes per dataset (1D or 2D). If the
dataspace is 2D, snbytes is the size of a side of the 'dataset square'.
*/
- snbytes = (off_t)sqrt((double)nbytes);
+ snbytes = sqrto(nbytes);
bsize = buf_size * blk_size;
diff --git a/tools/test/perform/sio_engine.c b/tools/test/perform/sio_engine.c
index 69409bb..9ea94cb 100644
--- a/tools/test/perform/sio_engine.c
+++ b/tools/test/perform/sio_engine.c
@@ -1268,8 +1268,7 @@ done:
* 'temp' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+H5_GCC_DIAG_OFF(format-nonliteral)
static void
do_cleanupfile(iotype iot, char *filename)
{
@@ -1331,5 +1330,5 @@ do_cleanupfile(iotype iot, char *filename)
}
}
}
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(format-nonliteral)