aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/locale
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/locale')
-rw-r--r--newlib/libc/locale/setlocale.h4
-rw-r--r--newlib/libc/locale/uselocale.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/newlib/libc/locale/setlocale.h b/newlib/libc/locale/setlocale.h
index a0c8084..9f7fd7c 100644
--- a/newlib/libc/locale/setlocale.h
+++ b/newlib/libc/locale/setlocale.h
@@ -218,7 +218,7 @@ _ELIDABLE_INLINE struct __locale_t *
__get_locale_r (struct _reent *r)
{
#ifdef __HAVE_LOCALE_INFO__
- return r->_locale;
+ return _REENT_LOCALE(r);
#else
return __get_global_locale();
#endif
@@ -232,7 +232,7 @@ _ELIDABLE_INLINE struct __locale_t *
__get_current_locale (void)
{
#ifdef __HAVE_LOCALE_INFO__
- return _REENT->_locale ?: __get_global_locale ();
+ return _REENT_LOCALE(_REENT) ?: __get_global_locale ();
#else
return __get_global_locale();
#endif
diff --git a/newlib/libc/locale/uselocale.c b/newlib/libc/locale/uselocale.c
index 83ebcdd..799fb72 100644
--- a/newlib/libc/locale/uselocale.c
+++ b/newlib/libc/locale/uselocale.c
@@ -64,9 +64,9 @@ _uselocale_r (struct _reent *p, struct __locale_t *newloc)
if (!current_locale)
current_locale = LC_GLOBAL_LOCALE;
if (newloc == LC_GLOBAL_LOCALE)
- p->_locale = NULL;
+ _REENT_LOCALE(p) = NULL;
else if (newloc)
- p->_locale = newloc;
+ _REENT_LOCALE(p) = newloc;
return current_locale;
}