From f7a29259ee46b1065ca3ba36f921fecfcbb6fdc6 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 15 Nov 2010 16:47:13 +0100 Subject: [PATCH] findmnt: follow HAVE_LANGINFO Signed-off-by: Karel Zak --- lib/tt.c | 5 +---- misc-utils/Makefile.am | 3 +++ misc-utils/findmnt.c | 3 --- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/tt.c b/lib/tt.c index d3436e10..a4aabfe0 100644 --- a/lib/tt.c +++ b/lib/tt.c @@ -15,9 +15,6 @@ #include #include #include -#ifdef HAVE_LANGINFO_H -#include -#endif #ifdef HAVE_SYS_IOCTL_H #include #endif @@ -138,7 +135,7 @@ struct tt *tt_new_table(int flags) INIT_LIST_HEAD(&tb->tb_lines); INIT_LIST_HEAD(&tb->tb_columns); -#if defined(HAVE_WIDECHAR) && defined(HAVE_LANGINFO_H) +#if defined(HAVE_WIDECHAR) if (!(flags & TT_FL_ASCII) && !strcmp(nl_langinfo(CODESET), "UTF-8")) tb->symbols = &utf8_tt_symbols; else diff --git a/misc-utils/Makefile.am b/misc-utils/Makefile.am index 6a16f999..794b8818 100644 --- a/misc-utils/Makefile.am +++ b/misc-utils/Makefile.am @@ -60,6 +60,9 @@ dist_man_MANS += findmnt.8 findmnt_LDADD = $(ul_libmount_la) findmnt_CFLAGS = $(AM_CFLAGS) -I$(ul_libmount_incdir) findmnt_SOURCES = findmnt.c $(top_srcdir)/lib/tt.c +if !HAVE_LANGINFO +findmnt_SOURCES += $(top_srcdir)/lib/langinfo.c +endif endif cal_SOURCES = cal.c $(top_srcdir)/lib/mbsalign.c diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c index b1fb90a4..0e3cc376 100644 --- a/misc-utils/findmnt.c +++ b/misc-utils/findmnt.c @@ -26,9 +26,6 @@ #include #include #include -#ifdef HAVE_LANGINFO_H -#include -#endif #ifdef HAVE_SYS_IOCTL_H #include #endif -- 2.39.5