From 915a6c51c5d8127e87ef797ee23e04e4f92b4c4f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 19 Dec 2005 07:26:29 +0000 Subject: * iconv/gconv.c: Demangle pointers before use if necessary. * 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. --- iconv/skeleton.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'iconv/skeleton.c') diff --git a/iconv/skeleton.c b/iconv/skeleton.c index c749356..baace6b 100644 --- a/iconv/skeleton.c +++ b/iconv/skeleton.c @@ -144,6 +144,8 @@ # include #endif +#include + #ifndef DL_CALL_FCT # define DL_CALL_FCT(fct, args) fct args #endif @@ -393,10 +395,17 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data, { struct __gconv_step *next_step = step + 1; struct __gconv_step_data *next_data = data + 1; - __gconv_fct fct; + __gconv_fct fct = NULL; int status; - fct = (data->__flags & __GCONV_IS_LAST) ? NULL : next_step->__fct; + if ((data->__flags & __GCONV_IS_LAST) == 0) + { + fct = next_step->__fct; +#ifdef PTR_DEMANGLE + if (next_step->__shlib_handle != NULL) + PTR_DEMANGLE (fct); +#endif + } /* If the function is called with no input this means we have to reset to the initial state. The possibly partly converted input is -- cgit v1.1