Added autoconf check to detect and use the iconvctl if available, closing.
Looking into adding a check for iconvctl and using it when available.
The documentation of iconvctl() that I found says it is only supported by GNU libiconv. Does OpenBSD use GNU's libiconv or is the documentation outdated?
Hm, can't I attach files? Well, here is the patch:
--- src/Util.cc.orig Sat Sep 12 02:36:42 2009 +++ src/Util.cc Sat Sep 12 02:40:25 2009 @@ -432,6 +432,10 @@
do_iconv (iconv_t ic, const char **inp, size_t *in_bytes,
char **outp, size_t *out_bytes)
{
+ int one = 1; + + iconvctl(ic, ICONV_SET_DISCARD_ILSEQ, &one); +
#ifdef ICONV_CONST
return iconv(ic, inp, in_bytes, outp, out_bytes);
#else // !ICONV_CONST