[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: test-striconveh fail to build without libiconv
From: |
Bruno Haible |
Subject: |
Re: test-striconveh fail to build without libiconv |
Date: |
Tue, 09 Jul 2019 08:50:08 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-151-generic; KDE/5.18.0; x86_64; ; ) |
Hi Tom,
> In 8c96eb80bd calls to iconv functions were added outside the HAVE_ICONV
> block.
>
> test-striconveh.c will fail to build if iconv is unavailable:
> test-striconveh.c: In function 'main':
> test-striconveh.c:1113:7: error: 'cd_ascii_to_88591' undeclared (first
> use in this function)
> if (cd_ascii_to_88591 != (iconv_t)(-1))
> ^
Thanks for the report. This patch should fix it.
2019-07-09 Bruno Haible <address@hidden>
striconveh test: Fix a compilation failure when iconv is not available.
Reported by Tom G. Christensen <address@hidden>.
* tests/test-striconveh.c (main): Move iconv_close invocations inside
HAVE_ICONV.
diff --git a/tests/test-striconveh.c b/tests/test-striconveh.c
index ed41884..c2fb8bb 100644
--- a/tests/test-striconveh.c
+++ b/tests/test-striconveh.c
@@ -1106,8 +1106,6 @@ main ()
free (result);
}
-#endif
-
/* -------------------------------- Done. -------------------------------- */
if (cd_ascii_to_88591 != (iconv_t)(-1))
@@ -1116,5 +1114,7 @@ main ()
if (cd_utf7_to_utf8 != (iconv_t)(-1))
iconv_close (cd_utf7_to_utf8);
+#endif
+
return 0;
}