lib/tt: fix langinfo build break
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 <dave@gnu.org>
This commit is contained in:
parent
e8ae49476e
commit
97be4a37e3
2
lib/tt.c
2
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
|
||||
|
|
Loading…
Reference in New Issue