Skip to content

Commit

Permalink
Misc missed things from previous merges (#3295)
Browse files Browse the repository at this point in the history
  • Loading branch information
derobins authored Jul 27, 2023
1 parent 6118620 commit 0e82707
Show file tree
Hide file tree
Showing 87 changed files with 218 additions and 302 deletions.
4 changes: 2 additions & 2 deletions bin/make_err
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ sub create_init ($) {
print HEADER "/* Major error codes */\n";
print HEADER "/*********************/\n\n";
foreach $name (keys %major) {
print HEADER " "x(0*$indent),"HDassert(${name}_g==(-1));\n";
print HEADER " "x(0*$indent),"assert(${name}_g==(-1));\n";
print HEADER " "x(0*$indent),"if((msg = H5E__create_msg(cls, H5E_MAJOR, \"${major{$name}}\"))==NULL)\n";
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, \"error message initialization failed\")\n";
print HEADER " "x(0*$indent),"if((${name}_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)\n";
Expand All @@ -257,7 +257,7 @@ sub create_init ($) {

# Iterate over all the minor errors in each section
for $name ( @{$section_list{$sect_name}}) {
print HEADER " "x(0*$indent),"HDassert(${name}_g==(-1));\n";
print HEADER " "x(0*$indent),"assert(${name}_g==(-1));\n";
print HEADER " "x(0*$indent),"if((msg = H5E__create_msg(cls, H5E_MINOR, \"${minor{$name}}\"))==NULL)\n";
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, \"error message initialization failed\")\n";
print HEADER " "x(0*$indent),"if((${name}_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)\n";
Expand Down
14 changes: 7 additions & 7 deletions config/cmake/ConfigureChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ endif ()
## Check for non-standard extension quadmath.h

CHECK_INCLUDE_FILES(quadmath.h C_HAVE_QUADMATH)
if (${C_HAVE_QUADMATH})
if (C_HAVE_QUADMATH)
set(${HDF_PREFIX}_HAVE_QUADMATH_H 1)
else ()
set(${HDF_PREFIX}_HAVE_QUADMATH_H 0)
Expand Down Expand Up @@ -767,7 +767,7 @@ endif()

if (HDF5_BUILD_FORTRAN)
HDF_CHECK_TYPE_SIZE(__float128 _SIZEOF___FLOAT128)
if (${_SIZEOF___FLOAT128})
if (_SIZEOF___FLOAT128)
set (${HDF_PREFIX}_HAVE_FLOAT128 1)
set (${HDF_PREFIX}_SIZEOF___FLOAT128 ${_SIZEOF___FLOAT128})
else ()
Expand All @@ -776,7 +776,7 @@ if (HDF5_BUILD_FORTRAN)
endif ()

HDF_CHECK_TYPE_SIZE(_Quad _SIZEOF__QUAD)
if (NOT ${_SIZEOF__QUAD})
if (NOT _SIZEOF__QUAD)
set (${HDF_PREFIX}_SIZEOF__QUAD 0)
else ()
set (${HDF_PREFIX}_SIZEOF__QUAD ${_SIZEOF__QUAD})
Expand Down Expand Up @@ -856,7 +856,7 @@ if (HDF5_BUILD_FORTRAN)
#define C_LDBL_DIG DECIMAL_DIG\n\
#else\n\
#define C_LDBL_DIG LDBL_DIG\n\
#endif\n\nint main() {\nprintf(\"\\%d\\\;\\%d\\\;\", C_LDBL_DIG, C_FLT128_DIG)\\\;\n\nreturn 0\\\;\n}\n
#endif\n\nint main(void) {\nprintf(\"\\%d\\\;\\%d\\\;\", C_LDBL_DIG, C_FLT128_DIG)\\\;\n\nreturn 0\\\;\n}\n
"
)

Expand Down Expand Up @@ -924,9 +924,9 @@ endmacro ()
#-----------------------------------------------------------------------------

# ----------------------------------------------------------------------
# Set the flag to indicate that the machine is using a special algorithm to convert
# Set the flag to indicate that the machine is using a special algorithm toconvert
# 'long double' to '(unsigned) long' values. (This flag should only be set for
# the IBM Power6 Linux. When the bit sequence of long double is
# the IBM Power Linux. When the bit sequence of long double is
# 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long
# is 0x004733ce17af227f, not the same as the library's conversion to 0x004733ce17af2282.
# The machine's conversion gets the correct value. We define the macro and disable
Expand All @@ -936,7 +936,7 @@ H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LONG_SPECIAL "Checking IF your syst
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine is using a special algorithm
# to convert some values of '(unsigned) long' to 'long double' values.
# (This flag should be off for all machines, except for IBM Power6 Linux,
# (This flag should be off for all machines, except for IBM Power Linux,
# when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff...,
# ..., 7fffff..., the compiler uses a unknown algorithm. We define a
# macro and skip the test for now until we know about the algorithm.
Expand Down
31 changes: 17 additions & 14 deletions config/cmake/ConversionTests.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ int HDF_NO_UBSAN main(void)
ll = (long)ld;
memcpy(s2, &ll, 8);

/* The library's algorithm converts it to 0x 00 47 33 ce 17 af 22 82
* and gets wrong value 20041683600089730 on the IBM Power6 Linux.
* But the IBM Power6 Linux converts it to 0x00 47 33 ce 17 af 22 7f
/* The library's algorithm converts it to 0x00 47 33 ce 17 af 22 82
* and gets wrong value 20041683600089730 on Linux on IBM Power
* architecture.
*
* But Linux on IBM Power converts it to 0x00 47 33 ce 17 af 22 7f
* and gets the correct value 20041683600089727. It uses some special
* algorithm. We're going to define the macro and skip the test until
* we can figure out how they do it.
Expand Down Expand Up @@ -118,10 +120,11 @@ int HDF_NO_UBSAN main(void)

/* The library converts the value to 0x434fffffffffffff8000000000000000.
* In decimal it is 18014398509481982.000000, one value short of the original.
* The IBM Power6 Linux converts it to 0x4350000000000000bff0000000000000.
* The value is correct in decimal. It uses some special
* algorithm. We're going to define the macro and skip the test until
* we can figure out how they do it.
*
* Linux on IBM Power architecture converts it to
* 0x4350000000000000bff0000000000000. The value is correct in decimal.
* It uses some special algorithm. We're going to define the macro and
* skip the test until we can figure out how they do it.
*/
if (s[0]==0x43 && s[1]==0x50 && s[2]==0x00 && s[3]==0x00 &&
s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 &&
Expand All @@ -136,14 +139,14 @@ int HDF_NO_UBSAN main(void)
ld = (long double)ull;
memcpy(s, &ld, 16);

/* Use a different value from signed long to test. The problem is the same
* for both long and unsigned long. The value is 18446744073709551615.
/* Use a different value from signed long to test. The problem is the
* same for both long and unsigned long. The value is 18446744073709551615.
* The library converts the value to 0x43effffffffffffffe000000000000000.
* In decimal it's 18446744073709548544.000000, very different from the original.
* The IBM Power6 Linux converts it to 0x43f0000000000000bff0000000000000.
* The value is correct in decimal. It uses some special
* algorithm. We're going to define the macro and skip the test until
* we can figure out how they do it.
* In decimal it's 18446744073709548544.000000, very different from the
* original. Linux on IBM Power architecture converts it to
* 0x43f0000000000000bff0000000000000. The value is correct in decimal.
* It uses some special algorithm. We're going to define the macro and
* skip the test until we can figure out how they do it.
*/
if (s[0]==0x43 && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 &&
Expand Down
4 changes: 2 additions & 2 deletions config/cmake/HDFTests.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


/* A simple test program to see if a function "works" */
#define SIMPLE_TEST(x) int main(){ x; return 0; }
#define SIMPLE_TEST(x) int main(void){ x; return 0; }


#ifdef HAVE_ATTRIBUTE
Expand Down Expand Up @@ -93,7 +93,7 @@ int main ()

#include <sys/types.h>

int main()
int main(void)
{
off64_t n = 0;
return (int)n;
Expand Down
6 changes: 6 additions & 0 deletions config/cmake/hdf5-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ set (${HDF5_PACKAGE_NAME}_ENABLE_PLUGIN_SUPPORT @HDF5_ENABLE_PLUGIN_SUPPORT@)
set (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT @HDF5_ENABLE_Z_LIB_SUPPORT@)
set (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT @HDF5_ENABLE_SZIP_SUPPORT@)
set (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
set (${HDF5_PACKAGE_NAME}_ENABLE_ROS3_VFD @HDF5_ENABLE_ROS3_VFD@)
set (${HDF5_PACKAGE_NAME}_ENABLE_SUBFILING_VFD @HDF5_ENABLE_SUBFILING_VFD@)
set (${HDF5_PACKAGE_NAME}_BUILD_SHARED_LIBS @H5_ENABLE_SHARED_LIB@)
set (${HDF5_PACKAGE_NAME}_BUILD_STATIC_LIBS @H5_ENABLE_STATIC_LIB@)
Expand All @@ -68,6 +69,11 @@ if (${HDF5_PACKAGE_NAME}_ENABLE_PARALLEL)
find_package(MPI QUIET REQUIRED)
endif ()

if (${HDF5_PACKAGE_NAME}_ENABLE_THREADSAFE OR ${HDF5_PACKAGE_NAME}_ENABLE_SUBFILING_VFD)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads QUIET REQUIRED)
endif ()

if (${HDF5_PACKAGE_NAME}_BUILD_JAVA)
set (${HDF5_PACKAGE_NAME}_JAVA_INCLUDE_DIRS
@PACKAGE_CURRENT_BUILD_DIR@/lib/jarhdf5-@[email protected]
Expand Down
32 changes: 17 additions & 15 deletions config/cmake/libhdf5.settings.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Linking Options:
AM_LDFLAGS: @AM_LDFLAGS@
Extra libraries: @LINK_LIBS@
Archiver: @CMAKE_AR@
AR_FLAGS:
Ranlib: @CMAKE_RANLIB@

Languages:
Expand All @@ -44,24 +45,24 @@ Languages:
Static C Library: @H5_ENABLE_STATIC_LIB@

Fortran: @HDF5_BUILD_FORTRAN@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Compiler: @CMAKE_Fortran_COMPILER@ @CMAKE_Fortran_COMPILER_VERSION@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Flags: @CMAKE_Fortran_FLAGS@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ H5 Fortran Flags: @HDF5_CMAKE_Fortran_FLAGS@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ AM Fortran Flags: @AM_FCFLAGS@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ Shared Fortran Library: @H5_ENABLE_SHARED_LIB@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ Static Fortran Library: @H5_ENABLE_STATIC_LIB@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ Module Directory: @CMAKE_Fortran_MODULE_DIRECTORY@
Fortran Compiler: @CMAKE_Fortran_COMPILER@ @CMAKE_Fortran_COMPILER_VERSION@
Fortran Flags: @CMAKE_Fortran_FLAGS@
H5 Fortran Flags: @HDF5_CMAKE_Fortran_FLAGS@
AM Fortran Flags: @AM_FCFLAGS@
Shared Fortran Library: @H5_ENABLE_SHARED_LIB@
Static Fortran Library: @H5_ENABLE_STATIC_LIB@
Module Directory: @CMAKE_Fortran_MODULE_DIRECTORY@

C++: @HDF5_BUILD_CPP_LIB@
@BUILD_CXX_CONDITIONAL_TRUE@ C++ Compiler: @CMAKE_CXX_COMPILER@ @CMAKE_CXX_COMPILER_VERSION@
@BUILD_CXX_CONDITIONAL_TRUE@ C++ Flags: @CMAKE_CXX_FLAGS@
@BUILD_CXX_CONDITIONAL_TRUE@ H5 C++ Flags: @HDF5_CMAKE_CXX_FLAGS@
@BUILD_CXX_CONDITIONAL_TRUE@ AM C++ Flags: @AM_CXXFLAGS@
@BUILD_CXX_CONDITIONAL_TRUE@ Shared C++ Library: @H5_ENABLE_SHARED_LIB@
@BUILD_CXX_CONDITIONAL_TRUE@ Static C++ Library: @H5_ENABLE_STATIC_LIB@
C++ Compiler: @CMAKE_CXX_COMPILER@ @CMAKE_CXX_COMPILER_VERSION@
C++ Flags: @CMAKE_CXX_FLAGS@
H5 C++ Flags: @HDF5_CMAKE_CXX_FLAGS@
AM C++ Flags: @AM_CXXFLAGS@
Shared C++ Library: @H5_ENABLE_SHARED_LIB@
Static C++ Library: @H5_ENABLE_STATIC_LIB@

JAVA: @HDF5_BUILD_JAVA@
@BUILD_JAVA_CONDITIONAL_TRUE@ JAVA Compiler: @CMAKE_Java_COMPILER@ @Java_VERSION@
JAVA: @HDF5_BUILD_JAVA@
JAVA Compiler: @CMAKE_Java_COMPILER@ @Java_VERSION@

Features:
---------
Expand All @@ -77,6 +78,7 @@ Dimension scales w/ new references: @DIMENSION_SCALES_WITH_NEW_REF@
Default API mapping: @DEFAULT_API_VERSION@
With deprecated public symbols: @HDF5_ENABLE_DEPRECATED_SYMBOLS@
I/O filters (external): @EXTERNAL_FILTERS@
Map (H5M) API: @H5_HAVE_MAP_API@
Direct VFD: @H5_HAVE_DIRECT@
Mirror VFD: @H5_HAVE_MIRROR_VFD@
Subfiling VFD: @H5_HAVE_SUBFILING_VFD@
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3433,7 +3433,7 @@ esac
## ----------------------------------------------------------------------
## Set the flag to indicate that the machine is using a special algorithm to convert
## 'long double' to '(unsigned) long' values. (This flag should only be set for
## the IBM Power6 Linux. When the bit sequence of long double is
## the IBM Power Linux. When the bit sequence of long double is
## 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long
## is 0x004733ce17af227f, not the same as the library's conversion to 0x004733ce17af2282.
## The machine's conversion gets the correct value. We define the macro and disable
Expand Down Expand Up @@ -3468,7 +3468,7 @@ fi
## ----------------------------------------------------------------------
## Set the flag to indicate that the machine is using a special algorithm
## to convert some values of '(unsigned) long' to 'long double' values.
## (This flag should be off for all machines, except for IBM Power6 Linux,
## (This flag should be off for all machines, except for IBM Power Linux,
## when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff...,
## ..., 7fffff..., the compiler uses a unknown algorithm. We define a
## macro and skip the test for now until we know about the algorithm.
Expand Down
107 changes: 0 additions & 107 deletions doc/release_txt_notes.md

This file was deleted.

4 changes: 2 additions & 2 deletions doxygen/dox/IntroHDF5.dox
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,8 @@ Navigate back: \ref index "Main" / \ref GettingStarted
@page HDF5Examples HDF5 Examples
Example programs of how to use HDF5 are provided below.
For HDF-EOS specific examples, see the <a href="http://hdfeos.org/zoo/index.php">examples</a>
of how to access and visualize NASA HDF-EOS files using IDL, MATLAB, and NCL on the
<a href="http://hdfeos.org/">HDF-EOS Tools and Information Center</a> page.
of how to access and visualize NASA HDF-EOS files using Python, IDL, MATLAB, and NCL
on the <a href="http://hdfeos.org/">HDF-EOS Tools and Information Center</a> page.

\section secHDF5Examples Examples
\li \ref LBExamples
Expand Down
2 changes: 1 addition & 1 deletion doxygen/examples/H5Fclose.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "hdf5.h"

int
main()
main(void)
{
hid_t file;
if ((file = H5Fcreate("foo.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
Expand Down
2 changes: 1 addition & 1 deletion doxygen/examples/H5Fcreate.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "hdf5.h"

int
main()
main(void)
{
hid_t file;
if ((file = H5Fcreate("foo.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
Expand Down
2 changes: 1 addition & 1 deletion doxygen/examples/hello_hdf5.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "hdf5.h"

int
main()
main(void)
{
herr_t retval;
unsigned majnum, minnum, relnum;
Expand Down
Binary file modified doxygen/img/HDF5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0e82707

Please sign in to comment.