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.


On 05/22/2013 05:07 PM, Eli Zaretskii wrote:
>> Date: Wed, 22 May 2013 16:50:48 +0100
>> From: Pedro Alves <palves@redhat.com>

>> I found the thread where this support was originally discussed:
>>
>>  http://sourceware.org/ml/libc-alpha/2002-07/msg00202.html
>>
>> I found this one in particular enlightening:
>>
>>  http://sourceware.org/ml/libc-alpha/2002-07/msg00208.html
> 
> This solves quite a different problem, then, right?

It seems to solve exactly the issue I assumed gettext had.
That is, I thought with this

  printf (_("%" PRIu32), u);

the translator would see either "%u" or "%lu" depending on
which host had been used for extracting the strings.

But it seems gettext treats PRIu32 etc. specially when extracting
the strings and the translator sees "%PRIu32".  IIUC, then that bit
of code I pointed at is part of the mechanism that converts the
literal "PRIu32" in the translated string to the system's %u etc.
specifier at gettext/_/run time, so the resulting translated message
can be passed on to the destination function.  I mean "printf"
in the example above.  I might have misunderstood though.

-- 
Pedro Alves


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