summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2008-04-16 23:12:40 +0200
committerKarel Zak2008-04-16 23:12:40 +0200
commit310170b83b7e0263286f3c6c2787d20ae96aea17 (patch)
treee7d5205199005e813561585a565fa79d0b080b8c
parentmore: use HAVE_WIDECHAR instead ENABLE_WIDECHAR (diff)
downloadkernel-qcow2-util-linux-310170b83b7e0263286f3c6c2787d20ae96aea17.tar.gz
kernel-qcow2-util-linux-310170b83b7e0263286f3c6c2787d20ae96aea17.tar.xz
kernel-qcow2-util-linux-310170b83b7e0263286f3c6c2787d20ae96aea17.zip
cal: use HAVE_LIB{NCURSES,NCURSESW} instead HAVE_NCURSES
The HAVE_NCURSES is obsolete macro. The autotool generates HAVE_LIBxxx macros. Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--misc-utils/cal.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc-utils/cal.c b/misc-utils/cal.c
index ec6abf493..82603b1b0 100644
--- a/misc-utils/cal.c
+++ b/misc-utils/cal.c
@@ -66,7 +66,7 @@
#include <err.h>
#include "nls.h"
-#if defined(HAVE_NCURSES)
+#if defined(HAVE_LIBNCURSES) || defined(HAVE_LIBNCURSESW)
#ifdef HAVE_NCURSES_H
#include <ncurses.h>
@@ -122,7 +122,7 @@ my_tgetstr(char *s, char *ss) {
return ret;
}
-#else /* ! (HAVE_LIBTERMCAP || HAVE_NCURSES) */
+#else /* ! (HAVE_LIBTERMCAP || HAVE_LIBNCURSES || HAVE_LIBNCURSESW) */
static void
my_putstring(char *s) {
@@ -273,7 +273,7 @@ main(int argc, char **argv) {
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
-#if defined(HAVE_NCURSES) || defined(HAVE_LIBTERMCAP)
+#if defined(HAVE_LIBNCURSES) || defined(HAVE_LIBNCURSESW) || defined(HAVE_LIBTERMCAP)
if ((term = getenv("TERM"))) {
int ret;
my_setupterm(term, 1, &ret);
@@ -516,7 +516,7 @@ monthly3(int day, int month, int year) {
int w1, w2, w3;
w1 = w2 = w3 = width;
-#if defined(HAVE_NCURSES) || defined(HAVE_LIBTERMCAP)
+#if defined(HAVE_LIBNCURSES) || defined(HAVE_LIBNCURSESW) || defined(HAVE_LIBTERMCAP)
/* adjust width to allow for non printable characters */
w1 += (out_prev.s[i] == Hrow ? Slen : 0);
w2 += (out_curm.s[i] == Hrow ? Slen : 0);