This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Complete display of LC_MONETARY
- From: Andreas Schwab <schwab at suse dot de>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 18 Nov 2013 18:09:43 +0100
- Subject: Re: [PATCH] Complete display of LC_MONETARY
- Authentication-results: sourceware.org; auth=none
- References: <mvm4n7hrb3i dot fsf at hawking dot suse dot de> <20131118162740 dot GB3928 at domone dot podge> <mvmtxf9k6hm dot fsf at hawking dot suse dot de> <20131118170601 dot GA4671 at domone dot podge>
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.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."