This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: search locale archive again after alias expansion


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


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