Browse Source

Add __toupper, remove unneeded undefs for tolower

Peter S. Mazinger 18 years ago
parent
commit
16fbf62c20
2 changed files with 4 additions and 4 deletions
  1. 1 0
      include/libc-internal.h
  2. 3 4
      libc/misc/ctype/ctype.c

+ 1 - 0
include/libc-internal.h

@@ -263,6 +263,7 @@ extern char *__glibc_strerror_r_internal (int __errnum, char *__buf, size_t __bu
 
 /* ctype.h */
 extern int __tolower (int __c) __THROW attribute_hidden;
+extern int __toupper (int __c) __THROW attribute_hidden;
 
 #ifdef __UCLIBC_HAS_WCHAR__
 /* wchar.h */

+ 3 - 4
libc/misc/ctype/ctype.c

@@ -268,8 +268,6 @@ IS_FUNC_BODY(xdigit);
 /**********************************************************************/
 #ifdef L_tolower
 
-#undef tolower
-#undef __tolower
 #ifdef __UCLIBC_HAS_CTYPE_TABLES__
 
 int attribute_hidden __tolower(int c)
@@ -313,7 +311,7 @@ weak_alias(__tolower_l, tolower_l)
 
 #ifdef __UCLIBC_HAS_CTYPE_TABLES__
 
-int toupper(int c)
+int attribute_hidden __toupper(int c)
 {
 #if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
 	assert(CTYPE_DOMAIN_CHECK(c));
@@ -323,12 +321,13 @@ int toupper(int c)
 
 #else  /* __UCLIBC_HAS_CTYPE_TABLES__ */
 
-int toupper(int c)
+int attribute_hidden __toupper(int c)
 {
 	return __C_toupper(c);
 }
 
 #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
+strong_alias(__toupper,toupper)
 
 #endif
 /**********************************************************************/