This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: search locale archive again after alias expansion
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: Roland McGrath <roland at hack dot frob dot com>, libc-alpha at sourceware dot org
- Date: Thu, 26 Feb 2015 02:52:00 -0300
- Subject: Re: search locale archive again after alias expansion
- Authentication-results: sourceware.org; auth=none
- References: <orr4dao5h6 dot fsf at livre dot home> <20130918220004 dot B23492C09F at topped-with-meat dot com> <ory56t31yv dot fsf at livre dot home> <or8uigyac8 dot fsf at free dot home> <oregr8db48 dot fsf at livre dot home> <54E796D1 dot 40502 at redhat dot com>
On Feb 20, 2015, "Carlos O'Donell" <carlos@redhat.com> wrote:
>> for ChangeLog
>>
>> [BZ #15969]
>> * locale/findlocale.c (_nl_find_locale): Retry archive search
>> after alias expansion.
>> * NEWS: Updated.
> OK to checkin.
I did, and then my dtv-fix build failed due to a missing const typecast
in the patch above. I didn't check whether the prototype of
_nl_load_locale_from_archive changed so as to require a const char **,
or whether this is a result of the warning tightening, but I'm putting
in this amendment for now, while I test a more adequade fix.
[BZ #15969]
* locale/findlocale.c (_nl_find_locale): Fix constness error in
the previous change.
diff --git a/locale/findlocale.c b/locale/findlocale.c
index 360f58b..5e2639b 100644
--- a/locale/findlocale.c
+++ b/locale/findlocale.c
@@ -161,7 +161,8 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
loc_name = (char *) _nl_expand_alias (*name);
if (loc_name != NULL)
{
- data = _nl_load_locale_from_archive (category, &loc_name);
+ data = _nl_load_locale_from_archive (category,
+ (const char **) &loc_name);
if (__builtin_expect (data != NULL, 1))
return data;
}
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer