summaryrefslogtreecommitdiffstats
path: root/src/H5public.h
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2021-08-25 23:43:13 (GMT)
committerGitHub <noreply@github.com>2021-08-25 23:43:13 (GMT)
commit1bf72bee1c9a5b8c9280aadee6e5d940a7a1c1ca (patch)
tree6c3bab304ee5f16a460b2637e0632a6bc7cd7dc6 /src/H5public.h
parent56dcd1badcc2b7ffacfbc606bda40c86c4812aee (diff)
downloadhdf5-1bf72bee1c9a5b8c9280aadee6e5d940a7a1c1ca.zip
hdf5-1bf72bee1c9a5b8c9280aadee6e5d940a7a1c1ca.tar.gz
hdf5-1bf72bee1c9a5b8c9280aadee6e5d940a7a1c1ca.tar.bz2
Merge clang-tidy changes to public headers (#962)
Diffstat (limited to 'src/H5public.h')
-rw-r--r--src/H5public.h36
1 files changed, 27 insertions, 9 deletions
diff --git a/src/H5public.h b/src/H5public.h
index 09a2278..9ff8252 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -56,10 +56,15 @@
#ifdef H5_HAVE_STDDEF_H
#include <stddef.h>
#endif
+
#ifdef H5_HAVE_PARALLEL
/* Don't link against MPI C++ bindings */
+#ifndef MPICH_SKIP_MPICXX
#define MPICH_SKIP_MPICXX 1
-#define OMPI_SKIP_MPICXX 1
+#endif
+#ifndef OMPI_SKIP_MPICXX
+#define OMPI_SKIP_MPICXX 1
+#endif
#include <mpi.h>
#ifndef MPI_FILE_NULL /* MPIO may be defined in mpi.h already */
#include <mpio.h>
@@ -233,7 +238,14 @@ typedef int herr_t;
typedef bool hbool_t;
typedef int htri_t;
-/* Define the ssize_t type if it not is defined */
+/* The signed version of size_t
+ *
+ * ssize_t is POSIX and not defined in any C standard. It's used in some
+ * public HDF5 API calls so this work-around will define it if it's not
+ * present.
+ *
+ * Use of ssize_t should be discouraged in new code.
+ */
#if H5_SIZEOF_SSIZE_T == 0
/* Undefine this size, we will re-define it in one of the sections below */
#undef H5_SIZEOF_SSIZE_T
@@ -251,8 +263,10 @@ typedef long long ssize_t;
#endif
#endif
-/* int64_t type is used for creation order field for links. It may be
- * defined in Posix.1g, otherwise it is defined here.
+/**
+ * The size of file objects.
+ *
+ * \internal Defined as a (minimum) 64-bit integer type.
*/
#if H5_SIZEOF_INT64_T >= 8
#elif H5_SIZEOF_INT >= 8
@@ -297,9 +311,11 @@ typedef unsigned long long uint64_t;
#error "nothing appropriate for uint64_t"
#endif
-/*
- * The sizes of file objects have their own types defined here, use a minimum
- * 64-bit type.
+/**
+ * The size of file objects. Used when negative values are needed to indicate errors.
+ *
+ * \internal Defined as a (minimum) 64-bit integer type. Use of hssize_t
+ * should be discouraged in new code.
*/
#if H5_SIZEOF_LONG_LONG >= 8
H5_GCC_DIAG_OFF("long-long")
@@ -319,8 +335,10 @@ H5_GCC_DIAG_ON("long-long")
#error "nothing appropriate for hsize_t"
#endif
-/*
- * File addresses have their own types.
+/**
+ * The address of an object in the file.
+ *
+ * \internal Defined as a (minimum) 64-bit unsigned integer type.
*/
#if H5_SIZEOF_INT >= 8
typedef unsigned haddr_t;