[PATCH 2/4] findmnt: follow HAVE_LANGINFO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Karel Zak <kzak@xxxxxxxxxx>
---
 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 d3436e1..a4aabfe 100644
--- a/lib/tt.c
+++ b/lib/tt.c
@@ -15,9 +15,6 @@
 #include <unistd.h>
 #include <string.h>
 #include <termios.h>
-#ifdef HAVE_LANGINFO_H
-#include <langinfo.h>
-#endif
 #ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
 #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 6a16f99..794b881 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 b1fb90a..0e3cc37 100644
--- a/misc-utils/findmnt.c
+++ b/misc-utils/findmnt.c
@@ -26,9 +26,6 @@
 #include <getopt.h>
 #include <string.h>
 #include <termios.h>
-#ifdef HAVE_LANGINFO_H
-#include <langinfo.h>
-#endif
 #ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
 #endif
-- 
1.7.3.1

--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux