aboutsummaryrefslogtreecommitdiffstats
path: root/ctype
diff options
context:
space:
mode:
Diffstat (limited to 'ctype')
-rw-r--r--ctype/Versions3
-rw-r--r--ctype/ctype-info.c15
2 files changed, 17 insertions, 1 deletions
diff --git a/ctype/Versions b/ctype/Versions
index 8cf0338b39e..84f1e2c7cb2 100644
--- a/ctype/Versions
+++ b/ctype/Versions
@@ -21,4 +21,7 @@ libc {
# functions used by optimized macros in ctype.h
__ctype_b_loc; __ctype_tolower_loc; __ctype_toupper_loc;
}
+ GLIBC_PRIVATE {
+ __ctype_init;
+ }
}
diff --git a/ctype/ctype-info.c b/ctype/ctype-info.c
index 03b67d179f8..b64e7439a8f 100644
--- a/ctype/ctype-info.c
+++ b/ctype/ctype-info.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,95,96,97,99,2000, 2002, 2008
+/* Copyright (C) 1991,92,95,96,97,99,2000, 2002, 2008, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -26,6 +26,19 @@ __libc_tsd_define (, const int32_t *, CTYPE_TOLOWER)
__libc_tsd_define (, const int32_t *, CTYPE_TOUPPER)
+void
+__ctype_init (void)
+{
+ const uint16_t **bp = __libc_tsd_address (const uint16_t *, CTYPE_B);
+ *bp = (const uint16_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_CLASS) + 128;
+ const int32_t **up = __libc_tsd_address (const int32_t *, CTYPE_TOUPPER);
+ *up = ((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOUPPER) + 128);
+ const int32_t **lp = __libc_tsd_address (const int32_t *, CTYPE_TOLOWER);
+ *lp = ((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOLOWER) + 128);
+}
+libc_hidden_def (__ctype_init)
+
+
#include <shlib-compat.h>
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3)