From 97be4a37e327108e2d95ca832e71f6eda1e2d908 Mon Sep 17 00:00:00 2001 From: Davidlohr Bueso Date: Mon, 15 Nov 2010 08:55:16 -0300 Subject: [PATCH] lib/tt: fix langinfo build break MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When HAVE_LANGINFO_H is not defined we break the compilation in tt.c: CC tt.o tt.c: In function ‘tt_new_table’: tt.c:142: warning: implicit declaration of function ‘nl_langinfo’ tt.c:142: error: ‘CODESET’ undeclared (first use in this function) tt.c:142: error: (Each undeclared identifier is reported only once tt.c:142: error: for each function it appears in.) make: *** [tt.o] Error 1 Signed-off-by: Davidlohr Bueso --- lib/tt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tt.c b/lib/tt.c index 7d87bf54e..d3436e10b 100644 --- a/lib/tt.c +++ b/lib/tt.c @@ -138,7 +138,7 @@ struct tt *tt_new_table(int flags) INIT_LIST_HEAD(&tb->tb_lines); INIT_LIST_HEAD(&tb->tb_columns); -#ifdef HAVE_WIDECHAR +#if defined(HAVE_WIDECHAR) && defined(HAVE_LANGINFO_H) if (!(flags & TT_FL_ASCII) && !strcmp(nl_langinfo(CODESET), "UTF-8")) tb->symbols = &utf8_tt_symbols; else