diff options
author | Ulrich Drepper <drepper@redhat.com> | 2005-12-19 07:26:29 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2005-12-19 07:26:29 +0000 |
commit | 915a6c51c5d8127e87ef797ee23e04e4f92b4c4f (patch) | |
tree | 4c7f9881c4b6b3ab049688dc22e969c44e8fbcf9 /wcsmbs/btowc.c | |
parent | 477aa8698f7963b0984c15016f62f99efe4bb0b5 (diff) | |
download | glibc-915a6c51c5d8127e87ef797ee23e04e4f92b4c4f.tar.gz glibc-915a6c51c5d8127e87ef797ee23e04e4f92b4c4f.tar.xz glibc-915a6c51c5d8127e87ef797ee23e04e4f92b4c4f.zip |
* iconv/gconv.c: Demangle pointers before use if necessary. cvs/fedora-glibc-20051219T1003
* iconv/gconv_cache.c: Likewise. * iconv/skeleton.c: Likewise. * libio/iofwide.c: Likewise. * wcsmbs/btowc.c: Likewise. * wcsmbs/mbrtowc.c: Likewise. * wcsmbs/mbsnrtowcs.c: Likewise. * wcsmbs/mbsrtowcs_l.c: Likewise. * wcsmbs/wcrtomb.c: Likewise. * wcsmbs/wcsnrtombs.c: Likewise. * wcsmbs/wcsrtombs.c: Likewise. * wcsmbs/wctob.c: Likewise. * iconv_gconv_db.c: Likewise. After init functions returns mangle btowc pointer if necessary. * iconv/gconv_dl.c: Mangle function pointers retrieved from dlsym.
Diffstat (limited to 'wcsmbs/btowc.c')
-rw-r--r-- | wcsmbs/btowc.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/wcsmbs/btowc.c b/wcsmbs/btowc.c index 6add7ed8bb..6517d4f635 100644 --- a/wcsmbs/btowc.c +++ b/wcsmbs/btowc.c @@ -26,6 +26,8 @@ #include <wcsmbsload.h> #include <limits.h> +#include <sysdep.h> + wint_t __btowc (c) @@ -45,13 +47,17 @@ __btowc (c) /* Get the conversion functions. */ fcts = get_gconv_fcts (_NL_CURRENT_DATA (LC_CTYPE)); + __gconv_btowc_fct btowc_fct = fcts->towc->__btowc_fct; if (__builtin_expect (fcts->towc_nsteps == 1, 1) - && __builtin_expect (fcts->towc->__btowc_fct != NULL, 1)) + && __builtin_expect (btowc_fct != NULL, 1)) { /* Use the shortcut function. */ - return DL_CALL_FCT (fcts->towc->__btowc_fct, - (fcts->towc, (unsigned char) c)); +#ifdef PTR_DEMANGLE + if (fcts->towc->__shlib_handle != NULL) + PTR_DEMANGLE (btowc_fct); +#endif + return DL_CALL_FCT (btowc_fct, (fcts->towc, (unsigned char) c)); } else { @@ -78,9 +84,13 @@ __btowc (c) /* Create the input string. */ inbuf[0] = c; - status = DL_CALL_FCT (fcts->towc->__fct, - (fcts->towc, &data, &inptr, inptr + 1, - NULL, &dummy, 0, 1)); + __gconv_fct fct = fcts->towc->__fct; +#ifdef PTR_DEMANGLE + if (fcts->towc->__shlib_handle != NULL) + PTR_DEMANGLE (fct); +#endif + status = DL_CALL_FCT (fct, (fcts->towc, &data, &inptr, inptr + 1, + NULL, &dummy, 0, 1)); if (status != __GCONV_OK && status != __GCONV_FULL_OUTPUT && status != __GCONV_EMPTY_INPUT) |