+2019-12-18 Bruno Haible <bruno@clisp.org>
+
+ localename: Optimize code for native Windows.
+ * lib/localename.c (gl_locale_name_posix): Remove handling of LC_ALL
+ category (not allowed here).
+
2019-12-18 Bruno Haible <bruno@clisp.org>
setlocale: Make calls with NULL argument multithread-safe.
2019-12-17 Bruno Haible <bruno@clisp.org>
localcharset: Optimize code for native Windows.
- * lib/localcharset.c (locale_charset): Don't both calling
+ * lib/localcharset.c (locale_charset): Don't bother calling
setlocale (LC_ALL, NULL) since we're not interested in its result.
2019-12-17 Bruno Haible <bruno@clisp.org>
if (LC_MIN <= category && category <= LC_MAX)
{
const char *locname = setlocale (category, NULL);
- LCID lcid;
-
- /* If CATEGORY is LC_ALL, the result might be a semi-colon
- separated list of locales. We need only one, so we take the
- one corresponding to LC_CTYPE, as the most important for
- character translations. */
- if (category == LC_ALL && strchr (locname, ';'))
- locname = setlocale (LC_CTYPE, NULL);
/* Convert locale name to LCID. We don't want to use
LocaleNameToLCID because (a) it is only available since Vista,
and (b) it doesn't accept locale names returned by 'setlocale'. */
- lcid = get_lcid (locname);
+ LCID lcid = get_lcid (locname);
if (lcid > 0)
return gl_locale_name_from_win32_LCID (lcid);