Redefine locale info in struct _reent for per-thread locales

The _reent members _current_category and _current_locale are not
used at all.  _current_locale is set to "C" in various points of
the code but its value is just as unused as _current_category.

This patch redefines these members without changing the size of the
structure to allow for an implementation of per-thread locales per
POSIX-1.2008 (i.e. uselocale and usage of the per-thread locale in
subsequent function calls).

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2016-07-06 15:41:35 +02:00
parent b9ac3c2c8b
commit a68ca43b90
2 changed files with 11 additions and 7 deletions

View File

@ -740,7 +740,6 @@ dll_crt0_0 ()
_impure_ptr->_stdin = &_impure_ptr->__sf[0];
_impure_ptr->_stdout = &_impure_ptr->__sf[1];
_impure_ptr->_stderr = &_impure_ptr->__sf[2];
_impure_ptr->_current_locale = "C";
user_data->impure_ptr = _impure_ptr;
user_data->impure_ptr_ptr = &_impure_ptr;