Replace all uses of libncurses and libtermcap with their wide character

variants.  This allows usable file system images (i.e. those with both a
shell and an editor) to be created with only one copy of the curses library.

Exp-run:	antoine
PR:		189842
Discussed with:	bapt
Sponsored by:	DARPA, AFRL
This commit is contained in:
Brooks Davis 2014-07-17 18:24:34 +00:00
parent 53cc33f6f6
commit 80189b3b09
41 changed files with 81 additions and 85 deletions

View File

@ -40,8 +40,8 @@ MLINKS= csh.1 tcsh.1
# utilities of the same name are handled with the associated manpage,
# builtin.1 in share/man/man1/.
DPADD= ${LIBTERMCAP} ${LIBCRYPT}
LDADD= -ltermcap -lcrypt
DPADD= ${LIBTERMCAPW} ${LIBCRYPT}
LDADD= -ltermcapw -lcrypt
LINKS= ${BINDIR}/csh ${BINDIR}/tcsh

View File

@ -11,8 +11,8 @@ LDADD= -lutil
.if !defined(RELEASE_CRUNCH) && \
${MK_LS_COLORS} != no
CFLAGS+= -DCOLORLS
DPADD+= ${LIBTERMCAP}
LDADD+= -ltermcap
DPADD+= ${LIBTERMCAPW}
LDADD+= -ltermcapw
.endif
.include <bsd.prog.mk>

View File

@ -18,8 +18,8 @@ SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}
# utilities of the same name are handled with the associated manpage,
# builtin.1 in share/man/man1/.
DPADD= ${LIBEDIT} ${LIBTERMCAP}
LDADD= -ledit -ltermcap
DPADD= ${LIBEDIT} ${LIBTERMCAPW}
LDADD= -ledit -ltermcapw
CFLAGS+=-DSHELL -I. -I${.CURDIR}
# for debug:

View File

@ -2,7 +2,7 @@
PROG= grdc
MAN= grdc.6
DPADD= ${LIBNCURSES}
LDADD= -lncurses
DPADD= ${LIBNCURSESW}
LDADD= -lncursesw
.include <bsd.prog.mk>

View File

@ -23,7 +23,7 @@ ${.OBJDIR}/${_h}: ${SRCDIR}/${_h}
${INSTALL} ${.ALLSRC} ${.TARGET}
.endfor
DPADD= ${LIBTERMCAP}
LDADD= -ltermcap
DPADD= ${LIBTERMCAPW}
LDADD= -ltermcapw
.include <bsd.lib.mk>

View File

@ -11,8 +11,8 @@ GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a
# global symbols visible.
LDFLAGS+= -Wl,-E
DPADD= ${GDBLIBS} ${BULIBS} ${LIBM} ${LIBREADLINE} ${LIBTERMCAP} ${LIBGNUREGEX}
LDADD= ${GDBLIBS} ${BULIBS} -lm ${LIBREADLINE} -ltermcap -lgnuregex
DPADD= ${GDBLIBS} ${BULIBS} ${LIBM} ${LIBREADLINE} ${LIBTERMCAPW} ${LIBGNUREGEX}
LDADD= ${GDBLIBS} ${BULIBS} -lm ${LIBREADLINE} -ltermcapw -lgnuregex
NO_PIE= yes

View File

@ -12,8 +12,8 @@ GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a
# global symbols visible.
LDFLAGS+= -Wl,-E
DPADD= ${GDBLIBS} ${BULIBS} ${LIBM} ${LIBREADLINE} ${LIBTERMCAP} ${LIBGNUREGEX}
LDADD= ${GDBLIBS} ${BULIBS} -lm ${LIBREADLINE} -ltermcap -lgnuregex
DPADD= ${GDBLIBS} ${BULIBS} ${LIBM} ${LIBREADLINE} ${LIBTERMCAPW} ${LIBGNUREGEX}
LDADD= ${GDBLIBS} ${BULIBS} -lm ${LIBREADLINE} -ltermcapw -lgnuregex
NO_PIE= yes

View File

@ -8,9 +8,9 @@ BULIBS= ${OBJ_BU}/libbfd/libbfd.a ${OBJ_BU}/libopcodes/libopcodes.a \
${OBJ_BU}/libiberty/libiberty.a
GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a
DPADD= ${GDBLIBS} ${BULIBS} ${LIBKVM} ${LIBM} ${LIBREADLINE} ${LIBTERMCAP} \
DPADD= ${GDBLIBS} ${BULIBS} ${LIBKVM} ${LIBM} ${LIBREADLINE} ${LIBTERMCAPW} \
${LIBGNUREGEX}
LDADD= ${GDBLIBS} ${BULIBS} -lkvm${GDB_SUFFIX} -lm ${LIBREADLINE} -ltermcap \
LDADD= ${GDBLIBS} ${BULIBS} -lkvm${GDB_SUFFIX} -lm ${LIBREADLINE} -ltermcapw \
-lgnuregex
.if defined(GDB_CROSS_DEBUGGER)

