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:
Davidlohr Bueso 2010-11-15 08:55:16 -03:00 committed by Karel Zak
parent e8ae49476e
commit 97be4a37e3
1 changed files with 1 additions and 1 deletions

View File

@ -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