]> granicus.if.org Git - neomutt/commitdiff
Drop another obsolete iconv check
authorRichard Russon <rich@flatcap.org>
Mon, 1 May 2017 03:37:18 +0000 (04:37 +0100)
committerRichard Russon <rich@flatcap.org>
Tue, 2 May 2017 16:34:44 +0000 (17:34 +0100)
Don't check for a bug in 18 year-old packages

configure.ac
sendlib.c

index 449d5d25e4b3d128aa2ea158ca4b1ac6dc813860..497bc83ba2e38519d03a4b712fcbf67a5306b366 100644 (file)
@@ -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 <iconv.h>
-#include <string.h>
-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
index c3d5ec33fa7515e757f0458e4f7ff460e1456e7d..2635a64173ed4dd7ee1d42b382d7b4092f0047e8 100644 (file)
--- 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)));