aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-05-27 13:36:29 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-05-27 13:36:29 +0000
commit7ea7f668fc91fc3d08b389b1be38aa9b8cbca27c (patch)
tree09300a3fdf3421c0c31d34e05f3a97fae3e6a847 /gcc
parent2ef321b15a55046e0f75924b4dd4a844435c909a (diff)
downloadgcc-7ea7f668fc91fc3d08b389b1be38aa9b8cbca27c.zip
gcc-7ea7f668fc91fc3d08b389b1be38aa9b8cbca27c.tar.gz
gcc-7ea7f668fc91fc3d08b389b1be38aa9b8cbca27c.tar.bz2
system.h (__STDC_FORMAT_MACROS): Define as very first thing.
2014-05-27 Richard Biener <rguenther@suse.de> * system.h (__STDC_FORMAT_MACROS): Define as very first thing. From-SVN: r210973
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/system.h7
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6d983f8..0a7fe22 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2014-05-27 Richard Biener <rguenther@suse.de>
+
+ * system.h (__STDC_FORMAT_MACROS): Define as very first thing.
+
2014-05-27 Georg-Johann Lay <avr@gjlay.de>
PR libgcc/61152
diff --git a/gcc/system.h b/gcc/system.h
index f216230..6cb24b0 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -22,6 +22,12 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_SYSTEM_H
#define GCC_SYSTEM_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
+
/* We must include stdarg.h before stdio.h. */
#include <stdarg.h>
@@ -491,7 +497,6 @@ extern void *realloc (void *, size_t);
#endif
#ifdef HAVE_INTTYPES_H
-#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#endif