From ade65bab03cd227488723bb39875eeb8130f6fd7 Mon Sep 17 00:00:00 2001 From: Dave Murphy Date: Tue, 19 Mar 2019 08:45:03 +0000 Subject: [PATCH] fix uselocal --- dka64/patches/newlib-3.1.0.patch | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/dka64/patches/newlib-3.1.0.patch b/dka64/patches/newlib-3.1.0.patch index 20059e3..901c669 100644 --- a/dka64/patches/newlib-3.1.0.patch +++ b/dka64/patches/newlib-3.1.0.patch @@ -9196,6 +9196,34 @@ index 4c343e462..c04493460 100644 { return __get_current_locale ()->ctype_ptr; } +diff --git a/newlib/libc/locale/setlocale.h b/newlib/libc/locale/setlocale.h +index a0c80843a..efabdcfc4 100644 +--- a/newlib/libc/locale/setlocale.h ++++ b/newlib/libc/locale/setlocale.h +@@ -217,11 +217,7 @@ __get_global_locale () + _ELIDABLE_INLINE struct __locale_t * + __get_locale_r (struct _reent *r) + { +-#ifdef __HAVE_LOCALE_INFO__ + return r->_locale; +-#else +- return __get_global_locale(); +-#endif + } + + /* In POSIX terms the current locale is the locale used by all functions +@@ -231,11 +227,7 @@ __get_locale_r (struct _reent *r) + _ELIDABLE_INLINE struct __locale_t * + __get_current_locale (void) + { +-#ifdef __HAVE_LOCALE_INFO__ + return _REENT->_locale ?: __get_global_locale (); +-#else +- return __get_global_locale(); +-#endif + } + + /* Only access fixed "C" locale using this function. Fake for !_MB_CAPABLE diff --git a/newlib/libc/machine/aarch64/Makefile.am b/newlib/libc/machine/aarch64/Makefile.am index e8b8197fa..011f69d69 100644 --- a/newlib/libc/machine/aarch64/Makefile.am