about summary refs log tree commit diff
path: root/ctype/ctype-info.c
diff options
context:
space:
mode:
Diffstat (limited to 'ctype/ctype-info.c')
-rw-r--r--ctype/ctype-info.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/ctype/ctype-info.c b/ctype/ctype-info.c
index 03b67d179f..b64e7439a8 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)