View File

@ -10,8 +10,8 @@ SRCS= dir.c display.c doc.c dribble.c echo-area.c filesys.c \
CFLAGS+= -DINFODIR=\"${INFODIR}:/usr/local/info:.\"
DPADD= ${LIBTERMCAP} ${LIBTXI}
LDADD= -ltermcap ${LIBTXI}
DPADD= ${LIBTERMCAPW} ${LIBTXI}
LDADD= -ltermcapw ${LIBTXI}
NO_PIE= yes

View File

@ -29,11 +29,11 @@ CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/roken \
DPADD= ${LIBKADM5CLNT} ${LIBKADM5SRV} ${LIBHDB} ${LIBKRB5} ${LIBHX509} \
${LIBSL} ${LIBROKEN} ${LIBVERS} ${LIBASN1} \
${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} \
${LIBEDIT} ${LIBNCURSES} ${LDAPDPADD}
${LIBEDIT} ${LIBNCURSESW} ${LDAPDPADD}
LDADD= -lkadm5clnt -lkadm5srv -lhdb -lkrb5 -lhx509 \
${LIBSL} -lroken ${LIBVERS} -lasn1 \
-lcrypto -lcrypt -lcom_err \
-ledit -lncurses ${LDAPLDADD}
-ledit -lncursesw ${LDAPLDADD}
LDFLAGS=${LDAPLDFLAGS}
NO_PIE= yes

View File

@ -10,8 +10,8 @@ OSRCS= chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c \
hist.c key.c map.c \
parse.c prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c
DPADD= ${LIBNCURSES}
LDADD= -lncurses
DPADD= ${LIBNCURSESW}
LDADD= -lncursesw
MAN= editline.3 editrc.5

View File

@ -30,8 +30,8 @@ CFLAGS+= -I${TELNETDIR}
LIBTELNET= ${.OBJDIR}/../../lib/libtelnet/libtelnet.a
DPADD= ${LIBUTIL} ${LIBTERMCAP} ${LIBTELNET}
LDADD= -lutil -ltermcap ${LIBTELNET}
DPADD= ${LIBUTIL} ${LIBTERMCAPW} ${LIBTELNET}
LDADD= -lutil -ltermcapw ${LIBTELNET}
.if ${MK_OPENSSL} != "no"
SRCS+= authenc.c

View File

@ -52,7 +52,7 @@ CRUNCH_SRCDIRS+= bin
CRUNCH_PROGS_bin= cat chflags chio chmod cp date dd df echo \
ed expr getfacl hostname kenv kill ln ls mkdir mv \
pkill ps pwd realpath rm rmdir setfacl sh stty sync test
CRUNCH_LIBS+= -lcrypt -ledit -ljail -lkvm -ll -ltermcap -lutil
CRUNCH_LIBS+= -lcrypt -ledit -ljail -lkvm -ll -ltermcapw -lutil
CRUNCH_BUILDTOOLS+= bin/sh
# Additional options for specific programs
@ -118,7 +118,7 @@ CRUNCH_PROGS_sbin+= zpool
# crunchgen does not like C++ programs; this should be fixed someday
# CRUNCH_PROGS+= devd
CRUNCH_LIBS+= -lalias -lcam -lcurses -ldevstat -lipsec
CRUNCH_LIBS+= -lalias -lcam -lncursesw -ldevstat -lipsec
.if ${MK_ZFS} != "no"
CRUNCH_LIBS+= -lavl -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem
.endif

View File

@ -9,8 +9,8 @@ SRCS= fsdb.c fsdbutil.c \
pass5.c setup.c utilities.c ffs_subr.c ffs_tables.c globs.c
CFLAGS+= -I${.CURDIR}/../fsck_ffs
WARNS?= 2
LDADD= -ledit -ltermcap
DPADD= ${LIBEDIT} ${LIBTERMCAP}
LDADD= -ledit -ltermcapw
DPADD= ${LIBEDIT} ${LIBTERMCAPW}
.PATH: ${.CURDIR}/../fsck_ffs ${.CURDIR}/../../sys/ufs/ffs
.include <bsd.prog.mk>

