Browse Source

Provide __tolower and use it

Peter S. Mazinger 18 years ago
parent
commit
fbf868b243
3 changed files with 7 additions and 4 deletions
  1. 5 2
      libc/misc/ctype/ctype.c
  2. 1 1
      libc/string/strcasecmp.c
  3. 1 1
      libc/string/strncasecmp.c

+ 5 - 2
libc/misc/ctype/ctype.c

@@ -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
 /**********************************************************************/

+ 1 - 1
libc/string/strcasecmp.c

@@ -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
 

+ 1 - 1
libc/string/strncasecmp.c

@@ -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