Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2016-08-16 16:24:26 +0300
committerCorinna Vinschen <corinna@vinschen.de>2016-08-16 16:24:26 +0300
commit6e7ce50e0415b05736f6f56377ecb2f8147e94cc (patch)
tree30dc3b7f79344767e24b1c5ba136c9e4d82cf447 /newlib/libc/locale
parent7ef90f7f9d71463caddaeb2ee7f42b3f06bc138a (diff)
Expose locale category accessor functions to non-__HAVE_LOCALE_INFO__ targets.
These functions are used from, e.g., nl_langinfo or strftime, so we need them for all targets. Just return "C" locale category for non-__HAVE_LOCALE_INFO__ targets. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib/libc/locale')
-rw-r--r--newlib/libc/locale/setlocale.h50
1 files changed, 49 insertions, 1 deletions
diff --git a/newlib/libc/locale/setlocale.h b/newlib/libc/locale/setlocale.h
index 03b1dd7de..7aa676a5b 100644
--- a/newlib/libc/locale/setlocale.h
+++ b/newlib/libc/locale/setlocale.h
@@ -322,7 +322,55 @@ __get_current_messages_locale (void)
return (const struct lc_messages_T *)
__get_current_locale ()->lc_cat[LC_MESSAGES].ptr;
}
-#endif
+#else /* ! __HAVE_LOCALE_INFO__ */
+_ELIDABLE_INLINE const struct lc_monetary_T *
+__get_monetary_locale (struct __locale_t *locale)
+{
+ return _C_monetary_locale;
+}
+
+_ELIDABLE_INLINE const struct lc_monetary_T *
+__get_current_monetary_locale (void)
+{
+ return _C_monetary_locale;
+}
+
+_ELIDABLE_INLINE const struct lc_numeric_T *
+__get_numeric_locale (struct __locale_t *locale)
+{
+ return _C_numeric_locale;
+}
+
+_ELIDABLE_INLINE const struct lc_numeric_T *
+__get_current_numeric_locale (void)
+{
+ return _C_numeric_locale;
+}
+
+_ELIDABLE_INLINE const struct lc_time_T *
+__get_time_locale (struct __locale_t *locale)
+{
+ return _C_time_locale;
+}
+
+_ELIDABLE_INLINE const struct lc_time_T *
+__get_current_time_locale (void)
+{
+ return _C_time_locale;
+}
+
+_ELIDABLE_INLINE const struct lc_messages_T *
+__get_messages_locale (struct __locale_t *locale)
+{
+ return _C_messages_locale;
+}
+
+_ELIDABLE_INLINE const struct lc_messages_T *
+__get_current_messages_locale (void)
+{
+ return _C_messages_locale;
+}
+#endif /* !__HAVE_LOCALE_INFO__ */
_ELIDABLE_INLINE const char *
__locale_charset (void)