summaryrefslogtreecommitdiffstats
path: root/src/H5public.h
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-06-04 21:54:00 (GMT)
committerGitHub <noreply@github.com>2021-06-04 21:54:00 (GMT)
commitce5f1ff1c502a1f341560254e4ed3b0dc65cfade (patch)
tree6ef0c4e3466f41b60a9089f4a73f5dce808a981b /src/H5public.h
parent9bf274e21a318b201a34b2d2e81a23f5c0bfecb2 (diff)
downloadhdf5-ce5f1ff1c502a1f341560254e4ed3b0dc65cfade.zip
hdf5-ce5f1ff1c502a1f341560254e4ed3b0dc65cfade.tar.gz
hdf5-ce5f1ff1c502a1f341560254e4ed3b0dc65cfade.tar.bz2
Adds __STDC_FORMAT_MACROS before including inttypes.h w/ C++ (#726)
* Adds __STDC_FORMAT_MACROS before including inttypes.h w/ C++ Allows C++ library to be built on older versions of gcc. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/H5public.h')
-rw-r--r--src/H5public.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/H5public.h b/src/H5public.h
index bf81605..cef15d9 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -42,7 +42,11 @@
#include <limits.h> /* For H5T_NATIVE_CHAR defn in H5Tpublic.h */
#include <stdarg.h> /* For variadic functions in H5VLpublic.h */
-#include <stdint.h> /* For C9x types */
+#include <stdint.h> /* For C9x types */
+
+#ifdef __cplusplus
+#define __STDC_FORMAT_MACROS
+#endif
#include <inttypes.h> /* C99/POSIX.1 header for uint64_t, PRIu64 */
#ifdef H5_HAVE_STDDEF_H