[PATCH] Complete display of LC_MONETARY

Ondřej Bílka neleai@seznam.cz
Mon Nov 18 18:41:00 GMT 2013


On Mon, Nov 18, 2013 at 06:09:43PM +0100, Andreas Schwab wrote:
> Ondřej Bílka <neleai@seznam.cz> writes:
> 
> > On Mon, Nov 18, 2013 at 05:41:09PM +0100, Andreas Schwab wrote:
> >> It needs an amendment, the C locale has a bad value for conversion_rate.
> >>
> > ok,  
> >> Andreas.
> >> 
> >>  static const char not_available[] = "\377";
> >> +static const uint32_t conversion_rate[] = { 1, 1 };
> >>  
> >>  const struct __locale_data _nl_C_LC_MONETARY attribute_hidden =
> >>  {
> >> @@ -74,7 +75,7 @@ const struct __locale_data _nl_C_LC_MONETARY attribute_hidden =
> >>      { .word = 99991231 },
> >>      { .word = 10101 },
> >>      { .word = 99991231 },
> >> -    { .word = 1 },
> >> +    { .string = (const char *) conversion_rate },
> >>      { .word = (unsigned int) L'\0' },
> >
> > You could alternatively use .wstr which would not need a cast.
> 
> It's not a wide string either.
> 
As this is only wordarray keeping .string looks like best alternative.



More information about the Libc-alpha mailing list