From 6677e30757dd7999fdc32f0a1fdb3fbda5629361 Mon Sep 17 00:00:00 2001 From: christos Date: Wed, 27 Aug 2008 10:17:49 +0000 Subject: [PATCH] add the ability to have non widechar build, with USE_WIDECHAR=no On i386: vi 308685 nvi.nonwide 296856 nvi.wide 340860 --- usr.bin/nvi/build/Makefile | 8 ++++++-- usr.bin/nvi/build/config.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/usr.bin/nvi/build/Makefile b/usr.bin/nvi/build/Makefile index 4b15a63ed447..da188acc49d8 100644 --- a/usr.bin/nvi/build/Makefile +++ b/usr.bin/nvi/build/Makefile @@ -1,7 +1,9 @@ -# $NetBSD: Makefile,v 1.3 2008/08/27 05:42:54 christos Exp $ +# $NetBSD: Makefile,v 1.4 2008/08/27 10:17:49 christos Exp $ .include +USE_WIDECHAR?=yes + CPPFLAGS+=-I${DIST}/include -I${.CURDIR} -I. -DGTAGS WARNS=0 #DBG=-g @@ -35,8 +37,10 @@ SRCS= api.c cl_bsd.c cl_funcs.c cl_main.c cl_read.c cl_screen.c cl_term.c \ vs_smap.c vs_split.c # For wide char support +.if ${USE_WIDECHAR} == "yes" SRCS+= regcomp.c regerror.c regexec.c regfree.c -CPPFLAGS+=-I${DIST}/regex -D__REGEX_PRIVATE +CPPFLAGS+=-I${DIST}/regex -D__REGEX_PRIVATE -DUSE_WIDECHAR +.endif LINKS= ${BINDIR}/nvi ${BINDIR}/nex ${BINDIR}/nvi ${BINDIR}/nview MLINKS= nvi.1 nex.1 nvi.1 nview.1 diff --git a/usr.bin/nvi/build/config.h b/usr.bin/nvi/build/config.h index 98befe1c658e..876edaa1d48f 100644 --- a/usr.bin/nvi/build/config.h +++ b/usr.bin/nvi/build/config.h @@ -117,7 +117,7 @@ /* #undef USE_SLANG_CURSES */ /* Define when using wide characters */ -#define USE_WIDECHAR 1 +/* #undef USE_WIDECHAR */ /* Define if you have */ /* #undef HAVE_NCURSES_H */