From: Richard Russon Date: Mon, 1 May 2017 03:37:18 +0000 (+0100) Subject: Drop another obsolete iconv check X-Git-Tag: neomutt-20170526~38^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec4dd65ebe339a948b01d72ac969a49762877e59;p=neomutt Drop another obsolete iconv check Don't check for a bug in 18 year-old packages --- diff --git a/configure.ac b/configure.ac index 449d5d25e..497bc83ba 100644 --- a/configure.ac +++ b/configure.ac @@ -1078,37 +1078,6 @@ if test "$am_cv_func_iconv" != yes; then AC_MSG_ERROR([An iconv implementation is required]) fi -dnl This is to detect implementations such as the one in glibc-2.1, -dnl which always convert exactly but return the number of characters -dnl converted instead of the number converted inexactly. -AC_CACHE_CHECK([whether iconv is non-transcribing], mutt_cv_iconv_nontrans, - mutt_save_LIBS="$LIBS" - LIBS="$LIBS $LIBICONV" - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include -#include -int main() -{ - iconv_t cd; - const char *ib; - char *ob; - size_t ibl, obl; - const char *s = "\304\211"; -changequote(, )dnl - char t[3]; -changequote([, ])dnl - ib = s, ibl = 2, ob = t, obl = 3; - return ((cd = iconv_open("UTF-8", "UTF-8")) == (iconv_t)(-1) || - iconv(cd, &ib, &ibl, &ob, &obl)); -} -]])],[mutt_cv_iconv_nontrans=no],[mutt_cv_iconv_nontrans=yes],[mutt_cv_iconv_nontrans=no]) - LIBS="$mutt_save_LIBS") -if test "$mutt_cv_iconv_nontrans" = yes; then - AC_DEFINE(ICONV_NONTRANS, 1) -else - AC_DEFINE(ICONV_NONTRANS, 0) -fi - AC_ARG_WITH(idn, AS_HELP_STRING([--with-idn=@<:@PFX@:>@],[Use GNU libidn for internationalized domain names]), [ if test "$with_idn" != "no"; then diff --git a/sendlib.c b/sendlib.c index c3d5ec33f..2635a6417 100644 --- a/sendlib.c +++ b/sendlib.c @@ -673,7 +673,7 @@ static size_t convert_file_to(FILE *file, const char *fromcode, int ncodes, ib = bufi; ob = bufu, obl = sizeof(bufu); n = iconv(cd1, ibl ? &ib : 0, &ibl, &ob, &obl); - assert(n == (size_t)(-1) || !n || ICONV_NONTRANS); + assert(n == (size_t)(-1) || !n); if (n == (size_t)(-1) && ((errno != EINVAL && errno != E2BIG) || ib == bufi)) { assert(errno == EILSEQ || (errno == EINVAL && ib == bufi && ibl < sizeof(bufi)));