Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Mar 2016 15:44:54 +0000 (UTC)
From:      Glen Barber <gjb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r296457 - in projects/release-pkg: . bin/sh lib/libc/db/db lib/libc/tests/string lib/libedit lib/libedit/TEST lib/libedit/edit/readline sbin/mdmfs sys/arm/allwinner sys/arm/allwinner/a2...
Message-ID:  <201603071544.u27FisdP069649@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gjb
Date: Mon Mar  7 15:44:54 2016
New Revision: 296457
URL: https://svnweb.freebsd.org/changeset/base/296457

Log:
  MFH
  
  Sponsored by:	The FreeBSD Foundation

Added:
  projects/release-pkg/lib/libc/tests/string/memcmp_test.c
     - copied unchanged from r296456, head/lib/libc/tests/string/memcmp_test.c
  projects/release-pkg/sys/arm/allwinner/aw_mp.c
     - copied unchanged from r296456, head/sys/arm/allwinner/aw_mp.c
  projects/release-pkg/sys/arm/allwinner/aw_mp.h
     - copied unchanged from r296456, head/sys/arm/allwinner/aw_mp.h
Deleted:
  projects/release-pkg/sys/arm/allwinner/a20/a20_mp.c
Modified:
  projects/release-pkg/ObsoleteFiles.inc
  projects/release-pkg/UPDATING
  projects/release-pkg/bin/sh/expand.c
  projects/release-pkg/bin/sh/histedit.c
  projects/release-pkg/lib/libc/db/db/db.c
  projects/release-pkg/lib/libc/tests/string/Makefile
  projects/release-pkg/lib/libedit/Makefile
  projects/release-pkg/lib/libedit/TEST/tc1.c
  projects/release-pkg/lib/libedit/TEST/wtc1.c
  projects/release-pkg/lib/libedit/chared.c
  projects/release-pkg/lib/libedit/chared.h
  projects/release-pkg/lib/libedit/chartype.c
  projects/release-pkg/lib/libedit/chartype.h
  projects/release-pkg/lib/libedit/common.c
  projects/release-pkg/lib/libedit/config.h
  projects/release-pkg/lib/libedit/edit/readline/readline.h
  projects/release-pkg/lib/libedit/editline.3
  projects/release-pkg/lib/libedit/el.c
  projects/release-pkg/lib/libedit/el.h
  projects/release-pkg/lib/libedit/eln.c
  projects/release-pkg/lib/libedit/emacs.c
  projects/release-pkg/lib/libedit/filecomplete.c
  projects/release-pkg/lib/libedit/hist.c
  projects/release-pkg/lib/libedit/hist.h
  projects/release-pkg/lib/libedit/histedit.h
  projects/release-pkg/lib/libedit/history.c
  projects/release-pkg/lib/libedit/keymacro.c
  projects/release-pkg/lib/libedit/makelist
  projects/release-pkg/lib/libedit/map.c
  projects/release-pkg/lib/libedit/parse.c
  projects/release-pkg/lib/libedit/prompt.c
  projects/release-pkg/lib/libedit/prompt.h
  projects/release-pkg/lib/libedit/read.c
  projects/release-pkg/lib/libedit/read.h
  projects/release-pkg/lib/libedit/readline.c
  projects/release-pkg/lib/libedit/refresh.c
  projects/release-pkg/lib/libedit/refresh.h
  projects/release-pkg/lib/libedit/search.c
  projects/release-pkg/lib/libedit/search.h
  projects/release-pkg/lib/libedit/sig.c
  projects/release-pkg/lib/libedit/sig.h
  projects/release-pkg/lib/libedit/sys.h
  projects/release-pkg/lib/libedit/terminal.c
  projects/release-pkg/lib/libedit/terminal.h
  projects/release-pkg/lib/libedit/tokenizer.c
  projects/release-pkg/lib/libedit/tty.c
  projects/release-pkg/lib/libedit/tty.h
  projects/release-pkg/lib/libedit/vi.c
  projects/release-pkg/sbin/mdmfs/mdmfs.8
  projects/release-pkg/sys/arm/allwinner/a20/files.a20
  projects/release-pkg/sys/arm/allwinner/allwinner_machdep.c
  projects/release-pkg/sys/arm/conf/A20
  projects/release-pkg/sys/boot/common/load_elf_obj.c
  projects/release-pkg/sys/compat/linuxkpi/common/src/linux_pci.c
  projects/release-pkg/sys/netinet/tcp_subr.c
Directory Properties:
  projects/release-pkg/   (props changed)
  projects/release-pkg/lib/libc/   (props changed)
  projects/release-pkg/lib/libedit/   (props changed)
  projects/release-pkg/lib/libedit/edit/readline/   (props changed)
  projects/release-pkg/sbin/   (props changed)
  projects/release-pkg/sys/   (props changed)
  projects/release-pkg/sys/boot/   (props changed)

Modified: projects/release-pkg/ObsoleteFiles.inc
==============================================================================
--- projects/release-pkg/ObsoleteFiles.inc	Mon Mar  7 15:20:59 2016	(r296456)
+++ projects/release-pkg/ObsoleteFiles.inc	Mon Mar  7 15:44:54 2016	(r296457)
@@ -106,6 +106,8 @@ OLD_FILES+=usr/lib/clang/3.7.1/include/x
 OLD_FILES+=usr/lib/clang/3.7.1/include/xtestintrin.h
 OLD_DIRS+=usr/lib/clang/3.7.1/include
 OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-i386.a
+OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-preinit-i386.a
+OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-preinit-x86_64.a
 OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-x86_64.a
 OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan_cxx-i386.a
 OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan_cxx-x86_64.a

Modified: projects/release-pkg/UPDATING
==============================================================================
--- projects/release-pkg/UPDATING	Mon Mar  7 15:20:59 2016	(r296456)
+++ projects/release-pkg/UPDATING	Mon Mar  7 15:44:54 2016	(r296457)
@@ -31,6 +31,20 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
 	disable the most expensive debugging functionality run
 	"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20160306:
+	On amd64, clang 3.8.0 can now insert sections of type AMD64_UNWIND into
+	kernel modules.  Therefore, if you load any kernel modules at boot time,
+	please install the boot loaders after you install the kernel, but before
+	rebooting, e.g.:
+
+	make buildworld
+	make kernel KERNCONF=YOUR_KERNEL_HERE
+	make -C sys/boot install
+	<reboot in single user>
+
+	Then follow the usual steps, described in the General Notes section,
+	below.
+
 20160305:
 	Clang, llvm, lldb and compiler-rt have been upgraded to 3.8.0.  Please
 	see the 20141231 entry below for information about prerequisites and

Modified: projects/release-pkg/bin/sh/expand.c
==============================================================================
--- projects/release-pkg/bin/sh/expand.c	Mon Mar  7 15:20:59 2016	(r296456)
+++ projects/release-pkg/bin/sh/expand.c	Mon Mar  7 15:44:54 2016	(r296457)
@@ -463,7 +463,6 @@ expbackq(union node *cmd, int quoted, in
 	argbackq = saveargbackq;
 
 	p = in.buf;
-	lastc = '\0';
 	nnl = 0;
 	if (!quoted && flag & EXP_SPLIT)
 		ifs = ifsset() ? ifsval() : " \t\n";
@@ -1288,7 +1287,7 @@ patmatch(const char *pattern, const char
 				if (wc == 0)
 					goto backtrack;
 			} else
-				wc = (unsigned char)*q++;
+				q++;
 			break;
 		case '*':
 			c = *p;

Modified: projects/release-pkg/bin/sh/histedit.c
==============================================================================
--- projects/release-pkg/bin/sh/histedit.c	Mon Mar  7 15:20:59 2016	(r296456)
+++ projects/release-pkg/bin/sh/histedit.c	Mon Mar  7 15:44:54 2016	(r296457)
@@ -359,7 +359,7 @@ histcmd(int argc, char **argv __unused)
 					 * cursor, set it back to the current
 					 * entry.
 					 */
-					retval = history(hist, &he,
+					history(hist, &he,
 					    H_NEXT_EVENT, oldhistnum);
 				}
 			} else

Modified: projects/release-pkg/lib/libc/db/db/db.c
==============================================================================
--- projects/release-pkg/lib/libc/db/db/db.c	Mon Mar  7 15:20:59 2016	(r296456)
+++ projects/release-pkg/lib/libc/db/db/db.c	Mon Mar  7 15:44:54 2016	(r296457)
@@ -44,6 +44,10 @@ __FBSDID("$FreeBSD$");
 
 static int __dberr(void);
 
