From 0feda66ff0dccdf77453b7c881c80be244e0ae12 Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Mon, 9 Oct 2023 10:42:46 -0700 Subject: Bring the H5detect removal change from develop (#3648) * Bring the H5detect removal change from develop - Removed CMake cross-compiling variables * HDF5_USE_PREGEN * HDF5_BATCH_H5DETECT These were used to work around H5detect and H5make_libsettings and are no longer required. - Running H5make_libsettings is no longer required for cross-compiling The functionality of H5make_libsettings is now handled via template files, so H5make_libsettings has been removed. - Running H5detect is no longer required for cross-compiling The functionality of H5detect is now exercised at library startup, so H5detect has been removed. * Put H5T_CONV_ab macros in do..while loops (#3432) Ever since a recent round of macro cleanup, bin/trace and clang-format have been bickering over what H5Tconv.c should look like and neither produces readable code. This change puts the top-level H5T_CONV_ab macros in do..while loops, adds appropriate semicolons, and adds the missing H5_CLANG_DIAG_ON|OFF and H5_GCC_CLANG_DIAG_ON|OFF macros to the list of statement macros clang-format recognizes. H5Tconv.c is now readable and both bin/trace and clang-format are happy. --- .clang-format | 4 + CMakeLists.txt | 6 - bin/batch/knl_H5detect.sl.in.cmake | 20 - configure.ac | 7 + release_docs/INSTALL_CMake.txt | 9 - release_docs/README_HPC | 19 - release_docs/RELEASE.txt | 18 + src/CMakeLists.txt | 175 +---- src/H5.c | 9 +- src/H5T.c | 18 +- src/H5Tconv.c | 1452 ++++++++++++++++++++++------------- src/H5Tinit_float.c | 572 ++++++++++++++ src/H5Tpkg.h | 2 +- src/H5build_settings.autotools.c.in | 119 +++ src/H5build_settings.cmake.c.in | 117 +++ src/H5build_settings.off.c.in | 13 + src/H5detect.c | 941 ----------------------- src/H5make_libsettings.c | 300 -------- src/H5private.h | 2 +- src/Makefile.am | 42 +- 20 files changed, 1805 insertions(+), 2040 deletions(-) delete mode 100644 bin/batch/knl_H5detect.sl.in.cmake create mode 100644 src/H5Tinit_float.c create mode 100644 src/H5build_settings.autotools.c.in create mode 100644 src/H5build_settings.cmake.c.in create mode 100644 src/H5build_settings.off.c.in delete mode 100644 src/H5detect.c delete mode 100644 src/H5make_libsettings.c diff --git a/.clang-format b/.clang-format index 0d59087..0b62255 100644 --- a/.clang-format +++ b/.clang-format @@ -83,6 +83,10 @@ StatementMacros: - H5_END_TAG - H5_GCC_DIAG_OFF - H5_GCC_DIAG_ON + - H5_CLANG_DIAG_OFF + - H5_CLANG_DIAG_ON + - H5_GCC_CLANG_DIAG_OFF + - H5_GCC_CLANG_DIAG_ON - H5_LEAVE - HGOTO_DONE - HMPI_DONE_ERROR diff --git a/CMakeLists.txt b/CMakeLists.txt index da12dd3..f5f5d19 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1225,10 +1225,4 @@ endif () #----------------------------------------------------------------------------- configure_file (${HDF_RESOURCES_DIR}/H5pubconf.h.in ${HDF5_SRC_BINARY_DIR}/H5pubconf.h @ONLY) -#----------------------------------------------------------------------------- -# Options for use by cross compiling and toolchains -#----------------------------------------------------------------------------- -option (HDF5_USE_PREGEN "Use pre-generated Files" OFF) -option (HDF5_BATCH_H5DETECT "Use a batch command for running h5detect" OFF) - include (CMakeInstallation.cmake) diff --git a/bin/batch/knl_H5detect.sl.in.cmake b/bin/batch/knl_H5detect.sl.in.cmake deleted file mode 100644 index 39a3ef3..0000000 --- a/bin/batch/knl_H5detect.sl.in.cmake +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -#SBATCH -p knl -C quad -#SBATCH --nodes=1 -#SBATCH -t 00:10:00 -#SBATCH --mail-type=BEGIN,END,FAIL -#SBATCH --mail-user=@sandia.gov -#SBATCH --export=ALL -#SBATCH --job-name=knl_h5detect - - -# Inputs: Build directory, output file name, executable file name (username/email if available). -PROGNAME=H5detect -OUTPUT=H5Tinit.c - -CMD="@HDF5_BINARY_DIR@/bin/${PROGNAME} @HDF5_GENERATED_SOURCE_DIR@/${OUTPUT}" -echo "Run $CMD" -srun -n 1 $CMD -echo "Done running $CMD" - diff --git a/configure.ac b/configure.ac index 06ba0dd..77f2eb3 100644 --- a/configure.ac +++ b/configure.ac @@ -112,6 +112,10 @@ AC_CONFIG_COMMANDS([pubconf], [ sed '/^#/d' < src/libhdf5.settings > libhdf5.settings.TMP cp libhdf5.settings.TMP src/libhdf5.settings rm -f libhdf5.settings.TMP + echo "Post process src/H5build_settings.c" + sed '/^# /d' < src/H5build_settings.c > H5build_settings.TMP + cp H5build_settings.TMP src/H5build_settings.c + rm -f H5build_settings.TMP ]) ## It's possible to configure for a host other than the one on which @@ -3908,9 +3912,11 @@ AC_ARG_ENABLE([embedded-libinfo], if test "${enable_embedded_libinfo}" = "yes"; then AC_MSG_RESULT([yes]) + BUILD_SETTINGS_FILE="src/H5build_settings.autotools.c.in" AC_DEFINE([HAVE_EMBEDDED_LIBINFO], [1], [Define if library information should be embedded in the executables]) else + BUILD_SETTINGS_FILE="src/H5build_settings.off.c.in" AC_MSG_RESULT([no]) fi @@ -4047,6 +4053,7 @@ AC_CONFIG_FILES([Makefile doxygen/Doxyfile src/Makefile src/libhdf5.settings + src/H5build_settings.c:${BUILD_SETTINGS_FILE} test/Makefile test/H5srcdir_str.h test/test_abort_fail.sh diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 4da4daa..9e0797b 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -1030,15 +1030,6 @@ References: https://stackoverflow.com/questions/54539682/how-to-set-up-cmake-to-cross-compile-with-clang-for-arm-embedded-on-windows?rq=1 https://developer.android.com/ndk/guides/cmake -Predefine H5Tinit.c file -------------------------------- -The one file that needs to be pre-generated is the H5Tinit.c file. The variables -indicated in the error log (see above) are the variables that need to match the target system. - -The HDF5 CMake variables; - HDF5_USE_PREGEN: set this to true - HDF5_USE_PREGEN_DIR: set this path to the preset H5Tinit.c file - ======================================================================== X: Using CMakePresets.json for compiling diff --git a/release_docs/README_HPC b/release_docs/README_HPC index 27dc32c..576e019 100644 --- a/release_docs/README_HPC +++ b/release_docs/README_HPC @@ -9,7 +9,6 @@ Section II: Obtain HDF5 source Section III: Using ctest command to build and test Section IV: Cross compiling Section V: Manual alternatives -Section VI: Other cross compiling options ************************************************************************ @@ -184,21 +183,3 @@ or for parallel builds. Tests on machines using LSF will typically use "bsub ctestS.lsf", etc. - -======================================================================== -VI. Other cross compiling options -======================================================================== -Settings for two other cross-compiling options are also in the config/toolchain -files which do not seem to be necessary with the Cray PrgEnv-* modules - -1. HDF5_USE_PREGEN. This option, along with the HDF5_USE_PREGEN_DIR CMake - variable would allow the use of an appropriate H5Tinit.c file with type - information generated on a compute node to be used when cross compiling - for those compute nodes. The use of the variables in lines 110 and 111 - of HDF5options.cmake file seem to preclude needing this option with the - available Cray modules and CMake option. - -2. HDF5_BATCH_H5DETECT and associated CMake variables. This option when - properly configured will run H5detect in a batch job on a compute node - at the beginning of the CMake build process. It was also found to be - unnecessary with the available Cray modules and CMake options. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 57e8189..f68775c 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -47,6 +47,24 @@ New Features Configuration: ------------- + - Removed CMake cross-compiling variables + + * HDF5_USE_PREGEN + * HDF5_BATCH_H5DETECT + + These were used to work around H5detect and H5make_libsettings and + are no longer required. + + - Running H5make_libsettings is no longer required for cross-compiling + + The functionality of H5make_libsettings is now handled via template files, + so H5make_libsettings has been removed. + + - Running H5detect is no longer required for cross-compiling + + The functionality of H5detect is now exercised at library startup, + so H5detect has been removed. + - Thread-safety + static library disabled on Windows w/ CMake The thread-safety feature requires hooks in DllMain(), which is only diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 92c74f7..a0a67df 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,6 +6,7 @@ project (HDF5_SRC C) #----------------------------------------------------------------------------- set (H5_SOURCES ${HDF5_SRC_DIR}/H5.c + ${HDF5_SRC_BINARY_DIR}/H5build_settings.c ${HDF5_SRC_DIR}/H5checksum.c ${HDF5_SRC_DIR}/H5dbg.c ${HDF5_SRC_DIR}/H5mpi.c @@ -616,6 +617,7 @@ set (H5T_SOURCES ${HDF5_SRC_DIR}/H5Tfields.c ${HDF5_SRC_DIR}/H5Tfixed.c ${HDF5_SRC_DIR}/H5Tfloat.c + ${HDF5_SRC_DIR}/H5Tinit_float.c ${HDF5_SRC_DIR}/H5Tnative.c ${HDF5_SRC_DIR}/H5Toffset.c ${HDF5_SRC_DIR}/H5Toh.c @@ -1013,14 +1015,9 @@ if (HDF5_GENERATE_HEADERS) endif () #----------------------------------------------------------------------------- -# Setup the H5detect utility which generates H5Tinit with platform -# specific type checks inside +# Generate the H5build_settings.c file #----------------------------------------------------------------------------- -if (HDF5_USE_PREGEN) - set (HDF5_GENERATED_SOURCE_DIR ${HDF5_USE_PREGEN_DIR}) -else () - set (HDF5_GENERATED_SOURCE_DIR ${HDF5_SRC_BINARY_DIR}) -endif () +configure_file (${HDF5_SOURCE_DIR}/src/H5build_settings.cmake.c.in ${HDF5_SRC_BINARY_DIR}/H5build_settings.c @ONLY) if (BUILD_SHARED_LIBS) file (MAKE_DIRECTORY "${HDF5_SRC_BINARY_DIR}/shared") @@ -1055,159 +1052,11 @@ if (LOCAL_BATCH_TEST) endif () endif () -#### make the H5detect program -set (lib_prog_deps) -add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c) -target_include_directories (H5detect PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") -target_compile_definitions(H5detect PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS}) -TARGET_C_PROPERTIES (H5detect STATIC) -target_link_libraries (H5detect - PRIVATE "$<$:MPI::MPI_C>" $<$,$>:ws2_32.lib> -) -target_compile_options(H5detect - PRIVATE "$<$:-O0>" -) -set (lib_prog_deps ${lib_prog_deps} H5detect) - -# check if a pregenerated H5Tinit.c file is present -if (NOT EXISTS "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c") - # execute the H5detect program - if (HDF5_BATCH_H5DETECT) - configure_file ( - ${HDF5_SOURCE_DIR}/bin/batch/${HDF5_BATCH_H5DETECT_SCRIPT}.in.cmake - ${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT} ESCAPE_QUOTES @ONLY - ) - add_custom_command ( - OUTPUT gen_SRCS.stamp1 - BYPRODUCTS H5Tinit.c - COMMAND ${HDF5_BATCH_CMD} - ARGS ${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT} - COMMAND ${CMAKE_COMMAND} - ARGS -E echo "Executed batch command to create H5Tinit.c" - COMMAND ${CMAKE_COMMAND} - ARGS -E touch gen_SRCS.stamp1 - DEPENDS H5detect - WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} - ) - add_custom_target (gen_H5Tinit - COMMAND ${CMAKE_COMMAND} -P ${HDF5_SOURCE_DIR}/config/cmake/wait_H5Tinit.cmake - ) - else () - add_custom_command ( - OUTPUT gen_SRCS.stamp1 - BYPRODUCTS H5Tinit.c - COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ - ARGS H5Tinit.c - COMMAND ${CMAKE_COMMAND} - ARGS -E touch gen_SRCS.stamp1 - DEPENDS H5detect - WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} - COMMENT "Create H5Tinit.c" - ) - if (BUILD_SHARED_LIBS) - add_custom_command ( - OUTPUT shared/shared_gen_SRCS.stamp1 - BYPRODUCTS shared/H5Tinit.c - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different H5Tinit.c shared/H5Tinit.c - COMMAND ${CMAKE_COMMAND} - ARGS -E touch shared/shared_gen_SRCS.stamp1 - DEPENDS H5detect gen_SRCS.stamp1 - WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} - COMMENT "Copy H5Tinit.c to shared folder" - ) - endif () - endif () -else () - add_custom_command ( - OUTPUT gen_SRCS.stamp1 - COMMAND ${CMAKE_COMMAND} - ARGS -E touch gen_SRCS.stamp1 - DEPENDS H5Tinit.c - WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} - COMMENT "Touch existing H5Tinit.c" - ) - set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE) - if (BUILD_SHARED_LIBS) - add_custom_command ( - OUTPUT shared/shared_gen_SRCS.stamp1 - BYPRODUCTS shared/H5Tinit.c - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different H5Tinit.c shared/H5Tinit.c - COMMAND ${CMAKE_COMMAND} - ARGS -E touch shared/shared_gen_SRCS.stamp1 - DEPENDS H5Tinit.c gen_SRCS.stamp1 - WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} - COMMENT "Copy existing H5Tinit.c to shared folder" - ) - endif () -endif () - -#----------------------------------------------------------------------------- -# Add Target to clang-format -#----------------------------------------------------------------------------- -if (HDF5_ENABLE_FORMATTERS) - clang_format (HDF5_SRC_DETECT_FORMAT ${HDF5_SRC_DIR}/H5detect.c) -endif () - -# make the H5make_libsettings program -add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c) -target_include_directories (H5make_libsettings PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") -target_compile_definitions(H5make_libsettings PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS}) -TARGET_C_PROPERTIES (H5make_libsettings STATIC) -target_link_libraries (H5make_libsettings - PRIVATE "$<$:MPI::MPI_C>" $<$,$>:ws2_32.lib> -) -target_compile_options(H5make_libsettings - PRIVATE "$<$:-O0>" -) -set (lib_prog_deps ${lib_prog_deps} H5make_libsettings) - -#----------------------------------------------------------------------------- -# Add Target to clang-format -#----------------------------------------------------------------------------- -if (HDF5_ENABLE_FORMATTERS) - clang_format (HDF5_SRC_LIBSETTINGS_FORMAT H5make_libsettings) -endif () - -# execute the H5make_libsettings program -add_custom_command ( - OUTPUT gen_SRCS.stamp2 - BYPRODUCTS H5lib_settings.c - COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ - ARGS H5lib_settings.c - COMMAND ${CMAKE_COMMAND} - ARGS -E touch gen_SRCS.stamp2 - DEPENDS H5make_libsettings - WORKING_DIRECTORY ${HDF5_SRC_BINARY_DIR} - COMMENT "Create H5lib_settings.c" -) -set_source_files_properties (${HDF5_SRC_BINARY_DIR}/H5lib_settings.c PROPERTIES GENERATED TRUE) -if (BUILD_SHARED_LIBS) - add_custom_command ( - OUTPUT shared/shared_gen_SRCS.stamp2 - BYPRODUCTS shared/H5lib_settings.c - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different H5lib_settings.c shared/H5lib_settings.c - COMMAND ${CMAKE_COMMAND} - ARGS -E touch shared/shared_gen_SRCS.stamp2 - DEPENDS H5make_libsettings gen_SRCS.stamp2 - WORKING_DIRECTORY ${HDF5_SRC_BINARY_DIR} - COMMENT "Copy H5lib_settings.c to shared folder" - ) -endif () - #----------------------------------------------------------------------------- -# Add H5Tinit source to build - generated by H5detect/CMake at configure time +# Set up library builds #----------------------------------------------------------------------------- if (BUILD_STATIC_LIBS) - set (gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c) - add_custom_target (gen_${HDF5_LIB_TARGET} ALL - DEPENDS ${lib_prog_deps} ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 ${HDF5_SRC_BINARY_DIR}/gen_SRCS.stamp2 - COMMENT "Generation target files" - ) - - add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS} ${H5_MODULE_HEADERS}) + add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} H5build_settings.c ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS} ${H5_MODULE_HEADERS}) target_include_directories (${HDF5_LIB_TARGET} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" INTERFACE "$/include>;$" @@ -1235,19 +1084,12 @@ if (BUILD_STATIC_LIBS) set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC 0) set_target_properties (${HDF5_LIB_TARGET} PROPERTIES FOLDER libraries) - add_dependencies (${HDF5_LIB_TARGET} gen_${HDF5_LIB_TARGET}) set (install_targets ${HDF5_LIB_TARGET}) endif () if (BUILD_SHARED_LIBS) - set (shared_gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c ${HDF5_SRC_BINARY_DIR}/shared/H5lib_settings.c) - add_custom_target (gen_${HDF5_LIBSH_TARGET} ALL - DEPENDS ${lib_prog_deps} ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 ${HDF5_SRC_BINARY_DIR}/shared/shared_gen_SRCS.stamp2 - COMMENT "Shared generation target files" - ) - - add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS} ${H5_MODULE_HEADERS}) + add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} H5build_settings.c ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS} ${H5_MODULE_HEADERS}) target_include_directories (${HDF5_LIBSH_TARGET} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" PUBLIC "$<$:${HDFS_INCLUDE_DIR}>" @@ -1274,7 +1116,6 @@ if (BUILD_SHARED_LIBS) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_LIBSH_TARGET} ${HDF5_LIB_NAME} SHARED "LIB") set_target_properties (${HDF5_LIBSH_TARGET} PROPERTIES FOLDER libraries) - add_dependencies (${HDF5_LIBSH_TARGET} gen_${HDF5_LIBSH_TARGET}) set (install_targets ${install_targets} ${HDF5_LIBSH_TARGET}) endif () @@ -1416,7 +1257,7 @@ if (DOXYGEN_FOUND) # Replace variables inside @@ with the current values add_custom_target (hdf5lib_doc ALL COMMAND ${DOXYGEN_EXECUTABLE} ${HDF5_BINARY_DIR}/Doxyfile - DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c + DEPENDS ${HDF5_SRC_BINARY_DIR}/H5build_settings.c WORKING_DIRECTORY ${HDF5_SRC_DIR} COMMENT "Generating HDF5 library Source API documentation with Doxygen" VERBATIM ) diff --git a/src/H5.c b/src/H5.c index 10617bc..91212d1 100644 --- a/src/H5.c +++ b/src/H5.c @@ -904,8 +904,8 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum) /* Mention the versions we are referring to */ fprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum, (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE); - /* Show library settings if available */ - fprintf(stderr, "%s", H5libhdf5_settings); + /* Show library build settings if available */ + fprintf(stderr, "%s", H5build_settings); /* Bail out now. */ HDfputs("Bye...\n", stderr); @@ -921,8 +921,9 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum) /* Mention the versions we are referring to */ fprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum, (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE); - /* Show library settings if available */ - fprintf(stderr, "%s", H5libhdf5_settings); + /* Show library build settings if available */ + fprintf(stderr, "%s", H5build_settings); + break; default: /* 2 or higher: continue silently */ diff --git a/src/H5T.c b/src/H5T.c index 1c5c3f5..0511e22 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -368,8 +368,7 @@ H5T_order_t H5T_native_order_g = H5T_ORDER_ERROR; /*********************/ /* - * Predefined data types. These are initialized at runtime in H5Tinit.c and - * by H5T_init() in this source file. + * Predefined data types. These are initialized at runtime by H5T_init(). * * If more of these are added, the new ones must be added to the list of * types to reset in H5T_term_package(). @@ -501,11 +500,7 @@ size_t H5T_NATIVE_FLOAT_ALIGN_g = 0; size_t H5T_NATIVE_DOUBLE_ALIGN_g = 0; size_t H5T_NATIVE_LDOUBLE_ALIGN_g = 0; -/* - * Alignment constraints for C9x types. These are initialized at run time in - * H5Tinit.c if the types are provided by the system. Otherwise we set their - * values to 0 here (no alignment calculated). - */ +/* Alignment constraints for C99 types */ size_t H5T_NATIVE_INT8_ALIGN_g = 0; size_t H5T_NATIVE_UINT8_ALIGN_g = 0; size_t H5T_NATIVE_INT_LEAST8_ALIGN_g = 0; @@ -752,12 +747,9 @@ H5T_init(void) /* Only 16 (numbered 0-15) are supported in the current file format */ HDcompile_assert(H5T_NCLASSES < 16); - /* - * Initialize pre-defined native datatypes from code generated during - * the library configuration by H5detect. - */ - if (H5T__init_native() < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize interface"); + /* Initialize native floating-point datatypes */ + if (H5T__init_native_float_types() < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize floating-point types"); /* Initialize all other native types */ if (H5T__init_native_internal() < 0) diff --git a/src/H5Tconv.c b/src/H5Tconv.c index f6b9b91..daa282c 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -244,10 +244,10 @@ } #define H5T_CONV_sS(STYPE, DTYPE, ST, DT, D_MIN, D_MAX) \ - { \ + do { \ HDcompile_assert(sizeof(ST) <= sizeof(DT)); \ H5T_CONV(H5T_CONV_xX, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ - } + } while (0) #define H5T_CONV_sU_CORE(STYPE, DTYPE, S, D, ST, DT, D_MIN, D_MAX) \ { \ @@ -273,10 +273,10 @@ } #define H5T_CONV_sU(STYPE, DTYPE, ST, DT, D_MIN, D_MAX) \ - { \ + do { \ HDcompile_assert(sizeof(ST) <= sizeof(DT)); \ H5T_CONV(H5T_CONV_sU, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ - } + } while (0) /* Define to 1 if overflow is possible during conversion, 0 otherwise * Because destination is at least as wide as the source, this should only @@ -355,22 +355,22 @@ } #define H5T_CONV_uS(STYPE, DTYPE, ST, DT, D_MIN, D_MAX) \ - { \ + do { \ HDcompile_assert(sizeof(ST) <= sizeof(DT)); \ H5T_CONV(H5T_CONV_uS, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ - } + } while (0) #define H5T_CONV_uU(STYPE, DTYPE, ST, DT, D_MIN, D_MAX) \ - { \ + do { \ HDcompile_assert(sizeof(ST) <= sizeof(DT)); \ H5T_CONV(H5T_CONV_xX, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ - } + } while (0) #define H5T_CONV_Ss(STYPE, DTYPE, ST, DT, D_MIN, D_MAX) \ - { \ + do { \ HDcompile_assert(sizeof(ST) >= sizeof(DT)); \ H5T_CONV(H5T_CONV_Xx, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ - } + } while (0) #define H5T_CONV_Su_CORE(STYPE, DTYPE, S, D, ST, DT, D_MIN, D_MAX) \ { \ @@ -408,22 +408,22 @@ } #define H5T_CONV_Su(STYPE, DTYPE, ST, DT, D_MIN, D_MAX) \ - { \ + do { \ HDcompile_assert(sizeof(ST) >= sizeof(DT)); \ H5T_CONV(H5T_CONV_Su, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ - } + } while (0) #define H5T_CONV_Us(STYPE, DTYPE, ST, DT, D_MIN, D_MAX) \ - { \ + do { \ HDcompile_assert(sizeof(ST) >= sizeof(DT)); \ H5T_CONV(H5T_CONV_Ux, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ - } + } while (0) #define H5T_CONV_Uu(STYPE, DTYPE, ST, DT, D_MIN, D_MAX) \ - { \ + do { \ HDcompile_assert(sizeof(ST) >= sizeof(DT)); \ H5T_CONV(H5T_CONV_Ux, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ - } + } while (0) #define H5T_CONV_su_CORE(STYPE, DTYPE, S, D, ST, DT, D_MIN, D_MAX) \ { \ @@ -451,10 +451,10 @@ } #define H5T_CONV_su(STYPE, DTYPE, ST, DT, D_MIN, D_MAX) \ - { \ + do { \ HDcompile_assert(sizeof(ST) == sizeof(DT)); \ H5T_CONV(H5T_CONV_su, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ - } + } while (0) #define H5T_CONV_us_CORE(STYPE, DTYPE, S, D, ST, DT, D_MIN, D_MAX) \ { \ @@ -482,16 +482,16 @@ } #define H5T_CONV_us(STYPE, DTYPE, ST, DT, D_MIN, D_MAX) \ - { \ + do { \ HDcompile_assert(sizeof(ST) == sizeof(DT)); \ H5T_CONV(H5T_CONV_us, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ - } + } while (0) #define H5T_CONV_fF(STYPE, DTYPE, ST, DT, D_MIN, D_MAX) \ - { \ + do { \ HDcompile_assert(sizeof(ST) <= sizeof(DT)); \ H5T_CONV(H5T_CONV_xX, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ - } + } while (0) /* Same as H5T_CONV_Xx_CORE, except that instead of using D_MAX and D_MIN * when an overflow occurs, use the 'float' infinity values. @@ -532,10 +532,10 @@ } #define H5T_CONV_Ff(STYPE, DTYPE, ST, DT, D_MIN, D_MAX) \ - { \ + do { \ HDcompile_assert(sizeof(ST) >= sizeof(DT)); \ H5T_CONV(H5T_CONV_Ff, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ - } + } while (0) #define H5T_HI_LO_BIT_SET(TYP, V, LO, HI) \ { \ @@ -628,9 +628,9 @@ } #define H5T_CONV_xF(STYPE, DTYPE, ST, DT, D_MIN, D_MAX) \ - { \ + do { \ H5T_CONV(H5T_CONV_xF, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, Y) \ - } + } while (0) /* Quincey added the condition branch (else if (*(S) != (ST)((DT)(*(S))))). * It handles a special situation when the source is "float" and assigned the value @@ -686,9 +686,9 @@ } #define H5T_CONV_Fx(STYPE, DTYPE, ST, DT, D_MIN, D_MAX) \ - { \ + do { \ H5T_CONV(H5T_CONV_Fx, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, Y) \ - } + } while (0) /* Since all "no exception" cores do the same thing (assign the value in the * source location to the destination location, using casting), use one "core" @@ -5077,8 +5077,10 @@ done: */ herr_t H5T__conv_schar_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_su(SCHAR, UCHAR, signed char, unsigned char, -, -)} + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_su(SCHAR, UCHAR, signed char, unsigned char, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_schar @@ -5091,9 +5093,12 @@ H5T__conv_schar_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t H5T__conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_us(UCHAR, SCHAR, unsigned char, signed char, -, SCHAR_MAX)} +herr_t +H5T__conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_us(UCHAR, SCHAR, unsigned char, signed char, -, SCHAR_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_short @@ -5106,9 +5111,12 @@ herr_t H5T__conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz * *------------------------------------------------------------------------- */ -herr_t H5T__conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_sS(SCHAR, SHORT, signed char, short, -, -)} +herr_t +H5T__conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_sS(SCHAR, SHORT, signed char, short, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_ushort @@ -5122,9 +5130,11 @@ herr_t H5T__conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz *------------------------------------------------------------------------- */ herr_t - H5T__conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_sU(SCHAR, USHORT, signed char, unsigned short, -, -)} +H5T__conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_sU(SCHAR, USHORT, signed char, unsigned short, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_short @@ -5137,9 +5147,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_uS(UCHAR, SHORT, unsigned char, short, -, SHRT_MAX)} +herr_t +H5T__conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_uS(UCHAR, SHORT, unsigned char, short, -, SHRT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_ushort @@ -5153,9 +5166,11 @@ herr_t H5T__conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz *------------------------------------------------------------------------- */ herr_t - H5T__conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_uU(UCHAR, USHORT, unsigned char, unsigned short, -, -)} +H5T__conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_uU(UCHAR, USHORT, unsigned char, unsigned short, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_int @@ -5168,9 +5183,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_schar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_sS(SCHAR, INT, signed char, int, -, -)} +herr_t +H5T__conv_schar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_sS(SCHAR, INT, signed char, int, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_uint @@ -5183,9 +5201,12 @@ herr_t H5T__conv_schar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_ * *------------------------------------------------------------------------- */ -herr_t H5T__conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_sU(SCHAR, UINT, signed char, unsigned, -, -)} +herr_t +H5T__conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_sU(SCHAR, UINT, signed char, unsigned, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_int @@ -5198,9 +5219,12 @@ herr_t H5T__conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_uS(UCHAR, INT, unsigned char, int, -, INT_MAX)} +herr_t +H5T__conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_uS(UCHAR, INT, unsigned char, int, -, INT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_uint @@ -5213,9 +5237,12 @@ herr_t H5T__conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_ * *------------------------------------------------------------------------- */ -herr_t H5T__conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_uU(UCHAR, UINT, unsigned char, unsigned, -, -)} +herr_t +H5T__conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_uU(UCHAR, UINT, unsigned char, unsigned, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_long @@ -5228,9 +5255,12 @@ herr_t H5T__conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_schar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_sS(SCHAR, LONG, signed char, long, -, -)} +herr_t +H5T__conv_schar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_sS(SCHAR, LONG, signed char, long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_ulong @@ -5243,9 +5273,12 @@ herr_t H5T__conv_schar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_sU(SCHAR, ULONG, signed char, unsigned long, -, -)} +herr_t +H5T__conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_sU(SCHAR, ULONG, signed char, unsigned long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_long @@ -5259,9 +5292,11 @@ herr_t H5T__conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz *------------------------------------------------------------------------- */ herr_t - H5T__conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_uS(UCHAR, LONG, unsigned char, long, -, LONG_MAX)} +H5T__conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_uS(UCHAR, LONG, unsigned char, long, -, LONG_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_ulong @@ -5274,9 +5309,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_uU(UCHAR, ULONG, unsigned char, unsigned long, -, -)} +herr_t +H5T__conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_uU(UCHAR, ULONG, unsigned char, unsigned long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_llong @@ -5290,9 +5328,11 @@ herr_t H5T__conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz *------------------------------------------------------------------------- */ herr_t - H5T__conv_schar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_sS(SCHAR, LLONG, signed char, long long, -, -)} +H5T__conv_schar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_sS(SCHAR, LLONG, signed char, long long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_ullong @@ -5306,9 +5346,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_schar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_sU(SCHAR, ULLONG, signed char, unsigned long long, -, -)} +H5T__conv_schar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_sU(SCHAR, ULLONG, signed char, unsigned long long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_llong @@ -5321,9 +5363,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_uS(UCHAR, LLONG, unsigned char, long long, -, LLONG_MAX)} +herr_t +H5T__conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_uS(UCHAR, LLONG, unsigned char, long long, -, LLONG_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_ullong @@ -5337,9 +5382,11 @@ herr_t H5T__conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz *------------------------------------------------------------------------- */ herr_t - H5T__conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_uU(UCHAR, ULLONG, unsigned char, unsigned long long, -, -)} +H5T__conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_uU(UCHAR, ULLONG, unsigned char, unsigned long long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_short_schar @@ -5352,9 +5399,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Ss(SHORT, SCHAR, short, signed char, SCHAR_MIN, SCHAR_MAX)} +herr_t +H5T__conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Ss(SHORT, SCHAR, short, signed char, SCHAR_MIN, SCHAR_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_short_uchar @@ -5367,9 +5417,12 @@ herr_t H5T__conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz * *------------------------------------------------------------------------- */ -herr_t H5T__conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Su(SHORT, UCHAR, short, unsigned char, -, UCHAR_MAX)} +herr_t +H5T__conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Su(SHORT, UCHAR, short, unsigned char, -, UCHAR_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_schar @@ -5383,9 +5436,11 @@ herr_t H5T__conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz *------------------------------------------------------------------------- */ herr_t - H5T__conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Us(USHORT, SCHAR, unsigned short, signed char, -, SCHAR_MAX)} +H5T__conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Us(USHORT, SCHAR, unsigned short, signed char, -, SCHAR_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_uchar @@ -5399,9 +5454,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Uu(USHORT, UCHAR, unsigned short, unsigned char, -, UCHAR_MAX)} +H5T__conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Uu(USHORT, UCHAR, unsigned short, unsigned char, -, UCHAR_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_short_ushort @@ -5415,9 +5472,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_su(SHORT, USHORT, short, unsigned short, -, -)} +H5T__conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_su(SHORT, USHORT, short, unsigned short, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_short @@ -5431,9 +5490,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_us(USHORT, SHORT, unsigned short, short, -, SHRT_MAX)} +H5T__conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_us(USHORT, SHORT, unsigned short, short, -, SHRT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_short_int @@ -5446,9 +5507,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_sS(SHORT, INT, short, int, -, -)} +herr_t +H5T__conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_sS(SHORT, INT, short, int, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_short_uint @@ -5461,9 +5525,12 @@ herr_t H5T__conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_ * *------------------------------------------------------------------------- */ -herr_t H5T__conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_sU(SHORT, UINT, short, unsigned, -, -)} +herr_t +H5T__conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_sU(SHORT, UINT, short, unsigned, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_int @@ -5477,9 +5544,11 @@ herr_t H5T__conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size *------------------------------------------------------------------------- */ herr_t - H5T__conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_uS(USHORT, INT, unsigned short, int, -, INT_MAX)} +H5T__conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_uS(USHORT, INT, unsigned short, int, -, INT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_uint @@ -5493,9 +5562,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_uU(USHORT, UINT, unsigned short, unsigned, -, -)} +H5T__conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_uU(USHORT, UINT, unsigned short, unsigned, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_short_long @@ -5508,9 +5579,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_sS(SHORT, LONG, short, long, -, -)} +herr_t +H5T__conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_sS(SHORT, LONG, short, long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_short_ulong @@ -5523,9 +5597,12 @@ herr_t H5T__conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_sU(SHORT, ULONG, short, unsigned long, -, -)} +herr_t +H5T__conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_sU(SHORT, ULONG, short, unsigned long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_long @@ -5538,9 +5615,12 @@ herr_t H5T__conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz * *------------------------------------------------------------------------- */ -herr_t H5T__conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_uS(USHORT, LONG, unsigned short, long, -, LONG_MAX)} +herr_t +H5T__conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_uS(USHORT, LONG, unsigned short, long, -, LONG_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_ulong @@ -5554,9 +5634,11 @@ herr_t H5T__conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz *------------------------------------------------------------------------- */ herr_t - H5T__conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_uU(USHORT, ULONG, unsigned short, unsigned long, -, -)} +H5T__conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_uU(USHORT, ULONG, unsigned short, unsigned long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_short_llong @@ -5569,9 +5651,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_sS(SHORT, LLONG, short, long long, -, -)} +herr_t +H5T__conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_sS(SHORT, LLONG, short, long long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_short_ullong @@ -5585,9 +5670,11 @@ herr_t H5T__conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz *------------------------------------------------------------------------- */ herr_t - H5T__conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_sU(SHORT, ULLONG, short, unsigned long long, -, -)} +H5T__conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_sU(SHORT, ULLONG, short, unsigned long long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_llong @@ -5601,9 +5688,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_uS(USHORT, LLONG, unsigned short, long long, -, LLONG_MAX)} +H5T__conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_uS(USHORT, LLONG, unsigned short, long long, -, LLONG_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_ullong @@ -5617,9 +5706,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_uU(USHORT, ULLONG, unsigned short, unsigned long long, -, -)} +H5T__conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_uU(USHORT, ULLONG, unsigned short, unsigned long long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_int_schar @@ -5632,9 +5723,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Ss(INT, SCHAR, int, signed char, SCHAR_MIN, SCHAR_MAX)} +herr_t +H5T__conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Ss(INT, SCHAR, int, signed char, SCHAR_MIN, SCHAR_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_int_uchar @@ -5648,9 +5742,11 @@ herr_t H5T__conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_ *------------------------------------------------------------------------- */ herr_t - H5T__conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_Su(INT, UCHAR, int, unsigned char, -, UCHAR_MAX)} +H5T__conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Su(INT, UCHAR, int, unsigned char, -, UCHAR_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_schar @@ -5663,9 +5759,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Us(UINT, SCHAR, unsigned, signed char, -, SCHAR_MAX)} +herr_t +H5T__conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Us(UINT, SCHAR, unsigned, signed char, -, SCHAR_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_uchar @@ -5678,9 +5777,12 @@ herr_t H5T__conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Uu(UINT, UCHAR, unsigned, unsigned char, -, UCHAR_MAX)} +herr_t +H5T__conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Uu(UINT, UCHAR, unsigned, unsigned char, -, UCHAR_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_int_short @@ -5693,9 +5795,12 @@ herr_t H5T__conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_Ss(INT, SHORT, int, short, SHRT_MIN, SHRT_MAX)} +herr_t +H5T__conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Ss(INT, SHORT, int, short, SHRT_MIN, SHRT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_int_ushort @@ -5708,9 +5813,12 @@ herr_t H5T__conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_ * *------------------------------------------------------------------------- */ -herr_t H5T__conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Su(INT, USHORT, int, unsigned short, -, USHRT_MAX)} +herr_t +H5T__conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Su(INT, USHORT, int, unsigned short, -, USHRT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_short @@ -5723,9 +5831,12 @@ herr_t H5T__conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_Us(UINT, SHORT, unsigned, short, -, SHRT_MAX)} +herr_t +H5T__conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Us(UINT, SHORT, unsigned, short, -, SHRT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_ushort @@ -5738,9 +5849,12 @@ herr_t H5T__conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Uu(UINT, USHORT, unsigned, unsigned short, -, USHRT_MAX)} +herr_t +H5T__conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Uu(UINT, USHORT, unsigned, unsigned short, -, USHRT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_int_uint @@ -5753,9 +5867,12 @@ herr_t H5T__conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz * *------------------------------------------------------------------------- */ -herr_t H5T__conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_su(INT, UINT, int, unsigned, -, -)} +herr_t +H5T__conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_su(INT, UINT, int, unsigned, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_int @@ -5768,9 +5885,12 @@ herr_t H5T__conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_us(UINT, INT, unsigned, int, -, INT_MAX)} +herr_t +H5T__conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_us(UINT, INT, unsigned, int, -, INT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_int_long @@ -5783,9 +5903,12 @@ herr_t H5T__conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_sS(INT, LONG, int, long, -, -)} +herr_t +H5T__conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_sS(INT, LONG, int, long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_int_ulong @@ -5798,9 +5921,12 @@ herr_t H5T__conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_sU(INT, LONG, int, unsigned long, -, -)} +herr_t +H5T__conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_sU(INT, LONG, int, unsigned long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_long @@ -5813,9 +5939,12 @@ herr_t H5T__conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_ * *------------------------------------------------------------------------- */ -herr_t H5T__conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_uS(UINT, LONG, unsigned, long, -, LONG_MAX)} +herr_t +H5T__conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_uS(UINT, LONG, unsigned, long, -, LONG_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_ulong @@ -5828,9 +5957,12 @@ herr_t H5T__conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_ * *------------------------------------------------------------------------- */ -herr_t H5T__conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_uU(UINT, ULONG, unsigned, unsigned long, -, -)} +herr_t +H5T__conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_uU(UINT, ULONG, unsigned, unsigned long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_int_llong @@ -5843,9 +5975,12 @@ herr_t H5T__conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_sS(INT, LLONG, int, long long, -, -)} +herr_t +H5T__conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_sS(INT, LLONG, int, long long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_int_ullong @@ -5858,9 +5993,12 @@ herr_t H5T__conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_ * *------------------------------------------------------------------------- */ -herr_t H5T__conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_sU(INT, ULLONG, int, unsigned long long, -, -)} +herr_t +H5T__conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_sU(INT, ULLONG, int, unsigned long long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_llong @@ -5873,9 +6011,12 @@ herr_t H5T__conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_uS(UINT, LLONG, unsigned, long long, -, LLONG_MAX)} +herr_t +H5T__conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_uS(UINT, LLONG, unsigned, long long, -, LLONG_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_ullong @@ -5888,9 +6029,12 @@ herr_t H5T__conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_uU(UINT, ULLONG, unsigned, unsigned long long, -, -)} +herr_t +H5T__conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_uU(UINT, ULLONG, unsigned, unsigned long long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_long_schar @@ -5903,9 +6047,12 @@ herr_t H5T__conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz * *------------------------------------------------------------------------- */ -herr_t H5T__conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Ss(LONG, SCHAR, long, signed char, SCHAR_MIN, SCHAR_MAX)} +herr_t +H5T__conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Ss(LONG, SCHAR, long, signed char, SCHAR_MIN, SCHAR_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_long_uchar @@ -5918,9 +6065,12 @@ herr_t H5T__conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Su(LONG, UCHAR, long, unsigned char, -, UCHAR_MAX)} +herr_t +H5T__conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Su(LONG, UCHAR, long, unsigned char, -, UCHAR_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_schar @@ -5933,9 +6083,12 @@ herr_t H5T__conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Us(ULONG, SCHAR, unsigned long, signed char, -, SCHAR_MAX)} +herr_t +H5T__conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Us(ULONG, SCHAR, unsigned long, signed char, -, SCHAR_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_uchar @@ -5948,9 +6101,12 @@ herr_t H5T__conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz * *------------------------------------------------------------------------- */ -herr_t H5T__conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Uu(ULONG, UCHAR, unsigned long, unsigned char, -, UCHAR_MAX)} +herr_t +H5T__conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Uu(ULONG, UCHAR, unsigned long, unsigned char, -, UCHAR_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_long_short @@ -5964,9 +6120,11 @@ herr_t H5T__conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz *------------------------------------------------------------------------- */ herr_t - H5T__conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_Ss(LONG, SHORT, long, short, SHRT_MIN, SHRT_MAX)} +H5T__conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Ss(LONG, SHORT, long, short, SHRT_MIN, SHRT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_long_ushort @@ -5979,9 +6137,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Su(LONG, USHORT, long, unsigned short, -, USHRT_MAX)} +herr_t +H5T__conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Su(LONG, USHORT, long, unsigned short, -, USHRT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_short @@ -5994,9 +6155,12 @@ herr_t H5T__conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz * *------------------------------------------------------------------------- */ -herr_t H5T__conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Us(ULONG, SHORT, unsigned long, short, -, SHRT_MAX)} +herr_t +H5T__conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Us(ULONG, SHORT, unsigned long, short, -, SHRT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_ushort @@ -6010,9 +6174,11 @@ herr_t H5T__conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz *------------------------------------------------------------------------- */ herr_t - H5T__conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Uu(ULONG, USHORT, unsigned long, unsigned short, -, USHRT_MAX)} +H5T__conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Uu(ULONG, USHORT, unsigned long, unsigned short, -, USHRT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_long_int @@ -6025,9 +6191,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_Ss(LONG, INT, long, int, INT_MIN, INT_MAX)} +herr_t +H5T__conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Ss(LONG, INT, long, int, INT_MIN, INT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_long_uint @@ -6040,9 +6209,12 @@ herr_t H5T__conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_Su(LONG, UINT, long, unsigned, -, UINT_MAX)} +herr_t +H5T__conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Su(LONG, UINT, long, unsigned, -, UINT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_int @@ -6055,9 +6227,12 @@ herr_t H5T__conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_ * *------------------------------------------------------------------------- */ -herr_t H5T__conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_Us(ULONG, INT, unsigned long, int, -, INT_MAX)} +herr_t +H5T__conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Us(ULONG, INT, unsigned long, int, -, INT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_uint @@ -6070,9 +6245,12 @@ herr_t H5T__conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_ * *------------------------------------------------------------------------- */ -herr_t H5T__conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Uu(ULONG, UINT, unsigned long, unsigned, -, UINT_MAX)} +herr_t +H5T__conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Uu(ULONG, UINT, unsigned long, unsigned, -, UINT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_long_ulong @@ -6085,9 +6263,12 @@ herr_t H5T__conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_su(LONG, ULONG, long, unsigned long, -, -)} +herr_t +H5T__conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_su(LONG, ULONG, long, unsigned long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_long @@ -6101,9 +6282,11 @@ herr_t H5T__conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size *------------------------------------------------------------------------- */ herr_t - H5T__conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_us(ULONG, LONG, unsigned long, long, -, LONG_MAX)} +H5T__conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_us(ULONG, LONG, unsigned long, long, -, LONG_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_long_llong @@ -6116,9 +6299,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_sS(LONG, LLONG, long, long long, -, -)} +herr_t +H5T__conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_sS(LONG, LLONG, long, long long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_long_ullong @@ -6132,9 +6318,11 @@ herr_t H5T__conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size *------------------------------------------------------------------------- */ herr_t - H5T__conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_sU(LONG, ULLONG, long, unsigned long long, -, -)} +H5T__conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_sU(LONG, ULLONG, long, unsigned long long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_llong @@ -6147,9 +6335,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_uS(ULONG, LLONG, unsigned long, long long, -, LLONG_MAX)} +herr_t +H5T__conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_uS(ULONG, LLONG, unsigned long, long long, -, LLONG_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_ullong @@ -6163,9 +6354,11 @@ herr_t H5T__conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz *------------------------------------------------------------------------- */ herr_t - H5T__conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_uU(ULONG, ULLONG, unsigned long, unsigned long long, -, -)} +H5T__conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_uU(ULONG, ULLONG, unsigned long, unsigned long long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_schar @@ -6178,9 +6371,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Ss(LLONG, SCHAR, long long, signed char, SCHAR_MIN, SCHAR_MAX)} +herr_t +H5T__conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Ss(LLONG, SCHAR, long long, signed char, SCHAR_MIN, SCHAR_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_uchar @@ -6193,9 +6389,12 @@ herr_t H5T__conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz * *------------------------------------------------------------------------- */ -herr_t H5T__conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Su(LLONG, UCHAR, long long, unsigned char, -, UCHAR_MAX)} +herr_t +H5T__conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Su(LLONG, UCHAR, long long, unsigned char, -, UCHAR_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ullong_schar @@ -6209,9 +6408,11 @@ herr_t H5T__conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz *------------------------------------------------------------------------- */ herr_t - H5T__conv_ullong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Us(ULLONG, SCHAR, unsigned long long, signed char, -, SCHAR_MAX)} +H5T__conv_ullong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Us(ULLONG, SCHAR, unsigned long long, signed char, -, SCHAR_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ullong_uchar @@ -6225,9 +6426,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Uu(ULLONG, UCHAR, unsigned long long, unsigned char, -, UCHAR_MAX)} +H5T__conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Uu(ULLONG, UCHAR, unsigned long long, unsigned char, -, UCHAR_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_short @@ -6240,9 +6443,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Ss(LLONG, SHORT, long long, short, SHRT_MIN, SHRT_MAX)} +herr_t +H5T__conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Ss(LLONG, SHORT, long long, short, SHRT_MIN, SHRT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_ushort @@ -6256,9 +6462,11 @@ herr_t H5T__conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz *------------------------------------------------------------------------- */ herr_t - H5T__conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Su(LLONG, USHORT, long long, unsigned short, -, USHRT_MAX)} +H5T__conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Su(LLONG, USHORT, long long, unsigned short, -, USHRT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ullong_short @@ -6272,9 +6480,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Us(ULLONG, SHORT, unsigned long long, short, -, SHRT_MAX)} +H5T__conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Us(ULLONG, SHORT, unsigned long long, short, -, SHRT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ullong_ushort @@ -6288,9 +6498,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Uu(ULLONG, USHORT, unsigned long long, unsigned short, -, USHRT_MAX)} +H5T__conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Uu(ULLONG, USHORT, unsigned long long, unsigned short, -, USHRT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_int @@ -6304,9 +6516,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_Ss(LLONG, INT, long long, int, INT_MIN, INT_MAX)} +H5T__conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Ss(LLONG, INT, long long, int, INT_MIN, INT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_uint @@ -6320,9 +6534,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_Su(LLONG, UINT, long long, unsigned, -, UINT_MAX)} +H5T__conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Su(LLONG, UINT, long long, unsigned, -, UINT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ullong_int @@ -6335,9 +6551,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Us(ULLONG, INT, unsigned long long, int, -, INT_MAX)} +herr_t +H5T__conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Us(ULLONG, INT, unsigned long long, int, -, INT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ullong_uint @@ -6350,9 +6569,12 @@ herr_t H5T__conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Uu(ULLONG, UINT, unsigned long long, unsigned, -, UINT_MAX)} +herr_t +H5T__conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Uu(ULLONG, UINT, unsigned long long, unsigned, -, UINT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_long @@ -6365,9 +6587,12 @@ herr_t H5T__conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz * *------------------------------------------------------------------------- */ -herr_t H5T__conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Ss(LLONG, LONG, long long, long, LONG_MIN, LONG_MAX)} +herr_t +H5T__conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Ss(LLONG, LONG, long long, long, LONG_MIN, LONG_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_ulong @@ -6380,9 +6605,12 @@ herr_t H5T__conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Su(LLONG, ULONG, long long, unsigned long, -, ULONG_MAX)} +herr_t +H5T__conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Su(LLONG, ULONG, long long, unsigned long, -, ULONG_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ullong_long @@ -6395,9 +6623,12 @@ herr_t H5T__conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz * *------------------------------------------------------------------------- */ -herr_t H5T__conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Us(ULLONG, LONG, unsigned long long, long, -, LONG_MAX)} +herr_t +H5T__conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Us(ULLONG, LONG, unsigned long long, long, -, LONG_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ullong_ulong @@ -6411,9 +6642,11 @@ herr_t H5T__conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz *------------------------------------------------------------------------- */ herr_t - H5T__conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Uu(ULLONG, ULONG, unsigned long long, unsigned long, -, ULONG_MAX)} +H5T__conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Uu(ULLONG, ULONG, unsigned long long, unsigned long, -, ULONG_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_ullong @@ -6427,9 +6660,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_su(LLONG, ULLONG, long long, unsigned long long, -, -)} +H5T__conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_su(LLONG, ULLONG, long long, unsigned long long, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ullong_llong @@ -6443,9 +6678,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_us(ULLONG, LLONG, unsigned long long, long long, -, LLONG_MAX)} +H5T__conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_us(ULLONG, LLONG, unsigned long long, long long, -, LLONG_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_float_double @@ -6457,9 +6694,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_float_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_fF(FLOAT, DOUBLE, float, double, -, -)} +herr_t +H5T__conv_float_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_fF(FLOAT, DOUBLE, float, double, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_float_ldouble @@ -6472,9 +6712,11 @@ herr_t H5T__conv_float_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, si *------------------------------------------------------------------------- */ herr_t - H5T__conv_float_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_fF(FLOAT, LDOUBLE, float, long double, -, -)} +H5T__conv_float_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_fF(FLOAT, LDOUBLE, float, long double, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_double_float @@ -6487,9 +6729,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_double_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Ff(DOUBLE, FLOAT, double, float, -FLT_MAX, FLT_MAX)} +H5T__conv_double_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Ff(DOUBLE, FLOAT, double, float, -FLT_MAX, FLT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_double_ldouble @@ -6502,9 +6746,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_double_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_fF(DOUBLE, LDOUBLE, double, long double, -, -)} +H5T__conv_double_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_fF(DOUBLE, LDOUBLE, double, long double, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ldouble_float @@ -6517,9 +6763,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_ldouble_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Ff(LDOUBLE, FLOAT, long double, float, -FLT_MAX, FLT_MAX)} +H5T__conv_ldouble_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Ff(LDOUBLE, FLOAT, long double, float, -FLT_MAX, FLT_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ldouble_double @@ -6532,9 +6780,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_ldouble_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_Ff(LDOUBLE, DOUBLE, long double, double, -DBL_MAX, DBL_MAX)} +H5T__conv_ldouble_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_Ff(LDOUBLE, DOUBLE, long double, double, -DBL_MAX, DBL_MAX); +} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_float @@ -6546,9 +6796,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_schar_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(SCHAR, FLOAT, signed char, float, -, -)} +herr_t +H5T__conv_schar_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(SCHAR, FLOAT, signed char, float, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_double @@ -6560,9 +6813,12 @@ herr_t H5T__conv_schar_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz * *------------------------------------------------------------------------- */ -herr_t H5T__conv_schar_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(SCHAR, DOUBLE, signed char, double, -, -)} +herr_t +H5T__conv_schar_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(SCHAR, DOUBLE, signed char, double, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_ldouble @@ -6575,9 +6831,11 @@ herr_t H5T__conv_schar_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, si *------------------------------------------------------------------------- */ herr_t - H5T__conv_schar_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_xF(SCHAR, LDOUBLE, signed char, long double, -, -)} +H5T__conv_schar_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(SCHAR, LDOUBLE, signed char, long double, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_float @@ -6589,9 +6847,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_uchar_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(UCHAR, FLOAT, unsigned char, float, -, -)} +herr_t +H5T__conv_uchar_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(UCHAR, FLOAT, unsigned char, float, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_double @@ -6604,9 +6865,11 @@ herr_t H5T__conv_uchar_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz *------------------------------------------------------------------------- */ herr_t - H5T__conv_uchar_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(UCHAR, DOUBLE, unsigned char, double, -, -)} +H5T__conv_uchar_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(UCHAR, DOUBLE, unsigned char, double, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_ldouble @@ -6619,9 +6882,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_uchar_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_xF(UCHAR, LDOUBLE, unsigned char, long double, -, -)} +H5T__conv_uchar_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(UCHAR, LDOUBLE, unsigned char, long double, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_short_float @@ -6633,9 +6898,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_short_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(SHORT, FLOAT, short, float, -, -)} +herr_t +H5T__conv_short_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(SHORT, FLOAT, short, float, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_short_double @@ -6647,9 +6915,12 @@ herr_t H5T__conv_short_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz * *------------------------------------------------------------------------- */ -herr_t H5T__conv_short_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(SHORT, DOUBLE, short, double, -, -)} +herr_t +H5T__conv_short_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(SHORT, DOUBLE, short, double, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_short_ldouble @@ -6662,9 +6933,11 @@ herr_t H5T__conv_short_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, si *------------------------------------------------------------------------- */ herr_t - H5T__conv_short_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(SHORT, LDOUBLE, short, long double, -, -)} +H5T__conv_short_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(SHORT, LDOUBLE, short, long double, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_float @@ -6677,9 +6950,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_ushort_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(USHORT, FLOAT, unsigned short, float, -, -)} +H5T__conv_ushort_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(USHORT, FLOAT, unsigned short, float, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_double @@ -6692,9 +6967,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_ushort_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_xF(USHORT, DOUBLE, unsigned short, double, -, -)} +H5T__conv_ushort_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(USHORT, DOUBLE, unsigned short, double, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_ldouble @@ -6707,9 +6984,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_ushort_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_xF(USHORT, LDOUBLE, unsigned short, long double, -, -)} +H5T__conv_ushort_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(USHORT, LDOUBLE, unsigned short, long double, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_int_float @@ -6721,9 +7000,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_int_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(INT, FLOAT, int, float, -, -)} +herr_t +H5T__conv_int_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(INT, FLOAT, int, float, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_int_double @@ -6735,9 +7017,12 @@ herr_t H5T__conv_int_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_ * *------------------------------------------------------------------------- */ -herr_t H5T__conv_int_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(INT, DOUBLE, int, double, -, -)} +herr_t +H5T__conv_int_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(INT, DOUBLE, int, double, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_int_ldouble @@ -6749,9 +7034,12 @@ herr_t H5T__conv_int_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_int_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(INT, LDOUBLE, int, long double, -, -)} +herr_t +H5T__conv_int_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(INT, LDOUBLE, int, long double, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_float @@ -6763,9 +7051,12 @@ herr_t H5T__conv_int_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz * *------------------------------------------------------------------------- */ -herr_t H5T__conv_uint_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(UINT, FLOAT, unsigned int, float, -, -)} +herr_t +H5T__conv_uint_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(UINT, FLOAT, unsigned int, float, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_double @@ -6777,9 +7068,12 @@ herr_t H5T__conv_uint_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_uint_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(UINT, DOUBLE, unsigned int, double, -, -)} +herr_t +H5T__conv_uint_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(UINT, DOUBLE, unsigned int, double, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_ldouble @@ -6792,9 +7086,11 @@ herr_t H5T__conv_uint_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz *------------------------------------------------------------------------- */ herr_t - H5T__conv_uint_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_xF(UINT, LDOUBLE, unsigned int, long double, -, -)} +H5T__conv_uint_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(UINT, LDOUBLE, unsigned int, long double, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_long_float @@ -6806,9 +7102,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_long_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(LONG, FLOAT, long, float, -, -)} +herr_t +H5T__conv_long_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(LONG, FLOAT, long, float, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_long_double @@ -6820,9 +7119,12 @@ herr_t H5T__conv_long_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_long_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(LONG, DOUBLE, long, double, -, -)} +herr_t +H5T__conv_long_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(LONG, DOUBLE, long, double, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_long_ldouble @@ -6834,9 +7136,12 @@ herr_t H5T__conv_long_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz * *------------------------------------------------------------------------- */ -herr_t H5T__conv_long_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(LONG, LDOUBLE, long, long double, -, -)} +herr_t +H5T__conv_long_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(LONG, LDOUBLE, long, long double, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_float @@ -6848,9 +7153,12 @@ herr_t H5T__conv_long_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, si * *------------------------------------------------------------------------- */ -herr_t H5T__conv_ulong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(ULONG, FLOAT, unsigned long, float, -, -)} +herr_t +H5T__conv_ulong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(ULONG, FLOAT, unsigned long, float, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_double @@ -6863,9 +7171,11 @@ herr_t H5T__conv_ulong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz *------------------------------------------------------------------------- */ herr_t - H5T__conv_ulong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(ULONG, DOUBLE, unsigned long, double, -, -)} +H5T__conv_ulong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(ULONG, DOUBLE, unsigned long, double, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_ldouble @@ -6878,9 +7188,11 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_ulong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5T_CONV_xF(ULONG, LDOUBLE, unsigned long, long double, -, -)} +H5T__conv_ulong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(ULONG, LDOUBLE, unsigned long, long double, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_float @@ -6892,9 +7204,12 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_llong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(LLONG, FLOAT, long long, float, -, -)} +herr_t +H5T__conv_llong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(LLONG, FLOAT, long long, float, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_double @@ -6907,10 +7222,10 @@ herr_t H5T__conv_llong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz *------------------------------------------------------------------------- */ herr_t - H5T__conv_llong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_llong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { - H5T_CONV_xF(LLONG, DOUBLE, long long, double, -, -) + H5T_CONV_xF(LLONG, DOUBLE, long long, double, -, -); } /*------------------------------------------------------------------------- @@ -6928,7 +7243,7 @@ herr_t H5T__conv_llong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { - H5T_CONV_xF(LLONG, LDOUBLE, long long, long double, -, -) + H5T_CONV_xF(LLONG, LDOUBLE, long long, long double, -, -); } #endif /* H5T_CONV_INTERNAL_LLONG_LDOUBLE */ @@ -6944,8 +7259,10 @@ H5T__conv_llong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n */ herr_t H5T__conv_ullong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(ULLONG, FLOAT, unsigned long long, float, -, -)} + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5T_CONV_xF(ULLONG, FLOAT, unsigned long long, float, -, -); +} /*------------------------------------------------------------------------- * Function: H5T__conv_ullong_double @@ -6958,10 +7275,10 @@ H5T__conv_ullong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t - H5T__conv_ullong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_ullong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { - H5T_CONV_xF(ULLONG, DOUBLE, unsigned long long, double, -, -) + H5T_CONV_xF(ULLONG, DOUBLE, unsigned long long, double, -, -); } /*------------------------------------------------------------------------- @@ -6979,7 +7296,7 @@ herr_t H5T__conv_ullong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { - H5T_CONV_xF(ULLONG, LDOUBLE, unsigned long long, long double, -, -) + H5T_CONV_xF(ULLONG, LDOUBLE, unsigned long long, long double, -, -); } #endif /*H5T_CONV_INTERNAL_ULLONG_LDOUBLE*/ @@ -6995,9 +7312,12 @@ H5T__conv_ullong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t */ herr_t H5T__conv_float_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, SCHAR, float, signed char, SCHAR_MIN, SCHAR_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(FLOAT, SCHAR, float, signed char, SCHAR_MIN, SCHAR_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_float_uchar @@ -7009,10 +7329,14 @@ H5T__conv_float_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t H5T__conv_float_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, UCHAR, float, unsigned char, 0, UCHAR_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +herr_t +H5T__conv_float_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(FLOAT, UCHAR, float, unsigned char, 0, UCHAR_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_double_schar @@ -7024,11 +7348,14 @@ herr_t H5T__conv_float_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz * *------------------------------------------------------------------------- */ -herr_t H5T__conv_double_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, SCHAR, double, signed char, SCHAR_MIN, SCHAR_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +herr_t +H5T__conv_double_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(DOUBLE, SCHAR, double, signed char, SCHAR_MIN, SCHAR_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_double_uchar @@ -7041,10 +7368,13 @@ herr_t H5T__conv_double_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, si *------------------------------------------------------------------------- */ herr_t - H5T__conv_double_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, UCHAR, double, unsigned char, 0, UCHAR_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +H5T__conv_double_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(DOUBLE, UCHAR, double, unsigned char, 0, UCHAR_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_ldouble_schar @@ -7057,10 +7387,13 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_ldouble_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, SCHAR, long double, signed char, SCHAR_MIN, - SCHAR_MAX) H5_GCC_CLANG_DIAG_ON("float-equal")} +H5T__conv_ldouble_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(LDOUBLE, SCHAR, long double, signed char, SCHAR_MIN, SCHAR_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_ldouble_uchar @@ -7072,11 +7405,14 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_ldouble_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, UCHAR, long double, unsigned char, 0, UCHAR_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +herr_t +H5T__conv_ldouble_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(LDOUBLE, UCHAR, long double, unsigned char, 0, UCHAR_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_float_short @@ -7088,10 +7424,14 @@ herr_t H5T__conv_ldouble_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, s * *------------------------------------------------------------------------- */ -herr_t H5T__conv_float_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, SHORT, float, short, SHRT_MIN, SHRT_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +herr_t +H5T__conv_float_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(FLOAT, SHORT, float, short, SHRT_MIN, SHRT_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_float_ushort @@ -7104,10 +7444,13 @@ herr_t H5T__conv_float_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz *------------------------------------------------------------------------- */ herr_t - H5T__conv_float_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, USHORT, float, unsigned short, 0, USHRT_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +H5T__conv_float_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(FLOAT, USHORT, float, unsigned short, 0, USHRT_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_double_short @@ -7120,10 +7463,13 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_double_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, SHORT, double, short, SHRT_MIN, SHRT_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +H5T__conv_double_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(DOUBLE, SHORT, double, short, SHRT_MIN, SHRT_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_double_ushort @@ -7136,10 +7482,13 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_double_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, USHORT, double, unsigned short, 0, USHRT_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +H5T__conv_double_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(DOUBLE, USHORT, double, unsigned short, 0, USHRT_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_ldouble_short @@ -7151,11 +7500,14 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_ldouble_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, SHORT, long double, short, SHRT_MIN, SHRT_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +herr_t +H5T__conv_ldouble_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(LDOUBLE, SHORT, long double, short, SHRT_MIN, SHRT_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_ldouble_ushort @@ -7168,10 +7520,13 @@ herr_t H5T__conv_ldouble_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, s *------------------------------------------------------------------------- */ herr_t - H5T__conv_ldouble_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, USHORT, long double, unsigned short, 0, - USHRT_MAX) H5_GCC_CLANG_DIAG_ON("float-equal")} +H5T__conv_ldouble_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(LDOUBLE, USHORT, long double, unsigned short, 0, USHRT_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_float_int @@ -7183,10 +7538,14 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_float_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, INT, float, int, INT_MIN, INT_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +herr_t +H5T__conv_float_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(FLOAT, INT, float, int, INT_MIN, INT_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_float_uint @@ -7198,10 +7557,14 @@ herr_t H5T__conv_float_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_ * *------------------------------------------------------------------------- */ -herr_t H5T__conv_float_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, UINT, float, unsigned int, 0, UINT_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +herr_t +H5T__conv_float_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(FLOAT, UINT, float, unsigned int, 0, UINT_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_double_int @@ -7213,10 +7576,14 @@ herr_t H5T__conv_float_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_double_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, INT, double, int, INT_MIN, INT_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +herr_t +H5T__conv_double_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(DOUBLE, INT, double, int, INT_MIN, INT_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_double_uint @@ -7228,10 +7595,14 @@ herr_t H5T__conv_double_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_double_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, UINT, double, unsigned int, 0, UINT_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +herr_t +H5T__conv_double_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(DOUBLE, UINT, double, unsigned int, 0, UINT_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_ldouble_int @@ -7243,10 +7614,14 @@ herr_t H5T__conv_double_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz * *------------------------------------------------------------------------- */ -herr_t H5T__conv_ldouble_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, INT, long double, int, INT_MIN, INT_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +herr_t +H5T__conv_ldouble_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(LDOUBLE, INT, long double, int, INT_MIN, INT_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_ldouble_uint @@ -7258,11 +7633,14 @@ herr_t H5T__conv_ldouble_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz * *------------------------------------------------------------------------- */ -herr_t H5T__conv_ldouble_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, UINT, long double, unsigned int, 0, UINT_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +herr_t +H5T__conv_ldouble_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(LDOUBLE, UINT, long double, unsigned int, 0, UINT_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_float_long @@ -7274,10 +7652,14 @@ herr_t H5T__conv_ldouble_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, si * *------------------------------------------------------------------------- */ -herr_t H5T__conv_float_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, LONG, float, long, LONG_MIN, LONG_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +herr_t +H5T__conv_float_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(FLOAT, LONG, float, long, LONG_MIN, LONG_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_float_ulong @@ -7289,10 +7671,14 @@ herr_t H5T__conv_float_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size * *------------------------------------------------------------------------- */ -herr_t H5T__conv_float_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, ULONG, float, unsigned long, 0, ULONG_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +herr_t +H5T__conv_float_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(FLOAT, ULONG, float, unsigned long, 0, ULONG_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_double_long @@ -7304,10 +7690,14 @@ herr_t H5T__conv_float_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz * *------------------------------------------------------------------------- */ -herr_t H5T__conv_double_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, LONG, double, long, LONG_MIN, LONG_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +herr_t +H5T__conv_double_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(DOUBLE, LONG, double, long, LONG_MIN, LONG_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_double_ulong @@ -7320,10 +7710,13 @@ herr_t H5T__conv_double_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz *------------------------------------------------------------------------- */ herr_t - H5T__conv_double_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, ULONG, double, unsigned long, 0, ULONG_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +H5T__conv_double_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(DOUBLE, ULONG, double, unsigned long, 0, ULONG_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_ldouble_long @@ -7336,10 +7729,13 @@ herr_t *------------------------------------------------------------------------- */ herr_t - H5T__conv_ldouble_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, LONG, long double, long, LONG_MIN, LONG_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +H5T__conv_ldouble_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(LDOUBLE, LONG, long double, long, LONG_MIN, LONG_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_ldouble_ulong @@ -7351,11 +7747,14 @@ herr_t * *------------------------------------------------------------------------- */ -herr_t H5T__conv_ldouble_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, ULONG, long double, unsigned long, 0, ULONG_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +herr_t +H5T__conv_ldouble_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(LDOUBLE, ULONG, long double, unsigned long, 0, ULONG_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_float_llong @@ -7367,10 +7766,14 @@ herr_t H5T__conv_ldouble_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, s * *------------------------------------------------------------------------- */ -herr_t H5T__conv_float_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, LLONG, float, long long, LLONG_MIN, LLONG_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +herr_t +H5T__conv_float_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(FLOAT, LLONG, float, long long, LLONG_MIN, LLONG_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_float_ullong @@ -7382,11 +7785,14 @@ herr_t H5T__conv_float_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz * *------------------------------------------------------------------------- */ -herr_t H5T__conv_float_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, ULLONG, float, unsigned long long, 0, ULLONG_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +herr_t +H5T__conv_float_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(FLOAT, ULLONG, float, unsigned long long, 0, ULLONG_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_double_llong @@ -7398,11 +7804,14 @@ herr_t H5T__conv_float_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, si * *------------------------------------------------------------------------- */ -herr_t H5T__conv_double_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg){ - H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, LLONG, double, long long, LLONG_MIN, LLONG_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal")} +herr_t +H5T__conv_double_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +{ + H5_GCC_CLANG_DIAG_OFF("float-equal") + H5T_CONV_Fx(DOUBLE, LLONG, double, long long, LLONG_MIN, LLONG_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") +} /*------------------------------------------------------------------------- * Function: H5T__conv_double_ullong @@ -7415,11 +7824,12 @@ herr_t H5T__conv_double_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, si *------------------------------------------------------------------------- */ herr_t - H5T__conv_double_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_double_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(DOUBLE, ULLONG, double, unsigned long long, 0, ULLONG_MAX) H5_GCC_CLANG_DIAG_ON("float-equal") + H5T_CONV_Fx(DOUBLE, ULLONG, double, unsigned long long, 0, ULLONG_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") } /*------------------------------------------------------------------------- @@ -7438,8 +7848,8 @@ H5T__conv_ldouble_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(LDOUBLE, LLONG, long double, long long, LLONG_MIN, LLONG_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal") + H5T_CONV_Fx(LDOUBLE, LLONG, long double, long long, LLONG_MIN, LLONG_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") } #endif /*H5T_CONV_INTERNAL_LDOUBLE_LLONG*/ @@ -7459,8 +7869,8 @@ H5T__conv_ldouble_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(LDOUBLE, ULLONG, long double, unsigned long long, 0, ULLONG_MAX) - H5_GCC_CLANG_DIAG_ON("float-equal") + H5T_CONV_Fx(LDOUBLE, ULLONG, long double, unsigned long long, 0, ULLONG_MAX); + H5_GCC_CLANG_DIAG_ON("float-equal") } #endif /*H5T_CONV_INTERNAL_LDOUBLE_ULLONG*/ diff --git a/src/H5Tinit_float.c b/src/H5Tinit_float.c new file mode 100644 index 0000000..bc14e42 --- /dev/null +++ b/src/H5Tinit_float.c @@ -0,0 +1,572 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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://www.hdfgroup.org/licenses. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * Purpose: Initialize native floating-point datatypes + */ + +/****************/ +/* Module Setup */ +/****************/ + +#include "H5Tmodule.h" /* This source code file is part of the H5T module */ + +/***********/ +/* Headers */ +/***********/ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5FLprivate.h" /* Free Lists */ +#include "H5Iprivate.h" /* IDs */ +#include "H5Tpkg.h" /* Datatypes */ + +/****************/ +/* Local Macros */ +/****************/ + +/* This could also go in H5private.h, but this is the only place we + * need to turn off the sanitizers and we don't want to encourage + * this. + */ +#if defined(__has_attribute) +#if __has_attribute(no_sanitize) +#define H5_NO_UBSAN __attribute__((no_sanitize("undefined"))) +#else +#define H5_NO_UBSAN +#endif +#else +#define H5_NO_UBSAN +#endif + +/*------------------------------------------------------------------------- + * Function: DETECT_F + * + * Purpose: This macro takes a floating point type like `double' and + * a base name like `natd' and detects byte order, mantissa + * location, exponent location, sign bit location, presence or + * absence of implicit mantissa bit, and exponent bias and + * initializes a detected_t structure with those properties. + *------------------------------------------------------------------------- + */ +#define DETECT_F(TYPE, VAR, INFO) \ + { \ + TYPE _v1, _v2, _v3; \ + unsigned char _buf1[sizeof(TYPE)], _buf3[sizeof(TYPE)]; \ + unsigned char _pad_mask[sizeof(TYPE)]; \ + unsigned char _byte_mask; \ + int _i, _j, _last = (-1); \ + \ + memset(&INFO, 0, sizeof(INFO)); \ + INFO.size = sizeof(TYPE); \ + \ + /* Initialize padding mask */ \ + memset(_pad_mask, 0, sizeof(_pad_mask)); \ + \ + /* Padding bits. Set a variable to 4.0, then flip each bit and see if \ + * the modified variable is equal ("==") to the original. Build a \ + * padding bitmask to indicate which bits in the type are padding (i.e. \ + * have no effect on the value and should be ignored by subsequent \ + * steps). This is necessary because padding bits can change arbitrarily \ + * and interfere with detection of the various properties below unless we \ + * know to ignore them. */ \ + _v1 = (TYPE)4.0L; \ + memcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \ + for (_i = 0; _i < (int)sizeof(TYPE); _i++) \ + for (_byte_mask = (unsigned char)1; _byte_mask; _byte_mask = (unsigned char)(_byte_mask << 1)) { \ + _buf1[_i] ^= _byte_mask; \ + memcpy((void *)&_v2, (const void *)_buf1, sizeof(TYPE)); \ + H5_GCC_CLANG_DIAG_OFF("float-equal") \ + if (_v1 != _v2) \ + _pad_mask[_i] |= _byte_mask; \ + H5_GCC_CLANG_DIAG_ON("float-equal") \ + _buf1[_i] ^= _byte_mask; \ + } \ + \ + /* Byte Order */ \ + for (_i = 0, _v1 = (TYPE)0.0L, _v2 = (TYPE)1.0L; _i < (int)sizeof(TYPE); _i++) { \ + _v3 = _v1; \ + _v1 += _v2; \ + _v2 /= (TYPE)256.0L; \ + memcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \ + memcpy(_buf3, (const void *)&_v3, sizeof(TYPE)); \ + _j = H5T__byte_cmp(sizeof(TYPE), _buf3, _buf1, _pad_mask); \ + if (_j >= 0) { \ + INFO.perm[_i] = _j; \ + _last = _i; \ + } \ + } \ + if (H5T__fix_order(sizeof(TYPE), _last, INFO.perm, &INFO.order) < 0) \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to detect byte order"); \ + \ + /* Implicit mantissa bit */ \ + _v1 = (TYPE)0.5L; \ + _v2 = (TYPE)1.0L; \ + if (H5T__imp_bit(sizeof(TYPE), INFO.perm, &_v1, &_v2, _pad_mask, &(INFO.imp)) < 0) \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to determine implicit bit"); \ + INFO.norm = INFO.imp ? H5T_NORM_IMPLIED : H5T_NORM_NONE; \ + \ + /* Sign bit */ \ + _v1 = (TYPE)1.0L; \ + _v2 = (TYPE)-1.0L; \ + if (H5T__bit_cmp(sizeof(TYPE), INFO.perm, &_v1, &_v2, _pad_mask, &(INFO.sign)) < 0) \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to detect byte order"); \ + \ + /* Mantissa */ \ + INFO.mpos = 0; \ + \ + _v1 = (TYPE)1.0L; \ + _v2 = (TYPE)1.5L; \ + if (H5T__bit_cmp(sizeof(TYPE), INFO.perm, &_v1, &_v2, _pad_mask, &(INFO.msize)) < 0) \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to detect byte order"); \ + INFO.msize += 1 + (unsigned)(INFO.imp ? 0 : 1) - INFO.mpos; \ + \ + /* Exponent */ \ + INFO.epos = INFO.mpos + INFO.msize; \ + \ + INFO.esize = INFO.sign - INFO.epos; \ + \ + _v1 = (TYPE)1.0L; \ + INFO.ebias = H5T__find_bias(INFO.epos, INFO.esize, INFO.perm, &_v1); \ + H5T__set_precision(&(INFO)); \ + COMP_ALIGNMENT(TYPE, INFO.comp_align); \ + } + +/* Detect alignment for C structure */ +#define COMP_ALIGNMENT(TYPE, COMP_ALIGN) \ + { \ + struct { \ + char c; \ + TYPE x; \ + } s; \ + \ + COMP_ALIGN = (unsigned)((char *)(&(s.x)) - (char *)(&s)); \ + } + +/******************/ +/* Local Typedefs */ +/******************/ + +/* Holds detected information about a native floating-point type */ +typedef struct H5T_fpoint_det_t { + unsigned size; /* Total byte size */ + unsigned prec; /* Meaningful bits */ + unsigned offset; /* Bit offset to meaningful bits */ + int perm[32]; /* For detection of byte order */ + H5T_order_t order; /* byte order */ + unsigned sign; /* Location of sign bit */ + unsigned mpos, msize, imp; /* Information about mantissa */ + H5T_norm_t norm; /* Information about mantissa */ + unsigned epos, esize; /* Information about exponent */ + unsigned long ebias; /* Exponent bias for floating point */ + unsigned comp_align; /* Alignment for structure */ +} H5T_fpoint_det_t; + +/********************/ +/* Package Typedefs */ +/********************/ + +/********************/ +/* Local Prototypes */ +/********************/ + +/********************/ +/* Public Variables */ +/********************/ + +/*****************************/ +/* Library Private Variables */ +/*****************************/ + +/*********************/ +/* Package Variables */ +/*********************/ + +/*******************/ +/* Local Variables */ +/*******************/ + +/* Functions used in the DETECT_F() macro */ +static int H5T__byte_cmp(int, const void *, const void *, const unsigned char *); +static herr_t H5T__bit_cmp(unsigned, int *, void *, void *, const unsigned char *, unsigned *); +static herr_t H5T__fix_order(int, int, int *, H5T_order_t *); +static herr_t H5T__imp_bit(unsigned, int *, void *, void *, const unsigned char *, unsigned *); +static unsigned H5T__find_bias(unsigned, unsigned, int *, void *); +static void H5T__set_precision(H5T_fpoint_det_t *); + +/*------------------------------------------------------------------------- + * Function: H5T__byte_cmp + * + * Purpose: Compares two chunks of memory A and B and returns the + * byte index into those arrays of the first byte that + * differs between A and B. Ignores differences where the + * corresponding bit in pad_mask is set to 0. + * + * Return: Success: Index of differing byte. + * Failure: -1 if all bytes are the same. + *------------------------------------------------------------------------- + */ +static int +H5T__byte_cmp(int n, const void *_a, const void *_b, const unsigned char *pad_mask) +{ + const unsigned char *a = (const unsigned char *)_a; + const unsigned char *b = (const unsigned char *)_b; + int ret_value = -1; + + FUNC_ENTER_PACKAGE_NOERR + + for (int i = 0; i < n; i++) + if ((a[i] & pad_mask[i]) != (b[i] & pad_mask[i])) + HGOTO_DONE(i); + +done: + FUNC_LEAVE_NOAPI(ret_value) +} + +/*------------------------------------------------------------------------- + * Function: H5T__bit_cmp + * + * Purpose: Compares two bit vectors and returns the index for the + * first bit that differs between the two vectors. The + * size of the vector is NBYTES. PERM is a mapping from + * actual order to little endian. Ignores differences where + * the corresponding bit in pad_mask is set to 0. + * + * Sets `first` to the index of the first differing bit + * + * Return: SUCCEED/FAIL + *------------------------------------------------------------------------- + */ +static herr_t +H5T__bit_cmp(unsigned nbytes, int *perm, void *_a, void *_b, const unsigned char *pad_mask, unsigned *first) +{ + unsigned char *a = (unsigned char *)_a; + unsigned char *b = (unsigned char *)_b; + unsigned char aa, bb; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_PACKAGE + + *first = 0; + + for (unsigned i = 0; i < nbytes; i++) { + if (perm[i] >= (int)nbytes) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failure in bit comparison"); + if ((aa = (unsigned char)(a[perm[i]] & pad_mask[perm[i]])) != + (bb = (unsigned char)(b[perm[i]] & pad_mask[perm[i]]))) { + + for (unsigned j = 0; j < 8; j++, aa >>= 1, bb >>= 1) { + if ((aa & 1) != (bb & 1)) { + *first = i * 8 + j; + HGOTO_DONE(SUCCEED); + } + } + } + } + + /* If we got here and didn't set a value, error out */ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "didn't find a value for `first`"); + +done: + FUNC_LEAVE_NOAPI(ret_value) +} + +/*------------------------------------------------------------------------- + * Function: H5T__fix_order + * + * Purpose: Given an array PERM with elements FIRST through LAST + * initialized with zero origin byte numbers, this function + * creates a permutation vector that maps the actual order + * of a floating point number to little-endian. + * + * This function assumes that the mantissa byte ordering + * implies the total ordering. + * + * Return: SUCCEED/FAIL + *------------------------------------------------------------------------- + */ +static herr_t +H5T__fix_order(int n, int last, int *perm, H5T_order_t *order) +{ + herr_t ret_value = SUCCEED; + + FUNC_ENTER_PACKAGE + + if (last <= 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to detect byte order"); + + /* We have at least three points to consider */ + if (perm[last] < perm[last - 1] && perm[last - 1] < perm[last - 2]) { + /* Little endian */ + *order = H5T_ORDER_LE; + for (int i = 0; i < n; i++) + perm[i] = i; + } + else if (perm[last] > perm[last - 1] && perm[last - 1] > perm[last - 2]) { + /* Big endian */ + *order = H5T_ORDER_BE; + for (int i = 0; i < n; i++) + perm[i] = (n - 1) - i; + } + else { + /* Undetermined endianness - defaults to 'VAX' for historical + * reasons, but there are other mixed-endian systems (like ARM + * in rare cases) + */ + if (0 != n % 2) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "n is not a power of 2"); + + *order = H5T_ORDER_VAX; + for (int i = 0; i < n; i += 2) { + perm[i] = (n - 2) - i; + perm[i + 1] = (n - 1) - i; + } + } + +done: + FUNC_LEAVE_NOAPI(ret_value) +} + +/*------------------------------------------------------------------------- + * Function: H5T__imp_bit + * + * Purpose: Looks for an implicit bit in the mantissa. The value + * of _A should be 1.0 and the value of _B should be 0.5. + * Some floating-point formats discard the most significant + * bit of the mantissa after normalizing since it will always + * be a one (except for 0.0). If this is true for the native + * floating point values stored in _A and _B then the function + * returns non-zero. + * + * This function assumes that the exponent occupies higher + * order bits than the mantissa and that the most significant + * bit of the mantissa is next to the least significant bit + * of the exponent. + * + * + * Return: imp_bit will be set to 1 if the most significant bit + * of the mantissa is discarded (ie, the mantissa has an + * implicit `one' as the most significant bit). Otherwise, + * imp_bit will be set to zero zero. + * + * SUCCEED/FAIL + *------------------------------------------------------------------------- + */ +static herr_t +H5T__imp_bit(unsigned n, int *perm, void *_a, void *_b, const unsigned char *pad_mask, unsigned *imp_bit) +{ + unsigned char *a = (unsigned char *)_a; + unsigned char *b = (unsigned char *)_b; + unsigned changed; + unsigned major; + unsigned minor; + unsigned msmb; /* Most significant mantissa bit */ + herr_t ret_value = SUCCEED; + + FUNC_ENTER_PACKAGE + + /* Look for the least significant bit that has changed between + * A and B. This is the least significant bit of the exponent. + */ + if (H5T__bit_cmp(n, perm, a, b, pad_mask, &changed) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "couldn't find LSB"); + + /* The bit to the right (less significant) of the changed bit should + * be the most significant bit of the mantissa. If it is non-zero + * then the format does not remove the leading `1' of the mantissa. + */ + msmb = changed - 1; + major = msmb / 8; + minor = msmb % 8; + + *imp_bit = (a[perm[major]] >> minor) & 0x01 ? 0 : 1; + +done: + FUNC_LEAVE_NOAPI(ret_value) +} + +/*------------------------------------------------------------------------- + * Function: find_bias + * + * Purpose: Determines the bias of the exponent. This function should + * be called with _A having a value of `1'. + * + * Return: The exponent bias + *------------------------------------------------------------------------- + */ +H5_ATTR_PURE static unsigned +H5T__find_bias(unsigned epos, unsigned esize, int *perm, void *_a) +{ + unsigned char *a = (unsigned char *)_a; + unsigned char mask; + unsigned b, shift = 0, nbits, bias = 0; + + FUNC_ENTER_PACKAGE_NOERR + + while (esize > 0) { + nbits = MIN(esize, (8 - epos % 8)); + mask = (unsigned char)((1 << nbits) - 1); + b = (unsigned)(a[perm[epos / 8]] >> (epos % 8)) & mask; + bias |= b << shift; + + shift += nbits; + esize -= nbits; + epos += nbits; + } + + FUNC_LEAVE_NOAPI(bias) +} + +/*------------------------------------------------------------------------- + * Function: H5T__set_precision + * + * Purpose: Determine the precision and offset + * + * Return: void + *------------------------------------------------------------------------- + */ +static void +H5T__set_precision(H5T_fpoint_det_t *d) +{ + FUNC_ENTER_PACKAGE_NOERR + + d->offset = MIN3(d->mpos, d->epos, d->sign); + d->prec = d->msize + d->esize + 1; + + FUNC_LEAVE_NOAPI_VOID +} + +/*------------------------------------------------------------------------- + * Function: H5T__init_native_float_types + * + * Purpose: Initialize native floating-point datatypes + * + * Return: Success: non-negative + * Failure: negative + *------------------------------------------------------------------------- + */ +herr_t H5_NO_UBSAN +H5T__init_native_float_types(void) +{ + H5T_fpoint_det_t det; + H5T_t *dt = NULL; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_PACKAGE + + /* H5T_NATIVE_FLOAT */ + + /* Get the type's characteristics */ + memset(&det, 0, sizeof(H5T_fpoint_det_t)); + DETECT_F(float, FLOAT, det); + + /* Allocate and fill type structure */ + if (NULL == (dt = H5T__alloc())) + HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "datatype allocation failed"); + dt->shared->state = H5T_STATE_IMMUTABLE; + dt->shared->type = H5T_FLOAT; + dt->shared->size = det.size; + dt->shared->u.atomic.order = det.order; + dt->shared->u.atomic.offset = det.offset; + dt->shared->u.atomic.prec = det.prec; + dt->shared->u.atomic.lsb_pad = H5T_PAD_ZERO; + dt->shared->u.atomic.msb_pad = H5T_PAD_ZERO; + dt->shared->u.atomic.u.f.sign = det.sign; + dt->shared->u.atomic.u.f.epos = det.epos; + dt->shared->u.atomic.u.f.esize = det.esize; + dt->shared->u.atomic.u.f.ebias = det.ebias; + dt->shared->u.atomic.u.f.mpos = det.mpos; + dt->shared->u.atomic.u.f.msize = det.msize; + dt->shared->u.atomic.u.f.norm = det.norm; + dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO; + + /* Register the type and set global variables */ + if ((H5T_NATIVE_FLOAT_g = H5I_register(H5I_DATATYPE, dt, FALSE)) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't register ID for built-in datatype"); + H5T_NATIVE_FLOAT_ALIGN_g = det.comp_align; + + /* H5T_NATIVE_DOUBLE */ + + /* Get the type's characteristics */ + memset(&det, 0, sizeof(H5T_fpoint_det_t)); + DETECT_F(double, DOUBLE, det); + + /* Allocate and fill type structure */ + if (NULL == (dt = H5T__alloc())) + HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "datatype allocation failed"); + dt->shared->state = H5T_STATE_IMMUTABLE; + dt->shared->type = H5T_FLOAT; + dt->shared->size = det.size; + dt->shared->u.atomic.order = det.order; + dt->shared->u.atomic.offset = det.offset; + dt->shared->u.atomic.prec = det.prec; + dt->shared->u.atomic.lsb_pad = H5T_PAD_ZERO; + dt->shared->u.atomic.msb_pad = H5T_PAD_ZERO; + dt->shared->u.atomic.u.f.sign = det.sign; + dt->shared->u.atomic.u.f.epos = det.epos; + dt->shared->u.atomic.u.f.esize = det.esize; + dt->shared->u.atomic.u.f.ebias = det.ebias; + dt->shared->u.atomic.u.f.mpos = det.mpos; + dt->shared->u.atomic.u.f.msize = det.msize; + dt->shared->u.atomic.u.f.norm = det.norm; + dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO; + + /* Register the type and set global variables */ + if ((H5T_NATIVE_DOUBLE_g = H5I_register(H5I_DATATYPE, dt, FALSE)) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't register ID for built-in datatype"); + H5T_NATIVE_DOUBLE_ALIGN_g = det.comp_align; + + /* H5T_NATIVE_LDOUBLE */ + + /* Get the type's characteristics */ + memset(&det, 0, sizeof(H5T_fpoint_det_t)); + DETECT_F(long double, LDOUBLE, det); + + /* Allocate and fill type structure */ + if (NULL == (dt = H5T__alloc())) + HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "datatype allocation failed"); + dt->shared->state = H5T_STATE_IMMUTABLE; + dt->shared->type = H5T_FLOAT; + dt->shared->size = det.size; + dt->shared->u.atomic.order = det.order; + dt->shared->u.atomic.offset = det.offset; + dt->shared->u.atomic.prec = det.prec; + dt->shared->u.atomic.lsb_pad = H5T_PAD_ZERO; + dt->shared->u.atomic.msb_pad = H5T_PAD_ZERO; + dt->shared->u.atomic.u.f.sign = det.sign; + dt->shared->u.atomic.u.f.epos = det.epos; + dt->shared->u.atomic.u.f.esize = det.esize; + dt->shared->u.atomic.u.f.ebias = det.ebias; + dt->shared->u.atomic.u.f.mpos = det.mpos; + dt->shared->u.atomic.u.f.msize = det.msize; + dt->shared->u.atomic.u.f.norm = det.norm; + dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO; + + /* Register the type and set global variables */ + if ((H5T_NATIVE_LDOUBLE_g = H5I_register(H5I_DATATYPE, dt, FALSE)) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't register ID for built-in datatype"); + H5T_NATIVE_LDOUBLE_ALIGN_g = det.comp_align; + + /* Set the platform's alignment (assumes long double's order + * is true for all types) + */ + H5T_native_order_g = det.order; + +done: + if (ret_value < 0) { + if (dt != NULL) { + dt->shared = H5FL_FREE(H5T_shared_t, dt->shared); + dt = H5FL_FREE(H5T_t, dt); + } + } + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5T__init_native_float_types() */ diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index 504f756..23fa960 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -464,7 +464,7 @@ H5FL_EXTERN(H5T_t); H5FL_EXTERN(H5T_shared_t); /* Common functions */ -H5_DLL herr_t H5T__init_native(void); +H5_DLL herr_t H5T__init_native_float_types(void); H5_DLL herr_t H5T__init_native_internal(void); H5_DLL H5T_t *H5T__create(H5T_class_t type, size_t size); H5_DLL H5T_t *H5T__alloc(void); diff --git a/src/H5build_settings.autotools.c.in b/src/H5build_settings.autotools.c.in new file mode 100644 index 0000000..abdc53a --- /dev/null +++ b/src/H5build_settings.autotools.c.in @@ -0,0 +1,119 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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://www.hdfgroup.org/licenses. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include "H5private.h" + +H5_GCC_DIAG_OFF("larger-than=") +H5_CLANG_DIAG_OFF("overlength-strings") + +/* clang-format off */ +const char H5build_settings[]= + " SUMMARY OF THE HDF5 CONFIGURATION\n" + " =================================\n" + "\n" + "General Information:\n" + "-------------------\n" + " HDF5 Version: @H5_VERSION@\n" + " Configured on: @CONFIG_DATE@\n" + " Configured by: @CONFIG_USER@\n" + " Host system: @host_cpu@-@host_vendor@-@host_os@\n" + " Uname information: @UNAME_INFO@\n" + " Byte sex: @BYTESEX@\n" + " Installation point: @prefix@\n" + "\n" + "Compiling Options:\n" + "------------------\n" + " Build Mode: @BUILD_MODE@\n" + " Debugging Symbols: @SYMBOLS@\n" + " Asserts: @ASSERTS@\n" + " Profiling: @PROFILING@\n" + " Optimization Level: @OPTIMIZATION@\n" + "\n" + "Linking Options:\n" + "----------------\n" + " Libraries: @STATIC_SHARED@\n" + " Statically Linked Executables: @LT_STATIC_EXEC@\n" + " LDFLAGS: @LDFLAGS@\n" + " H5_LDFLAGS: @H5_LDFLAGS@\n" + " AM_LDFLAGS: @AM_LDFLAGS@\n" + " Extra libraries: @LIBS@\n" + " Archiver: @AR@\n" + " AR_FLAGS: @AR_FLAGS@\n" + " Ranlib: @RANLIB@\n" + "\n" + "Languages:\n" + "----------\n" + " C: yes\n" + " C Compiler: @CC_VERSION@\n" + " CPPFLAGS: @CPPFLAGS@\n" + " H5_CPPFLAGS: @H5_CPPFLAGS@\n" + " AM_CPPFLAGS: @AM_CPPFLAGS@\n" + " C Flags: @CFLAGS@\n" + " H5 C Flags: @H5_CFLAGS@\n" + " AM C Flags: @AM_CFLAGS@\n" + " Shared C Library: @enable_shared@\n" + " Static C Library: @enable_static@\n" + "\n" + "\n" + " Fortran: @HDF_FORTRAN@\n" +@BUILD_FORTRAN_CONDITIONAL_TRUE@ " Fortran Compiler: @FC_VERSION@\n" +@BUILD_FORTRAN_CONDITIONAL_TRUE@ " Fortran Flags: @FCFLAGS@\n" +@BUILD_FORTRAN_CONDITIONAL_TRUE@ " H5 Fortran Flags: @H5_FCFLAGS@\n" +@BUILD_FORTRAN_CONDITIONAL_TRUE@ " AM Fortran Flags: @AM_FCFLAGS@\n" +@BUILD_FORTRAN_CONDITIONAL_TRUE@ " Shared Fortran Library: @H5_FORTRAN_SHARED@\n" +@BUILD_FORTRAN_CONDITIONAL_TRUE@ " Static Fortran Library: @enable_static@\n" +@BUILD_FORTRAN_CONDITIONAL_TRUE@ " Module Directory: @fmoddir@\n" + "\n" + " C++: @HDF_CXX@\n" +@BUILD_CXX_CONDITIONAL_TRUE@ " C++ Compiler: @CXX_VERSION@\n" +@BUILD_CXX_CONDITIONAL_TRUE@ " C++ Flags: @CXXFLAGS@\n" +@BUILD_CXX_CONDITIONAL_TRUE@ " H5 C++ Flags: @H5_CXXFLAGS@\n" +@BUILD_CXX_CONDITIONAL_TRUE@ " AM C++ Flags: @AM_CXXFLAGS@\n" +@BUILD_CXX_CONDITIONAL_TRUE@ " Shared C++ Library: @enable_shared@\n" +@BUILD_CXX_CONDITIONAL_TRUE@ " Static C++ Library: @enable_static@\n" + "\n" + " Java: @HDF_JAVA@\n" +@BUILD_JAVA_CONDITIONAL_TRUE@ " Java Compiler: @JAVA_VERSION@\n" + "\n" + "\n" + "Features:\n" + "---------\n" + " Parallel HDF5: @PARALLEL@\n" + " Parallel Filtered Dataset Writes: @PARALLEL_FILTERED_WRITES@\n" + " Large Parallel I/O: @LARGE_PARALLEL_IO@\n" + " High-level library: @HDF5_HL@\n" + "Dimension scales w/ new references: @DIMENSION_SCALES_WITH_NEW_REF@\n" + " Build HDF5 Tests: @HDF5_TESTS@\n" + " Build HDF5 Tools: @HDF5_TOOLS@\n" + " Build GIF Tools: @HDF5_HL_GIF_TOOLS@\n" + " Threadsafety: @THREADSAFE@\n" + " Default API mapping: @DEFAULT_API_VERSION@\n" + " With deprecated public symbols: @DEPRECATED_SYMBOLS@\n" + " I/O filters (external): @EXTERNAL_FILTERS@\n" + " Map (H5M) API: @MAP_API@\n" + " Direct VFD: @DIRECT_VFD@\n" + " Mirror VFD: @MIRROR_VFD@\n" + " Subfiling VFD: @SUBFILING_VFD@\n" + " (Read-Only) S3 VFD: @ROS3_VFD@\n" + " (Read-Only) HDFS VFD: @HAVE_LIBHDFS@\n" + " Packages w/ extra debug output: @INTERNAL_DEBUG_OUTPUT@\n" + " API tracing: @TRACE_API@\n" + " Using memory checker: @USINGMEMCHECKER@\n" + " Function stack tracing: @CODESTACK@\n" + " Use file locking: @DESIRED_FILE_LOCKING@\n" + " Strict file format checks: @STRICT_FORMAT_CHECKS@\n" + " Optimization instrumentation: @INSTRUMENT_LIBRARY@\n" +; +/* clang-format on */ + +H5_GCC_DIAG_ON("larger-than=") +H5_CLANG_DIAG_OFF("overlength-strings") diff --git a/src/H5build_settings.cmake.c.in b/src/H5build_settings.cmake.c.in new file mode 100644 index 0000000..67ebec7 --- /dev/null +++ b/src/H5build_settings.cmake.c.in @@ -0,0 +1,117 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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://www.hdfgroup.org/licenses. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include "H5private.h" + +H5_GCC_DIAG_OFF("larger-than=") +H5_CLANG_DIAG_OFF("overlength-strings") + +const char H5build_settings[]= + " SUMMARY OF THE HDF5 CONFIGURATION\n" + " =================================\n" + "\n" + "General Information:\n" + "-------------------\n" + " HDF5 Version: @HDF5_PACKAGE_VERSION_STRING@\n" + " Configured on: @CONFIG_DATE@\n" + " Configured by: @CMAKE_GENERATOR@\n" + " Host system: @CMAKE_HOST_SYSTEM@\n" + " Uname information: @CMAKE_SYSTEM_NAME@\n" + " Byte sex: @BYTESEX@\n" + " Installation point: @CMAKE_INSTALL_PREFIX@\n" + "\n" + "Compiling Options:\n" + "------------------\n" + " Build Mode: @HDF_CFG_NAME@\n" + " Debugging Symbols: @HDF5_ENABLE_SYMBOLS@\n" + " Asserts: @HDF5_ENABLE_ASSERTS@\n" + " Profiling: @HDF5_ENABLE_PROFILING@\n" + " Optimization Level: @HDF5_ENABLE_OPTIMIZATION@\n" + "\n" + "Linking Options:\n" + "----------------\n" + " Libraries: @BUILD_NAME_EXT@\n" + " Statically Linked Executables: @BUILD_STATIC_EXECS@\n" + " LDFLAGS: @CMAKE_SHARED_LINKER_FLAGS@\n" + " H5_LDFLAGS: @H5_LDFLAGS@\n" + " AM_LDFLAGS: @AM_LDFLAGS@\n" + " Extra libraries: @LINK_LIBS@\n" + " Archiver: @CMAKE_AR@\n" + " AR_FLAGS: \n" + " Ranlib: @CMAKE_RANLIB@\n" + "\n" + "Languages:\n" + "----------\n" + " C: YES\n" + " C Compiler: @CMAKE_C_COMPILER@ @CMAKE_C_COMPILER_VERSION@\n" + " CPPFLAGS: @CPPFLAGS@\n" + " H5_CPPFLAGS: @H5_CPPFLAGS@\n" + " AM_CPPFLAGS: @AM_CPPFLAGS@\n" + " C Flags: @CMAKE_C_FLAGS@\n" + " H5 C Flags: @HDF5_CMAKE_C_FLAGS@\n" + " AM C Flags: @AM_CFLAGS@\n" + " Shared C Library: @H5_ENABLE_SHARED_LIB@\n" + " Static C Library: @H5_ENABLE_STATIC_LIB@\n" + "\n" + "\n" + " Fortran: @HDF5_BUILD_FORTRAN@\n" + " Fortran Compiler: @CMAKE_Fortran_COMPILER@ @CMAKE_Fortran_COMPILER_VERSION@\n" + " Fortran Flags: @CMAKE_Fortran_FLAGS@\n" + " H5 Fortran Flags: @HDF5_CMAKE_Fortran_FLAGS@\n" + " AM Fortran Flags: @AM_FCFLAGS@\n" + " Shared Fortran Library: @H5_ENABLE_SHARED_LIB@\n" + " Static Fortran Library: @H5_ENABLE_STATIC_LIB@\n" + " Module Directory: @CMAKE_Fortran_MODULE_DIRECTORY@\n" + "\n" + " C++: @HDF5_BUILD_CPP_LIB@\n" + " C++ Compiler: @CMAKE_CXX_COMPILER@ @CMAKE_CXX_COMPILER_VERSION@\n" + " C++ Flags: @CMAKE_CXX_FLAGS@\n" + " H5 C++ Flags: @HDF5_CMAKE_CXX_FLAGS@\n" + " AM C++ Flags: @AM_CXXFLAGS@\n" + " Shared C++ Library: @H5_ENABLE_SHARED_LIB@\n" + " Static C++ Library: @H5_ENABLE_STATIC_LIB@\n" + "\n" + " Java: @HDF5_BUILD_JAVA@\n" + " Java Compiler: @CMAKE_Java_COMPILER@ @Java_VERSION@\n" + "\n" + "\n" + "Features:\n" + "---------\n" + " Parallel HDF5: @HDF5_ENABLE_PARALLEL@\n" + " Parallel Filtered Dataset Writes: @PARALLEL_FILTERED_WRITES@\n" + " Large Parallel I/O: @LARGE_PARALLEL_IO@\n" + " High-level library: @HDF5_BUILD_HL_LIB@\n" + "Dimension scales w/ new references: @DIMENSION_SCALES_WITH_NEW_REF@\n" + " Build HDF5 Tests: @BUILD_TESTING@\n" + " Build HDF5 Tools: @HDF5_BUILD_TOOLS@\n" + " Build GIF Tools: @HDF5_BUILD_HL_GIF_TOOLS@\n" + " Threadsafety: @HDF5_ENABLE_THREADSAFE@\n" + " Default API mapping: @DEFAULT_API_VERSION@\n" + " With deprecated public symbols: @HDF5_ENABLE_DEPRECATED_SYMBOLS@\n" + " I/O filters (external): @EXTERNAL_FILTERS@\n" + " Map (H5M) API: @H5_HAVE_MAP_API@\n" + " Direct VFD: @H5_HAVE_DIRECT@\n" + " Mirror VFD: @H5_HAVE_MIRROR_VFD@\n" + " Subfiling VFD: @H5_HAVE_SUBFILING_VFD@\n" + " (Read-Only) S3 VFD: @H5_HAVE_ROS3_VFD@\n" + " (Read-Only) HDFS VFD: @H5_HAVE_LIBHDFS@\n" + " Packages w/ extra debug output: @INTERNAL_DEBUG_OUTPUT@\n" + " API tracing: @HDF5_ENABLE_TRACE@\n" + " Using memory checker: @HDF5_ENABLE_USING_MEMCHECKER@\n" + " Function stack tracing: @HDF5_ENABLE_CODESTACK@\n" + " Use file locking: @HDF5_FILE_LOCKING_SETTING@\n" + " Strict file format checks: @HDF5_STRICT_FORMAT_CHECKS@\n" + " Optimization instrumentation: @HDF5_Enable_Instrument@\n" +; + +H5_GCC_DIAG_ON("larger-than=") +H5_CLANG_DIAG_OFF("overlength-strings") diff --git a/src/H5build_settings.off.c.in b/src/H5build_settings.off.c.in new file mode 100644 index 0000000..2464e9f --- /dev/null +++ b/src/H5build_settings.off.c.in @@ -0,0 +1,13 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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://www.hdfgroup.org/licenses. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +const char H5build_settings[]=""; diff --git a/src/H5detect.c b/src/H5detect.c deleted file mode 100644 index 9520faa..0000000 --- a/src/H5detect.c +++ /dev/null @@ -1,941 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * 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://www.hdfgroup.org/licenses. * - * If you do not have access to either file, you may request a copy from * - * help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/*keep this declaration near the top of this file -RPM*/ -static const char *FileHeader = "\n\ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\ - * Copyright by The HDF Group. *\n\ - * All rights reserved. *\n\ - * *\n\ - * This file is part of HDF5. The full HDF5 copyright notice, including *\n\ - * terms governing use, modification, and redistribution, is contained in *\n\ - * the COPYING file, which can be found at the root of the source code *\n\ - * distribution tree, or in https://www.hdfgroup.org/licenses. *\n\ - * If you do not have access to either file, you may request a copy from *\n\ - * help@hdfgroup.org. *\n\ - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"; -/* - * Purpose: This code was borrowed heavily from the `detect.c' - * program in the AIO distribution from Lawrence - * Livermore National Laboratory. - * - * Detects machine byte order and floating point - * format and generates a C source file (H5Tinit.c) - * to describe those parameters. - * - * Assumptions: We have an ANSI compiler. We're on a Unix like - * system or configure has detected those Unix - * features which aren't available. We're not - * running on a Vax or other machine with mixed - * endianness. - *------------------------------------------------------------------------- - */ -#undef NDEBUG -#include "H5private.h" -/* Do NOT use fprintf in this file as it is not linked with the library, - * which contains the H5system.c file in which the function is defined. - */ -#include "H5Tpublic.h" -#include "H5Rpublic.h" - -#if defined(__has_attribute) -#if __has_attribute(no_sanitize_address) -#define HDF_NO_UBSAN __attribute__((no_sanitize_address)) -#else -#define HDF_NO_UBSAN -#endif -#else -#define HDF_NO_UBSAN -#endif - -#define MAXDETECT 64 - -/* - * This structure holds information about a type that - * was detected. - */ -typedef struct detected_t { - const char *varname; - unsigned int size; /* total byte size */ - unsigned int precision; /* meaningful bits */ - unsigned int offset; /* bit offset to meaningful bits */ - int perm[32]; /* for detection of byte order */ - hbool_t is_vax; /* for vax (float & double) only */ - unsigned int sign; /* location of sign bit */ - unsigned int mpos, msize, imp; /* information about mantissa */ - unsigned int epos, esize; /* information about exponent */ - unsigned long bias; /* exponent bias for floating pt */ - unsigned int comp_align; /* alignment for structure */ -} detected_t; - -FILE *rawoutstream = NULL; - -/* global variables types detection code */ -H5_GCC_DIAG_OFF("larger-than=") -static detected_t d_g[MAXDETECT]; -H5_GCC_DIAG_ON("larger-than=") -static volatile int nd_g = 0; - -static void print_results(int nd, detected_t *d); -static void iprint(detected_t *); -static int byte_cmp(int, const void *, const void *, const unsigned char *); -static unsigned int bit_cmp(unsigned int, int *, void *, void *, const unsigned char *); -static void fix_order(int, int, int *, const char **); -static unsigned int imp_bit(unsigned int, int *, void *, void *, const unsigned char *); -static unsigned int find_bias(unsigned int, unsigned int, int *, void *); -static void precision(detected_t *); -static void print_header(void); -static void detect_C89_floats(void); -static void detect_C99_floats(void); - -/*------------------------------------------------------------------------- - * Function: precision - * - * Purpose: Determine the precision and offset. - * - * Return: void - *------------------------------------------------------------------------- - */ -static void -precision(detected_t *d) -{ - /* A floating point */ - d->offset = MIN3(d->mpos, d->epos, d->sign); - d->precision = d->msize + d->esize + 1; -} - -/*------------------------------------------------------------------------- - * Function: DETECT_F - * - * Purpose: This macro takes a floating point type like `double' and - * a base name like `natd' and detects byte order, mantissa - * location, exponent location, sign bit location, presence or - * absence of implicit mantissa bit, and exponent bias and - * initializes a detected_t structure with those properties. - *------------------------------------------------------------------------- - */ -#define DETECT_F(TYPE, VAR, INFO) \ - { \ - TYPE _v1, _v2, _v3; \ - unsigned char _buf1[sizeof(TYPE)], _buf3[sizeof(TYPE)]; \ - unsigned char _pad_mask[sizeof(TYPE)]; \ - unsigned char _byte_mask; \ - int _i, _j, _last = (-1); \ - const char *_mesg; \ - \ - memset(&INFO, 0, sizeof(INFO)); \ - INFO.varname = #VAR; \ - INFO.size = sizeof(TYPE); \ - \ - /* Initialize padding mask */ \ - memset(_pad_mask, 0, sizeof(_pad_mask)); \ - \ - /* Padding bits. Set a variable to 4.0, then flip each bit and see if \ - * the modified variable is equal ("==") to the original. Build a \ - * padding bitmask to indicate which bits in the type are padding (i.e. \ - * have no effect on the value and should be ignored by subsequent \ - * steps). This is necessary because padding bits can change arbitrarily \ - * and interfere with detection of the various properties below unless we \ - * know to ignore them. */ \ - _v1 = (TYPE)4.0L; \ - memcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \ - for (_i = 0; _i < (int)sizeof(TYPE); _i++) \ - for (_byte_mask = (unsigned char)1; _byte_mask; _byte_mask = (unsigned char)(_byte_mask << 1)) { \ - _buf1[_i] ^= _byte_mask; \ - memcpy((void *)&_v2, (const void *)_buf1, sizeof(TYPE)); \ - H5_GCC_CLANG_DIAG_OFF("float-equal") \ - if (_v1 != _v2) \ - _pad_mask[_i] |= _byte_mask; \ - H5_GCC_CLANG_DIAG_ON("float-equal") \ - _buf1[_i] ^= _byte_mask; \ - } /* end for */ \ - \ - /* Byte Order */ \ - for (_i = 0, _v1 = (TYPE)0.0L, _v2 = (TYPE)1.0L; _i < (int)sizeof(TYPE); _i++) { \ - _v3 = _v1; \ - _v1 += _v2; \ - _v2 /= (TYPE)256.0L; \ - memcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \ - memcpy(_buf3, (const void *)&_v3, sizeof(TYPE)); \ - _j = byte_cmp(sizeof(TYPE), _buf3, _buf1, _pad_mask); \ - if (_j >= 0) { \ - INFO.perm[_i] = _j; \ - _last = _i; \ - } \ - } \ - fix_order(sizeof(TYPE), _last, INFO.perm, (const char **)&_mesg); \ - \ - if (!strcmp(_mesg, "VAX")) \ - INFO.is_vax = TRUE; \ - \ - /* Implicit mantissa bit */ \ - _v1 = (TYPE)0.5L; \ - _v2 = (TYPE)1.0L; \ - INFO.imp = imp_bit(sizeof(TYPE), INFO.perm, &_v1, &_v2, _pad_mask); \ - \ - /* Sign bit */ \ - _v1 = (TYPE)1.0L; \ - _v2 = (TYPE)-1.0L; \ - INFO.sign = bit_cmp(sizeof(TYPE), INFO.perm, &_v1, &_v2, _pad_mask); \ - \ - /* Mantissa */ \ - INFO.mpos = 0; \ - \ - _v1 = (TYPE)1.0L; \ - _v2 = (TYPE)1.5L; \ - INFO.msize = bit_cmp(sizeof(TYPE), INFO.perm, &_v1, &_v2, _pad_mask); \ - INFO.msize += 1 + (unsigned int)(INFO.imp ? 0 : 1) - INFO.mpos; \ - \ - /* Exponent */ \ - INFO.epos = INFO.mpos + INFO.msize; \ - \ - INFO.esize = INFO.sign - INFO.epos; \ - \ - _v1 = (TYPE)1.0L; \ - INFO.bias = find_bias(INFO.epos, INFO.esize, INFO.perm, &_v1); \ - precision(&(INFO)); \ - if (!strcmp(INFO.varname, "FLOAT") || !strcmp(INFO.varname, "DOUBLE") || \ - !strcmp(INFO.varname, "LDOUBLE")) { \ - COMP_ALIGNMENT(TYPE, INFO.comp_align); \ - } \ - } - -/* Detect alignment for C structure */ -#define COMP_ALIGNMENT(TYPE, COMP_ALIGN) \ - { \ - struct { \ - char c; \ - TYPE x; \ - } s; \ - \ - COMP_ALIGN = (unsigned int)((char *)(&(s.x)) - (char *)(&s)); \ - } - -/*------------------------------------------------------------------------- - * Function: print_results - * - * Purpose: Prints information about the detected data types. - * - * Return: void - *------------------------------------------------------------------------- - */ -static void -print_results(int nd, detected_t *d) -{ - int byte_order = 0; /*byte order of data types*/ - int i, j; - - /* Include files */ - fprintf(rawoutstream, "\ -/****************/\n\ -/* Module Setup */\n\ -/****************/\n\ -\n\ -#include \"H5Tmodule.h\" /* This source code file is part of the H5T module */\n\ -\n\ -\n\ -/***********/\n\ -/* Headers */\n\ -/***********/\n\ -#include \"H5private.h\" /* Generic Functions */\n\ -#include \"H5Eprivate.h\" /* Error handling */\n\ -#include \"H5FLprivate.h\" /* Free Lists */\n\ -#include \"H5Iprivate.h\" /* IDs */\n\ -#include \"H5Tpkg.h\" /* Datatypes */\n\ -\n\ -\n\ -/****************/\n\ -/* Local Macros */\n\ -/****************/\n\ -\n\ -\n\ -/******************/\n\ -/* Local Typedefs */\n\ -/******************/\n\ -\n\ -\n\ -/********************/\n\ -/* Package Typedefs */\n\ -/********************/\n\ -\n\ -\n\ -/********************/\n\ -/* Local Prototypes */\n\ -/********************/\n\ -\n\ -\n\ -/********************/\n\ -/* Public Variables */\n\ -/********************/\n\ -\n\ -\n\ -/*****************************/\n\ -/* Library Private Variables */\n\ -/*****************************/\n\ -\n\ -\n\ -/*********************/\n\ -/* Package Variables */\n\ -/*********************/\n\ -\n\ -\n"); - fprintf(rawoutstream, "\n\ -/*******************/\n\ -/* Local Variables */\n\ -/*******************/\n\ -\n"); - - /* The interface initialization function */ - fprintf(rawoutstream, "\n\ - \n\ -/*-------------------------------------------------------------------------\n\ - * Function: H5T__init_native\n\ - *\n\ - * Purpose: Initialize pre-defined native datatypes from code generated\n\ - * during the library configuration by H5detect.\n\ - *\n\ - * Return: Success: non-negative\n\ - * Failure: negative\n\ - *\n\ - * Programmer: Robb Matzke\n\ - * Wednesday, December 16, 1998\n\ - *\n\ - *-------------------------------------------------------------------------\n\ - */\n\ -herr_t\n\ -H5T__init_native(void)\n\ -{\n\ - H5T_t *dt = NULL;\n\ - herr_t ret_value = SUCCEED;\n\ -\n\ - FUNC_ENTER_PACKAGE\n"); - - for (i = 0; i < nd; i++) { - /* The native endianness of this machine */ - /* The INFO.perm now contains `-1' for bytes that aren't used and - * are always zero. This happens on the Cray for `short' where - * sizeof(short) is 8, but only the low-order 4 bytes are ever used. - */ - if (d[i].is_vax) /* the type is a VAX floating number */ - byte_order = -1; - else { - for (j = 0; j < 32; j++) { - /*Find the 1st containing valid data*/ - if (d[i].perm[j] > -1) { - byte_order = d[i].perm[j]; - break; - } - } - } - - /* Print a comment to describe this section of definitions. */ - fprintf(rawoutstream, "\n /*\n"); - iprint(d + i); - fprintf(rawoutstream, " */\n"); - - /* The part common to fixed and floating types */ - fprintf(rawoutstream, "\ - if(NULL == (dt = H5T__alloc()))\n\ - HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, \"datatype allocation failed\");\n\ - dt->shared->state = H5T_STATE_IMMUTABLE;\n\ - dt->shared->type = H5T_FLOAT;\n\ - dt->shared->size = %d;\n", - d[i].size); /*size */ - - if (byte_order == -1) - fprintf(rawoutstream, "\ - dt->shared->u.atomic.order = H5T_ORDER_VAX;\n"); - else if (byte_order == 0) - fprintf(rawoutstream, "\ - dt->shared->u.atomic.order = H5T_ORDER_LE;\n"); - else - fprintf(rawoutstream, "\ - dt->shared->u.atomic.order = H5T_ORDER_BE;\n"); - - fprintf(rawoutstream, "\ - dt->shared->u.atomic.offset = %d;\n\ - dt->shared->u.atomic.prec = %d;\n\ - dt->shared->u.atomic.lsb_pad = H5T_PAD_ZERO;\n\ - dt->shared->u.atomic.msb_pad = H5T_PAD_ZERO;\n", - d[i].offset, /*offset */ - d[i].precision); /*precision */ - /*assert((d[i].perm[0]>0)==(byte_order>0));*/ /* Double-check that byte-order doesn't change */ - - /* The part unique to floating point types */ - fprintf(rawoutstream, "\ -dt->shared->u.atomic.u.f.sign = %d;\n\ -dt->shared->u.atomic.u.f.epos = %d;\n\ -dt->shared->u.atomic.u.f.esize = %d;\n\ -dt->shared->u.atomic.u.f.ebias = 0x%08lx;\n\ -dt->shared->u.atomic.u.f.mpos = %d;\n\ -dt->shared->u.atomic.u.f.msize = %d;\n\ -dt->shared->u.atomic.u.f.norm = H5T_NORM_%s;\n\ -dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO;\n", - d[i].sign, /*sign location */ - d[i].epos, /*exponent loc */ - d[i].esize, /*exponent size */ - (unsigned long)(d[i].bias), /*exponent bias */ - d[i].mpos, /*mantissa loc */ - d[i].msize, /*mantissa size */ - d[i].imp ? "IMPLIED" : "NONE"); /*normalization */ - - /* Register the type */ - fprintf(rawoutstream, "\ - if((H5T_NATIVE_%s_g = H5I_register(H5I_DATATYPE, dt, FALSE)) < 0)\n\ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \"can't register ID for built-in datatype\");\n", - d[i].varname); - - /* Variables for alignment of compound datatype */ - if (!strcmp(d[i].varname, "SCHAR") || !strcmp(d[i].varname, "SHORT") || - !strcmp(d[i].varname, "INT") || !strcmp(d[i].varname, "LONG") || !strcmp(d[i].varname, "LLONG") || - !strcmp(d[i].varname, "FLOAT") || !strcmp(d[i].varname, "DOUBLE") || - !strcmp(d[i].varname, "LDOUBLE")) { - fprintf(rawoutstream, " H5T_NATIVE_%s_ALIGN_g = %lu;\n", d[i].varname, - (unsigned long)(d[i].comp_align)); - } - } - - /* Consider VAX a little-endian machine */ - if (byte_order == 0 || byte_order == -1) { - fprintf(rawoutstream, "\n\ - /* Set the native order for this machine */\n\ - H5T_native_order_g = H5T_ORDER_%s;\n", - "LE"); - } - else { - fprintf(rawoutstream, "\n\ - /* Set the native order for this machine */\n\ - H5T_native_order_g = H5T_ORDER_%s;\n", - "BE"); - } - - fprintf(rawoutstream, "\ -\n\ -done:\n\ - if(ret_value < 0) {\n\ - if(dt != NULL) {\n\ - dt->shared = H5FL_FREE(H5T_shared_t, dt->shared);\n\ - dt = H5FL_FREE(H5T_t, dt);\n\ - } /* end if */\n\ - } /* end if */\n\ -\n\ - FUNC_LEAVE_NOAPI(ret_value);\n} /* end H5T__init_native() */\n"); - -} /* end print_results() */ - -/*------------------------------------------------------------------------- - * Function: iprint - * - * Purpose: Prints information about the fields of a floating point format. - * - * Return: void - - *------------------------------------------------------------------------- - */ -static void -iprint(detected_t *d) -{ - unsigned int pass; - - for (pass = (d->size - 1) / 4;; --pass) { - unsigned int i, k; - /* - * Print the byte ordering above the bit fields. - */ - fprintf(rawoutstream, " * "); - for (i = MIN(pass * 4 + 3, d->size - 1); i >= pass * 4; --i) { - fprintf(rawoutstream, "%4d", d->perm[i]); - if (i > pass * 4) - fputs(" ", rawoutstream); - if (!i) - break; - } - - /* - * Print the bit fields - */ - fprintf(rawoutstream, "\n * "); - for (i = MIN(pass * 4 + 3, d->size - 1), k = MIN(pass * 32 + 31, 8 * d->size - 1); i >= pass * 4; - --i) { - unsigned int j; - - for (j = 8; j > 0; --j) { - if (k == d->sign) { - fputc('S', rawoutstream); - } - else if (k >= d->epos && k < d->epos + d->esize) { - fputc('E', rawoutstream); - } - else if (k >= d->mpos && k < d->mpos + d->msize) { - fputc('M', rawoutstream); - } - else { - fputc('?', rawoutstream); /*unknown floating point bit */ - } - --k; - } - if (i > pass * 4) - fputc(' ', rawoutstream); - if (!i) - break; - } - fputc('\n', rawoutstream); - if (!pass) - break; - } - - /* - * Is there an implicit bit in the mantissa. - */ - fprintf(rawoutstream, " * Implicit bit? %s\n", d->imp ? "yes" : "no"); -} - -/*------------------------------------------------------------------------- - * Function: byte_cmp - * - * Purpose: Compares two chunks of memory A and B and returns the - * byte index into those arrays of the first byte that - * differs between A and B. Ignores differences where the - * corresponding bit in pad_mask is set to 0. - * - * Return: Success: Index of differing byte. - * Failure: -1 if all bytes are the same. - *------------------------------------------------------------------------- - */ -static int -byte_cmp(int n, const void *_a, const void *_b, const unsigned char *pad_mask) -{ - int i; - const unsigned char *a = (const unsigned char *)_a; - const unsigned char *b = (const unsigned char *)_b; - - for (i = 0; i < n; i++) - if ((a[i] & pad_mask[i]) != (b[i] & pad_mask[i])) - return i; - - return -1; -} - -/*------------------------------------------------------------------------- - * Function: bit_cmp - * - * Purpose: Compares two bit vectors and returns the index for the - * first bit that differs between the two vectors. The - * size of the vector is NBYTES. PERM is a mapping from - * actual order to little endian. Ignores differences where - * the corresponding bit in pad_mask is set to 0. - * - * Return: Index of first differing bit. - * - *------------------------------------------------------------------------- - */ -static unsigned int -bit_cmp(unsigned int nbytes, int *perm, void *_a, void *_b, const unsigned char *pad_mask) -{ - unsigned int i; - unsigned char *a = (unsigned char *)_a; - unsigned char *b = (unsigned char *)_b; - unsigned char aa, bb; - - for (i = 0; i < nbytes; i++) { - assert(perm[i] < (int)nbytes); - if ((aa = (unsigned char)(a[perm[i]] & pad_mask[perm[i]])) != - (bb = (unsigned char)(b[perm[i]] & pad_mask[perm[i]]))) { - unsigned int j; - - for (j = 0; j < 8; j++, aa >>= 1, bb >>= 1) { - if ((aa & 1) != (bb & 1)) - return i * 8 + j; - } - fprintf(stderr, "INTERNAL ERROR"); - abort(); - } - } - fprintf(stderr, "INTERNAL ERROR"); - abort(); - return 0; -} - -/*------------------------------------------------------------------------- - * Function: fix_order - * - * Purpose: Given an array PERM with elements FIRST through LAST - * initialized with zero origin byte numbers, this function - * creates a permutation vector that maps the actual order - * of a floating point number to little-endian. - * - * This function assumes that the mantissa byte ordering - * implies the total ordering. - * - * Return: void - *------------------------------------------------------------------------- - */ -static void -fix_order(int n, int last, int *perm, const char **mesg) -{ - int i; - - if (last > 1) { - /* - * We have at least three points to consider. - */ - if (perm[last] < perm[last - 1] && perm[last - 1] < perm[last - 2]) { - /* - * Little endian. - */ - if (mesg) - *mesg = "Little-endian"; - for (i = 0; i < n; i++) - perm[i] = i; - } - else if (perm[last] > perm[last - 1] && perm[last - 1] > perm[last - 2]) { - /* - * Big endian. - */ - if (mesg) - *mesg = "Big-endian"; - for (i = 0; i < n; i++) - perm[i] = (n - 1) - i; - } - else { - /* - * Bi-endian machines like VAX. - * (NOTE: This is not an actual determination of the VAX-endianness. - * It could have some other endianness and fall into this - * case - JKM & QAK) - */ - assert(0 == n % 2); - if (mesg) - *mesg = "VAX"; - for (i = 0; i < n; i += 2) { - perm[i] = (n - 2) - i; - perm[i + 1] = (n - 1) - i; - } - } - } - else { - fprintf(stderr, "Failed to detect byte order of %d-byte floating point.\n", n); - exit(1); - } -} - -/*------------------------------------------------------------------------- - * Function: imp_bit - * - * Purpose: Looks for an implicit bit in the mantissa. The value - * of _A should be 1.0 and the value of _B should be 0.5. - * Some floating-point formats discard the most significant - * bit of the mantissa after normalizing since it will always - * be a one (except for 0.0). If this is true for the native - * floating point values stored in _A and _B then the function - * returns non-zero. - * - * This function assumes that the exponent occupies higher - * order bits than the mantissa and that the most significant - * bit of the mantissa is next to the least significant bit - * of the exponent. - * - * - * Return: Success: Non-zero if the most significant bit - * of the mantissa is discarded (ie, the - * mantissa has an implicit `one' as the - * most significant bit). Otherwise, - * returns zero. - * - * Failure: 1 - * - *------------------------------------------------------------------------- - */ -static unsigned int -imp_bit(unsigned int n, int *perm, void *_a, void *_b, const unsigned char *pad_mask) -{ - unsigned char *a = (unsigned char *)_a; - unsigned char *b = (unsigned char *)_b; - unsigned int changed, major, minor; - unsigned int msmb; /* most significant mantissa bit */ - - /* - * Look for the least significant bit that has changed between - * A and B. This is the least significant bit of the exponent. - */ - changed = bit_cmp(n, perm, a, b, pad_mask); - - /* - * The bit to the right (less significant) of the changed bit should - * be the most significant bit of the mantissa. If it is non-zero - * then the format does not remove the leading `1' of the mantissa. - */ - msmb = changed - 1; - major = msmb / 8; - minor = msmb % 8; - - return (a[perm[major]] >> minor) & 0x01 ? 0 : 1; -} - -/*------------------------------------------------------------------------- - * Function: find_bias - * - * Purpose: Determines the bias of the exponent. This function should - * be called with _A having a value of `1'. - * - * Return: The exponent bias. - * - *------------------------------------------------------------------------- - */ -H5_ATTR_PURE static unsigned int -find_bias(unsigned int epos, unsigned int esize, int *perm, void *_a) -{ - unsigned char *a = (unsigned char *)_a; - unsigned char mask; - unsigned int b, shift = 0, nbits, bias = 0; - - while (esize > 0) { - nbits = MIN(esize, (8 - epos % 8)); - mask = (unsigned char)((1 << nbits) - 1); - b = (unsigned int)(a[perm[epos / 8]] >> (epos % 8)) & mask; - bias |= b << shift; - - shift += nbits; - esize -= nbits; - epos += nbits; - } - return bias; -} - -/*------------------------------------------------------------------------- - * Function: print_header - * - * Purpose: Prints the C file header for the generated file. - * - * Return: void - *------------------------------------------------------------------------- - */ -static void -print_header(void) -{ - - time_t now = HDtime(NULL); - struct tm *tm = HDlocaltime(&now); - char real_name[30]; - char host_name[256]; - int i; - const char *s; -#ifdef H5_HAVE_GETPWUID - struct passwd *pwd = NULL; -#else - int pwd = 1; -#endif - static const char *month_name[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; - static const char *purpose = "\ -This machine-generated source code contains\n\ -information about the various integer and\n\ -floating point numeric formats found on this\n\ -architecture. The parameters below should be\n\ -checked carefully and errors reported to the\n\ -HDF5 maintainer.\n\ -\n\ -Each of the numeric formats listed below are\n\ -printed from most significant bit to least\n\ -significant bit even though the actual bytes\n\ -might be stored in a different order in\n\ -memory. The integers above each binary byte\n\ -indicate the relative order of the bytes in\n\ -memory; little-endian machines have\n\ -decreasing numbers while big-endian machines\n\ -have increasing numbers.\n\ -\n\ -The fields of the numbers are printed as\n\ -letters with `S' for the mantissa sign bit,\n\ -`M' for the mantissa magnitude, and `E' for\n\ -the exponent. The exponent has an associated\n\ -bias which can be subtracted to find the\n\ -true exponent. The radix point is assumed\n\ -to be before the first `M' bit. Any bit\n\ -of a floating-point value not falling into one\n\ -of these categories is printed as a question\n\ -mark. Bits of integer types are printed as\n\ -`I' for 2's complement and `U' for magnitude.\n\ -\n\ -If the most significant bit of the normalized\n\ -mantissa (always a `1' except for `0.0') is\n\ -not stored then an `implicit=yes' appears\n\ -under the field description. In this case,\n\ -the radix point is still assumed to be\n\ -before the first `M' but after the implicit\n\ -bit.\n"; - - /* - * The real name is the first item from the passwd gecos field. - */ -#ifdef H5_HAVE_GETPWUID - { - size_t n; - char *comma; - if ((pwd = getpwuid(getuid()))) { - if ((comma = strchr(pwd->pw_gecos, ','))) { - n = MIN(sizeof(real_name) - 1, (unsigned)(comma - pwd->pw_gecos)); - strncpy(real_name, pwd->pw_gecos, n); - real_name[n] = '\0'; - } - else { - strncpy(real_name, pwd->pw_gecos, sizeof(real_name)); - real_name[sizeof(real_name) - 1] = '\0'; - } - } - else - real_name[0] = '\0'; - } -#else - real_name[0] = '\0'; -#endif - - /* - * The FQDM of this host or the empty string. - */ -#ifdef H5_HAVE_GETHOSTNAME - if (gethostname(host_name, sizeof(host_name)) < 0) { - host_name[0] = '\0'; - } -#else - host_name[0] = '\0'; -#endif - - /* - * The file header: warning, copyright notice, build information. - */ - fprintf(rawoutstream, "/* Generated automatically by H5detect -- do not edit */\n\n\n"); - fputs(FileHeader, rawoutstream); /*the copyright notice--see top of this file */ - - fprintf(rawoutstream, " *\n * Created:\t\t%s %2d, %4d\n", month_name[tm->tm_mon], tm->tm_mday, - 1900 + tm->tm_year); - if (pwd || real_name[0] || host_name[0]) { - fprintf(rawoutstream, " *\t\t\t"); - if (real_name[0]) - fprintf(rawoutstream, "%s <", real_name); -#ifdef H5_HAVE_GETPWUID - if (pwd) - fputs(pwd->pw_name, rawoutstream); -#endif - if (host_name[0]) - fprintf(rawoutstream, "@%s", host_name); - if (real_name[0]) - fprintf(rawoutstream, ">"); - fputc('\n', rawoutstream); - } - fprintf(rawoutstream, " *\n * Purpose:\t\t"); - for (s = purpose; *s; s++) { - fputc(*s, rawoutstream); - if ('\n' == *s && s[1]) - fprintf(rawoutstream, " *\t\t\t"); - } - - fprintf(rawoutstream, " *\n"); - fprintf(rawoutstream, " *\tDO NOT MAKE MODIFICATIONS TO THIS FILE!\n"); - fprintf(rawoutstream, " *\tIt was generated by code in `H5detect.c'.\n"); - - fprintf(rawoutstream, " *\n *"); - for (i = 0; i < 73; i++) - fputc('-', rawoutstream); - fprintf(rawoutstream, "\n */\n\n"); -} - -/*------------------------------------------------------------------------- - * Function: detect_C89_floats - * - * Purpose: Detect C89 floating point types - * - * Return: void - *------------------------------------------------------------------------- - */ -static void HDF_NO_UBSAN -detect_C89_floats(void) -{ - DETECT_F(float, FLOAT, d_g[nd_g]); - nd_g++; - DETECT_F(double, DOUBLE, d_g[nd_g]); - nd_g++; -} - -/*------------------------------------------------------------------------- - * Function: detect_C99_floats - * - * Purpose: Detect C99 floating point types - * - * Return: void - *------------------------------------------------------------------------- - */ -static void HDF_NO_UBSAN -detect_C99_floats(void) -{ -#if H5_SIZEOF_DOUBLE == H5_SIZEOF_LONG_DOUBLE - /* - * If sizeof(double)==sizeof(long double) then assume that `long double' - * isn't supported and use `double' instead. This suppresses warnings on - * some systems and `long double' is probably the same as `double' here - * anyway. - */ - DETECT_F(double, LDOUBLE, d_g[nd_g]); - nd_g++; -#else - DETECT_F(long double, LDOUBLE, d_g[nd_g]); - nd_g++; -#endif -} - -/*------------------------------------------------------------------------- - * Function: main - * - * Purpose: Main entry point. - * - * Return: Success: EXIT_SUCCESS - * - *------------------------------------------------------------------------- - */ -int HDF_NO_UBSAN -main(int argc, char *argv[]) -{ - char *fname = NULL; - FILE *f; /* temporary holding place for the stream pointer - * so that rawoutstream is changed only when succeeded */ - - if (argc > 1) - fname = argv[1]; - - /* First check if filename is string "NULL" */ - if (fname != NULL) { - /* binary output */ - if ((f = fopen(fname, "w")) != NULL) - rawoutstream = f; - } - if (!rawoutstream) - rawoutstream = stdout; - - print_header(); - - /* C89 floating point types */ - detect_C89_floats(); - - /* C99 floating point types */ - detect_C99_floats(); - - print_results(nd_g, d_g); - - if (rawoutstream && rawoutstream != stdout) { - if (fclose(rawoutstream)) - fprintf(stderr, "closing rawoutstream"); - else - rawoutstream = NULL; - } - - return EXIT_SUCCESS; -} diff --git a/src/H5make_libsettings.c b/src/H5make_libsettings.c deleted file mode 100644 index 2661288..0000000 --- a/src/H5make_libsettings.c +++ /dev/null @@ -1,300 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * 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://www.hdfgroup.org/licenses. * - * If you do not have access to either file, you may request a copy from * - * help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/* Keep this declaration near the top of this file */ -static const char *FileHeader = "\n\ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\ - * Copyright by The HDF Group. *\n\ - * All rights reserved. *\n\ - * *\n\ - * This file is part of HDF5. The full HDF5 copyright notice, including *\n\ - * terms governing use, modification, and redistribution, is contained in *\n\ - * the COPYING file, which can be found at the root of the source code *\n\ - * distribution tree, or in https://www.hdfgroup.org/licenses. *\n\ - * If you do not have access to either file, you may request a copy from *\n\ - * help@hdfgroup.org. *\n\ - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"; -/* - * Purpose: Generate the H5libsettings.c file from the - * libhdf5.settings file. - * - *------------------------------------------------------------------------- - */ - -#include "H5private.h" - -/* Do NOT use fprintf in this file as it is not linked with the library, - * which contains the H5system.c file in which the function is defined. - */ - -#define LIBSETTINGSFNAME "libhdf5.settings" - -FILE *rawoutstream = NULL; - -/*------------------------------------------------------------------------- - * Function: insert_libhdf5_settings - * - * Purpose: insert the contents of libhdf5.settings into a file - * represented by flibinfo. - * Make it an empty string if H5_HAVE_EMBEDDED_LIBINFO is not - * defined, i.e., not enabled. - * - * Return: void - *------------------------------------------------------------------------- - */ -static void -insert_libhdf5_settings(FILE *flibinfo) -{ -#ifdef H5_HAVE_EMBEDDED_LIBINFO - FILE *fsettings; /* for files libhdf5.settings */ - int inchar; - int bol = 0; /* indicates the beginning of a new line */ - - if (NULL == (fsettings = fopen(LIBSETTINGSFNAME, "r"))) { - perror(LIBSETTINGSFNAME); - exit(EXIT_FAILURE); - } - - /* Turn off warnings for large arrays. If the library info string is - * a problem, people can build without the embedded library info. - */ - fprintf(flibinfo, "#include \"H5private.h\"\n"); - fprintf(flibinfo, "H5_GCC_DIAG_OFF(\"larger-than=\")\n\n"); - fprintf(flibinfo, "H5_CLANG_DIAG_OFF(\"overlength-strings\")\n\n"); - - /* Print variable definition and the string. Do not use const or some - * platforms (AIX?) will have issues. - */ - fprintf(flibinfo, "const char H5libhdf5_settings[]=\n"); - bol++; - while (EOF != (inchar = getc(fsettings))) { - if (bol) { - /* Start a new line */ - fprintf(flibinfo, "\t\""); - bol = 0; - } - if (inchar == '\n') { - /* end of a line */ - fprintf(flibinfo, "\\n\"\n"); - bol++; - } - else - putc(inchar, flibinfo); - } - - if (feof(fsettings)) { - /* wrap up */ - if (!bol) - /* EOF found without a new line */ - fprintf(flibinfo, "\\n\"\n"); - fprintf(flibinfo, ";\n\n"); - } - else { - fprintf(stderr, "Read errors encountered with %s\n", LIBSETTINGSFNAME); - exit(EXIT_FAILURE); - } - if (0 != fclose(fsettings)) { - perror(LIBSETTINGSFNAME); - exit(EXIT_FAILURE); - } - - /* Re-enable warnings for large arrays */ - fprintf(rawoutstream, "H5_GCC_DIAG_ON(\"larger-than=\")\n"); - fprintf(rawoutstream, "H5_CLANG_DIAG_OFF(\"overlength-strings\")\n"); -#else - /* Print variable definition and an empty string. Do not use const or some - * platforms (AIX?) will have issues. - */ - fprintf(flibinfo, "const char H5libhdf5_settings[]=\"\";\n"); -#endif -} /* insert_libhdf5_settings() */ - -/*------------------------------------------------------------------------- - * Function: make_libinfo - * - * Purpose: Create the embedded library information definition. - * This sets up for a potential extension that the declaration - * is printed to a file different from stdout. - * - * Return: void - *------------------------------------------------------------------------- - */ -static void -make_libinfo(void) -{ - /* Print variable definition and then the string as a macro */ - insert_libhdf5_settings(rawoutstream); -} - -/*------------------------------------------------------------------------- - * Function: print_header - * - * Purpose: Prints the header for the generated file. - * - * Return: void - *------------------------------------------------------------------------- - */ -static void -print_header(void) -{ - time_t now = HDtime(NULL); - struct tm *tm = HDlocaltime(&now); - char real_name[30]; - char host_name[256]; - int i; - const char *s; -#ifdef H5_HAVE_GETPWUID - struct passwd *pwd = NULL; -#else - int pwd = 1; -#endif - static const char *month_name[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; - static const char *purpose = "\ -This machine-generated source code contains\n\ -information about the library build configuration\n"; - - /* - * The real name is the first item from the passwd gecos field. - */ -#ifdef H5_HAVE_GETPWUID - { - size_t n; - char *comma; - - if ((pwd = getpwuid(getuid()))) { - if ((comma = strchr(pwd->pw_gecos, ','))) { - n = MIN(sizeof(real_name) - 1, (unsigned)(comma - pwd->pw_gecos)); - strncpy(real_name, pwd->pw_gecos, n); - real_name[n] = '\0'; - } - else { - strncpy(real_name, pwd->pw_gecos, sizeof(real_name)); - real_name[sizeof(real_name) - 1] = '\0'; - } - } - else - real_name[0] = '\0'; - } -#else - real_name[0] = '\0'; -#endif - - /* - * The FQDM of this host or the empty string. - */ -#ifdef H5_HAVE_GETHOSTNAME - if (gethostname(host_name, sizeof(host_name)) < 0) - host_name[0] = '\0'; -#else - host_name[0] = '\0'; -#endif - - /* - * The file header: warning, copyright notice, build information. - */ - fprintf(rawoutstream, "/* Generated automatically by H5make_libsettings -- do not edit */\n\n\n"); - fputs(FileHeader, rawoutstream); /*the copyright notice--see top of this file */ - - fprintf(rawoutstream, " *\n * Created:\t\t%s %2d, %4d\n", month_name[tm->tm_mon], tm->tm_mday, - 1900 + tm->tm_year); - if (pwd || real_name[0] || host_name[0]) { - fprintf(rawoutstream, " *\t\t\t"); - if (real_name[0]) - fprintf(rawoutstream, "%s <", real_name); -#ifdef H5_HAVE_GETPWUID - if (pwd) - fputs(pwd->pw_name, rawoutstream); -#endif - if (host_name[0]) - fprintf(rawoutstream, "@%s", host_name); - if (real_name[0]) - fprintf(rawoutstream, ">"); - fputc('\n', rawoutstream); - } - - fprintf(rawoutstream, " *\n * Purpose:\t\t"); - - for (s = purpose; *s; s++) { - fputc(*s, rawoutstream); - if ('\n' == *s && s[1]) - fprintf(rawoutstream, " *\t\t\t"); - } - - fprintf(rawoutstream, " *\n"); - fprintf(rawoutstream, " *\tDO NOT MAKE MODIFICATIONS TO THIS FILE!\n"); - fprintf(rawoutstream, " *\tIt was generated by code in `H5make_libsettings.c'.\n"); - - fprintf(rawoutstream, " *\n *"); - for (i = 0; i < 73; i++) - fputc('-', rawoutstream); - fprintf(rawoutstream, "\n */\n\n"); -} - -/*------------------------------------------------------------------------- - * Function: print_footer - * - * Purpose: Prints the file footer for the generated file. - * - * Return: void - *------------------------------------------------------------------------- - */ -static void -print_footer(void) -{ - /* nothing */ -} - -/*------------------------------------------------------------------------- - * Function: main - * - * Purpose: Main entry point. - * - * Return: Success: EXIT_SUCCESS - *------------------------------------------------------------------------- - */ -int -main(int argc, char *argv[]) -{ - char *fname = NULL; - FILE *f; /* temporary holding place for the stream pointer - * so that rawoutstream is changed only when succeeded - */ - - if (argc > 1) - fname = argv[1]; - - /* First check if filename is string "NULL" */ - if (fname != NULL) { - /* binary output */ - if ((f = fopen(fname, "w")) != NULL) - rawoutstream = f; - } - if (!rawoutstream) - rawoutstream = stdout; - - print_header(); - - /* Generate embedded library information variable definition */ - make_libinfo(); - - print_footer(); - - if (rawoutstream && rawoutstream != stdout) { - if (fclose(rawoutstream)) - fprintf(stderr, "closing rawoutstream"); - else - rawoutstream = NULL; - } - - exit(EXIT_SUCCESS); -} diff --git a/src/H5private.h b/src/H5private.h index b1a253e..5286312 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -1262,7 +1262,7 @@ extern H5_debug_t H5_debug_g; #define H5DEBUG(X) (H5_debug_g.pkg[H5_PKG_##X].stream) /* Embedded build information */ -extern const char H5libhdf5_settings[]; +extern const char H5build_settings[]; /*------------------------------------------------------------------------- * Purpose: These macros are inserted automatically just after the diff --git a/src/Makefile.am b/src/Makefile.am index 81459a9..2272389c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -18,25 +18,17 @@ include $(top_srcdir)/config/commence.am include $(top_srcdir)/config/lt_vers.am -# How to build H5detect for number format detection. -# Use -g to force no optimization since many compilers (e.g., Intel) takes -# a long time to compile it with any optimization on. H5detect is used -# to generate H5Tinit.c once. So, optimization is not critical. -noinst_PROGRAMS = H5detect H5make_libsettings - # Our main target, the HDF5 library lib_LTLIBRARIES=libhdf5.la # Add libtool numbers to the HDF5 library (from config/lt_vers.am) libhdf5_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) -# H5Tinit.c and H5lib_settings.c are generated files and should be cleaned. -MOSTLYCLEANFILES=H5Tinit.c H5lib_settings.c $(DX_CLEANFILES) -# H5pubconf.h is generated by configure, and should be cleaned. -DISTCLEANFILES=H5pubconf.h +# These files are generated by configure, and should be cleaned +DISTCLEANFILES=H5pubconf.h H5build_settings.c # library sources -libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5lib_settings.c H5system.c \ +libhdf5_la_SOURCES= H5.c H5build_settings.c H5checksum.c H5dbg.c H5system.c \ H5timer.c H5trace.c \ H5A.c H5Abtree2.c H5Adense.c H5Adeprec.c H5Aint.c H5Atest.c \ H5AC.c H5ACdbg.c H5ACproxy_entry.c \ @@ -101,7 +93,7 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5lib_settings.c H5system.c \ H5SM.c H5SMbtree2.c H5SMcache.c H5SMmessage.c H5SMtest.c \ H5T.c H5Tarray.c H5Tbit.c H5Tcommit.c H5Tcompound.c H5Tconv.c \ H5Tcset.c H5Tdbg.c H5Tdeprec.c H5Tenum.c H5Tfields.c H5Tfixed.c \ - H5Tfloat.c H5Tinit.c H5Tnative.c H5Toffset.c H5Toh.c H5Topaque.c \ + H5Tfloat.c H5Tinit_float.c H5Tnative.c H5Toffset.c H5Toh.c H5Topaque.c \ H5Torder.c H5Tref.c H5Tpad.c H5Tprecis.c H5Tstrpad.c H5Tvisit.c \ H5Tvlen.c \ H5TS.c \ @@ -187,32 +179,6 @@ endif settingsdir=$(libdir) settings_DATA=libhdf5.settings -# Number format detection -# The LD_LIBRARY_PATH setting is a kludge. -# Things should have been all set during H5detect making. -# Remove the generated .c file if errors occur unless HDF5_Make_Ignore -# is set to ignore the error. -H5Tinit.c: H5detect$(EXEEXT) - @if $(AM_V_P); then set -x; else echo " GEN H5Tinit.c"; fi; \ - LD_LIBRARY_PATH="$$LD_LIBRARY_PATH`echo $(LDFLAGS) | \ - sed -e 's/-L/:/g' -e 's/ //g'`" \ - $(RUNSERIAL) ./H5detect$(EXEEXT) $@ || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - ($(RM) $@ ; exit 1) - -# Build configuration header file generation -# The LD_LIBRARY_PATH setting is a kludge. -# Things should have been all set during H5make_libsettings making. -# Remove the generated .c file if errors occur unless HDF5_Make_Ignore -# is set to ignore the error. -H5lib_settings.c: H5make_libsettings$(EXEEXT) libhdf5.settings - @if $(AM_V_P); then set -x; else echo " GEN H5lib_settings.c"; fi; \ - LD_LIBRARY_PATH="$$LD_LIBRARY_PATH`echo $(LDFLAGS) | \ - sed -e 's/-L/:/g' -e 's/ //g'`" \ - $(RUNSERIAL) ./H5make_libsettings$(EXEEXT) $@ || \ - (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ - ($(RM) $@ ; exit 1) - # Error header generation # # Actually, H5Einit.h, H5Eterm.h, H5Edefin.h and H5Epubgen.h all -- cgit v0.12