]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
text-utils: use proper paths to term.h
authorKarel Zak <kzak@redhat.com>
Tue, 30 May 2017 15:15:37 +0000 (17:15 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 30 May 2017 15:15:37 +0000 (17:15 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
term-utils/setterm.c
text-utils/more.c
text-utils/pg.c
text-utils/ul.c

index 8e969c2b3a16255688c5e3dc0cd2ef15e74c6e7b..53826f95409bd009593d375abeaf2b68911b4bd4 100644 (file)
 #include <termios.h>
 #include <unistd.h>
 
-#ifndef NCURSES_CONST
-# define NCURSES_CONST const   /* define before including term.h */
+#ifdef HAVE_TERM_H
+# include <term.h>
+#elif defined(HAVE_NCURSES_TERM_H)
+# include <ncurses/term.h>
+#elif defined(HAVE_NCURSESW_TERM_H)
+# include <ncursesw/term.h>
 #endif
-#ifdef HAVE_NCURSES_H
-# include <ncurses.h>
-#elif defined(HAVE_NCURSES_NCURSES_H)
-# include <ncurses/ncurses.h>
-#endif
-/* must include after ncurses.h */
-#include <term.h>
 
 #ifdef HAVE_LINUX_TIOCL_H
 # include <linux/tiocl.h>
index d4aba11e46a5f7f6a03fdd5b2e2477cf78a96491..cc53075f616d77ca2dbbf351218745cf082bae54 100644 (file)
@@ -190,7 +190,13 @@ static struct {
 } context, screen_start;
 extern char PC;                        /* pad character */
 
-#include <term.h>              /* include after <curses.h> */
+#ifdef HAVE_TERM_H
+# include <term.h>
+#elif defined(HAVE_NCURSES_TERM_H)
+# include <ncurses/term.h>
+#elif defined(HAVE_NCURSESW_TERM_H)
+#  include <ncursesw/term.h>
+#endif
 
 #define TERM_AUTO_RIGHT_MARGIN    "am"
 #define TERM_CEOL                 "xhp"
index b05ec3d70eb68532955490b54f7eed85b9cd3a04..bc485e2fe9ef0eee3a39dd8ec68c721ea9a1edf1 100644 (file)
 #include <signal.h>
 #include <setjmp.h>
 
-#ifdef HAVE_NCURSES_H
+#ifdef HAVE_NCURSESW_H
+# include <ncursesw.h>
+#elif defined(HAVE_NCURSES_H)
 # include <ncurses.h>
+#elif defined(HAVE_NCURSESW_NCURSES_H)
+# include <ncursesw/ncurses.h>
 #elif defined(HAVE_NCURSES_NCURSES_H)
 # include <ncurses/ncurses.h>
 #endif
 
-#include <term.h>
+#ifdef HAVE_TERM_H
+# include <term.h>
+#elif defined(HAVE_NCURSES_TERM_H)
+# include <ncurses/term.h>
+#elif defined(HAVE_NCURSESW_TERM_H)
+# include <ncursesw/term.h>
+#endif
 
 #include "nls.h"
 #include "xalloc.h"
index 178d5cb7fbb5ffe64c397a2679fee7eb9837ee1e..3d1518ceacc87efcee2e0ed3e11a82d372eb6347 100644 (file)
 #include <stdio.h>
 #include <unistd.h>            /* for getopt(), isatty() */
 #include <string.h>            /* for memset(), strcpy() */
-#include <term.h>              /* for setupterm() */
 #include <stdlib.h>            /* for getenv() */
 #include <limits.h>            /* for INT_MAX */
 #include <signal.h>            /* for signal() */
 #include <errno.h>
 #include <getopt.h>
 
+#ifdef HAVE_TERM_H
+# include <term.h>
+#elif defined(HAVE_NCURSES_TERM_H)
+# include <ncurses/term.h>
+#elif defined(HAVE_NCURSESW_TERM_H)
+# include <ncursesw/term.h>
+#endif
+
 #include "nls.h"
 #include "xalloc.h"
 #include "widechar.h"