View File

@ -7,8 +7,8 @@ MAN= gvinum.8
WARNS?= 2
CFLAGS+= -I${.CURDIR}/../../sys -I${DESTDIR}/${INCLUDEDIR}/edit
DPADD= ${LIBEDIT} ${LIBTERMCAP} ${LIBDEVSTAT} ${LIBKVM} ${LIBGEOM}
LDADD= -ledit -ltermcap -ldevstat -lkvm -lgeom
DPADD= ${LIBEDIT} ${LIBTERMCAPW} ${LIBDEVSTAT} ${LIBKVM} ${LIBGEOM}
LDADD= -ledit -ltermcapw -ldevstat -lkvm -lgeom
.PATH: ${.CURDIR}/../../sys/geom/vinum

View File

@ -11,8 +11,8 @@ CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
SRCS+= roaming_dummy.c
.endif
DPADD= ${LIBSSH} ${LIBEDIT} ${LIBNCURSES}
LDADD= -lssh -ledit -lncurses
DPADD= ${LIBSSH} ${LIBEDIT} ${LIBNCURSESW}
LDADD= -lssh -ledit -lncursesw
USEPRIVATELIB= ssh
.if ${MK_LDNS} != "no"

View File

@ -57,7 +57,7 @@ CRUNCH_SRCDIRS+= bin
# statically - and that ends very badly.
CRUNCH_SHLIBS+= -lc -lutil -lcrypt
CRUNCH_LIBS+= -lkvm -lmemstat -lnetgraph
CRUNCH_LIBS+= -lcrypt -ledit -ll -ltermcap
CRUNCH_LIBS+= -lcrypt -ledit -ll -ltermcapw
###################################################################
# Programs from standard /sbin
@ -70,7 +70,7 @@ CRUNCH_LIBS+= -lcrypt -ledit -ll -ltermcap
#
CRUNCH_SRCDIRS+= sbin
CRUNCH_LIBS+= -lalias -lcam -lcurses -ldevstat -lipsec
CRUNCH_LIBS+= -lalias -lcam -lcursesw -ldevstat -lipsec
# Don't forget this - ifconfig, etc -adrian
CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lsbuf -lufs

View File

@ -2,8 +2,8 @@
PROG= stumbler
BINDIR= /usr/local/bin
DPADD= ${LIBPCAP} ${LIBNCURSES}
LDADD= -lpcap -lncurses
DPADD= ${LIBPCAP} ${LIBNCURSESW}
LDADD= -lpcap -lncursesw
CFLAGS=-g
MAN=

View File

@ -11,8 +11,8 @@ DPADD+= ${.OBJDIR}/../../../lib/clang/lib${lib}/lib${lib}.a
LDADD+= ${.OBJDIR}/../../../lib/clang/lib${lib}/lib${lib}.a
.endfor
DPADD+= ${LIBNCURSES}
LDADD+= -lncurses
DPADD+= ${LIBNCURSESW}
LDADD+= -lncursesw
BINDIR?= /usr/bin

View File

@ -8,8 +8,8 @@ CFLAGS+= -DHAS_NCURSES -DHAS_UNISTD -DHAS_STDARG -DHAS_STDLIB \
PROG= ee
LINKS= ${BINDIR}/ee ${BINDIR}/ree ${BINDIR}/ee ${BINDIR}/edit
MLINKS= ee.1 ree.1 ee.1 edit.1
DPADD= ${LIBNCURSES}
LDADD= -lncurses
DPADD= ${LIBNCURSESW}
LDADD= -lncursesw
WARNS?= 2

View File

@ -20,8 +20,8 @@ CFLAGS+= -DINET6
.endif
CFLAGS+= -I${.CURDIR} -I${TNFTP}
LDADD= -ledit -ltermcap -lutil
DPADD= ${LIBEDIT} ${LIBTERMCAP} ${LIBUTIL}
LDADD= -ledit -ltermcapw -lutil
DPADD= ${LIBEDIT} ${LIBTERMCAPW} ${LIBUTIL}
WARNS?= 2

View File

@ -8,8 +8,8 @@ SRCS= main.c screen.c brac.c ch.c charset.c cmdbuf.c command.c cvt.c \
signal.c tags.c ttyin.c version.c
SCRIPTS=lesspipe.sh zless.sh
SCRIPTSNAME_lesspipe.sh=lesspipe.sh
DPADD= ${LIBTERMCAP}
LDADD= -ltermcap
DPADD= ${LIBTERMCAPW}
LDADD= -ltermcapw
LINKS= ${BINDIR}/less ${BINDIR}/more \
${BINDIR}/zless ${BINDIR}/bzless \
${BINDIR}/zless ${BINDIR}/xzless \

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PROG= msgs
DPADD= ${LIBTERMCAP}
LDADD= -ltermcap
DPADD= ${LIBTERMCAPW}
LDADD= -ltermcapw
.include <bsd.prog.mk>

