X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fcharset.c;h=14862e7ac1ed9a45338fcd823b4bbad8904396b0;hb=2bd7c093f663139ad9e57ddc748ade12f6bfbe01;hp=3c56613effa03309fd36c6d21fd50b2d640dd151;hpb=0dd7fb99eb2e120421bad8daec9c27b9b41869f4;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/charset.c b/gdb/charset.c index 3c56613eff..14862e7ac1 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