+#ifndef O_CLOEXEC
+#define O_CLOEXEC 0
+#endif
+
 DB *
 dbopen(const char *fname, int flags, int mode, DBTYPE type, const void *openinfo)
 {
@@ -51,7 +55,7 @@ dbopen(const char *fname, int flags, int
 #define	DB_FLAGS	(DB_LOCK | DB_SHMEM | DB_TXN)
 #define	USE_OPEN_FLAGS							\
 	(O_CREAT | O_EXCL | O_EXLOCK | O_NOFOLLOW | O_NONBLOCK | 	\
-	 O_RDONLY | O_RDWR | O_SHLOCK | O_SYNC | O_TRUNC)
+	 O_RDONLY | O_RDWR | O_SHLOCK | O_SYNC | O_TRUNC | O_CLOEXEC)
 
 	if ((flags & ~(USE_OPEN_FLAGS | DB_FLAGS)) == 0)
 		switch (type) {

Modified: projects/release-pkg/lib/libc/tests/string/Makefile
==============================================================================
--- projects/release-pkg/lib/libc/tests/string/Makefile	Mon Mar  7 15:20:59 2016	(r296456)
+++ projects/release-pkg/lib/libc/tests/string/Makefile	Mon Mar  7 15:44:54 2016	(r296457)
@@ -4,6 +4,7 @@ PACKAGE=	tests
 FILESGROUPS=	TESTS
 TESTSPACKAGE=	${PACKAGE}
 
+ATF_TESTS_C+=		memcmp_test
 ATF_TESTS_C+=		stpncpy_test
 ATF_TESTS_C+=		strerror2_test
 ATF_TESTS_C+=		wcscasecmp_test

Copied: projects/release-pkg/lib/libc/tests/string/memcmp_test.c (from r296456, head/lib/libc/tests/string/memcmp_test.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/release-pkg/lib/libc/tests/string/memcmp_test.c	Mon Mar  7 15:44:54 2016	(r296457, copy of r296456, head/lib/libc/tests/string/memcmp_test.c)
@@ -0,0 +1,124 @@
+/*-
+ * Copyright (c) 2016 Jilles Tjoelker <jilles@FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <atf-c.h>
+
+ATF_TC_WITHOUT_HEAD(zero);
+ATF_TC_BODY(zero, tc)
+{
+
+	assert(memcmp("a", "b", 0) == 0);
+	assert(memcmp("", "", 0) == 0);
+}
+
+ATF_TC_WITHOUT_HEAD(eq);
+ATF_TC_BODY(eq, tc)
+{
+	unsigned char data1[256], data2[256];
+	int i;
+
+	for (i = 0; i < 256; i++)
+		data1[i] = data2[i] = i ^ 0x55;
+	for (i = 1; i < 256; i++)
+		assert(memcmp(data1, data2, i) == 0);
+	for (i = 1; i < 256; i++)
+		assert(memcmp(data1 + i, data2 + i, 256 - i) == 0);
+}
+
+ATF_TC_WITHOUT_HEAD(neq);
+ATF_TC_BODY(neq, tc)
+{
+	unsigned char data1[256], data2[256];
+	int i;
+
+	for (i = 0; i < 256; i++) {
+		data1[i] = i;
+		data2[i] = i ^ 0x55;
+	}
+	for (i = 1; i < 256; i++)
+		assert(memcmp(data1, data2, i) != 0);
+	for (i = 1; i < 256; i++)
+		assert(memcmp(data1 + i, data2 + i, 256 - i) != 0);
+}
+
+ATF_TC_WITHOUT_HEAD(diff);
+ATF_TC_BODY(diff, tc)
+{
+	unsigned char data1[256], data2[256];
+	int i;
+
+	memset(data1, 'a', sizeof(data1));
+	memset(data2, 'a', sizeof(data2));
+	data1[128] = 255;
+	data2[128] = 0;
+	for (i = 1; i < 66; i++) {
+		assert(memcmp(data1 + 128, data2 + 128, i) == 255);
+		assert(memcmp(data2 + 128, data1 + 128, i) == -255);
+		assert(memcmp(data1 + 129 - i, data2 + 129 - i, i) == 255);
+		assert(memcmp(data2 + 129 - i, data1 + 129 - i, i) == -255);
+		assert(memcmp(data1 + 129 - i, data2 + 129 - i, i * 2) == 255);
+		assert(memcmp(data2 + 129 - i, data1 + 129 - i, i * 2) == -255);
+	}
+	data1[128] = 'c';
+	data2[128] = 'e';
+	for (i = 1; i < 66; i++) {
+		assert(memcmp(data1 + 128, data2 + 128, i) == -2);
+		assert(memcmp(data2 + 128, data1 + 128, i) == 2);
+		assert(memcmp(data1 + 129 - i, data2 + 129 - i, i) == -2);
+		assert(memcmp(data2 + 129 - i, data1 + 129 - i, i) == 2);
+		assert(memcmp(data1 + 129 - i, data2 + 129 - i, i * 2) == -2);
+		assert(memcmp(data2 + 129 - i, data1 + 129 - i, i * 2) == 2);
+	}
+	memset(data1 + 129, 'A', sizeof(data1) - 129);
+	memset(data2 + 129, 'Z', sizeof(data2) - 129);
+	for (i = 1; i < 66; i++) {
+		assert(memcmp(data1 + 128, data2 + 128, i) == -2);
+		assert(memcmp(data2 + 128, data1 + 128, i) == 2);
+		assert(memcmp(data1 + 129 - i, data2 + 129 - i, i) == -2);
+		assert(memcmp(data2 + 129 - i, data1 + 129 - i, i) == 2);
+		assert(memcmp(data1 + 129 - i, data2 + 129 - i, i * 2) == -2);
+		assert(memcmp(data2 + 129 - i, data1 + 129 - i, i * 2) == 2);
+	}
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+
+	ATF_TP_ADD_TC(tp, zero);
+	ATF_TP_ADD_TC(tp, eq);
+	ATF_TP_ADD_TC(tp, neq);
+	ATF_TP_ADD_TC(tp, diff);
+
+	return (atf_no_error());
+}

Modified: projects/release-pkg/lib/libedit/Makefile
==============================================================================
--- projects/release-pkg/lib/libedit/Makefile	Mon Mar  7 15:20:59 2016	(r296456)
+++ projects/release-pkg/lib/libedit/Makefile	Mon Mar  7 15:44:54 2016	(r296457)
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.55 2016/02/24 14:25:38 christos Exp $
+#	$NetBSD: Makefile,v 1.37 2009/01/18 12:17:49 lukem Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/4/93
 # $FreeBSD$
 
@@ -7,7 +7,7 @@ LIB=	edit
 SHLIB_MAJOR=	7
 SHLIBDIR?= /lib
 
-OSRCS=	chared.c common.c el.c eln.c emacs.c fcns.c filecomplete.c help.c \
+OSRCS=	chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c \
 	hist.c keymacro.c map.c chartype.c \
 	parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c
 
@@ -35,6 +35,7 @@ CLEANFILES+= common.h editline.c emacs.h
 
 INCS=	histedit.h
 
+OSRCS+=	eln.c
 SRCS+=	tokenizern.c historyn.c
 CLEANFILES+=	tokenizern.c historyn.c
 CFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/edit -DWIDECHAR

Modified: projects/release-pkg/lib/libedit/TEST/tc1.c
==============================================================================
--- projects/release-pkg/lib/libedit/TEST/tc1.c	Mon Mar  7 15:20:59 2016	(r296456)
+++ projects/release-pkg/lib/libedit/TEST/tc1.c	Mon Mar  7 15:44:54 2016	(r296457)
@@ -1,4 +1,4 @@
-/*	$NetBSD: tc1.c,v 1.7 2016/02/17 19:47:49 christos Exp $	*/
+/*	$NetBSD: tc1.c,v 1.6 2014/06/18 20:12:15 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 19
 #if 0
 static char sccsid[] = "@(#)test.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: tc1.c,v 1.7 2016/02/17 19:47:49 christos Exp $");
+__RCSID("$NetBSD: tc1.c,v 1.6 2014/06/18 20:12:15 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 __FBSDID("$FreeBSD$");
@@ -50,15 +50,15 @@ __FBSDID("$FreeBSD$");
 /*
  * test.c: A little test program
  */
+#include <stdio.h>
+#include <string.h>
+#include <signal.h>
 #include <sys/wait.h>
 #include <ctype.h>
-#include <dirent.h>
-#include <locale.h>
-#include <signal.h>
-#include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
 #include <unistd.h>
+#include <dirent.h>
+#include <locale.h>
 
 #include "histedit.h"
 
@@ -158,7 +158,7 @@ main(int argc, char *argv[])
 					/* Add a user-defined function	*/
 	el_set(el, EL_ADDFN, "ed-complete", "Complete argument", complete);
 
-					/* Bind tab to it		*/
+					/* Bind tab to it 		*/
 	el_set(el, EL_BIND, "^I", "ed-complete", NULL);
 
 	/*

Modified: projects/release-pkg/lib/libedit/TEST/wtc1.c
==============================================================================
--- projects/release-pkg/lib/libedit/TEST/wtc1.c	Mon Mar  7 15:20:59 2016	(r296456)
+++ projects/release-pkg/lib/libedit/TEST/wtc1.c	Mon Mar  7 15:44:54 2016	(r296457)
@@ -5,16 +5,13 @@ __FBSDID("$FreeBSD$");
 #include <string.h>
 #include <signal.h>
 #include <sys/wait.h>
+#include <err.h>
 #include <ctype.h>
+#include <stdlib.h>
+#include <unistd.h>
 #include <dirent.h>
-#include <err.h>
 #include <limits.h>
 #include <locale.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
 
 #include "../histedit.h"
 

Modified: projects/release-pkg/lib/libedit/chared.c
==============================================================================
--- projects/release-pkg/lib/libedit/chared.c	Mon Mar  7 15:20:59 2016	(r296456)
+++ projects/release-pkg/lib/libedit/chared.c	Mon Mar  7 15:44:54 2016	(r296457)
@@ -1,4 +1,4 @@
-/*	$NetBSD: chared.c,v 1.49 2016/02/24 14:29:21 christos Exp $	*/
+/*	$NetBSD: chared.c,v 1.40 2014/06/18 18:12:28 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)chared.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: chared.c,v 1.49 2016/02/24 14:29:21 christos Exp $");
+__RCSID("$NetBSD: chared.c,v 1.40 2014/06/18 18:12:28 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 #include <sys/cdefs.h>
@@ -46,12 +46,8 @@ __FBSDID("$FreeBSD$");
 /*
  * chared.c: Character editor utilities
  */
-#include <ctype.h>
 #include <stdlib.h>
-#include <string.h>
-
 #include "el.h"
-#include "common.h"
 
 private void ch__clearmacro (EditLine *);
 
@@ -205,7 +201,7 @@ c_delbefore1(EditLine *el)
  *	Return if p is part of a word according to emacs
  */
 protected int
-ce__isword(wint_t p)
+ce__isword(Int p)
 {
 	return Isalnum(p) || Strchr(STR("*?_-.[]~="), p) != NULL;
 }
@@ -215,7 +211,7 @@ ce__isword(wint_t p)
  *	Return if p is part of a word according to vi
  */
 protected int
-cv__isword(wint_t p)
+cv__isword(Int p)
 {
 	if (Isalnum(p) || p == '_')
 		return 1;
@@ -229,7 +225,7 @@ cv__isword(wint_t p)
  *	Return if p is part of a big word according to vi
  */
 protected int
-cv__isWord(wint_t p)
+cv__isWord(Int p)
 {
 	return !Isspace(p);
 }
@@ -239,7 +235,7 @@ cv__isWord(wint_t p)
  *	Find the previous word
  */
 protected Char *
-c__prev_word(Char *p, Char *low, int n, int (*wtest)(wint_t))
+c__prev_word(Char *p, Char *low, int n, int (*wtest)(Int))
 {
 	p--;
 
@@ -263,7 +259,7 @@ c__prev_word(Char *p, Char *low, int n, 
  *	Find the next word
  */
 protected Char *
-c__next_word(Char *p, Char *high, int n, int (*wtest)(wint_t))
+c__next_word(Char *p, Char *high, int n, int (*wtest)(Int))
 {
 	while (n--) {
 		while ((p < high) && !(*wtest)(*p))
@@ -281,7 +277,7 @@ c__next_word(Char *p, Char *high, int n,
  *	Find the next word vi style
  */
 protected Char *
-cv_next_word(EditLine *el, Char *p, Char *high, int n, int (*wtest)(wint_t))
+cv_next_word(EditLine *el, Char *p, Char *high, int n, int (*wtest)(Int))
 {
 	int test;
 
@@ -310,7 +306,7 @@ cv_next_word(EditLine *el, Char *p, Char
  *	Find the previous word vi style
  */
 protected Char *
-cv_prev_word(Char *p, Char *low, int n, int (*wtest)(wint_t))
+cv_prev_word(Char *p, Char *low, int n, int (*wtest)(Int))
 {
 	int test;
 
@@ -374,7 +370,7 @@ cv_delfini(EditLine *el)
  *	Go to the end of this word according to vi
  */
 protected Char *
-cv__endword(Char *p, Char *high, int n, int (*wtest)(wint_t))
+cv__endword(Char *p, Char *high, int n, int (*wtest)(Int))
 {
 	int test;
 
@@ -528,7 +524,7 @@ ch_enlargebufs(EditLine *el, size_t addl
 
 	/* zero the newly added memory, leave old data in */
 	(void) memset(&newbuffer[sz], 0, (newsz - sz) * sizeof(*newbuffer));
-
+	    
 	oldbuf = el->el_line.buffer;
 
 	el->el_line.buffer = newbuffer;
@@ -577,7 +573,7 @@ ch_enlargebufs(EditLine *el, size_t addl
 	el->el_chared.c_redo.lim = newbuffer +
 			(el->el_chared.c_redo.lim - el->el_chared.c_redo.buf);
 	el->el_chared.c_redo.buf = newbuffer;
-
+	
 	if (!hist_enlargebuf(el, sz, newsz))
 		return 0;
 
@@ -677,9 +673,9 @@ out:
 protected int
 c_gets(EditLine *el, Char *buf, const Char *prompt)
 {
-	wchar_t wch;
+	Char ch;
 	ssize_t len;
-	Char *cp = el->el_line.buffer, ch;
+	Char *cp = el->el_line.buffer;
 
 	if (prompt) {
 		len = (ssize_t)Strlen(prompt);
@@ -694,28 +690,26 @@ c_gets(EditLine *el, Char *buf, const Ch
 		el->el_line.lastchar = cp + 1;
 		re_refresh(el);
 
-		if (el_wgetc(el, &wch) != 1) {
+		if (FUN(el,getc)(el, &ch) != 1) {
 			ed_end_of_file(el, 0);
 			len = -1;
 			break;
 		}
-		ch = (Char)wch;
 
 		switch (ch) {
 
-		case L'\b':	/* Delete and backspace */
+		case 0010:	/* Delete and backspace */
 		case 0177:
 			if (len == 0) {
 				len = -1;
 				break;
 			}
-			len--;
 			cp--;
 			continue;
 
 		case 0033:	/* ESC */
-		case L'\r':	/* Newline */
-		case L'\n':
+		case '\r':	/* Newline */
+		case '\n':
 			buf[len] = ch;
 			break;
 

Modified: projects/release-pkg/lib/libedit/chared.h
==============================================================================
--- projects/release-pkg/lib/libedit/chared.h	Mon Mar  7 15:20:59 2016	(r296456)
+++ projects/release-pkg/lib/libedit/chared.h	Mon Mar  7 15:44:54 2016	(r296457)
@@ -1,4 +1,4 @@
-/*	$NetBSD: chared.h,v 1.27 2016/02/16 22:53:14 christos Exp $	*/
+/*	$NetBSD: chared.h,v 1.22 2014/06/18 18:12:28 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -41,6 +41,11 @@
 #ifndef _h_el_chared
 #define	_h_el_chared
 
+#include <ctype.h>
+#include <string.h>
+
+#include "histedit.h"
+
 #define	EL_MAXMACRO	10
 
 /*
@@ -135,18 +140,24 @@ typedef struct el_chared_t {
 #define	MODE_REPLACE	1
 #define	MODE_REPLACE_1	2
 
+#include "common.h"
+#include "vi.h"
+#include "emacs.h"
+#include "search.h"
+#include "fcns.h"
+
 
-protected int	 cv__isword(wint_t);
-protected int	 cv__isWord(wint_t);
+protected int	 cv__isword(Int);
+protected int	 cv__isWord(Int);
 protected void	 cv_delfini(EditLine *);
-protected Char	*cv__endword(Char *, Char *, int, int (*)(wint_t));
-protected int	 ce__isword(wint_t);
+protected Char	*cv__endword(Char *, Char *, int, int (*)(Int));
+protected int	 ce__isword(Int);
 protected void	 cv_undo(EditLine *);
 protected void	 cv_yank(EditLine *, const Char *, int);
-protected Char	*cv_next_word(EditLine*, Char *, Char *, int, int (*)(wint_t));
-protected Char	*cv_prev_word(Char *, Char *, int, int (*)(wint_t));
-protected Char	*c__next_word(Char *, Char *, int, int (*)(wint_t));
-protected Char	*c__prev_word(Char *, Char *, int, int (*)(wint_t));
+protected Char	*cv_next_word(EditLine*, Char *, Char *, int, int (*)(Int));
+protected Char	*cv_prev_word(Char *, Char *, int, int (*)(Int));
+protected Char	*c__next_word(Char *, Char *, int, int (*)(Int));
+protected Char	*c__prev_word(Char *, Char *, int, int (*)(Int));
 protected void	 c_insert(EditLine *, int);
 protected void	 c_delbefore(EditLine *, int);
 protected void	 c_delbefore1(EditLine *);

Modified: projects/release-pkg/lib/libedit/chartype.c
==============================================================================
--- projects/release-pkg/lib/libedit/chartype.c	Mon Mar  7 15:20:59 2016	(r296456)
+++ projects/release-pkg/lib/libedit/chartype.c	Mon Mar  7 15:44:54 2016	(r296457)
@@ -1,4 +1,4 @@
-/*	$NetBSD: chartype.c,v 1.23 2016/02/28 23:02:24 christos Exp $	*/
+/*	$NetBSD: chartype.c,v 1.12 2015/02/22 02:16:19 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -31,16 +31,13 @@
  */
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: chartype.c,v 1.23 2016/02/28 23:02:24 christos Exp $");
+__RCSID("$NetBSD: chartype.c,v 1.12 2015/02/22 02:16:19 christos Exp $");
 #endif /* not lint && not SCCSID */
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-
 #include "el.h"
+#include <stdlib.h>
 
 #define CT_BUFSIZ ((size_t)1024)
 
@@ -71,7 +68,7 @@ ct_conv_wbuff_resize(ct_buffer_t *conv, 
 {
 	void *p;
 
-	if (wsize <= conv->wsize)
+	if (wsize <= conv->wsize) 
 		return 0;
 
 	conv->wsize = wsize;
@@ -209,28 +206,6 @@ ct_encode_char(char *dst, size_t len, Ch
 	}
 	return l;
 }
-
-size_t
-ct_mbrtowc(wchar_t *wc, const char *s, size_t n)
-{
-	mbstate_t mbs;
-	/* This only works because UTF-8 is stateless */
-	memset(&mbs, 0, sizeof(mbs));
-	return mbrtowc(wc, s, n, &mbs);
-}
-
-#else
-
-size_t
-ct_mbrtowc(wchar_t *wc, const char *s, size_t n)
-	if (s == NULL)
-		return 0;
-	if (n == 0)
-		return (size_t)-2;
-	if (wc != NULL)
-		*wc = *s;
-	return *s != '\0';
-}
 #endif
 
 protected const Char *
@@ -354,7 +329,7 @@ ct_visual_char(Char *dst, size_t len, Ch
 		return c > 0xffff ? 8 : 7;
 #else
 		*dst++ = '\\';
-#define tooctaldigit(v) (Char)((v) + '0')
+#define tooctaldigit(v) ((v) + '0')
 		*dst++ = tooctaldigit(((unsigned int) c >> 6) & 0x7);
 		*dst++ = tooctaldigit(((unsigned int) c >> 3) & 0x7);
 		*dst++ = tooctaldigit(((unsigned int) c     ) & 0x7);

Modified: projects/release-pkg/lib/libedit/chartype.h
==============================================================================
--- projects/release-pkg/lib/libedit/chartype.h	Mon Mar  7 15:20:59 2016	(r296456)
+++ projects/release-pkg/lib/libedit/chartype.h	Mon Mar  7 15:44:54 2016	(r296457)
@@ -1,4 +1,4 @@
-/*	$NetBSD: chartype.h,v 1.23 2016/02/24 17:20:01 christos Exp $	*/
+/*	$NetBSD: chartype.h,v 1.15 2015/05/17 13:14:41 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -32,6 +32,7 @@
 #define _h_chartype_f
 
 
+
 #ifdef WIDECHAR
 
 /* Ideally we should also test the value of the define to see if it
@@ -54,18 +55,21 @@
 #warning Build environment does not support non-BMP characters
 #endif
 
-#define ct_wctob             wctob
+#define ct_mbtowc            mbtowc
+#define ct_mbtowc_reset      mbtowc(0,0,(size_t)0)
 #define ct_wctomb            wctomb
 #define ct_wctomb_reset      wctomb(0,0)
 #define ct_wcstombs          wcstombs
 #define ct_mbstowcs          mbstowcs
 
 #define Char			wchar_t
+#define Int			wint_t
 #define FUN(prefix,rest)	prefix ## _w ## rest
 #define FUNW(type)		type ## _w
 #define TYPE(type)		type ## W
+#define FCHAR			"%lc"
 #define FSTR			"%ls"
-#define STR(x)			L ## x
+#define STR(x) 			L ## x
 #define UC(c)			c
 #define Isalpha(x)  iswalpha(x)
 #define Isalnum(x)  iswalnum(x)
@@ -106,18 +110,21 @@ Width(wchar_t c)
 
 #else /* NARROW */
 
-#define ct_wctob(w)          ((int)(w))
+#define ct_mbtowc            error
+#define ct_mbtowc_reset      
 #define ct_wctomb            error
-#define ct_wctomb_reset
+#define ct_wctomb_reset      
 #define ct_wcstombs(a, b, c)    (strncpy(a, b, c), strlen(a))
 #define ct_mbstowcs(a, b, c)    (strncpy(a, b, c), strlen(a))
 
 #define Char			char
+#define Int			int
 #define FUN(prefix,rest)	prefix ## _ ## rest
 #define FUNW(type)		type
 #define TYPE(type)		type
+#define FCHAR			"%c"
 #define FSTR			"%s"
-#define STR(x)			x
+#define STR(x) 			x
 #define UC(c)			(unsigned char)(c)
 
 #define Isalpha(x)  isalpha((unsigned char)x)
@@ -206,7 +213,7 @@ protected size_t ct_enc_width(Char);
 #define VISUAL_WIDTH_MAX ((size_t)8)
 
 /* The terminal is thought of in terms of X columns by Y lines. In the cases
- * where a wide character takes up more than one column, the adjacent
+ * where a wide character takes up more than one column, the adjacent 
  * occupied column entries will contain this faux character. */
 #define MB_FILL_CHAR ((Char)-1)
 
@@ -238,7 +245,5 @@ protected const Char *ct_visual_string(c
 protected int ct_chr_class(Char c);
 #endif
 
-size_t	ct_mbrtowc(wchar_t *, const char *, size_t);
-
 
 #endif /* _chartype_f */

Modified: projects/release-pkg/lib/libedit/common.c
==============================================================================
--- projects/release-pkg/lib/libedit/common.c	Mon Mar  7 15:20:59 2016	(r296456)
+++ projects/release-pkg/lib/libedit/common.c	Mon Mar  7 15:44:54 2016	(r296457)
@@ -1,4 +1,4 @@
-/*	$NetBSD: common.c,v 1.39 2016/02/24 14:25:38 christos Exp $	*/
+/*	$NetBSD: common.c,v 1.29 2012/03/24 20:08:43 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)common.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: common.c,v 1.39 2016/02/24 14:25:38 christos Exp $");
+__RCSID("$NetBSD: common.c,v 1.29 2012/03/24 20:08:43 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 #include <sys/cdefs.h>
@@ -46,13 +46,7 @@ __FBSDID("$FreeBSD$");
 /*
  * common.c: Common Editor functions
  */
-#include <ctype.h>
-#include <string.h>
-
 #include "el.h"
-#include "common.h"
-#include "parse.h"
-#include "vi.h"
 
 /* ed_end_of_file():
  *	Indicate end of file
@@ -60,7 +54,7 @@ __FBSDID("$FreeBSD$");
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_end_of_file(EditLine *el, wint_t c __attribute__((__unused__)))
+ed_end_of_file(EditLine *el, Int c __attribute__((__unused__)))
 {
 
 	re_goto_bottom(el);
@@ -74,7 +68,7 @@ ed_end_of_file(EditLine *el, wint_t c __
  *	Insert a character [bound to all insert keys]
  */
 protected el_action_t
-ed_insert(EditLine *el, wint_t c)
+ed_insert(EditLine *el, Int c)
 {
 	int count = el->el_state.argument;
 
@@ -93,14 +87,14 @@ ed_insert(EditLine *el, wint_t c)
 		    || el->el_line.cursor >= el->el_line.lastchar)
 			c_insert(el, 1);
 
-		*el->el_line.cursor++ = (Char)c;
+		*el->el_line.cursor++ = c;
 		re_fastaddc(el);		/* fast refresh for one char. */
 	} else {
 		if (el->el_state.inputmode != MODE_REPLACE_1)
 			c_insert(el, el->el_state.argument);
 
 		while (count-- && el->el_line.cursor < el->el_line.lastchar)
-			*el->el_line.cursor++ = (Char)c;
+			*el->el_line.cursor++ = c;
 		re_refresh(el);
 	}
 
@@ -117,7 +111,7 @@ ed_insert(EditLine *el, wint_t c)
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_delete_prev_word(EditLine *el, wint_t c __attribute__((__unused__)))
+ed_delete_prev_word(EditLine *el, Int c __attribute__((__unused__)))
 {
 	Char *cp, *p, *kp;
 
@@ -145,7 +139,7 @@ ed_delete_prev_word(EditLine *el, wint_t
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_delete_next_char(EditLine *el, wint_t c __attribute__((__unused__)))
+ed_delete_next_char(EditLine *el, Int c __attribute__((__unused__)))
 {
 #ifdef DEBUG_EDIT
 #define	EL	el->el_line
@@ -192,7 +186,7 @@ ed_delete_next_char(EditLine *el, wint_t
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_kill_line(EditLine *el, wint_t c __attribute__((__unused__)))
+ed_kill_line(EditLine *el, Int c __attribute__((__unused__)))
 {
 	Char *kp, *cp;
 
@@ -213,7 +207,7 @@ ed_kill_line(EditLine *el, wint_t c __at
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_move_to_end(EditLine *el, wint_t c __attribute__((__unused__)))
+ed_move_to_end(EditLine *el, Int c __attribute__((__unused__)))
 {
 
 	el->el_line.cursor = el->el_line.lastchar;
@@ -236,7 +230,7 @@ ed_move_to_end(EditLine *el, wint_t c __
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_move_to_beg(EditLine *el, wint_t c __attribute__((__unused__)))
+ed_move_to_beg(EditLine *el, Int c __attribute__((__unused__)))
 {
 
 	el->el_line.cursor = el->el_line.buffer;
@@ -259,7 +253,7 @@ ed_move_to_beg(EditLine *el, wint_t c __
  *	[^T] [^T]
  */
 protected el_action_t
-ed_transpose_chars(EditLine *el, wint_t c)
+ed_transpose_chars(EditLine *el, Int c)
 {
 
 	if (el->el_line.cursor < el->el_line.lastchar) {
@@ -272,7 +266,7 @@ ed_transpose_chars(EditLine *el, wint_t 
 		/* must have at least two chars entered */
 		c = el->el_line.cursor[-2];
 		el->el_line.cursor[-2] = el->el_line.cursor[-1];
-		el->el_line.cursor[-1] = (Char)c;
+		el->el_line.cursor[-1] = c;
 		return CC_REFRESH;
 	} else
 		return CC_ERROR;
@@ -285,7 +279,7 @@ ed_transpose_chars(EditLine *el, wint_t 
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_next_char(EditLine *el, wint_t c __attribute__((__unused__)))
+ed_next_char(EditLine *el, Int c __attribute__((__unused__)))
 {
 	Char *lim = el->el_line.lastchar;
 
@@ -314,7 +308,7 @@ ed_next_char(EditLine *el, wint_t c __at
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_prev_word(EditLine *el, wint_t c __attribute__((__unused__)))
+ed_prev_word(EditLine *el, Int c __attribute__((__unused__)))
 {
 
 	if (el->el_line.cursor == el->el_line.buffer)
@@ -340,7 +334,7 @@ ed_prev_word(EditLine *el, wint_t c __at
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_prev_char(EditLine *el, wint_t c __attribute__((__unused__)))
+ed_prev_char(EditLine *el, Int c __attribute__((__unused__)))
 {
 
 	if (el->el_line.cursor > el->el_line.buffer) {
@@ -364,12 +358,14 @@ ed_prev_char(EditLine *el, wint_t c __at
  *	[^V] [^V]
  */
 protected el_action_t
-ed_quoted_insert(EditLine *el, wint_t c)
+ed_quoted_insert(EditLine *el, Int c)
 {
 	int num;
+	Char tc;
 
 	tty_quotemode(el);
-	num = el_wgetc(el, &c);
+	num = FUN(el,getc)(el, &tc);
+	c = tc;
 	tty_noquotemode(el);
 	if (num == 1)
 		return ed_insert(el, c);
@@ -382,7 +378,7 @@ ed_quoted_insert(EditLine *el, wint_t c)
  *	Adds to argument or enters a digit
  */
 protected el_action_t
-ed_digit(EditLine *el, wint_t c)
+ed_digit(EditLine *el, Int c)
 {
 
 	if (!Isdigit(c))
@@ -410,7 +406,7 @@ ed_digit(EditLine *el, wint_t c)
  *	For ESC-n
  */
 protected el_action_t
-ed_argument_digit(EditLine *el, wint_t c)
+ed_argument_digit(EditLine *el, Int c)
 {
 
 	if (!Isdigit(c))
@@ -436,7 +432,7 @@ ed_argument_digit(EditLine *el, wint_t c
 protected el_action_t
 /*ARGSUSED*/
 ed_unassigned(EditLine *el __attribute__((__unused__)),
-    wint_t c __attribute__((__unused__)))
+    Int c __attribute__((__unused__)))
 {
 
 	return CC_ERROR;
@@ -453,8 +449,8 @@ ed_unassigned(EditLine *el __attribute__
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_tty_sigint(EditLine *el __attribute__((__unused__)),
-	      wint_t c __attribute__((__unused__)))
+ed_tty_sigint(EditLine *el __attribute__((__unused__)), 
+	      Int c __attribute__((__unused__)))
 {
 
 	return CC_NORM;
@@ -467,8 +463,8 @@ ed_tty_sigint(EditLine *el __attribute__
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_tty_dsusp(EditLine *el __attribute__((__unused__)),
-	     wint_t c __attribute__((__unused__)))
+ed_tty_dsusp(EditLine *el __attribute__((__unused__)), 
+	     Int c __attribute__((__unused__)))
 {
 
 	return CC_NORM;
@@ -481,8 +477,8 @@ ed_tty_dsusp(EditLine *el __attribute__(
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_tty_flush_output(EditLine *el __attribute__((__unused__)),
-		    wint_t c __attribute__((__unused__)))
+ed_tty_flush_output(EditLine *el __attribute__((__unused__)), 
+		    Int c __attribute__((__unused__)))
 {
 
 	return CC_NORM;
@@ -495,8 +491,8 @@ ed_tty_flush_output(EditLine *el __attri
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_tty_sigquit(EditLine *el __attribute__((__unused__)),
-	       wint_t c __attribute__((__unused__)))
+ed_tty_sigquit(EditLine *el __attribute__((__unused__)), 
+	       Int c __attribute__((__unused__)))
 {
 
 	return CC_NORM;
@@ -509,8 +505,8 @@ ed_tty_sigquit(EditLine *el __attribute_
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_tty_sigtstp(EditLine *el __attribute__((__unused__)),
-	       wint_t c __attribute__((__unused__)))
+ed_tty_sigtstp(EditLine *el __attribute__((__unused__)), 
+	       Int c __attribute__((__unused__)))
 {
 
 	return CC_NORM;
@@ -523,8 +519,8 @@ ed_tty_sigtstp(EditLine *el __attribute_
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_tty_stop_output(EditLine *el __attribute__((__unused__)),
-		   wint_t c __attribute__((__unused__)))
+ed_tty_stop_output(EditLine *el __attribute__((__unused__)), 
+		   Int c __attribute__((__unused__)))
 {
 
 	return CC_NORM;
@@ -537,8 +533,8 @@ ed_tty_stop_output(EditLine *el __attrib
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_tty_start_output(EditLine *el __attribute__((__unused__)),
-		    wint_t c __attribute__((__unused__)))
+ed_tty_start_output(EditLine *el __attribute__((__unused__)), 
+		    Int c __attribute__((__unused__)))
 {
 
 	return CC_NORM;
@@ -551,7 +547,7 @@ ed_tty_start_output(EditLine *el __attri
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_newline(EditLine *el, wint_t c __attribute__((__unused__)))
+ed_newline(EditLine *el, Int c __attribute__((__unused__)))
 {
 
 	re_goto_bottom(el);
@@ -567,7 +563,7 @@ ed_newline(EditLine *el, wint_t c __attr
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_delete_prev_char(EditLine *el, wint_t c __attribute__((__unused__)))
+ed_delete_prev_char(EditLine *el, Int c __attribute__((__unused__)))
 {
 
 	if (el->el_line.cursor <= el->el_line.buffer)
@@ -587,7 +583,7 @@ ed_delete_prev_char(EditLine *el, wint_t
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_clear_screen(EditLine *el, wint_t c __attribute__((__unused__)))
+ed_clear_screen(EditLine *el, Int c __attribute__((__unused__)))
 {
 
 	terminal_clear_screen(el);	/* clear the whole real screen */
@@ -602,8 +598,8 @@ ed_clear_screen(EditLine *el, wint_t c _
  */
 protected el_action_t
 /*ARGSUSED*/
-ed_redisplay(EditLine *el __attribute__((__unused__)),

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603071544.u27FisdP069649>