summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/libc-internal.h1
-rw-r--r--libc/misc/ctype/ctype.c7
2 files changed, 4 insertions, 4 deletions
diff --git a/include/libc-internal.h b/include/libc-internal.h
index 06e55fd28..c85629042 100644
--- a/include/libc-internal.h
+++ b/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 */
diff --git a/libc/misc/ctype/ctype.c b/libc/misc/ctype/ctype.c
index c53979e23..0a7e1bf84 100644
--- a/libc/misc/ctype/ctype.c
+++ b/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
/**********************************************************************/