This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] dwarf2read.c: Don't assume uint32_t is unsigned int on all hosts.
- From: Pedro Alves <palves at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org, dje at google dot com
- Date: Wed, 22 May 2013 17:26:34 +0100
- Subject: Re: [PATCH] dwarf2read.c: Don't assume uint32_t is unsigned int on all hosts.
- References: <20130521203421 dot 23721 dot 93618 dot stgit at brno dot lan> <CADPb22TzeQEanUGOMcFBJrStDYkk5zRUE2Fht_c_d5mQAYM7sw at mail dot gmail dot com> <519C932E dot 7000601 at redhat dot com> <83k3mrt5nu dot fsf at gnu dot org> <519CE57E dot 9020100 at redhat dot com> <519CE958 dot 1020704 at redhat dot com> <83fvxft2uw dot fsf at gnu dot org>
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