about summary refs log tree commit diff
path: root/iconv/iconv_prog.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-08-04 23:32:14 +0000
committerUlrich Drepper <drepper@redhat.com>2002-08-04 23:32:14 +0000
commit230491f02c51bcc0e195491703e3d48ca8778743 (patch)
tree9e7f87ddf324867b3e07c089916ed0029056b920 /iconv/iconv_prog.c
parent3ba06713f8c2c40f3bf0cc9431352ba873701dcd (diff)
downloadglibc-230491f02c51bcc0e195491703e3d48ca8778743.tar.gz
glibc-230491f02c51bcc0e195491703e3d48ca8778743.tar.xz
glibc-230491f02c51bcc0e195491703e3d48ca8778743.zip
Update.
2002-08-04  Ulrich Drepper  <drepper@redhat.com>

	* stdio-common/psignal.c: Declare _sys_siglist_internal.  Use USEINT
	to access _sys_siglist.
	* string/strsignal.c: Likewise.
	* sysdeps/generic/siglist.c: Add _sys_siglist_internal alias.
	* sysdeps/gnu/siglist.c: Likewise.
	* sysdeps/unix/siglist.c: Likewise.
	* sysdeps/unix/sysv/linux/arm/siglist.c: Likewise.

	* libio/fileops.c: Add missing INTUSEs for _IO_file_jumps.

	* libio/wfileops.c: Add missing INTUSE for _IO_file_close.

	* intl/dcigettext.c: Define _nl_default_dirname_internal as hidden
	alias and use it.
	* intl/bindtextdom.c: Use _nl_default_dirname_internal.

	* include/netinet/in.h: Add declaration of in6addr_loopback_internal.
	* inet/in6_addr.c: Add INTVARDEF for in6addr_loopback.
	* sysdeps/posix/getaddrinfo.c: Use INTUSE for in6addr_loopback access.

	* include/time.h: Add libc_hidden_proto for __gmtime_r.
	* time/gmtime.c (__gmtime_r): Add libc_hidden_def.

	* iconv/Versions: Replace __gconv_alias_db, __gconv_modules_db,
	and __gconv_cache with __gconv_get_alias_db, __gconv_get_modules_db,
	and __gconv_get_cache respectively.
	* iconv/gconv_cache.c (gconv_cache): Renamed for __gconv_cache and
	defined static.  Change all users.
	(__gconv_get_cache): New function.
	* iconv/gconv_db.c (__gconv_get_modules_db): New function.
	(__gconv_get_alias_db): New function.
	* iconv/gconv_int.h (__gconv_alias_db): Declare as hidden.
	(__conv_modules_db): Likewise.
	Add prototypes for __gconv_get_cache, __gconv_get_modules_db,
	and __gconv_get_alias_db.
	* iconv/iconv_prog.c: Use the new functions instead of accessing the
	variables.

	* include/stdlib.h: Add prototype and libc_hidden_proto for
	__default_morecore.
	* sysdeps/generic/morecore.c: Include <stdlib.h>.

	* malloc/obstack.c: Remove fputs macro.

	* malloc/mtrace.c: Remove fopen macro.
Diffstat (limited to 'iconv/iconv_prog.c')
-rw-r--r--iconv/iconv_prog.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c
index f7aa340321..8a8535bf50 100644
--- a/iconv/iconv_prog.c
+++ b/iconv/iconv_prog.c
@@ -47,9 +47,6 @@
 #define PACKAGE _libc_intl_domainname
 
 
-/* Defined in gconv_cache.c.  */
-extern void *__gconv_cache;
-
 /* Name and version of program.  */
 static void print_version (FILE *stream, struct argp_state *state);
 void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
@@ -668,10 +665,9 @@ insert_cache (void)
   const struct hash_entry *hashtab;
   size_t cnt;
 
-  header = (const struct gconvcache_header *) __gconv_cache;
-  strtab = (char *) __gconv_cache + header->string_offset;
-  hashtab = (struct hash_entry *) ((char *) __gconv_cache
-				   + header->hash_offset);
+  header = (const struct gconvcache_header *) __gconv_get_cache ();
+  strtab = (char *) header + header->string_offset;
+  hashtab = (struct hash_entry *) ((char *) header + header->hash_offset);
 
   for (cnt = 0; cnt < header->hash_size; ++cnt)
     if (hashtab[cnt].string_offset != 0)
@@ -689,24 +685,29 @@ internal_function
 print_known_names (void)
 {
   iconv_t h;
+  void *cache;
 
   /* We must initialize the internal databases first.  */
   h = iconv_open ("L1", "L1");
   iconv_close (h);
 
   /* See whether we have a cache.  */
-  if (__gconv_cache != NULL)
+  cache = __gconv_get_cache ();
+  if (cache != NULL)
     /* Yep, use only this information.  */
     insert_cache ();
   else
     {
+      struct gconv_module *modules;
+
       /* No, then use the information read from the gconv-modules file.
 	 First add the aliases.  */
-      twalk (__gconv_alias_db, insert_print_list);
+      twalk (__gconv_get_alias_db (), insert_print_list);
 
       /* Add the from- and to-names from the known modules.  */
-      if (__gconv_modules_db != NULL)
-	add_known_names (__gconv_modules_db);
+      modules = __gconv_get_modules_db ();
+      if (modules != NULL)
+	add_known_names (modules);
     }
 
   fputs (_("\