Skip to content

Commit

Permalink
Adds __STDC_FORMAT_MACROS before including inttypes.h w/ C++ (#726)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
derobins and github-actions[bot] authored Jun 4, 2021
1 parent 9bf274e commit ce5f1ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/H5public.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ce5f1ff

Please sign in to comment.