* test-striconveh fail to build without libiconv
@ 2019-07-09 5:27 Tom G. Christensen
2019-07-09 6:50 ` Bruno Haible
0 siblings, 1 reply; 2+ messages in thread
From: Tom G. Christensen @ 2019-07-09 5:27 UTC (permalink / raw)
To: bug-gnulib
Hello,
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))
^
test-striconveh.c:1113:7: note: each undeclared identifier is reported
only once for each function it appears in
test-striconveh.c:1113:29: error: 'iconv_t' undeclared (first use in
this function)
if (cd_ascii_to_88591 != (iconv_t)(-1))
^
test-striconveh.c:1114:5: warning: implicit declaration of function
'iconv_close' [-Wimplicit-function-declaration]
iconv_close (cd_ascii_to_88591);
^
test-striconveh.c:1115:16: error: 'cd_ascii_to_utf8' undeclared (first
use in this function)
iconv_close (cd_ascii_to_utf8);
^
test-striconveh.c:1116:7: error: 'cd_utf7_to_utf8' undeclared (first use
in this function)
if (cd_utf7_to_utf8 != (iconv_t)(-1))
^
make[4]: *** [test-striconveh.o] Error 1
-tgc
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: test-striconveh fail to build without libiconv
2019-07-09 5:27 test-striconveh fail to build without libiconv Tom G. Christensen
@ 2019-07-09 6:50 ` Bruno Haible
0 siblings, 0 replies; 2+ messages in thread
From: Bruno Haible @ 2019-07-09 6:50 UTC (permalink / raw)
To: bug-gnulib
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 <bruno@clisp.org>
striconveh test: Fix a compilation failure when iconv is not available.
Reported by Tom G. Christensen <tgc@jupiterrise.com>.
* 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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-09 6:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-09 5:27 test-striconveh fail to build without libiconv Tom G. Christensen
2019-07-09 6:50 ` Bruno Haible
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).