View File

@ -4,8 +4,8 @@
PROG= ncal
DPADD= ${LIBCALENDAR} ${LIBTERMCAP}
LDADD= -lcalendar -ltermcap
DPADD= ${LIBCALENDAR} ${LIBTERMCAPW}
LDADD= -lcalendar -ltermcapw
LINKS= ${BINDIR}/ncal ${BINDIR}/cal
MLINKS= ncal.1 cal.1

View File

@ -1,7 +1,7 @@
# $FreeBSD$
PROG= tabs
DPADD= ${LIBTERMCAP}
LDADD= -ltermcap
DPADD= ${LIBTERMCAPW}
LDADD= -ltermcapw
.include <bsd.prog.mk>

View File

@ -23,8 +23,8 @@ WARNS?= 2
LIBTELNET= ${.OBJDIR}/../../lib/libtelnet/libtelnet.a
DPADD= ${LIBTERMCAP} ${LIBTELNET}
LDADD= -ltermcap ${LIBTELNET}
DPADD= ${LIBTERMCAPW} ${LIBTELNET}
LDADD= -ltermcapw ${LIBTELNET}
.if !defined(RELEASE_CRUNCH)
CFLAGS+= -DIPSEC

View File

@ -7,7 +7,7 @@ PROG= tftp
SRCS= main.c tftp-file.c tftp-io.c tftp-options.c tftp-transfer.c
SRCS+= tftp-utils.c tftp.c
CFLAGS+=-I${.CURDIR}/../../libexec/tftpd
DPADD= ${LIBEDIT} ${LIBTERMCAP}
LDADD= -ledit -ltermcap
DPADD= ${LIBEDIT} ${LIBTERMCAPW}
LDADD= -ledit -ltermcapw
.include <bsd.prog.mk>

View File

@ -2,8 +2,8 @@
# $FreeBSD$
PROG= tput
DPADD= ${LIBTERMCAP}
LDADD= -ltermcap
DPADD= ${LIBTERMCAPW}
LDADD= -ltermcapw
SCRIPTS=clear.sh
MLINKS= tput.1 clear.1

View File

@ -1,10 +1,11 @@
# @(#)Makefile 8.1 (Berkeley) 6/9/93
# $FreeBSD$
PROG= tset
SRCS= map.c misc.c set.c term.c tset.c wrterm.c
DPADD= ${LIBTERMCAP}
LDADD= -ltermcap
DPADD= ${LIBTERMCAPW}
LDADD= -ltermcapw
LINKS= ${BINDIR}/tset ${BINDIR}/reset
MLINKS= tset.1 reset.1

View File

@ -3,7 +3,7 @@
PROG= ul
DPADD= ${LIBTERMCAP}
LDADD= -ltermcap
DPADD= ${LIBTERMCAPW}
LDADD= -ltermcapw
.include <bsd.prog.mk>

View File

@ -6,8 +6,8 @@ PROG= units
FILES= units.lib
FILESDIR= ${SHAREDIR}/misc
LDADD+=-ledit -ltermcap
DPADD+=${LIBEDIT} ${LIBTERMCAP}
LDADD+=-ledit -ltermcapw
DPADD+=${LIBEDIT} ${LIBTERMCAPW}
.if ${MK_TESTS} != "no"
SUBDIR+= tests

View File

@ -36,14 +36,9 @@ CFLAGS+=-I${.CURDIR} -I${SRCDIR} -I${SRCDIR}/regex
DPADD= ${LIBUTIL}
LDADD= -lutil
.if defined(RESCUE) || defined(RELEASE_CRUNCH)
DPADD+= ${LIBNCURSES}
LDADD+= -lncurses
.else
CFLAGS+= -DUSE_WIDECHAR
DPADD+= ${LIBNCURSESW}
LDADD+= -lncursesw
.endif
.if ${MK_ICONV} == "yes" && !defined(RESCUE) && !defined(RELEASE_CRUNCH)
CFLAGS+= -DUSE_ICONV

View File

