]> err.no Git - util-linux/commitdiff
findmnt: follow HAVE_LANGINFO
authorKarel Zak <kzak@redhat.com>
Mon, 15 Nov 2010 15:47:13 +0000 (16:47 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 15 Nov 2010 15:47:13 +0000 (16:47 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
lib/tt.c
misc-utils/Makefile.am
misc-utils/findmnt.c

index d3436e10b21c71293420bc1b057b95e8ccbd039a..a4aabfe0b26084f3d63cdcb7f83ed94f86d06ce3 100644 (file)
--- 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
index 6a16f9994ef3dbccb22d42245c7e8e4eb6bd574e..794b8818020b952811cdc0e5fa0750a9334ffb94 100644 (file)
@@ -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
index b1fb90a47fdcbd5fab25240f3423379354d8eb92..0e3cc3765755fd136a8529fcd8d95876c18ce3c8 100644 (file)
@@ -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