From ce5f1ff1c502a1f341560254e4ed3b0dc65cfade Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Fri, 4 Jun 2021 14:54:00 -0700 Subject: 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> --- src/H5public.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 /* For H5T_NATIVE_CHAR defn in H5Tpublic.h */ #include /* For variadic functions in H5VLpublic.h */ -#include /* For C9x types */ +#include /* For C9x types */ + +#ifdef __cplusplus +#define __STDC_FORMAT_MACROS +#endif #include /* C99/POSIX.1 header for uint64_t, PRIu64 */ #ifdef H5_HAVE_STDDEF_H -- cgit v0.12