aboutsummaryrefslogtreecommitdiff
path: root/gdb/charset.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2009-03-25 00:58:37 +0000
committerTom Tromey <tromey@redhat.com>2009-03-25 00:58:37 +0000
commitfc3b640d978b8b07680feb80a69ddd8c05ee69bd (patch)
tree92abfc36a7dcea9da711c8e3d4db835f08df9b0c /gdb/charset.c
parentb5fe7cfc58a3c8ea9be1aaedef6e441462340d10 (diff)
downloadgdb-fc3b640d978b8b07680feb80a69ddd8c05ee69bd.zip
gdb-fc3b640d978b8b07680feb80a69ddd8c05ee69bd.tar.gz
gdb-fc3b640d978b8b07680feb80a69ddd8c05ee69bd.tar.bz2
2009-03-24 Tom Tromey <tromey@redhat.com>
Pedro Alves <pedro@codesourcery.com> * configure, config.in: Rebuild. * configure.ac: Check for libiconvlist. * charset.c: Check HAVE_LIBICONVLIST. * acinclude.m4 (AM_ICONV): Don't subst LIBICONV, LIBICONV_INCLUDE, LIBICONV_LIBDIR. Update CPPFLAGS and LIBS. * Makefile.in (LIBICONV, LIBICONV_INCLUDE, LIBICONV_LIBDIR): Remove. (INTERNAL_CFLAGS_BASE): Update. (INTERNAL_LDFLAGS): Update. (CLIBS): Update.
Diffstat (limited to 'gdb/charset.c')
-rw-r--r--gdb/charset.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/charset.c b/gdb/charset.c
index 3c56613..14862e7 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -664,7 +664,13 @@ find_charset_names (void)
}
#else /* PHONY_ICONV */
-#ifdef HAVE_ICONVLIST
+
+/* Sometimes, libiconv redefines iconvlist as libiconvlist -- but
+ provides different symbols in the static and dynamic libraries.
+ So, configure may see libiconvlist but not iconvlist. But, calling
+ iconvlist is the right thing to do and will work. Hence we do a
+ check here but unconditionally call iconvlist below. */
+#if defined (HAVE_ICONVLIST) || defined (HAVE_LIBICONVLIST)
/* A helper function that adds some character sets to the vector of
all character sets. This is a callback function for iconvlist. */
@@ -723,7 +729,7 @@ find_charset_names (void)
VEC_safe_push (char_ptr, charsets, NULL);
}
-#endif /* HAVE_ICONVLIST */
+#endif /* HAVE_ICONVLIST || HAVE_LIBICONVLIST */
#endif /* PHONY_ICONV */
void