summary refs log tree commit diff
path: root/iconv/gconv_dl.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/gconv_dl.c
parent477aa8698f7963b0984c15016f62f99efe4bb0b5 (diff)
downloadglibc-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 'iconv/gconv_dl.c')
-rw-r--r--iconv/gconv_dl.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/iconv/gconv_dl.c b/iconv/gconv_dl.c
index 9504017210..8217b7e553 100644
--- a/iconv/gconv_dl.c
+++ b/iconv/gconv_dl.c
@@ -1,5 +1,5 @@
 /* Handle loading/unloading of shared object for transformation.
-   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
+   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -29,6 +29,7 @@
 #include <sys/param.h>
 
 #include <gconv_int.h>
+#include <sysdep.h>
 
 
 #ifdef DEBUG
@@ -130,6 +131,14 @@ __gconv_find_shlib (const char *name)
 		  found->init_fct = __libc_dlsym (found->handle, "gconv_init");
 		  found->end_fct = __libc_dlsym (found->handle, "gconv_end");
 
+#ifdef PTR_MANGLE
+		  PTR_MANGLE (found->fct);
+		  if (found->init_fct != NULL)
+		    PTR_MANGLE (found->init_fct);
+		  if (found->end_fct !=  NULL)
+		    PTR_MANGLE (found->end_fct);
+#endif
+
 		  /* We have succeeded in loading the shared object.  */
 		  found->counter = 1;
 		}