From b5d946a333f8faff998160c4da499c3c25a2d3ac Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 24 Sep 2016 10:29:47 +0200 Subject: locale: cleanup support Enable locale application to be build when utils are build. Remove useless compile and link warnings. Default to minimal locale builds. Signed-off-by: Waldemar Brodkorb --- libc/misc/locale/locale.c | 13 ------------- libc/sysdeps/linux/common/bits/uClibc_locale.h | 5 ----- 2 files changed, 18 deletions(-) (limited to 'libc') diff --git a/libc/misc/locale/locale.c b/libc/misc/locale/locale.c index f868ac022..e38792b51 100644 --- a/libc/misc/locale/locale.c +++ b/libc/misc/locale/locale.c @@ -58,9 +58,6 @@ #include #include -#undef link_warning -#define link_warning(A,B) - #undef __LOCALE_C_ONLY #ifndef __UCLIBC_HAS_LOCALE__ #define __LOCALE_C_ONLY @@ -118,8 +115,6 @@ extern void _locale_init_l(__locale_t base) attribute_hidden; #ifdef __LOCALE_C_ONLY -link_warning(setlocale,"REMINDER: The 'setlocale' function supports only C|POSIX locales.") - static const char C_string[] = "C"; char *setlocale(int category, register const char *locale) @@ -135,10 +130,6 @@ char *setlocale(int category, register const char *locale) #else /* ---------------------------------------------- __LOCALE_C_ONLY */ -#ifdef __UCLIBC_HAS_THREADS__ -link_warning(setlocale,"REMINDER: The 'setlocale' function is _not_ threadsafe except for simple queries.") -#endif - #if !defined(__LOCALE_DATA_NUM_LOCALES) || (__LOCALE_DATA_NUM_LOCALES <= 1) #error locales enabled, but not data other than for C locale! #endif @@ -263,8 +254,6 @@ char *setlocale(int category, const char *locale) #ifdef __LOCALE_C_ONLY -link_warning(localeconv,"REMINDER: The 'localeconv' function is hardwired for C/POSIX locale only.") - static struct lconv the_lconv; static const char decpt[] = "."; @@ -1002,8 +991,6 @@ libc_hidden_def(__XL_NPP(nl_langinfo)) /**********************************************************************/ #ifdef L_newlocale -#warning mask defines for extra locale categories - static const char posix[] = "POSIX"; static const char utf8[] = "UTF-8"; diff --git a/libc/sysdeps/linux/common/bits/uClibc_locale.h b/libc/sysdeps/linux/common/bits/uClibc_locale.h index b42236d38..6598eafd2 100644 --- a/libc/sysdeps/linux/common/bits/uClibc_locale.h +++ b/libc/sysdeps/linux/common/bits/uClibc_locale.h @@ -326,11 +326,6 @@ extern int __locale_mbrtowc_l(wchar_t *__restrict dst, __locale_t loc) attribute_hidden; #endif -#ifdef L_setlocale -/* so we only get the warning once... */ -#warning need thread version of CUR_LOCALE! -#endif - /**********************************************************************/ #ifdef __UCLIBC_HAS_XLOCALE__ -- cgit v1.2.3