summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2014-01-30 21:08:36 +0000
committerbrooks <brooks@FreeBSD.org>2014-01-30 21:08:36 +0000
commitf1b43045b34f3a11eb2202d754836c300f3aee39 (patch)
tree274baf7c9ba25224bc6f2c68d144d98c43f7e4e8 /usr.bin
parent5c8ed84ec82e0c7c0f55d157363bd283c8b0f900 (diff)
downloadFreeBSD-src-f1b43045b34f3a11eb2202d754836c300f3aee39.zip
FreeBSD-src-f1b43045b34f3a11eb2202d754836c300f3aee39.tar.gz
Merge from CheriBSD:
commit c1acf022c533c5ae27e0cd556977eafe3f5959eb Author: Brooks Davis <brooks@one-eyed-alien.net> Date: Fri Jan 17 21:46:44 2014 +0000 Add an option WITHOUT_NCURSESW to suppress building and linking to libncursesw. While wide character support it useful we'd like to only need one ncurses library on embedded systems. MFC after: 4 weeks Sponsored by: DARPA, AFRL
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/systat/Makefile13
-rw-r--r--usr.bin/systat/main.c4
-rw-r--r--usr.bin/vi/Makefile2
3 files changed, 16 insertions, 3 deletions
diff --git a/usr.bin/systat/Makefile b/usr.bin/systat/Makefile
index 40d55cc..5773c36 100644
--- a/usr.bin/systat/Makefile
+++ b/usr.bin/systat/Makefile
@@ -16,7 +16,16 @@ CFLAGS+= -DINET6
WARNS?= 0
-DPADD= ${LIBNCURSESW} ${LIBM} ${LIBDEVSTAT} ${LIBKVM}
-LDADD= -lncursesw -lm -ldevstat -lkvm
+DPADD= ${LIBM} ${LIBDEVSTAT} ${LIBKVM}
+LDADD= -lm -ldevstat -lkvm
+
+.if ${MK_NCURSESW} == "no"
+DPADD+= ${LIBNCURSES}
+LDADD+= -lncurses
+.else
+CFLAGS+= -DUSE_WIDECHAR
+DPADD+= ${LIBNCURSESW}
+LDADD+= -lncursesw
+.endif
.include <bsd.prog.mk>
diff --git a/usr.bin/systat/main.c b/usr.bin/systat/main.c
index 1aed28a..8417811 100644
--- a/usr.bin/systat/main.c
+++ b/usr.bin/systat/main.c
@@ -84,7 +84,11 @@ main(int argc, char **argv)
size_t size;
double t;
+#ifdef USE_WIDECHAR
(void) setlocale(LC_ALL, "");
+#else
+ (void) setlocale(LC_TIME, "");
+#endif
argc--, argv++;
while (argc > 0) {
diff --git a/usr.bin/vi/Makefile b/usr.bin/vi/Makefile
index 033c472..445d79f 100644
--- a/usr.bin/vi/Makefile
+++ b/usr.bin/vi/Makefile
@@ -36,7 +36,7 @@ CFLAGS+=-I${.CURDIR} -I${SRCDIR} -I${SRCDIR}/regex
DPADD= ${LIBUTIL}
LDADD= -lutil
-.if defined(RESCUE) || defined(RELEASE_CRUNCH)
+.if defined(RESCUE) || defined(RELEASE_CRUNCH) || ${MK_NCURSESW} == "no"
DPADD+= ${LIBNCURSES}
LDADD+= -lncurses
.else
OpenPOWER on IntegriCloud