* ctype/ctype-info.c: Renamed __ctype_old_* symbols to __ctype_*.

* locale/lc-ctype.c (_nl_postload_ctype): Likewise.
This commit is contained in:
Roland McGrath 2002-09-05 21:22:05 +00:00
parent 51387e0b86
commit 6e606fad8d
4 changed files with 41 additions and 34 deletions

View File

@ -1,3 +1,8 @@
2002-09-05 Roland McGrath <roland@redhat.com>
* ctype/ctype-info.c: Renamed __ctype_old_* symbols to __ctype_*.
* locale/lc-ctype.c (_nl_postload_ctype): Likewise.
2002-09-05 Jakub Jelinek <jakub@redhat.com>
* wcsmbs/wcsmbsload.c (__wcsmbs_load_conv): Unlock and return in

View File

@ -48,18 +48,18 @@ extern const char _nl_C_LC_CTYPE_class_alnum[] attribute_hidden;
#define b(t,x,o) (((const t *) _nl_C_LC_CTYPE_##x) + o)
const unsigned short int *__ctype_old_b = b (unsigned short int, class, 128);
const __uint32_t *__ctype32_old_b = b (__uint32_t, class32, 0);
const __int32_t *__ctype_old_tolower = b (__int32_t, tolower, 128);
const __int32_t *__ctype_old_toupper = b (__int32_t, toupper, 128);
const __uint32_t *__ctype32_old_tolower = b (__uint32_t, tolower, 128);
const __uint32_t *__ctype32_old_toupper = b (__uint32_t, toupper, 128);
const unsigned short int *__ctype_b = b (unsigned short int, class, 128);
const __uint32_t *__ctype32_b = b (__uint32_t, class32, 0);
const __int32_t *__ctype_tolower = b (__int32_t, tolower, 128);
const __int32_t *__ctype_toupper = b (__int32_t, toupper, 128);
const __uint32_t *__ctype32_tolower = b (__uint32_t, tolower, 128);
const __uint32_t *__ctype32_toupper = b (__uint32_t, toupper, 128);
compat_symbol (libc, __ctype_old_b, __ctype_b, GLIBC_2_0);
compat_symbol (libc, __ctype_old_tolower, __ctype_tolower, GLIBC_2_0);
compat_symbol (libc, __ctype_old_toupper, __ctype_toupper, GLIBC_2_0);
compat_symbol (libc, __ctype32_old_b, __ctype32_b, GLIBC_2_0);
compat_symbol (libc, __ctype32_old_tolower, __ctype32_tolower, GLIBC_2_2);
compat_symbol (libc, __ctype32_old_toupper, __ctype32_toupper, GLIBC_2_2);
compat_symbol (libc, __ctype_b, __ctype_b, GLIBC_2_0);
compat_symbol (libc, __ctype_tolower, __ctype_tolower, GLIBC_2_0);
compat_symbol (libc, __ctype_toupper, __ctype_toupper, GLIBC_2_0);
compat_symbol (libc, __ctype32_b, __ctype32_b, GLIBC_2_0);
compat_symbol (libc, __ctype32_tolower, __ctype32_tolower, GLIBC_2_2);
compat_symbol (libc, __ctype32_toupper, __ctype32_toupper, GLIBC_2_2);
#endif

View File

@ -54,19 +54,22 @@ _nl_postload_ctype (void)
#include <shlib-compat.h>
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3)
extern __const unsigned short int *__ctype_old_b; /* Characteristics. */
extern __const __int32_t *__ctype_old_tolower; /* Case conversions. */
extern __const __int32_t *__ctype_old_toupper; /* Case conversions. */
/* We must use the exported names to access these so we are sure to
be accessing the main executable's copy if it has COPY relocs. */
extern const uint32_t *__ctype32_old_b;
extern const uint32_t *__ctype32_old_toupper;
extern const uint32_t *__ctype32_old_tolower;
extern __const unsigned short int *__ctype_b; /* Characteristics. */
extern __const __int32_t *__ctype_tolower; /* Case conversions. */
extern __const __int32_t *__ctype_toupper; /* Case conversions. */
__ctype_old_b = current (uint16_t, CLASS, 128);
__ctype_old_toupper = current (uint32_t, TOUPPER, 128);
__ctype_old_tolower = current (uint32_t, TOLOWER, 128);
__ctype32_old_b = current (uint32_t, CLASS32, 0);
__ctype32_old_toupper = current (uint32_t, TOUPPER32, 0);
__ctype32_old_tolower = current (uint32_t, TOLOWER32, 0);
extern const uint32_t *__ctype32_b;
extern const uint32_t *__ctype32_toupper;
extern const uint32_t *__ctype32_tolower;
__ctype_b = current (uint16_t, CLASS, 128);
__ctype_toupper = current (uint32_t, TOUPPER, 128);
__ctype_tolower = current (uint32_t, TOLOWER, 128);
__ctype32_b = current (uint32_t, CLASS32, 0);
__ctype32_toupper = current (uint32_t, TOUPPER32, 0);
__ctype32_tolower = current (uint32_t, TOLOWER32, 0);
#endif
}

View File

@ -166,12 +166,7 @@ __wcsmbs_load_conv (struct locale_data *new_category)
/* Allocate the gconv_fcts structure. */
new_fcts = malloc (sizeof *new_fcts);
if (new_fcts == NULL)
{
failed:
new_category->private.ctype = &__wcsmbs_gconv_fcts_c;
__libc_lock_unlock (__libc_setlocale_lock);
return;
}
goto failed;
/* Get name of charset of the locale. */
charset_name = new_category->values[_NL_ITEM_INDEX(CODESET)].string;
@ -203,11 +198,15 @@ __wcsmbs_load_conv (struct locale_data *new_category)
__gconv_close_transform (new_fcts->towc, new_fcts->towc_nsteps);
free (new_fcts);
goto failed;
}
new_category->private.ctype = new_fcts;
new_category->private.cleanup = &_nl_cleanup_ctype;
failed:
new_category->private.ctype = &__wcsmbs_gconv_fcts_c;
}
else
{
new_category->private.ctype = new_fcts;
new_category->private.cleanup = &_nl_cleanup_ctype;
}
}
__libc_lock_unlock (__libc_setlocale_lock);