]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
more: don't include ncurses.h, fix for non-widechar
authorKarel Zak <kzak@redhat.com>
Fri, 3 Jun 2016 12:51:01 +0000 (14:51 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 3 Jun 2016 12:51:01 +0000 (14:51 +0200)
It seems our crazy widechar.h is in conflict with ncurses, but it
seems that nothing in more.c requires anything from ncurses. All we
need is probably <term.h>.

Signed-off-by: Karel Zak <kzak@redhat.com>
text-utils/more.c

index 0a5f4942ca274bde6c3125a410e271e3cad7f375..21e0cbc702ac1d01e0c326706c73f46bd1faeb58 100644 (file)
@@ -190,11 +190,6 @@ struct {
 } context, screen_start;
 extern char PC;                        /* pad character */
 
-#ifdef HAVE_NCURSES_H
-# include <ncurses.h>
-#elif defined(HAVE_NCURSES_NCURSES_H)
-# include <ncurses/ncurses.h>
-#endif
 #include <term.h>              /* include after <curses.h> */
 
 #define TERM_AUTO_RIGHT_MARGIN    "am"
@@ -1007,6 +1002,7 @@ void clreos(void)
 }
 
 
+#ifdef HAVE_WIDECHAR
 static UL_ASAN_BLACKLIST size_t xmbrtowc(wchar_t *wc, const char *s, size_t n,
                                  mbstate_t *mbstate)
 {
@@ -1015,6 +1011,7 @@ static UL_ASAN_BLACKLIST size_t xmbrtowc(wchar_t *wc, const char *s, size_t n,
                return 1;
        return mblength;
 }
+#endif
 
 /* Print a buffer of n characters */
 void prbuf(register char *s, register int n)