summaryrefslogtreecommitdiff
path: root/libc/misc/ctype/ctype.c
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-08-24 03:49:13 +0000
committerManuel Novoa III <mjn3@codepoet.org>2003-08-24 03:49:13 +0000
commit50660812be5588036a14fc85af16bccef68fac02 (patch)
tree65f25cc1dda3c7efc76efee2c61b28973465db2a /libc/misc/ctype/ctype.c
parent02f74937667727e32c591afe42e90e2b515ab61e (diff)
Fix a few bugs in the new extended locale functions.
Move stub gettext functions to a stub libintl to make switching in gnu gettext easier. Also add a few gnu-isms. Change to using hidden names with global weak aliases for the extended locale functions, as expected by libstd++. Slightly rework the locale data generation stuff to allow pregenerated locale data to be used with buildroot.
Diffstat (limited to 'libc/misc/ctype/ctype.c')
-rw-r--r--libc/misc/ctype/ctype.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/libc/misc/ctype/ctype.c b/libc/misc/ctype/ctype.c
index 0eb97140d..a89e1e75c 100644
--- a/libc/misc/ctype/ctype.c
+++ b/libc/misc/ctype/ctype.c
@@ -256,8 +256,9 @@ int tolower(int c)
#ifdef L_tolower_l
#undef tolower_l
+#undef __tolower_l
-int tolower_l(int c, __locale_t l)
+int __tolower_l(int c, __locale_t l)
{
#if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
assert(CTYPE_DOMAIN_CHECK(c));
@@ -265,6 +266,8 @@ int tolower_l(int c, __locale_t l)
return __UCLIBC_CTYPE_IN_TO_DOMAIN(c) ? l->__ctype_tolower[c] : c;
}
+weak_alias(__tolower_l, tolower_l)
+
#endif
/**********************************************************************/
#ifdef L_toupper
@@ -282,8 +285,9 @@ int toupper(int c)
#ifdef L_toupper_l
#undef toupper_l
+#undef __toupper_l
-int toupper_l(int c, __locale_t l)
+int __toupper_l(int c, __locale_t l)
{
#if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
assert(CTYPE_DOMAIN_CHECK(c));
@@ -291,6 +295,8 @@ int toupper_l(int c, __locale_t l)
return __UCLIBC_CTYPE_IN_TO_DOMAIN(c) ? l->__ctype_toupper[c] : c;
}
+weak_alias(__toupper_l, toupper_l)
+
#endif
/**********************************************************************/
#if defined(L_isascii) || defined(L_isascii_l)
@@ -300,6 +306,8 @@ int __XL(isascii)(int c)
return __isascii(c); /* locale-independent */
}
+__XL_ALIAS(isascii)
+
#endif
/**********************************************************************/
#if defined(L_toascii) || defined(L_toascii_l)
@@ -309,6 +317,8 @@ int __XL(toascii)(int c)
return __toascii(c); /* locale-independent */
}
+__XL_ALIAS(toascii)
+
#endif
/**********************************************************************/
/* old uClibc extensions */