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/gconv.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'iconv/gconv.c') diff --git a/iconv/gconv.c b/iconv/gconv.c index f3f49b7db3..cd43d3d6fb 100644 --- a/iconv/gconv.c +++ b/iconv/gconv.c @@ -1,6 +1,6 @@ /* Convert characters in input buffer using conversion descriptor to output buffer. - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1997-2001, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -20,10 +20,13 @@ 02111-1307 USA. */ #include -#include -#include #include #include +#include + +#include +#include + int internal_function @@ -45,9 +48,15 @@ __gconv (__gconv_t cd, const unsigned char **inbuf, cd->__data[last_step].__outbuf = outbuf != NULL ? *outbuf : NULL; cd->__data[last_step].__outbufend = outbufend; + __gconv_fct fct = cd->__steps->__fct; +#ifdef PTR_DEMANGLE + if (cd->__steps->__shlib_handle != NULL) + PTR_DEMANGLE (fct); +#endif + if (inbuf == NULL || *inbuf == NULL) /* We just flush. */ - result = DL_CALL_FCT (cd->__steps->__fct, + result = DL_CALL_FCT (fct, (cd->__steps, cd->__data, NULL, NULL, NULL, irreversible, cd->__data[last_step].__outbuf == NULL ? 2 : 1, 0)); @@ -60,7 +69,7 @@ __gconv (__gconv_t cd, const unsigned char **inbuf, do { last_start = *inbuf; - result = DL_CALL_FCT (cd->__steps->__fct, + result = DL_CALL_FCT (fct, (cd->__steps, cd->__data, inbuf, inbufend, NULL, irreversible, 0, 0)); } -- cgit v1.2.3