Change loadlocale to fill a __locale_t given as parameter

Don't use global variables.  This allows to call loadlocale from
the yet to be created newlocale().

Rename _thr_locale_t to __locale_t (these locales are not restricted
to threads so the name is misleading).

Along these lines, fix _set_ctype to take a __locale_t as parameter.

Signed-off by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2016-07-21 20:49:42 +02:00
parent d16a56306d
commit 1498c79db8
12 changed files with 87 additions and 88 deletions

View File

@ -1070,7 +1070,7 @@ __set_lc_messages_from_win (const char *name,
LC_COLLATE locale information. This is subsequently accessed by the
below functions strcoll, strxfrm, wcscoll, wcsxfrm. */
extern "C" int
__collate_load_locale (struct _thr_locale_t *locale, const char *name,
__collate_load_locale (struct __locale_t *locale, const char *name,
void *f_mbtowc, const char *charset)
{
const struct lc_collate_T *ccop;