From e94574b3bf0797709e337676e2df01d260eb875b Mon Sep 17 00:00:00 2001 From: Tony Reix Date: Wed, 11 Oct 2017 22:54:32 +0000 Subject: [PATCH] go-system.h (__STDC_FORMAT_MACROS): Define before including any system header files, as is done in ../system.h. * go-system.h (__STDC_FORMAT_MACROS): Define before including any system header files, as is done in ../system.h. From-SVN: r253666 --- gcc/go/ChangeLog | 5 +++++ gcc/go/go-system.h | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog index 3918fa814d7..1c0ef932914 100644 --- a/gcc/go/ChangeLog +++ b/gcc/go/ChangeLog @@ -1,3 +1,8 @@ +2017-10-11 Tony Reix + + * go-system.h (__STDC_FORMAT_MACROS): Define before including any + system header files, as is done in ../system.h. + 2017-10-05 Ian Lance Taylor * Make-lang.in (GO_OBJS): Add go/names.o. diff --git a/gcc/go/go-system.h b/gcc/go/go-system.h index 90185435c1e..b1c67c3cd73 100644 --- a/gcc/go/go-system.h +++ b/gcc/go/go-system.h @@ -22,6 +22,12 @@ #include "config.h" +/* Define this so that inttypes.h defines the PRI?64 macros even + when compiling with a C++ compiler. Define it here so in the + event inttypes.h gets pulled in by another header it is already + defined. */ +#define __STDC_FORMAT_MACROS + // These must be included before the #poison declarations in system.h. #include -- 2.30.2