aboutsummaryrefslogtreecommitdiff
path: root/iconv/gconv_cache.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
commit0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch)
tree2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /iconv/gconv_cache.c
parent7d58530341304d403a6626d7f7a1913165fe2f32 (diff)
downloadglibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.bz2
2.5-18.1
Diffstat (limited to 'iconv/gconv_cache.c')
-rw-r--r--iconv/gconv_cache.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/iconv/gconv_cache.c b/iconv/gconv_cache.c
index 9b695c3..716c384 100644
--- a/iconv/gconv_cache.c
+++ b/iconv/gconv_cache.c
@@ -1,5 +1,5 @@
/* Cache handling for iconv modules.
- Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
@@ -209,7 +209,18 @@ find_module (const char *directory, const char *filename,
/* Call the init function. */
if (result->__init_fct != NULL)
- status = DL_CALL_FCT (result->__init_fct, (result));
+ {
+ __gconv_init_fct init_fct = result->__init_fct;
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (init_fct);
+#endif
+ status = DL_CALL_FCT (init_fct, (result));
+
+#ifdef PTR_MANGLE
+ if (result->__btowc_fct != NULL)
+ PTR_MANGLE (result->__btowc_fct);
+#endif
+ }
}
return status;
@@ -456,7 +467,7 @@ libc_freeres_fn (free_mem)
if (cache_malloced)
free (gconv_cache);
#ifdef _POSIX_MAPPED_FILES
- else
+ else if (gconv_cache != NULL)
__munmap (gconv_cache, cache_size);
#endif
}