From 1498c79db89ea0e02a49ffa34e71da480e37165e Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 21 Jul 2016 20:49:42 +0200 Subject: 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 --- newlib/libc/include/sys/reent.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'newlib/libc/include/sys/reent.h') diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h index 16716dd7d..bd32320a6 100644 --- a/newlib/libc/include/sys/reent.h +++ b/newlib/libc/include/sys/reent.h @@ -40,7 +40,7 @@ struct _reent; /* TODO: This structure type isn't defined yet. It's supposed to be used by locale-specific functions in case a per-thread locale per SUSv4 has been specified. */ -struct _thr_locale_t; +struct __locale_t; /* * If _REENT_SMALL is defined, we make struct _reent as small as possible, @@ -391,7 +391,7 @@ struct _reent /* TODO */ int _unspecified_locale_info; /* unused, reserved for locale stuff */ - struct _thr_locale_t *_locale;/* per-thread locale */ + struct __locale_t *_locale;/* per-thread locale */ struct _mprec *_mp; @@ -584,7 +584,7 @@ struct _reent /* TODO */ int _unspecified_locale_info; /* unused, reserved for locale stuff */ - struct _thr_locale_t *_locale;/* per-thread locale */ + struct __locale_t *_locale;/* per-thread locale */ int __sdidinit; /* 1 means stdio has been init'd */ -- cgit v1.2.3