This is the mail archive of the
mailing list for the glibc project.
[Patch] Fix PRI_MACROS_BROKEN undef warnings.
- From: "Steve Ellcey " <sellcey at mips dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Mon, 28 Apr 2014 14:27:26 -0700
- Subject: [Patch] Fix PRI_MACROS_BROKEN undef warnings.
- Authentication-results: sourceware.org; auth=none
Here is another undefined macro warning fix. PRI_MACROS_BROKEN is only
used in loadmsgcat.c in the intl directory. It is never set anywhere in
glibc sources but binutils and gcc use a intl directory that I believe is
derived from the glibc one. The configure scripts of these products set
PRI_MACROS_BROKEN, but the intl sources in them don't appear to have been
updated from glibc since 2003.
So, if we care about keeping something that is usable with GCC/binutils
this patch seems like the best fix but if we don't care about staying in
sync with the intl directory of GCC or binutils we could just remove
PRI_MACROS_BROKEN completely or even remove the entire section of code
that sets the various PRI* macros since we know that glibc itself has the
The m4 macro that binutils and GCC use to set PRI_MACROS_BROKEN mentions
AIX 4.3.3 as a platform where the macros are defined as non-string values.
There are already a number differences between intl in glibc and the one
in GCC and binutils.
Tested on mips-mti-linux-gnu with no difference in the object files
2014-04-28 Steve Ellcey <firstname.lastname@example.org>
* intl/intl/loadmsgcat.c (PRI_MACROS_BROKEN): Set default value if
diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c
index b96a997..e6483ce 100644
@@ -94,6 +94,11 @@ char *alloca ();
/* Provide fallback values for macros that ought to be defined in <inttypes.h>.
Note that our fallback values need not be literal strings, because we don't
use them with preprocessor string concatenation. */
+#define PRI_MACROS_BROKEN 0
#if !defined PRId8 || PRI_MACROS_BROKEN
# undef PRId8
# define PRId8 "d"