OSDN Git Service

Provide __tolower and use it
authorPeter S. Mazinger <ps.m@gmx.net>
Tue, 3 Jan 2006 15:48:34 +0000 (15:48 -0000)
committerPeter S. Mazinger <ps.m@gmx.net>
Tue, 3 Jan 2006 15:48:34 +0000 (15:48 -0000)
libc/misc/ctype/ctype.c
libc/string/strcasecmp.c
libc/string/strncasecmp.c

index 60301d4..c53979e 100644 (file)
@@ -268,9 +268,11 @@ IS_FUNC_BODY(xdigit);
 /**********************************************************************/
 #ifdef L_tolower
 
+#undef tolower
+#undef __tolower
 #ifdef __UCLIBC_HAS_CTYPE_TABLES__
 
-int tolower(int c)
+int attribute_hidden __tolower(int c)
 {
 #if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
        assert(CTYPE_DOMAIN_CHECK(c));
@@ -280,12 +282,13 @@ int tolower(int c)
 
 #else  /* __UCLIBC_HAS_CTYPE_TABLES__ */
 
-int tolower(int c)
+int attribute_hidden __tolower(int c)
 {
        return __C_tolower(c);
 }
 
 #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
+strong_alias(__tolower,tolower)
 
 #endif
 /**********************************************************************/
index 054bc01..1d758e2 100644 (file)
@@ -32,7 +32,7 @@ extern wint_t __towlower_l (wint_t __wc, __locale_t __locale) __THROW attribute_
 # ifdef __UCLIBC_DO_XLOCALE
 #  define TOLOWER(C) __tolower_l((C), locale_arg)
 # else
-#  define TOLOWER(C) tolower((C))
+#  define TOLOWER(C) __tolower((C))
 # endif
 #endif
 
index 96f31ca..bfc865a 100644 (file)
@@ -32,7 +32,7 @@ extern wint_t __towlower_l (wint_t __wc, __locale_t __locale) __THROW attribute_
 # ifdef __UCLIBC_DO_XLOCALE
 #  define TOLOWER(C) __tolower_l((C), locale_arg)
 # else
-#  define TOLOWER(C) tolower((C))
+#  define TOLOWER(C) __tolower((C))
 # endif
 #endif