This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] dwarf2read.c: Don't assume uint32_t is unsigned int on all hosts.


> Date: Wed, 22 May 2013 10:43:10 +0100
> From: Pedro Alves <palves@redhat.com>
> CC: gdb-patches <gdb-patches@sourceware.org>
> 
> Hmm.  Grepping for PRIu in src/intl/ finds lots of hits.

They are all in the same single source file, at least in GDB 7.6.

> Looks like gettext is doing some magic to deal with these.

No magic, just a lot of these:

  #if !defined PRIo32 || PRI_MACROS_BROKEN
  # undef PRIo32
  # define PRIo32 "o"
  #endif
  #if !defined PRIu32 || PRI_MACROS_BROKEN
  # undef PRIu32
  # define PRIu32 "u"
  #endif
  #if !defined PRId64 || PRI_MACROS_BROKEN
  # undef PRId64
  # define PRId64 (sizeof (long) == 8 ? "ld" : "lld")
  #endif
  #if !defined PRIi64 || PRI_MACROS_BROKEN
  # undef PRIi64
  # define PRIi64 (sizeof (long) == 8 ? "li" : "lli")
  #endif

etc.

> There's still the issue with the fact that we use gnulib's
> inttypes.h replacement for systems that don't have it, and it's
> possible gettext's replacements don't match gnulib's...  But I'm
> willing to ignore that.
> 
> WDYT?

Fine with me.  Thanks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]