summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2022-06-22 16:16:30 (GMT)
committerGitHub <noreply@github.com>2022-06-22 16:16:30 (GMT)
commit8b2e7b32b5b9987938ebf6936205f324bc5050b8 (patch)
tree17062db1b0521cbe22e759c5083b216ae6c62437
parent55f4cc0caa69d65c505e926fb7b2568ab1a76c58 (diff)
downloadhdf5-8b2e7b32b5b9987938ebf6936205f324bc5050b8.zip
hdf5-8b2e7b32b5b9987938ebf6936205f324bc5050b8.tar.gz
hdf5-8b2e7b32b5b9987938ebf6936205f324bc5050b8.tar.bz2
Various warning fixes (#1812)
* Fixed -Wreserved-id-macro warnings from header include guards * Removed all __int64 and LL suffix stuff now that C99 is minimum requirement * Rename `H5FD_CTL__` to `H5FD_CTL_` to fix -Wreserved-id-macro warnings Double underscore is reserved in C++ and this public header should be C++ compatible. * Never define __STDC_FORMAT_MACROS anymore Defining it causes a -Wreserved-id-macro. Happily, according to the C++11 standard: "The macros defined by <stdint> are provided unconditionally. In particular, the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS (mentioned in C99 footnotes 219, 220, and 222) play no role in C++." https://cplusplus.github.io/LWG/issue984 So looks like it's not necessary to define it with reasonably new toolchains. * Fixed some -Wunused-macros warnings, removed dead code * Fixed all -Wdouble-promotion warnings in C++ files * Fixed remaining -Wsuggest-destructor-override warnings * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
-rw-r--r--c++/test/dsets.cpp2
-rw-r--r--c++/test/h5cpputil.h4
-rw-r--r--c++/test/tfilter.cpp6
-rw-r--r--c++/test/trefer.cpp1
-rw-r--r--c++/test/ttypes.cpp13
-rw-r--r--config/cmake/H5pubconf.h.in9
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake52
-rw-r--r--config/cmake_ext_mod/HDFTests.c48
-rw-r--r--config/ibm-aix2
-rw-r--r--configure.ac28
-rw-r--r--hl/c++/src/H5PacketTable.h2
-rw-r--r--java/src/jni/h5util.c8
-rw-r--r--release_docs/RELEASE.txt2
-rw-r--r--src/H5Dcompact.c4
-rw-r--r--src/H5ESdevelop.h6
-rw-r--r--src/H5FD.c4
-rw-r--r--src/H5FDdevelop.h6
-rw-r--r--src/H5FDmpi.c12
-rw-r--r--src/H5FDmpio.c14
-rw-r--r--src/H5FDmulti.c2
-rw-r--r--src/H5FDpublic.h26
-rw-r--r--src/H5FDsec2.c2
-rw-r--r--src/H5FDsplitter.c6
-rw-r--r--src/H5Idevelop.h6
-rw-r--r--src/H5Ldevelop.h6
-rw-r--r--src/H5Tdevelop.h6
-rw-r--r--src/H5Zdevelop.h6
-rw-r--r--src/H5public.h5
-rw-r--r--test/dt_arith.c24
-rw-r--r--test/tconfig.c5
-rw-r--r--test/vfd.c48
-rw-r--r--tools/lib/h5diff_array.c42
-rw-r--r--tools/lib/h5tools_str.c4
-rw-r--r--tools/src/h5perf/pio_engine.c18
-rw-r--r--tools/src/h5perf/pio_perf.c8
-rw-r--r--tools/src/h5perf/sio_engine.c2
-rw-r--r--tools/src/h5perf/sio_perf.c8
37 files changed, 143 insertions, 304 deletions
diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp
index 55ffd67..6e170bf 100644
--- a/c++/test/dsets.cpp
+++ b/c++/test/dsets.cpp
@@ -1201,7 +1201,7 @@ test_chunk_cache(const FileAccPropList &fapl)
// Retrieve and verify the raw data chunk cache parameters
nslots_4 = nbytes_4 = 0;
- w0_4 = 0.0F;
+ w0_4 = 0.0;
dapl2.getChunkCache(nslots_4, nbytes_4, w0_4);
verify_val(nslots_2, nslots_4, "DSetCreatPropList::getChunkCache", __LINE__, __FILE__);
verify_val(nbytes_2, nbytes_4, "DSetCreatPropList::getChunkCache", __LINE__, __FILE__);
diff --git a/c++/test/h5cpputil.h b/c++/test/h5cpputil.h
index 444bc68..86bc9d7 100644
--- a/c++/test/h5cpputil.h
+++ b/c++/test/h5cpputil.h
@@ -50,14 +50,14 @@ class InvalidActionException : public Exception {
public:
InvalidActionException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
InvalidActionException();
- virtual ~InvalidActionException() throw();
+ ~InvalidActionException() throw() override;
};
class TestFailedException : public Exception {
public:
TestFailedException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
TestFailedException();
- virtual ~TestFailedException() throw();
+ ~TestFailedException() throw() override;
};
// Overloaded/Template functions to verify values and display proper info
diff --git a/c++/test/tfilter.cpp b/c++/test/tfilter.cpp
index e89838c..b5073e8 100644
--- a/c++/test/tfilter.cpp
+++ b/c++/test/tfilter.cpp
@@ -27,8 +27,10 @@ using namespace H5;
#include "h5test.h"
#include "h5cpputil.h" // C++ utilility header file
-#define DSET_DIM1 100
-#define DSET_DIM2 200
+#ifdef H5_HAVE_FILTER_SZIP
+#define DSET_DIM1 100
+#define DSET_DIM2 200
+#endif
#define FILTER_CHUNK_DIM1 2
#define FILTER_CHUNK_DIM2 25
diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp
index 53a4ed3..66fa040 100644
--- a/c++/test/trefer.cpp
+++ b/c++/test/trefer.cpp
@@ -395,7 +395,6 @@ test_reference_obj()
#define GROUPNAME3 "group3"
#define DSETNAME "/dset"
#define DSETNAME2 "dset2"
-#define NAME_SIZE 16
static void
test_reference_group()
diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp
index 8afb4bb..794820e 100644
--- a/c++/test/ttypes.cpp
+++ b/c++/test/ttypes.cpp
@@ -28,12 +28,6 @@ using namespace H5;
#include "h5cpputil.h" // C++ utilility header file
/*
- * Offset from aligned memory returned by malloc(). This can be used to test
- * that type conversions handle non-aligned buffers correctly.
- */
-#define ALIGNMENT 1
-
-/*
* Define if you want to test alignment code on a machine that doesn't
* normally require alignment. When set, all native datatypes must be aligned
* on a byte boundary equal to the data size.
@@ -53,13 +47,6 @@ using namespace H5;
const char *FILENAME[] = {"dtypes1.h5", "dtypes2.h5", "dtypes3.h5", "dtypes4.h5", NULL};
-/*
- * Count up or down depending on whether the machine is big endian or little
- * endian. If local variable `endian' is H5T_ORDER_BE then the result will
- * be I, otherwise the result will be Z-(I+1).
- */
-#define ENDIAN(Z, I) (H5T_ORDER_BE == endian ? (I) : (Z) - ((I) + 1))
-
typedef enum flt_t { FLT_FLOAT, FLT_DOUBLE, FLT_LDOUBLE, FLT_OTHER } flt_t;
typedef enum int_t {
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 9a581cb..4b2d2ee 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -464,9 +464,6 @@
/* Define Fortran Maximum Real Decimal Precision */
#define H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@
-/* Width for printf() for type `long long' or `__int64', use `ll' */
-#cmakedefine H5_PRINTF_LL_WIDTH @H5_PRINTF_LL_WIDTH@
-
/* The size of `bool', as computed by sizeof. */
#cmakedefine H5_SIZEOF_BOOL @H5_SIZEOF_BOOL@
@@ -559,8 +556,7 @@
#endif
-/* Define size of long long and/or __int64 bit integer type only if the type
- exists. */
+/* The size of `long long', as computed by sizeof. */
#if !defined(__APPLE__)
#cmakedefine H5_SIZEOF_LONG_LONG @H5_SIZEOF_LONG_LONG@
#else
@@ -627,9 +623,6 @@
/* The size of `__float128', as computed by sizeof. */
#define H5_SIZEOF___FLOAT128 @H5_SIZEOF___FLOAT128@
-/* The size of `__int64', as computed by sizeof. */
-#define H5_SIZEOF___INT64 @H5_SIZEOF___INT64@
-
/* Define if strict file format checks are enabled */
#cmakedefine H5_STRICT_FORMAT_CHECKS @H5_STRICT_FORMAT_CHECKS@
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake
index 6242b12..c4516c7 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -326,10 +326,6 @@ if (NOT APPLE)
HDF_CHECK_TYPE_SIZE (long ${HDF_PREFIX}_SIZEOF_LONG)
endif ()
HDF_CHECK_TYPE_SIZE ("long long" ${HDF_PREFIX}_SIZEOF_LONG_LONG)
-HDF_CHECK_TYPE_SIZE (__int64 ${HDF_PREFIX}_SIZEOF___INT64)
-if (NOT ${HDF_PREFIX}_SIZEOF___INT64)
- set (${HDF_PREFIX}_SIZEOF___INT64 0)
-endif ()
HDF_CHECK_TYPE_SIZE (float ${HDF_PREFIX}_SIZEOF_FLOAT)
HDF_CHECK_TYPE_SIZE (double ${HDF_PREFIX}_SIZEOF_DOUBLE)
@@ -567,54 +563,6 @@ if (WINDOWS)
endif ()
endif ()
-#-----------------------------------------------------------------------------
-# Check how to print a Long Long integer
-#-----------------------------------------------------------------------------
-if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES "unknown")
- set (PRINT_LL_FOUND 0)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Checking for appropriate format for 64 bit long:")
- endif ()
- set (CURRENT_TEST_DEFINITIONS "-DPRINTF_LL_WIDTH")
- if (${HDF_PREFIX}_SIZEOF_LONG_LONG)
- set (CURRENT_TEST_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -DHAVE_LONG_LONG")
- endif ()
- TRY_RUN (${HDF_PREFIX}_PRINTF_LL_TEST_RUN ${HDF_PREFIX}_PRINTF_LL_TEST_COMPILE
- ${CMAKE_BINARY_DIR}
- ${HDF_RESOURCES_EXT_DIR}/HDFTests.c
- COMPILE_DEFINITIONS "${CURRENT_TEST_DEFINITIONS}"
- RUN_OUTPUT_VARIABLE OUTPUT
- )
- if (${HDF_PREFIX}_PRINTF_LL_TEST_COMPILE)
- if (${HDF_PREFIX}_PRINTF_LL_TEST_RUN MATCHES 0)
- string(REGEX REPLACE ".*PRINTF_LL_WIDTH=\\[(.*)\\].*" "\\1" ${HDF_PREFIX}_PRINTF_LL "${OUTPUT}")
- set (${HDF_PREFIX}_PRINTF_LL_WIDTH "\"${${HDF_PREFIX}_PRINTF_LL}\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll")
- set (PRINT_LL_FOUND 1)
- else ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Width test failed with result: ${${HDF_PREFIX}_PRINTF_LL_TEST_RUN}")
- endif ()
- endif ()
- else ()
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Test ${HDF_PREFIX}_PRINTF_LL_WIDTH failed\n"
- )
- endif ()
-
- if (PRINT_LL_FOUND)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Checking for appropriate format for 64 bit long: found ${${HDF_PREFIX}_PRINTF_LL_WIDTH}")
- endif ()
- else ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Checking for appropriate format for 64 bit long: not found")
- endif ()
- set (${HDF_PREFIX}_PRINTF_LL_WIDTH "\"unknown\"" CACHE INTERNAL
- "Width for printf for type `long long' or `__int64', us. `ll"
- )
- endif ()
-endif ()
-
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can handle converting
# denormalized floating-point values.
diff --git a/config/cmake_ext_mod/HDFTests.c b/config/cmake_ext_mod/HDFTests.c
index 2b2a202..16686ba 100644
--- a/config/cmake_ext_mod/HDFTests.c
+++ b/config/cmake_ext_mod/HDFTests.c
@@ -80,54 +80,6 @@ SIMPLE_TEST(timezone=0);
#endif /* HAVE_TIMEZONE */
-#ifdef PRINTF_LL_WIDTH
-
-#ifdef HAVE_LONG_LONG
-# define LL_TYPE long long
-#else /* HAVE_LONG_LONG */
-# define LL_TYPE __int64
-#endif /* HAVE_LONG_LONG */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if defined(_MSC_VER) && defined(_DEBUG)
-# include <crtdbg.h>
-int DebugReport(int reportType, char* message, int* returnValue)
-{
- (void)reportType;
- (void)message;
- (void)returnValue;
- return 1; /* no further handling required */
-}
-#endif
-
-int main(void)
-{
- char *llwidthArgs[] = { "I64", "l64", "ll", "l", "L", "q", NULL };
- char *s = malloc(128);
- char **currentArg = NULL;
- LL_TYPE x = (LL_TYPE)1048576 * (LL_TYPE)1048576;
- #if defined(_MSC_VER) && defined(_DEBUG)
- _CrtSetReportHook(DebugReport);
- #endif
- for (currentArg = llwidthArgs; *currentArg != NULL; currentArg++)
- {
- char formatString[64];
- snprintf(formatString, sizeof(formatString), "%%%sd", *currentArg);
- snprintf(s, 128, formatString, x);
- if (strcmp(s, "1099511627776") == 0)
- {
- printf("PRINTF_LL_WIDTH=[%s]\n", *currentArg);
- return 0;
- }
- }
- return 1;
-}
-
-#endif /* PRINTF_LL_WIDTH */
-
#ifdef SYSTEM_SCOPE_THREADS
#include <stdlib.h>
#include <pthread.h>
diff --git a/config/ibm-aix b/config/ibm-aix
index f48f9d8..9f261e3 100644
--- a/config/ibm-aix
+++ b/config/ibm-aix
@@ -149,8 +149,6 @@ ac_cv_sizeof_char=${ac_cv_sizeof_char=1}
ac_cv_sizeof_short=${ac_cv_sizeof_short=2}
ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8}
-# Do not cache __int64 since it is not a standard C type and some compilers
-# (e.g., gcc) does not support it.
ac_cv_sizeof_float=${ac_cv_sizeof_float=4}
ac_cv_sizeof_double=${ac_cv_sizeof_double=8}
ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=8}
diff --git a/configure.ac b/configure.ac
index 4fea5c4..575628f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -522,7 +522,6 @@ AC_CHECK_SIZEOF([int])
AC_CHECK_SIZEOF([unsigned])
AC_CHECK_SIZEOF([long])
AC_CHECK_SIZEOF([long long])
-AC_CHECK_SIZEOF([__int64])
AC_CHECK_SIZEOF([float])
AC_CHECK_SIZEOF([double])
AC_CHECK_SIZEOF([long double])
@@ -2146,33 +2145,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
[AC_MSG_RESULT([no])])
## ----------------------------------------------------------------------
-## Try to figure out how to print `long long'. Some machines use `%lld'
-## and others use `%qd'. There may be more! The final `l' is a
-## default in case none of the others work.
-##
-AC_MSG_CHECKING([how to print long long])
-AC_CACHE_VAL([hdf5_cv_printf_ll], [
-
-for hdf5_cv_printf_ll in ll l L q unknown; do
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- ],[[
- char *s = malloc(128);
- long long x = (long long)1048576 * (long long)1048576;
- snprintf(s,128,"%${hdf5_cv_printf_ll}d",x);
- exit(strcmp(s,"1099511627776"));
- ]])]
- , [break],,[continue])
-done])
-
-AC_MSG_RESULT([%${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u])
-AC_DEFINE_UNQUOTED([PRINTF_LL_WIDTH], ["$hdf5_cv_printf_ll"],
- [Width for printf() for type `long long' or `__int64', use `ll'])
-
-## ----------------------------------------------------------------------
## Remove old ways of determining debug/production build.
## These were used in 1.8.x and earlier. We should probably keep these checks
## around to help people migrate to 1.10.x and newer versions.
diff --git a/hl/c++/src/H5PacketTable.h b/hl/c++/src/H5PacketTable.h
index c1f1eb5..e395e5a 100644
--- a/hl/c++/src/H5PacketTable.h
+++ b/hl/c++/src/H5PacketTable.h
@@ -163,7 +163,7 @@ class H5_HLCPPDLL FL_PacketTable : virtual public PacketTable {
/* Destructor
* Cleans up the packet table
*/
- virtual ~FL_PacketTable()
+ ~FL_PacketTable() override
{
}
diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c
index 2de5d87..7ea09c8 100644
--- a/java/src/jni/h5util.c
+++ b/java/src/jni/h5util.c
@@ -211,9 +211,9 @@ h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_
/* Build default formats for long long types */
if (!fmt_llong[0]) {
- if (HDsnprintf(fmt_llong, sizeof(fmt_llong), "%%%sd", H5_PRINTF_LL_WIDTH) < 0)
+ if (HDsnprintf(fmt_llong, sizeof(fmt_llong), "%%lld") < 0)
H5_JNI_FATAL_ERROR(ENVONLY, "h5str_convert: HDsnprintf failure");
- if (HDsnprintf(fmt_ullong, sizeof(fmt_ullong), "%%%su", H5_PRINTF_LL_WIDTH) < 0)
+ if (HDsnprintf(fmt_ullong, sizeof(fmt_ullong), "%%llu") < 0)
H5_JNI_FATAL_ERROR(ENVONLY, "h5str_convert: HDsnprintf failure");
} /* end if */
@@ -781,9 +781,9 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i
/* Build default formats for long long types */
if (!fmt_llong[0]) {
- if (HDsnprintf(fmt_llong, sizeof(fmt_llong), "%%%sd", H5_PRINTF_LL_WIDTH) < 0)
+ if (HDsnprintf(fmt_llong, sizeof(fmt_llong), "%%lld") < 0)
H5_JNI_FATAL_ERROR(ENVONLY, "h5str_sprintf: HDsnprintf failure");
- if (HDsnprintf(fmt_ullong, sizeof(fmt_ullong), "%%%su", H5_PRINTF_LL_WIDTH) < 0)
+ if (HDsnprintf(fmt_ullong, sizeof(fmt_ullong), "%%llu") < 0)
H5_JNI_FATAL_ERROR(ENVONLY, "h5str_sprintf: HDsnprintf failure");
} /* end if */
switch (tclass) {
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index c8ecbd1..69d9780 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -109,7 +109,7 @@ New Features
Internal header file:
---------------------
- -
+ - All the #defines named H5FD_CTL__* were renamed to H5FD_CTL_*, i.e. the double underscore was reduced to a single underscore.
Documentation:
diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c
index 92252dc..94dc64d 100644
--- a/src/H5Dcompact.c
+++ b/src/H5Dcompact.c
@@ -285,7 +285,7 @@ H5D__compact_iovv_memmanage_cb(hsize_t dst_off, hsize_t src_off, size_t len, voi
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "can't get file handle")
/* Setup operation flags and arguments */
- op_flags = H5FD_CTL__ROUTE_TO_TERMINAL_VFD_FLAG | H5FD_CTL__FAIL_IF_UNKNOWN_FLAG;
+ op_flags = H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG | H5FD_CTL_FAIL_IF_UNKNOWN_FLAG;
op_args.dstbuf = udata->dstbuf;
op_args.dst_off = dst_off;
@@ -294,7 +294,7 @@ H5D__compact_iovv_memmanage_cb(hsize_t dst_off, hsize_t src_off, size_t len, voi
op_args.len = len;
/* Make request to file driver */
- if (H5FD_ctl(file_handle, H5FD_CTL__MEM_COPY, op_flags, &op_args, NULL) < 0)
+ if (H5FD_ctl(file_handle, H5FD_CTL_MEM_COPY, op_flags, &op_args, NULL) < 0)
HGOTO_ERROR(H5E_IO, H5E_FCNTL, FAIL, "VFD memcpy request failed")
done:
diff --git a/src/H5ESdevelop.h b/src/H5ESdevelop.h
index 2fb9aeb..5bbf74e 100644
--- a/src/H5ESdevelop.h
+++ b/src/H5ESdevelop.h
@@ -15,8 +15,8 @@
* support routines.
*/
-#ifndef _H5ESdevelop_H
-#define _H5ESdevelop_H
+#ifndef H5ESdevelop_H
+#define H5ESdevelop_H
/* Include package's public header */
#include "H5ESpublic.h"
@@ -49,4 +49,4 @@ H5_DLL herr_t H5ESget_requests(hid_t es_id, H5_iter_order_t order, hid_t *connec
}
#endif
-#endif /* _H5ESdevelop_H */
+#endif /* H5ESdevelop_H */
diff --git a/src/H5FD.c b/src/H5FD.c
index 6584843..162e27f 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -2180,7 +2180,7 @@ H5FD_ctl(H5FD_t *file, uint64_t op_code, uint64_t flags, const void *input, void
/* Dispatch to driver if the ctl function exists.
*
- * If it doesn't, fail if the H5FD_CTL__FAIL_IF_UNKNOWN_FLAG is set.
+ * If it doesn't, fail if the H5FD_CTL_FAIL_IF_UNKNOWN_FLAG is set.
*
* Otherwise, report success.
*/
@@ -2190,7 +2190,7 @@ H5FD_ctl(H5FD_t *file, uint64_t op_code, uint64_t flags, const void *input, void
HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "VFD ctl request failed")
}
- else if (flags & H5FD_CTL__FAIL_IF_UNKNOWN_FLAG) {
+ else if (flags & H5FD_CTL_FAIL_IF_UNKNOWN_FLAG) {
HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL,
"VFD ctl request failed (no ctl callback and fail if unknown flag is set)")
diff --git a/src/H5FDdevelop.h b/src/H5FDdevelop.h
index f5b32ed..50eae1f 100644
--- a/src/H5FDdevelop.h
+++ b/src/H5FDdevelop.h
@@ -15,8 +15,8 @@
* support routines.
*/
-#ifndef _H5FDdevelop_H
-#define _H5FDdevelop_H
+#ifndef H5FDdevelop_H
+#define H5FDdevelop_H
/* Include package's public header */
#include "H5FDpublic.h"
@@ -292,4 +292,4 @@ H5_DLL herr_t H5FDctl(H5FD_t *file, uint64_t op_code, uint64_t flags, const voi
}
#endif
-#endif /* _H5FDdevelop_H */
+#endif /* H5FDdevelop_H */
diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c
index 7eb1463..45791e8 100644
--- a/src/H5FDmpi.c
+++ b/src/H5FDmpi.c
@@ -57,7 +57,7 @@ int
H5FD_mpi_get_rank(H5FD_t *file)
{
const H5FD_class_t *cls;
- uint64_t flags = H5FD_CTL__FAIL_IF_UNKNOWN_FLAG | H5FD_CTL__ROUTE_TO_TERMINAL_VFD_FLAG;
+ uint64_t flags = H5FD_CTL_FAIL_IF_UNKNOWN_FLAG | H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG;
int rank = -1;
void * rank_ptr = (void *)(&rank);
int ret_value;
@@ -70,7 +70,7 @@ H5FD_mpi_get_rank(H5FD_t *file)
HDassert(cls->ctl); /* All MPI drivers must implement this */
/* Dispatch to driver */
- if ((cls->ctl)(file, H5FD_CTL__GET_MPI_RANK_OPCODE, flags, NULL, &rank_ptr) < 0)
+ if ((cls->ctl)(file, H5FD_CTL_GET_MPI_RANK_OPCODE, flags, NULL, &rank_ptr) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_rank request failed")
HDassert(rank >= 0);
@@ -109,7 +109,7 @@ int
H5FD_mpi_get_size(H5FD_t *file)
{
const H5FD_class_t *cls;
- uint64_t flags = H5FD_CTL__FAIL_IF_UNKNOWN_FLAG | H5FD_CTL__ROUTE_TO_TERMINAL_VFD_FLAG;
+ uint64_t flags = H5FD_CTL_FAIL_IF_UNKNOWN_FLAG | H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG;
int size = 0;
void * size_ptr = (void *)(&size);
int ret_value;
@@ -122,7 +122,7 @@ H5FD_mpi_get_size(H5FD_t *file)
HDassert(cls->ctl); /* All MPI drivers must implement this */
/* Dispatch to driver */
- if ((cls->ctl)(file, H5FD_CTL__GET_MPI_SIZE_OPCODE, flags, NULL, &size_ptr) < 0)
+ if ((cls->ctl)(file, H5FD_CTL_GET_MPI_SIZE_OPCODE, flags, NULL, &size_ptr) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_size request failed")
if (0 >= size)
@@ -162,7 +162,7 @@ MPI_Comm
H5FD_mpi_get_comm(H5FD_t *file)
{
const H5FD_class_t *cls;
- uint64_t flags = H5FD_CTL__FAIL_IF_UNKNOWN_FLAG | H5FD_CTL__ROUTE_TO_TERMINAL_VFD_FLAG;
+ uint64_t flags = H5FD_CTL_FAIL_IF_UNKNOWN_FLAG | H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG;
MPI_Comm comm = MPI_COMM_NULL;
void * comm_ptr = (void *)(&comm);
MPI_Comm ret_value;
@@ -175,7 +175,7 @@ H5FD_mpi_get_comm(H5FD_t *file)
HDassert(cls->ctl); /* All MPI drivers must implement this */
/* Dispatch to driver */
- if ((cls->ctl)(file, H5FD_CTL__GET_MPI_COMMUNICATOR_OPCODE, flags, NULL, &comm_ptr) < 0)
+ if ((cls->ctl)(file, H5FD_CTL_GET_MPI_COMMUNICATOR_OPCODE, flags, NULL, &comm_ptr) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, MPI_COMM_NULL, "driver get_comm request failed")
if (comm == MPI_COMM_NULL)
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index 1be4779..ce32bc7 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -3017,9 +3017,9 @@ done:
*
* At present, the supported op codes are:
*
- * H5FD_CTL__GET_MPI_COMMUNICATOR_OPCODE
- * H5FD_CTL__GET_MPI_RANK_OPCODE
- * H5FD_CTL__GET_MPI_SIZE_OPCODE
+ * H5FD_CTL_GET_MPI_COMMUNICATOR_OPCODE
+ * H5FD_CTL_GET_MPI_RANK_OPCODE
+ * H5FD_CTL_GET_MPI_SIZE_OPCODE
*
* Note that these opcodes must be supported by all VFDs that
* support MPI.
@@ -3045,26 +3045,26 @@ H5FD__mpio_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void H5_AT
switch (op_code) {
- case H5FD_CTL__GET_MPI_COMMUNICATOR_OPCODE:
+ case H5FD_CTL_GET_MPI_COMMUNICATOR_OPCODE:
HDassert(output);
HDassert(*output);
**((MPI_Comm **)output) = file->comm;
break;
- case H5FD_CTL__GET_MPI_RANK_OPCODE:
+ case H5FD_CTL_GET_MPI_RANK_OPCODE:
HDassert(output);
HDassert(*output);
**((int **)output) = file->mpi_rank;
break;
- case H5FD_CTL__GET_MPI_SIZE_OPCODE:
+ case H5FD_CTL_GET_MPI_SIZE_OPCODE:
HDassert(output);
HDassert(*output);
**((int **)output) = file->mpi_size;
break;
default: /* unknown op code */
- if (flags & H5FD_CTL__FAIL_IF_UNKNOWN_FLAG) {
+ if (flags & H5FD_CTL_FAIL_IF_UNKNOWN_FLAG) {
HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "unknown op_code and fail if unknown")
}
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index 20c538f..0d5bedf 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -2268,7 +2268,7 @@ H5FD_multi_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void *inpu
switch (op_code) {
/* Unknown op code */
default:
- if (flags & H5FD_CTL__FAIL_IF_UNKNOWN_FLAG)
+ if (flags & H5FD_CTL_FAIL_IF_UNKNOWN_FLAG)
H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_FCNTL,
"VFD ctl request failed (unknown op code and fail if unknown flag is set)", -1);
diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h
index 221f569..5221e35 100644
--- a/src/H5FDpublic.h
+++ b/src/H5FDpublic.h
@@ -188,14 +188,14 @@
(H5FD_CTL_OPC_RESERVED + 511) /* Maximum opcode value available for experimental use */
/* ctl function op codes: */
-#define H5FD_CTL__INVALID_OPCODE 0
-#define H5FD_CTL__TEST_OPCODE 1
-#define H5FD_CTL__GET_MPI_COMMUNICATOR_OPCODE 2
-#define H5FD_CTL__GET_MPI_RANK_OPCODE 3
-#define H5FD_CTL__GET_MPI_SIZE_OPCODE 4
-#define H5FD_CTL__MEM_ALLOC 5
-#define H5FD_CTL__MEM_FREE 6
-#define H5FD_CTL__MEM_COPY 7
+#define H5FD_CTL_INVALID_OPCODE 0
+#define H5FD_CTL_TEST_OPCODE 1
+#define H5FD_CTL_GET_MPI_COMMUNICATOR_OPCODE 2
+#define H5FD_CTL_GET_MPI_RANK_OPCODE 3
+#define H5FD_CTL_GET_MPI_SIZE_OPCODE 4
+#define H5FD_CTL_MEM_ALLOC 5
+#define H5FD_CTL_MEM_FREE 6
+#define H5FD_CTL_MEM_COPY 7
/* ctl function flags: */
@@ -227,7 +227,7 @@
*/
/* Unknown op codes should be ignored silently unless the
- * H5FD_CTL__FAIL_IF_UNKNOWN_FLAG is set.
+ * H5FD_CTL_FAIL_IF_UNKNOWN_FLAG is set.
*
* On terminal VFDs, unknown op codes should generate an
* error unconditionally if this flag is set.
@@ -237,9 +237,9 @@
* flags. In the absence of such flags, the VFD should
* generate an error.
*/
-#define H5FD_CTL__FAIL_IF_UNKNOWN_FLAG 0x0001
+#define H5FD_CTL_FAIL_IF_UNKNOWN_FLAG 0x0001
-/* The H5FD_CTL__ROUTE_TO_TERMINAL_VFD_FLAG is used only
+/* The H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG is used only
* by non-ternminal VFDs, and only applies to unknown
* opcodes. (known op codes should be handled as
* appropriate.)
@@ -249,9 +249,9 @@
* the VFD stack en-route to the terminal VFD.
* If that VFD does not support the ctl call, the
* pass through VFD should fail or succeed as directed
- * by the H5FD_CTL__FAIL_IF_UNKNOWN_FLAG.
+ * by the H5FD_CTL_FAIL_IF_UNKNOWN_FLAG.
*/
-#define H5FD_CTL__ROUTE_TO_TERMINAL_VFD_FLAG 0x0002
+#define H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG 0x0002
/*******************/
/* Public Typedefs */
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index acc705e..1d97f83 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -1086,7 +1086,7 @@ H5FD__sec2_ctl(H5FD_t *_file, uint64_t H5_ATTR_UNUSED op_code, uint64_t flags,
HDassert(_file);
/* No op codes are understood. */
- if (flags & H5FD_CTL__FAIL_IF_UNKNOWN_FLAG)
+ if (flags & H5FD_CTL_FAIL_IF_UNKNOWN_FLAG)
HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "unknown op_code and fail if unknown flag is set")
done:
diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c
index 3d7093a..48de4e6 100644
--- a/src/H5FDsplitter.c
+++ b/src/H5FDsplitter.c
@@ -1325,16 +1325,16 @@ H5FD__splitter_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void *
switch (op_code) {
/* Unknown op code */
default:
- if (flags & H5FD_CTL__ROUTE_TO_TERMINAL_VFD_FLAG) {
+ if (flags & H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG) {
/* Pass ctl call down to R/W channel VFD */
if (H5FDctl(file->rw_file, op_code, flags, input, output) < 0)
HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "VFD ctl request failed")
}
else {
/* If no valid VFD routing flag is specified, fail for unknown op code
- * if H5FD_CTL__FAIL_IF_UNKNOWN_FLAG flag is set.
+ * if H5FD_CTL_FAIL_IF_UNKNOWN_FLAG flag is set.
*/
- if (flags & H5FD_CTL__FAIL_IF_UNKNOWN_FLAG)
+ if (flags & H5FD_CTL_FAIL_IF_UNKNOWN_FLAG)
HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL,
"VFD ctl request failed (unknown op code and fail if unknown flag is set)")
}
diff --git a/src/H5Idevelop.h b/src/H5Idevelop.h
index 3cd951e..13e3a83 100644
--- a/src/H5Idevelop.h
+++ b/src/H5Idevelop.h
@@ -15,8 +15,8 @@
* support routines.
*/
-#ifndef _H5Idevelop_H
-#define _H5Idevelop_H
+#ifndef H5Idevelop_H
+#define H5Idevelop_H
/* Include package's public header */
#include "H5Ipublic.h" /* ID management */
@@ -136,4 +136,4 @@ H5_DLL hid_t H5Iregister_future(H5I_type_t type, const void *object, H5I_future_
}
#endif
-#endif /* _H5Idevelop_H */
+#endif /* H5Idevelop_H */
diff --git a/src/H5Ldevelop.h b/src/H5Ldevelop.h
index 43ed7de..96b2ec3 100644
--- a/src/H5Ldevelop.h
+++ b/src/H5Ldevelop.h
@@ -15,8 +15,8 @@
* support routines.
*/
-#ifndef _H5Ldevelop_H
-#define _H5Ldevelop_H
+#ifndef H5Ldevelop_H
+#define H5Ldevelop_H
/* Include package's public header */
#include "H5Lpublic.h"
@@ -311,4 +311,4 @@ typedef struct {
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-#endif /* _H5Ldevelop_H */
+#endif /* H5Ldevelop_H */
diff --git a/src/H5Tdevelop.h b/src/H5Tdevelop.h
index e642d7c..2ae4178 100644
--- a/src/H5Tdevelop.h
+++ b/src/H5Tdevelop.h
@@ -15,8 +15,8 @@
* support routines.
*/
-#ifndef _H5Tdevelop_H
-#define _H5Tdevelop_H
+#ifndef H5Tdevelop_H
+#define H5Tdevelop_H
/* Include package's public header */
#include "H5Tpublic.h"
@@ -224,4 +224,4 @@ H5_DLL htri_t H5Tcompiler_conv(hid_t src_id, hid_t dst_id);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-#endif /* _H5Tdevelop_H */
+#endif /* H5Tdevelop_H */
diff --git a/src/H5Zdevelop.h b/src/H5Zdevelop.h
index 328e221..0f5e3e9 100644
--- a/src/H5Zdevelop.h
+++ b/src/H5Zdevelop.h
@@ -15,8 +15,8 @@
* support routines.
*/
-#ifndef _H5Zdevelop_H
-#define _H5Zdevelop_H
+#ifndef H5Zdevelop_H
+#define H5Zdevelop_H
/* Include package's public header */
#include "H5Zpublic.h"
@@ -418,4 +418,4 @@ typedef struct H5Z_class1_t {
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-#endif /* _H5Zdevelop_H */
+#endif /* H5Zdevelop_H */
diff --git a/src/H5public.h b/src/H5public.h
index 0be303b..26239d0 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -37,9 +37,10 @@
/* C library header files for things that appear in HDF5 public headers */
#ifdef __cplusplus
-#define __STDC_FORMAT_MACROS
-#endif
+#include <cinttypes>
+#else
#include <inttypes.h>
+#endif
#include <limits.h>
#include <stdarg.h>
#include <stdbool.h>
diff --git a/test/dt_arith.c b/test/dt_arith.c
index 3601b95..ae48045 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -2462,11 +2462,11 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
break;
case INT_LLONG:
HDmemcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
- HDfprintf(stdout, " %29" H5_PRINTF_LL_WIDTH "d\n", *((long long *)aligned));
+ HDfprintf(stdout, " %29lld\n", *((long long *)aligned));
break;
case INT_ULLONG:
HDmemcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
- HDfprintf(stdout, " %29" H5_PRINTF_LL_WIDTH "u\n", *((unsigned long long *)aligned));
+ HDfprintf(stdout, " %29llu\n", *((unsigned long long *)aligned));
break;
case FLT_FLOAT:
case FLT_DOUBLE:
@@ -2516,11 +2516,11 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
break;
case INT_LLONG:
HDmemcpy(aligned, buf + j * sizeof(long long), sizeof(long long));
- HDfprintf(stdout, " %29" H5_PRINTF_LL_WIDTH "d\n", *((long long *)aligned));
+ HDfprintf(stdout, " %29lld\n", *((long long *)aligned));
break;
case INT_ULLONG:
HDmemcpy(aligned, buf + j * sizeof(long long), sizeof(unsigned long long));
- HDfprintf(stdout, " %29" H5_PRINTF_LL_WIDTH "u\n", *((unsigned long long *)aligned));
+ HDfprintf(stdout, " %29llu\n", *((unsigned long long *)aligned));
break;
case FLT_FLOAT:
case FLT_DOUBLE:
@@ -2561,10 +2561,10 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
HDprintf(" %29lu\n", *((unsigned long *)((void *)hw)));
break;
case INT_LLONG:
- HDfprintf(stdout, " %29" H5_PRINTF_LL_WIDTH "d\n", *((long long *)((void *)hw)));
+ HDfprintf(stdout, " %29lld\n", *((long long *)((void *)hw)));
break;
case INT_ULLONG:
- HDfprintf(stdout, " %29" H5_PRINTF_LL_WIDTH "u\n", *((unsigned long long *)((void *)hw)));
+ HDfprintf(stdout, " %29llu\n", *((unsigned long long *)((void *)hw)));
break;
case FLT_FLOAT:
case FLT_DOUBLE:
@@ -4398,11 +4398,11 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
break;
case INT_LLONG:
HDmemcpy(aligned, saved + j * sizeof(long long), sizeof(long long));
- HDfprintf(stdout, " %29" H5_PRINTF_LL_WIDTH "d\n", *((long long *)aligned));
+ HDfprintf(stdout, " %29lld\n", *((long long *)aligned));
break;
case INT_ULLONG:
HDmemcpy(aligned, saved + j * sizeof(unsigned long long), sizeof(unsigned long long));
- HDfprintf(stdout, " %29" H5_PRINTF_LL_WIDTH "u\n", *((unsigned long long *)aligned));
+ HDfprintf(stdout, " %29llu\n", *((unsigned long long *)aligned));
break;
case FLT_FLOAT:
HDmemcpy(aligned, saved + j * sizeof(float), sizeof(float));
@@ -4461,11 +4461,11 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
break;
case INT_LLONG:
HDmemcpy(aligned, buf + j * sizeof(long long), sizeof(long long));
- HDfprintf(stdout, " %29" H5_PRINTF_LL_WIDTH "d\n", *((long long *)aligned));
+ HDfprintf(stdout, " %29lld\n", *((long long *)aligned));
break;
case INT_ULLONG:
HDmemcpy(aligned, buf + j * sizeof(unsigned long long), sizeof(unsigned long long));
- HDfprintf(stdout, " %29" H5_PRINTF_LL_WIDTH "u\n", *((unsigned long long *)aligned));
+ HDfprintf(stdout, " %29llu\n", *((unsigned long long *)aligned));
break;
case FLT_FLOAT:
HDmemcpy(aligned, buf + j * sizeof(float), sizeof(float));
@@ -4515,10 +4515,10 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
HDprintf(" %29lu\n", *((unsigned long *)((void *)hw)));
break;
case INT_LLONG:
- HDfprintf(stdout, " %29" H5_PRINTF_LL_WIDTH "d\n", *((long long *)((void *)hw)));
+ HDfprintf(stdout, " %29lld\n", *((long long *)((void *)hw)));
break;
case INT_ULLONG:
- HDfprintf(stdout, " %29" H5_PRINTF_LL_WIDTH "u\n", *((unsigned long long *)((void *)hw)));
+ HDfprintf(stdout, " %29llu\n", *((unsigned long long *)((void *)hw)));
break;
case FLT_FLOAT:
HDprintf(" %29f\n", (double)*((float *)((void *)hw)));
diff --git a/test/tconfig.c b/test/tconfig.c
index 8bd625f..8cffd54 100644
--- a/test/tconfig.c
+++ b/test/tconfig.c
@@ -161,11 +161,6 @@ test_config_ctypes(void)
vrfy_cint_type(int_least64_t, uint_least64_t, H5_SIZEOF_INT_LEAST64_T);
#endif
- /* pseudo standard basic types */
-#if H5_SIZEOF___INT64 > 0
- vrfy_cint_type(__int64, unsigned __int64, H5_SIZEOF___INT64);
-#endif
-
#if H5_SIZEOF_OFF_T > 0
vrfy_ctype(off_t, H5_SIZEOF_OFF_T);
#endif
diff --git a/test/vfd.c b/test/vfd.c
index 412f202..d6f6d61 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -3581,12 +3581,12 @@ H5FD__ctl_test_vfd_ctl(H5FD_t H5_ATTR_UNUSED *_file, uint64_t op_code, uint64_t
switch (op_code) {
/* Op code for testing purposes */
- case H5FD_CTL__TEST_OPCODE:
+ case H5FD_CTL_TEST_OPCODE:
break;
/* Unknown op code */
default:
- if (flags & H5FD_CTL__FAIL_IF_UNKNOWN_FLAG)
+ if (flags & H5FD_CTL_FAIL_IF_UNKNOWN_FLAG)
ret_value = FAIL;
break;
}
@@ -3660,8 +3660,8 @@ run_ctl_test(uint64_t op_code, uint64_t flags, ctl_test_opc_type opc_type, hid_t
char filename[1024];
/* Check for a few ctl function flags */
- fail_if_unknown = (flags & H5FD_CTL__FAIL_IF_UNKNOWN_FLAG);
- routing_flag_set = (flags & H5FD_CTL__ROUTE_TO_TERMINAL_VFD_FLAG);
+ fail_if_unknown = (flags & H5FD_CTL_FAIL_IF_UNKNOWN_FLAG);
+ routing_flag_set = (flags & H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG);
/* Determine if the top-level VFD is a passthrough VFD */
if ((driver_id = H5Pget_driver(fapl_id)) < 0)
@@ -3761,7 +3761,7 @@ test_ctl(void)
TESTING_2("known op code to terminal VFD (without fail on unknown flag)");
- op_code = H5FD_CTL__TEST_OPCODE;
+ op_code = H5FD_CTL_TEST_OPCODE;
flags = 0;
/* H5FDctl call should succeed normally */
@@ -3772,8 +3772,8 @@ test_ctl(void)
TESTING_2("known op code to terminal VFD (with fail on unknown flag)");
- op_code = H5FD_CTL__TEST_OPCODE;
- flags = H5FD_CTL__FAIL_IF_UNKNOWN_FLAG;
+ op_code = H5FD_CTL_TEST_OPCODE;
+ flags = H5FD_CTL_FAIL_IF_UNKNOWN_FLAG;
/* H5FDctl call should succeed normally */
if (run_ctl_test(op_code, flags, CTL_OPC_KNOWN_TERMINAL, fapl_id) < 0)
@@ -3783,8 +3783,8 @@ test_ctl(void)
TESTING_2("known op code to terminal VFD (without fail on unknown flag/route to terminal VFD)");
- op_code = H5FD_CTL__TEST_OPCODE;
- flags = H5FD_CTL__ROUTE_TO_TERMINAL_VFD_FLAG;
+ op_code = H5FD_CTL_TEST_OPCODE;
+ flags = H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG;
/* H5FDctl call should succeed normally */
if (run_ctl_test(op_code, flags, CTL_OPC_KNOWN_TERMINAL, fapl_id) < 0)
@@ -3794,8 +3794,8 @@ test_ctl(void)
TESTING_2("known op code to terminal VFD (with fail on unknown flag/route to terminal VFD)");
- op_code = H5FD_CTL__TEST_OPCODE;
- flags = H5FD_CTL__FAIL_IF_UNKNOWN_FLAG | H5FD_CTL__ROUTE_TO_TERMINAL_VFD_FLAG;
+ op_code = H5FD_CTL_TEST_OPCODE;
+ flags = H5FD_CTL_FAIL_IF_UNKNOWN_FLAG | H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG;
/* H5FDctl call should succeed normally */
if (run_ctl_test(op_code, flags, CTL_OPC_KNOWN_TERMINAL, fapl_id) < 0)
@@ -3817,7 +3817,7 @@ test_ctl(void)
TESTING_2("unknown op code to terminal VFD (with fail on unknown flag)");
op_code = H5FD_CTL_OPC_RESERVED;
- flags = H5FD_CTL__FAIL_IF_UNKNOWN_FLAG;
+ flags = H5FD_CTL_FAIL_IF_UNKNOWN_FLAG;
/* H5FDctl call should fail due to 'fail if unknown' flag being specified */
if (run_ctl_test(op_code, flags, CTL_OPC_UNKNOWN, fapl_id) < 0)
@@ -3828,7 +3828,7 @@ test_ctl(void)
TESTING_2("unknown op code to terminal VFD (without fail on unknown flag/route to terminal VFD)");
op_code = H5FD_CTL_OPC_RESERVED;
- flags = H5FD_CTL__ROUTE_TO_TERMINAL_VFD_FLAG;
+ flags = H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG;
/* H5FDctl call should silently ignore unknown op code and succeed */
if (run_ctl_test(op_code, flags, CTL_OPC_UNKNOWN, fapl_id) < 0)
@@ -3839,7 +3839,7 @@ test_ctl(void)
TESTING_2("unknown op code to terminal VFD (with fail on unknown flag/route to terminal VFD)");
op_code = H5FD_CTL_OPC_RESERVED;
- flags = H5FD_CTL__FAIL_IF_UNKNOWN_FLAG | H5FD_CTL__ROUTE_TO_TERMINAL_VFD_FLAG;
+ flags = H5FD_CTL_FAIL_IF_UNKNOWN_FLAG | H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG;
/* H5FDctl call should fail due to 'fail if unknown' flag being specified */
if (run_ctl_test(op_code, flags, CTL_OPC_UNKNOWN, fapl_id) < 0)
@@ -3870,7 +3870,7 @@ test_ctl(void)
TESTING_2("known op code through passthrough VFD to terminal VFD (without fail on unknown flag/no "
"routing flag)");
- op_code = H5FD_CTL__TEST_OPCODE;
+ op_code = H5FD_CTL_TEST_OPCODE;
flags = 0;
/*
@@ -3886,8 +3886,8 @@ test_ctl(void)
TESTING_2(
"known op code through passthrough VFD to terminal VFD (with fail on unknown flag/no routing flag)");
- op_code = H5FD_CTL__TEST_OPCODE;
- flags = H5FD_CTL__FAIL_IF_UNKNOWN_FLAG;
+ op_code = H5FD_CTL_TEST_OPCODE;
+ flags = H5FD_CTL_FAIL_IF_UNKNOWN_FLAG;
/*
* H5FDctl call should fail since op code is unknown to
@@ -3903,8 +3903,8 @@ test_ctl(void)
TESTING_2("known op code through passthrough VFD to terminal VFD (without fail on unknown flag/route to "
"terminal VFD)");
- op_code = H5FD_CTL__TEST_OPCODE;
- flags = H5FD_CTL__ROUTE_TO_TERMINAL_VFD_FLAG;
+ op_code = H5FD_CTL_TEST_OPCODE;
+ flags = H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG;
/*
* H5Dctl call should succeed since the passthrough VFD
@@ -3919,8 +3919,8 @@ test_ctl(void)
TESTING_2("known op code through passthrough VFD to terminal VFD (with fail on unknown flag/route to "
"terminal VFD)");
- op_code = H5FD_CTL__TEST_OPCODE;
- flags = H5FD_CTL__FAIL_IF_UNKNOWN_FLAG | H5FD_CTL__ROUTE_TO_TERMINAL_VFD_FLAG;
+ op_code = H5FD_CTL_TEST_OPCODE;
+ flags = H5FD_CTL_FAIL_IF_UNKNOWN_FLAG | H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG;
/*
* H5Dctl call should succeed since the passthrough VFD
@@ -3950,7 +3950,7 @@ test_ctl(void)
TESTING_2("unknown op code to passthrough VFD (with fail on unknown flag)");
op_code = H5FD_CTL_OPC_RESERVED;
- flags = H5FD_CTL__FAIL_IF_UNKNOWN_FLAG;
+ flags = H5FD_CTL_FAIL_IF_UNKNOWN_FLAG;
/*
* H5FDctl call should fail since op code is unknown to
@@ -3965,7 +3965,7 @@ test_ctl(void)
TESTING_2("unknown op code to passthrough VFD (without fail on unknown flag/route to terminal VFD)");
op_code = H5FD_CTL_OPC_RESERVED;
- flags = H5FD_CTL__ROUTE_TO_TERMINAL_VFD_FLAG;
+ flags = H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG;
/*
* H5Dctl call should succeed since the passthrough VFD
@@ -3983,7 +3983,7 @@ test_ctl(void)
TESTING_2("unknown op code to passthrough VFD (with fail on unknown flag/route to terminal VFD)");
op_code = H5FD_CTL_OPC_RESERVED;
- flags = H5FD_CTL__FAIL_IF_UNKNOWN_FLAG | H5FD_CTL__ROUTE_TO_TERMINAL_VFD_FLAG;
+ flags = H5FD_CTL_FAIL_IF_UNKNOWN_FLAG | H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG;
/*
* H5Dctl call should fail since the passthrough VFD
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index a7156b5..9fa3ccc 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -31,33 +31,29 @@
#define UI_FORMAT "%-15u %-15u %-15u\n"
#define LI_FORMAT "%-15ld %-15ld %-15ld\n"
#define ULI_FORMAT "%-15lu %-15lu %-15lu\n"
-#define LLI_FORMAT "%-15" H5_PRINTF_LL_WIDTH "d %-15" H5_PRINTF_LL_WIDTH "d %-15" H5_PRINTF_LL_WIDTH "d\n"
-#define ULLI_FORMAT "%-15" H5_PRINTF_LL_WIDTH "u %-15" H5_PRINTF_LL_WIDTH "u %-15" H5_PRINTF_LL_WIDTH "u\n"
+#define LLI_FORMAT "%-15lld %-15lld %-15lld\n"
+#define ULLI_FORMAT "%-15llu %-15llu %-15llu\n"
/* with -p option */
-#define F_FORMAT_P "%-15.10g %-15.10g %-15.10g %-14.10g\n"
-#define LD_FORMAT_P "%-15.10Lg %-15.10Lg %-15.10Lg %-14.10Lg\n"
-#define I_FORMAT_P "%-15d %-15d %-15d %-14f\n"
-#define UI_FORMAT_P "%-15u %-15u %-15u %-14f\n"
-#define LI_FORMAT_P "%-15ld %-15ld %-15ld %-14f\n"
-#define ULI_FORMAT_P "%-15lu %-15lu %-15lu %-14f\n"
-#define LLI_FORMAT_P \
- "%-15" H5_PRINTF_LL_WIDTH "d %-15" H5_PRINTF_LL_WIDTH "d %-15" H5_PRINTF_LL_WIDTH "d %-14f\n"
-#define ULLI_FORMAT_P \
- "%-15" H5_PRINTF_LL_WIDTH "u %-15" H5_PRINTF_LL_WIDTH "u %-15" H5_PRINTF_LL_WIDTH "d %-14f\n"
-#define SPACES " "
+#define F_FORMAT_P "%-15.10g %-15.10g %-15.10g %-14.10g\n"
+#define LD_FORMAT_P "%-15.10Lg %-15.10Lg %-15.10Lg %-14.10Lg\n"
+#define I_FORMAT_P "%-15d %-15d %-15d %-14f\n"
+#define UI_FORMAT_P "%-15u %-15u %-15u %-14f\n"
+#define LI_FORMAT_P "%-15ld %-15ld %-15ld %-14f\n"
+#define ULI_FORMAT_P "%-15lu %-15lu %-15lu %-14f\n"
+#define LLI_FORMAT_P "%-15lld %-15lld %-15lld %-14f\n"
+#define ULLI_FORMAT_P "%-15llu %-15llu %-15lld %-14f\n"
+#define SPACES " "
/* not comparable */
-#define F_FORMAT_P_NOTCOMP "%-15.10g %-15.10g %-15.10g not comparable\n"
-#define LD_FORMAT_P_NOTCOMP "%-15.10Lg %-15.10Lg %-15.10Lg not comparable\n"
-#define I_FORMAT_P_NOTCOMP "%-15d %-15d %-15d not comparable\n"
-#define UI_FORMAT_P_NOTCOMP "%-15u %-15u %-15u not comparable\n"
-#define LI_FORMAT_P_NOTCOMP "%-15ld %-15ld %-15ld not comparable\n"
-#define ULI_FORMAT_P_NOTCOMP "%-15lu %-15lu %-15lu not comparable\n"
-#define LLI_FORMAT_P_NOTCOMP \
- "%-15" H5_PRINTF_LL_WIDTH "d %-15" H5_PRINTF_LL_WIDTH "d %-15" H5_PRINTF_LL_WIDTH "d not comparable\n"
-#define ULLI_FORMAT_P_NOTCOMP \
- "%-15" H5_PRINTF_LL_WIDTH "u %-15" H5_PRINTF_LL_WIDTH "u %-15" H5_PRINTF_LL_WIDTH "d not comparable\n"
+#define F_FORMAT_P_NOTCOMP "%-15.10g %-15.10g %-15.10g not comparable\n"
+#define LD_FORMAT_P_NOTCOMP "%-15.10Lg %-15.10Lg %-15.10Lg not comparable\n"
+#define I_FORMAT_P_NOTCOMP "%-15d %-15d %-15d not comparable\n"
+#define UI_FORMAT_P_NOTCOMP "%-15u %-15u %-15u not comparable\n"
+#define LI_FORMAT_P_NOTCOMP "%-15ld %-15ld %-15ld not comparable\n"
+#define ULI_FORMAT_P_NOTCOMP "%-15lu %-15lu %-15lu not comparable\n"
+#define LLI_FORMAT_P_NOTCOMP "%-15lld %-15lld %-15lld not comparable\n"
+#define ULLI_FORMAT_P_NOTCOMP "%-15llu %-15llu %-15lld not comparable\n"
/* if system EPSILON is defined, use the system EPSILON; otherwise, use
constants that are close to most EPSILON values */
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 5976044..5ade61f 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -660,8 +660,8 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
H5TOOLS_START_DEBUG(" ");
/* Build default formats for long long types */
if (!fmt_llong[0]) {
- HDsnprintf(fmt_llong, sizeof(fmt_llong), "%%%sd", H5_PRINTF_LL_WIDTH);
- HDsnprintf(fmt_ullong, sizeof(fmt_ullong), "%%%su", H5_PRINTF_LL_WIDTH);
+ HDsnprintf(fmt_llong, sizeof(fmt_llong), "%%lld");
+ HDsnprintf(fmt_ullong, sizeof(fmt_ullong), "%%llu");
}
/* Append value depending on data type */
diff --git a/tools/src/h5perf/pio_engine.c b/tools/src/h5perf/pio_engine.c
index 1baaca2..9d08938 100644
--- a/tools/src/h5perf/pio_engine.c
+++ b/tools/src/h5perf/pio_engine.c
@@ -234,7 +234,7 @@ do_pio(parameters param)
}
if ((snbytes % pio_mpi_nprocs_g) != 0) {
HDfprintf(stderr,
- "Dataset size (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the "
+ "Dataset size (%lld) must be a multiple of the "
"number of processes (%d)\n",
(long long)snbytes, pio_mpi_nprocs_g);
GOTOERROR(FAIL);
@@ -243,7 +243,7 @@ do_pio(parameters param)
if (!param.dim2d) {
if (((size_t)(snbytes / pio_mpi_nprocs_g) % buf_size) != 0) {
HDfprintf(stderr,
- "Dataset size/process (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the "
+ "Dataset size/process (%lld) must be a multiple of the "
"transfer buffer size (%zu)\n",
(long long)(snbytes / pio_mpi_nprocs_g), buf_size);
GOTOERROR(FAIL);
@@ -252,7 +252,7 @@ do_pio(parameters param)
else {
if (((size_t)snbytes % buf_size) != 0) {
HDfprintf(stderr,
- "Dataset side size (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the "
+ "Dataset side size (%lld) must be a multiple of the "
"transfer buffer size (%zu)\n",
(long long)snbytes, buf_size);
GOTOERROR(FAIL);
@@ -625,15 +625,13 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
if (!parms->dim2d) {
HDfprintf(output,
"Debug(do_write): "
- "buf_size=%zu, bytes_begin=%" H5_PRINTF_LL_WIDTH "d, bytes_count=%" H5_PRINTF_LL_WIDTH
- "d\n",
+ "buf_size=%zu, bytes_begin=%lld, bytes_count=%lld\n",
buf_size, (long long)bytes_begin[0], (long long)bytes_count);
}
else {
HDfprintf(output,
"Debug(do_write): "
- "linear buf_size=%zu, bytes_begin=(%" H5_PRINTF_LL_WIDTH "d,%" H5_PRINTF_LL_WIDTH
- "d), bytes_count=%" H5_PRINTF_LL_WIDTH "d\n",
+ "linear buf_size=%zu, bytes_begin=(%lld,%lld), bytes_count=%lld\n",
buf_size * blk_size, (long long)bytes_begin[0], (long long)bytes_begin[1],
(long long)bytes_count);
}
@@ -1640,15 +1638,13 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt
if (!parms->dim2d) {
HDfprintf(output,
"Debug(do_write): "
- "buf_size=%zu, bytes_begin=%" H5_PRINTF_LL_WIDTH "d, bytes_count=%" H5_PRINTF_LL_WIDTH
- "d\n",
+ "buf_size=%zu, bytes_begin=%lld, bytes_count=%lld\n",
buf_size, (long long)bytes_begin[0], (long long)bytes_count);
}
else {
HDfprintf(output,
"Debug(do_write): "
- "linear buf_size=%zu, bytes_begin=(%" H5_PRINTF_LL_WIDTH "d,%" H5_PRINTF_LL_WIDTH
- "d), bytes_count=%" H5_PRINTF_LL_WIDTH "d\n",
+ "linear buf_size=%zu, bytes_begin=(%lld,%lld), bytes_count=%lld\n",
buf_size * blk_size, (long long)bytes_begin[0], (long long)bytes_begin[1],
(long long)bytes_count);
}
diff --git a/tools/src/h5perf/pio_perf.c b/tools/src/h5perf/pio_perf.c
index 003c4f2..7ebbefa 100644
--- a/tools/src/h5perf/pio_perf.c
+++ b/tools/src/h5perf/pio_perf.c
@@ -1121,25 +1121,25 @@ recover_size_and_print(long long val, const char *end)
if (val >= ONE_MB && (val % ONE_MB) == 0) {
if (val >= ONE_GB && (val % ONE_GB) == 0)
HDfprintf(output,
- "%" H5_PRINTF_LL_WIDTH "d"
+ "%lld"
"GB%s",
val / ONE_GB, end);
else
HDfprintf(output,
- "%" H5_PRINTF_LL_WIDTH "d"
+ "%lld"
"MB%s",
val / ONE_MB, end);
}
else {
HDfprintf(output,
- "%" H5_PRINTF_LL_WIDTH "d"
+ "%lld"
"KB%s",
val / ONE_KB, end);
}
}
else {
HDfprintf(output,
- "%" H5_PRINTF_LL_WIDTH "d"
+ "%lld"
"%s",
val, end);
}
diff --git a/tools/src/h5perf/sio_engine.c b/tools/src/h5perf/sio_engine.c
index abf8b9a..c12e1da 100644
--- a/tools/src/h5perf/sio_engine.c
+++ b/tools/src/h5perf/sio_engine.c
@@ -179,7 +179,7 @@ do_sio(parameters param, results *res)
if ((param.dset_size[i] % param.buf_size[i]) != 0) {
HDfprintf(stderr,
- "Dataset size[%d] (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the "
+ "Dataset size[%d] (%lld) must be a multiple of the "
"transfer buffer size[%d] (%zu)\n",
param.rank, (long long)param.dset_size[i], param.rank, param.buf_size[i]);
GOTOERROR(FAIL);
diff --git a/tools/src/h5perf/sio_perf.c b/tools/src/h5perf/sio_perf.c
index dc2e15e..5432d6c 100644
--- a/tools/src/h5perf/sio_perf.c
+++ b/tools/src/h5perf/sio_perf.c
@@ -674,25 +674,25 @@ recover_size_and_print(long long val, const char *end)
if (val >= ONE_MB && (val % ONE_MB) == 0) {
if (val >= ONE_GB && (val % ONE_GB) == 0)
HDfprintf(output,
- "%" H5_PRINTF_LL_WIDTH "d"
+ "%lld"
"GB%s",
val / ONE_GB, end);
else
HDfprintf(output,
- "%" H5_PRINTF_LL_WIDTH "d"
+ "%lld"
"MB%s",
val / ONE_MB, end);
}
else {
HDfprintf(output,
- "%" H5_PRINTF_LL_WIDTH "d"
+ "%lld"
"KB%s",
val / ONE_KB, end);
}
}
else {
HDfprintf(output,
- "%" H5_PRINTF_LL_WIDTH "d"
+ "%lld"
"%s",
val, end);
}