@ -2,7 +2,7 @@
PROG= cdcontrol
DPADD= ${LIBEDIT} ${LIBTERMCAP}
LDADD= -ledit -ltermcap
DPADD= ${LIBEDIT} ${LIBTERMCAPW}
LDADD= -ledit -ltermcapw
.include <bsd.prog.mk>

View File

@ -13,8 +13,8 @@ CFLAGS+= -I${.CURDIR}/../common_source
WARNS?= 0
DPADD= ${LIBLPR} ${LIBEDIT} ${LIBTERMCAP}
LDADD= ${LIBLPR} -ledit -ltermcap
DPADD= ${LIBLPR} ${LIBEDIT} ${LIBTERMCAPW}
LDADD= ${LIBLPR} -ledit -ltermcapw
NO_PIE= yes

View File

@ -22,8 +22,8 @@ LDADD= -lnetgraph
.if !defined(NGCTL_NO_LIBEDIT)
CFLAGS+= -DEDITLINE
DPADD+= ${LIBPTHREAD} ${LIBEDIT} ${LIBTERMCAP}
LDADD+= -lpthread -ledit -ltermcap
DPADD+= ${LIBPTHREAD} ${LIBEDIT} ${LIBTERMCAPW}
LDADD+= -lpthread -ledit -ltermcapw
.endif
.include <bsd.prog.mk>

View File

@ -15,8 +15,8 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../ \
DPADD= ${LIBNTP} ${LIBM} ${LIBMD} ${LIBOPTS}
LDADD= ${LIBNTP} -lm -lmd ${LIBOPTS}
DPADD+= ${LIBEDIT} ${LIBTERMCAP}
LDADD+= -ledit -ltermcap
DPADD+= ${LIBEDIT} ${LIBTERMCAPW}
LDADD+= -ledit -ltermcapw
CFLAGS+= -DHAVE_LIBEDIT -DHAVE_READLINE_READLINE_H \
-I${DESTDIR}/${INCLUDEDIR}/edit

View File

@ -17,8 +17,8 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../ \
DPADD= ${LIBNTP} ${LIBM} ${LIBMD} ${LIBOPTS}
LDADD= ${LIBNTP} -lm -lmd ${LIBOPTS}
DPADD+= ${LIBEDIT} ${LIBTERMCAP}
LDADD+= -ledit -ltermcap
DPADD+= ${LIBEDIT} ${LIBTERMCAPW}
LDADD+= -ledit -ltermcapw
CFLAGS+= -DHAVE_LIBEDIT -DHAVE_READLINE_READLINE_H \
-I${DESTDIR}/${INCLUDEDIR}/edit

View File

@ -5,8 +5,8 @@
PROG= pmcstat
MAN= pmcstat.8
DPADD= ${LIBELF} ${LIBKVM} ${LIBPMC} ${LIBM} ${LIBNCURSES}
LDADD= -lelf -lkvm -lpmc -lm -lncurses
DPADD= ${LIBELF} ${LIBKVM} ${LIBPMC} ${LIBM} ${LIBNCURSESW}
LDADD= -lelf -lkvm -lpmc -lm -lncursesw
SRCS= pmcstat.c pmcstat.h pmcstat_log.c \
pmcpl_callgraph.c pmcpl_gprof.c pmcpl_annotate.c \

View File

@ -5,7 +5,7 @@ MAN= pppctl.8
WARNS?= 2
DPADD= ${LIBPTHREAD} ${LIBEDIT} ${LIBTERMCAP}
LDADD= -lpthread -ledit -ltermcap
DPADD= ${LIBPTHREAD} ${LIBEDIT} ${LIBTERMCAPW}
LDADD= -lpthread -ledit -ltermcapw
.include <bsd.prog.mk>

View File

@ -5,7 +5,7 @@ MAN= watch.8
WARNS?= 2
DPADD= ${LIBTERMCAP}
LDADD= -ltermcap
DPADD= ${LIBTERMCAPW}
LDADD= -ltermcapw
.include <bsd.prog.mk>

View File

@ -15,7 +15,7 @@ CFLAGS+= -DCONFIG_CTRL_IFACE_UNIX
CFLAGS+= -D_DIRENT_HAVE_D_TYPE
CFLAGS+= -DCONFIG_READLINE -I${DESTDIR}/${INCLUDEDIR}/edit
LDADD+= -ledit -ltermcap -lutil
DPADD+= ${LIBEDIT} ${LIBTERMCAP} ${LIBUTIL}
LDADD+= -ledit -ltermcapw -lutil
DPADD+= ${LIBEDIT} ${LIBTERMCAPW} ${LIBUTIL}
.include <bsd.prog.mk>