summaryrefslogtreecommitdiff
path: root/iconv/skeleton.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-12-19 07:26:29 +0000
committerUlrich Drepper <drepper@redhat.com>2005-12-19 07:26:29 +0000
commit915a6c51c5d8127e87ef797ee23e04e4f92b4c4f (patch)
tree4c7f9881c4b6b3ab049688dc22e969c44e8fbcf9 /iconv/skeleton.c
parent477aa8698f7963b0984c15016f62f99efe4bb0b5 (diff)
* 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 'iconv/skeleton.c')
-rw-r--r--iconv/skeleton.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/iconv/skeleton.c b/iconv/skeleton.c
index c74935693f..baace6b3fb 100644
--- a/iconv/skeleton.c
+++ b/iconv/skeleton.c
@@ -144,6 +144,8 @@
# include <dlfcn.h>
#endif
+#include <sysdep.h>
+
#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