This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix HWI AIX breakage
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 27 May 2014 15:33:43 +0200 (CEST)
- Subject: [PATCH] Fix HWI AIX breakage
- Authentication-results: sourceware.org; auth=none
This fixes the AIX breakage by defining __STDC_FORMAT_MACROS
earlier, before stdio.h on AIX gets to include inttypes.h.
Committed as obvious.
Richard.
2014-05-27 Richard Biener <rguenther@suse.de>
* system.h (__STDC_FORMAT_MACROS): Define as very first thing.
Index: gcc/system.h
===================================================================
--- gcc/system.h (revision 210972)
+++ gcc/system.h (working copy)
@@ -22,6 +22,12 @@ along with GCC; see the file COPYING3.
#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