CVS commit: src/sys/net

2021-04-05 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Mon Apr  5 06:56:47 UTC 2021

Modified Files:
src/sys/net: toeplitz.c

Log Message:
s/nitems/__arraycount/


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/net/toeplitz.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/toeplitz.c
diff -u src/sys/net/toeplitz.c:1.1 src/sys/net/toeplitz.c:1.2
--- src/sys/net/toeplitz.c:1.1	Sat Jan 30 21:23:08 2021
+++ src/sys/net/toeplitz.c	Mon Apr  5 06:56:47 2021
@@ -165,7 +165,7 @@ stoeplitz_hash_ip6(const struct stoeplit
 	uint32_t n32 = 0;
 	size_t i;
 
-	for (i = 0; i < nitems(faddr6->s6_addr32); i++)
+	for (i = 0; i < __arraycount(faddr6->s6_addr32); i++)
 		n32 ^= faddr6->s6_addr32[i] ^ laddr6->s6_addr32[i];
 
 	return (stoeplitz_hash_n32(scache, n32));
@@ -179,7 +179,7 @@ stoeplitz_hash_ip6port(const struct stoe
 	uint32_t n32 = 0;
 	size_t i;
 
-	for (i = 0; i < nitems(faddr6->s6_addr32); i++)
+	for (i = 0; i < __arraycount(faddr6->s6_addr32); i++)
 		n32 ^= faddr6->s6_addr32[i] ^ laddr6->s6_addr32[i];
 
 	n32 ^= fport ^ lport;



CVS commit: src/sys/arch/mips

2021-04-05 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Apr  5 07:00:06 UTC 2021

Modified Files:
src/sys/arch/mips/include: mips_opcode.h
src/sys/arch/mips/mips: db_disasm.c

Log Message:
Tidy up NOP disassembly, handle "pause" as well.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/mips/include/mips_opcode.h
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/mips/mips/db_disasm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/include/mips_opcode.h
diff -u src/sys/arch/mips/include/mips_opcode.h:1.24 src/sys/arch/mips/include/mips_opcode.h:1.25
--- src/sys/arch/mips/include/mips_opcode.h:1.24	Mon Aug 17 03:14:08 2020
+++ src/sys/arch/mips/include/mips_opcode.h	Mon Apr  5 07:00:06 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_opcode.h,v 1.24 2020/08/17 03:14:08 mrg Exp $	*/
+/*	$NetBSD: mips_opcode.h,v 1.25 2021/04/05 07:00:06 simonb Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -292,6 +292,15 @@ typedef union {
 #define	OP_DSRA32	077		/* MIPS-II, for r4000 port */
 
 /*
+ * Subvalues for SLL where the source and destination registers
+ * are both zero.
+ */
+#define	OP_SLL_NOP	0
+#define	OP_SLL_SSNOP	1
+#define	OP_SLL_EHB	3
+#define	OP_SLL_PAUSE	5
+
+/*
  * Values for the 'func' field when 'op' == OP_SPECIAL2.
  */
 #define	OP_MADD		000		/* QED */

Index: src/sys/arch/mips/mips/db_disasm.c
diff -u src/sys/arch/mips/mips/db_disasm.c:1.37 src/sys/arch/mips/mips/db_disasm.c:1.38
--- src/sys/arch/mips/mips/db_disasm.c:1.37	Mon Apr  5 06:38:01 2021
+++ src/sys/arch/mips/mips/db_disasm.c	Mon Apr  5 07:00:06 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_disasm.c,v 1.37 2021/04/05 06:38:01 simonb Exp $	*/
+/*	$NetBSD: db_disasm.c,v 1.38 2021/04/05 07:00:06 simonb Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.37 2021/04/05 06:38:01 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.38 2021/04/05 07:00:06 simonb Exp $");
 
 #include 
 #include 
@@ -265,18 +265,32 @@ db_disasm_insn(int insn, db_addr_t loc, 
 	switch (i.JType.op) {
 	case OP_SPECIAL: {
 		const char *name = spec_name[i.RType.func];
-		if (i.word == 0) {
-			db_printf("nop");
-			break;
-		}
-		if (i.word == (1 << 6)) {
-			db_printf("ssnop");
-			break;
-		}
-		if (i.word == (3 << 6)) {
-			db_printf("ehb");
+
+		/* Handle varations of NOPs */
+		if ((i.RType.func == OP_SLL) &&
+		(i.RType.rs == 0) &&
+		(i.RType.rt == 0) &&
+		(i.RType.rd == 0)) {
+			switch (i.RType.shamt) {
+			case OP_SLL_NOP:
+db_printf("nop");
+break;
+			case OP_SLL_SSNOP:
+db_printf("ssnop");
+break;
+			case OP_SLL_EHB:
+db_printf("ehb");
+break;
+			case OP_SLL_PAUSE:
+db_printf("pause");
+break;
+			default:
+db_printf("nop *");	/* "undefined" NOP */
+break;
+			}
 			break;
 		}
+
 		/*
 		 * The following are equivalents of a "move dst,src":
 		 *	addu	dst,src,zero	(in 32-bit mode)
@@ -296,6 +310,7 @@ db_disasm_insn(int insn, db_addr_t loc, 
 			reg_name[i.RType.rs]);
 			break;
 		}
+
 		if ((i.RType.func == OP_SRL || i.RType.func == OP_SRLV)
 		&& i.RType.rs == 1) {
 			name = (i.RType.func == OP_SRL) ? "rotr" : "rotrv";



CVS commit: src/sys/arch/mips/mips

2021-04-05 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Apr  5 07:27:11 UTC 2021

Modified Files:
src/sys/arch/mips/mips: db_disasm.c

Log Message:
Fix cut'n'paste typo - OP_CVM_DMUL is dmul, not baddu.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/mips/mips/db_disasm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/mips/db_disasm.c
diff -u src/sys/arch/mips/mips/db_disasm.c:1.38 src/sys/arch/mips/mips/db_disasm.c:1.39
--- src/sys/arch/mips/mips/db_disasm.c:1.38	Mon Apr  5 07:00:06 2021
+++ src/sys/arch/mips/mips/db_disasm.c	Mon Apr  5 07:27:11 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_disasm.c,v 1.38 2021/04/05 07:00:06 simonb Exp $	*/
+/*	$NetBSD: db_disasm.c,v 1.39 2021/04/05 07:27:11 simonb Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.38 2021/04/05 07:00:06 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.39 2021/04/05 07:27:11 simonb Exp $");
 
 #include 
 #include 
@@ -85,7 +85,7 @@ static const char * const spec2_name[64]
 	[OP_MADDU] = "maddu",
 	[OP_MUL] = "mul",
 #ifdef __OCTEON__
-	[OP_CVM_DMUL] = "baddu",
+	[OP_CVM_DMUL] = "dmul",
 #endif
 	[OP_MSUB] = "msub",
 	[OP_MSUBU] = "msubu",



CVS commit: src/sys/arch/mips

2021-04-05 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Apr  5 07:28:19 UTC 2021

Modified Files:
src/sys/arch/mips/include: mips_opcode.h
src/sys/arch/mips/mips: db_disasm.c

Log Message:
Some QED instructions are included in MIPS32 and MIPS64 instruction sets.
Update a few comments.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/mips/include/mips_opcode.h
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/mips/mips/db_disasm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/include/mips_opcode.h
diff -u src/sys/arch/mips/include/mips_opcode.h:1.25 src/sys/arch/mips/include/mips_opcode.h:1.26
--- src/sys/arch/mips/include/mips_opcode.h:1.25	Mon Apr  5 07:00:06 2021
+++ src/sys/arch/mips/include/mips_opcode.h	Mon Apr  5 07:28:19 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_opcode.h,v 1.25 2021/04/05 07:00:06 simonb Exp $	*/
+/*	$NetBSD: mips_opcode.h,v 1.26 2021/04/05 07:28:19 simonb Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -169,7 +169,7 @@ typedef union {
 #define	OP_LDL		032		/* MIPS-II, for r4000 port */
 #define	OP_LDR		033		/* MIPS-II, for r4000 port */
 
-#define	OP_SPECIAL2	034		/* QED opcodes */
+#define	OP_SPECIAL2	034		/* QED and MIPS32/MIPS64 opcodes */
 #define	OP_JALX		035
 #define	OP_MDMX		036
 #define	OP_SPECIAL3	037
@@ -303,9 +303,9 @@ typedef union {
 /*
  * Values for the 'func' field when 'op' == OP_SPECIAL2.
  */
-#define	OP_MADD		000		/* QED */
-#define	OP_MADDU	001		/* QED */
-#define	OP_MUL		002		/* QED */
+#define	OP_MADD		000		/* QED, MIPS32/64 */
+#define	OP_MADDU	001		/* QED, MIPS32/64 */
+#define	OP_MUL		002		/* QED, MIPS32/64 */
 #define	OP_CVM_DMUL	003		/* OCTEON */
 #define	OP_MSUB		004		/* MIPS32/64 */
 #define	OP_MSUBU	005		/* MIPS32/64 */

Index: src/sys/arch/mips/mips/db_disasm.c
diff -u src/sys/arch/mips/mips/db_disasm.c:1.39 src/sys/arch/mips/mips/db_disasm.c:1.40
--- src/sys/arch/mips/mips/db_disasm.c:1.39	Mon Apr  5 07:27:11 2021
+++ src/sys/arch/mips/mips/db_disasm.c	Mon Apr  5 07:28:19 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_disasm.c,v 1.39 2021/04/05 07:27:11 simonb Exp $	*/
+/*	$NetBSD: db_disasm.c,v 1.40 2021/04/05 07:28:19 simonb Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.39 2021/04/05 07:27:11 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.40 2021/04/05 07:28:19 simonb Exp $");
 
 #include 
 #include 
@@ -80,7 +80,7 @@ static const char * const spec_name[64] 
 /*56 */ "dsll","spec71","dsrl","dsra","dsll32","spec75","dsrl32","dsra32"
 };
 
-static const char * const spec2_name[64] = {	/* QED RM4650, R5000, etc. */
+static const char * const spec2_name[64] = {	/* QED, MIPS32/64, etc. */
 	[OP_MADD] = "madd",
 	[OP_MADDU] = "maddu",
 	[OP_MUL] = "mul",



CVS commit: src/external/mpl/bind/dist/lib

2021-04-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Apr  5 10:19:34 UTC 2021

Modified Files:
src/external/mpl/bind/dist/lib/dns: peer.c
src/external/mpl/bind/dist/lib/isc: task.c
src/external/mpl/bind/dist/lib/isc/netmgr: udp.c
src/external/mpl/bind/dist/lib/ns: client.c interfacemgr.c

Log Message:
bind: remove workaround for bugs in lint

The bugs have been fixed in lint1/init.c 1.179 from 2021-03-30.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/bind/dist/lib/dns/peer.c
cvs rdiff -u -r1.11 -r1.12 src/external/mpl/bind/dist/lib/isc/task.c
cvs rdiff -u -r1.5 -r1.6 src/external/mpl/bind/dist/lib/isc/netmgr/udp.c
cvs rdiff -u -r1.13 -r1.14 src/external/mpl/bind/dist/lib/ns/client.c
cvs rdiff -u -r1.10 -r1.11 src/external/mpl/bind/dist/lib/ns/interfacemgr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/mpl/bind/dist/lib/dns/peer.c
diff -u src/external/mpl/bind/dist/lib/dns/peer.c:1.6 src/external/mpl/bind/dist/lib/dns/peer.c:1.7
--- src/external/mpl/bind/dist/lib/dns/peer.c:1.6	Tue Mar 23 20:59:02 2021
+++ src/external/mpl/bind/dist/lib/dns/peer.c	Mon Apr  5 10:19:34 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: peer.c,v 1.6 2021/03/23 20:59:02 christos Exp $	*/
+/*	$NetBSD: peer.c,v 1.7 2021/04/05 10:19:34 rillig Exp $	*/
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -215,8 +215,6 @@ dns_peer_newprefix(isc_mem_t *mem, const
 	REQUIRE(peerptr != NULL && *peerptr == NULL);
 
 	peer = isc_mem_get(mem, sizeof(*peer));
-
-#ifndef __lint__ // XXX: bug
 	*peer = (dns_peer_t){
 		.magic = DNS_PEER_MAGIC,
 		.address = *addr,
@@ -224,7 +222,6 @@ dns_peer_newprefix(isc_mem_t *mem, const
 		.mem = mem,
 		.transfer_format = dns_one_answer,
 	};
-#endif
 
 	isc_refcount_init(&peer->refs, 1);
 

Index: src/external/mpl/bind/dist/lib/isc/task.c
diff -u src/external/mpl/bind/dist/lib/isc/task.c:1.11 src/external/mpl/bind/dist/lib/isc/task.c:1.12
--- src/external/mpl/bind/dist/lib/isc/task.c:1.11	Tue Mar 23 20:59:03 2021
+++ src/external/mpl/bind/dist/lib/isc/task.c	Mon Apr  5 10:19:34 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: task.c,v 1.11 2021/03/23 20:59:03 christos Exp $	*/
+/*	$NetBSD: task.c,v 1.12 2021/04/05 10:19:34 rillig Exp $	*/
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -1386,10 +1386,8 @@ isc_taskmgr_create(isc_mem_t *mctx, unsi
 	REQUIRE(managerp != NULL && *managerp == NULL);
 
 	manager = isc_mem_get(mctx, sizeof(*manager));
-#ifndef __lint__ // XXX: bug
 	*manager = (isc__taskmgr_t){ .common.impmagic = TASK_MANAGER_MAGIC,
  .common.magic = ISCAPI_TASKMGR_MAGIC };
-#endif
 
 	atomic_store(&manager->mode, isc_taskmgrmode_normal);
 	isc_mutex_init(&manager->lock);

Index: src/external/mpl/bind/dist/lib/isc/netmgr/udp.c
diff -u src/external/mpl/bind/dist/lib/isc/netmgr/udp.c:1.5 src/external/mpl/bind/dist/lib/isc/netmgr/udp.c:1.6
--- src/external/mpl/bind/dist/lib/isc/netmgr/udp.c:1.5	Tue Mar 23 20:59:03 2021
+++ src/external/mpl/bind/dist/lib/isc/netmgr/udp.c	Mon Apr  5 10:19:34 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: udp.c,v 1.5 2021/03/23 20:59:03 christos Exp $	*/
+/*	$NetBSD: udp.c,v 1.6 2021/04/05 10:19:34 rillig Exp $	*/
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -543,10 +543,7 @@ isc__nm_udp_send(isc_nmhandle_t *handle,
 
 	if (isc_nm_tid() == rsock->tid) {
 		isc__netievent_udpsend_t ievent
-#ifndef __lint__ // XXX: bug
-		= { .sock = rsock, .req = uvreq, .peer = *peer }
-#endif
-		;
+		= { .sock = rsock, .req = uvreq, .peer = *peer };
 
 		isc__nm_async_udpsend(NULL, (isc__netievent_t *)&ievent);
 	} else {

Index: src/external/mpl/bind/dist/lib/ns/client.c
diff -u src/external/mpl/bind/dist/lib/ns/client.c:1.13 src/external/mpl/bind/dist/lib/ns/client.c:1.14
--- src/external/mpl/bind/dist/lib/ns/client.c:1.13	Tue Mar 23 20:59:03 2021
+++ src/external/mpl/bind/dist/lib/ns/client.c	Mon Apr  5 10:19:34 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: client.c,v 1.13 2021/03/23 20:59:03 christos Exp $	*/
+/*	$NetBSD: client.c,v 1.14 2021/04/05 10:19:34 rillig Exp $	*/
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -2311,7 +2311,6 @@ ns__client_setup(ns_client_t *client, ns
 		 * Retain these values from the existing client, but
 		 * zero every thing else.
 		 */
-#ifndef __lint__ // XXX: bug
 		*client = (ns_client_t){ .magic = 0,
 	 .mctx = oldmctx,
 	 .manager = oldmgr,
@@ -2320,7 +2319,6 @@ ns__client_setup(ns_client_t *client, ns
 	 .sendbuf = sendbuf,
 	 .message = message,
 	 .query = query };
-#endif
 	}
 
 	client->query.attributes &= ~NS_QUERYATTR_ANSWERED;

Index: src/external/mpl/bind/dist/lib/ns/interfacemgr.c
diff -u src/external/mpl/bind/dist/lib/ns/interfacemgr.c:1.10 src/external/mpl/bind/dist/lib/ns/interfacemgr.c:1.11
--- src/external/mpl/bind/dist/lib/ns/interfacemgr.c:1.10	Tue Mar 23 20:59:03 2021
+++ src/external/mpl/bind

CVS commit: src/external/mpl/bind/dist/contrib/dlz/modules/wildcard

2021-04-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Apr  5 10:54:05 UTC 2021

Modified Files:
src/external/mpl/bind/dist/contrib/dlz/modules/wildcard:
dlz_wildcard_dynamic.c

Log Message:
bind: remove obsolete local modifications

The duplicate include has been added upstream, further up in the file.

Since lint1/tree.c 1.202 from 2021-01-31, lint no longer needs the
/*CONSTCOND*/ for do-while-0 "loops".


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \

src/external/mpl/bind/dist/contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/mpl/bind/dist/contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c
diff -u src/external/mpl/bind/dist/contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c:1.4 src/external/mpl/bind/dist/contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c:1.5
--- src/external/mpl/bind/dist/contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c:1.4	Sun May 24 19:46:21 2020
+++ src/external/mpl/bind/dist/contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c	Mon Apr  5 10:54:05 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: dlz_wildcard_dynamic.c,v 1.4 2020/05/24 19:46:21 christos Exp $	*/
+/*	$NetBSD: dlz_wildcard_dynamic.c,v 1.5 2021/04/05 10:54:05 rillig Exp $	*/
 
 /*
  * Copyright (C) 2002 Stichting NLnet, Netherlands, sticht...@nlnet.nl.
@@ -61,8 +61,6 @@
 #include 
 #include 
 
-#include 
-
 #define DE_CONST(konst, var)   \
 	do {   \
 		union {\
@@ -71,7 +69,7 @@
 		} _u;  \
 		_u.k = konst;  \
 		var = _u.v;\
-	} while (/*CONSTCOND*/0)
+	} while (0)
 
 /* fnmatch() return values. */
 #define FNM_NOMATCH 1 /* Match failed. */



CVS commit: src/external/mpl/bind/dist

2021-04-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Apr  5 11:27:04 UTC 2021

Modified Files:
src/external/mpl/bind/dist/bin/check: check-tool.c named-checkconf.c
named-checkzone.c
src/external/mpl/bind/dist/bin/confgen: util.h
src/external/mpl/bind/dist/bin/delv: delv.c
src/external/mpl/bind/dist/bin/dig: dig.c
src/external/mpl/bind/dist/bin/named: controlconf.c logconf.c server.c
statschannel.c tkeyconf.c zoneconf.c
src/external/mpl/bind/dist/bin/named/unix: dlz_dlopen_driver.c os.c
src/external/mpl/bind/dist/bin/named/win32: dlz_dlopen_driver.c
src/external/mpl/bind/dist/bin/rndc: util.h
src/external/mpl/bind/dist/bin/tests: makejournal.c
src/external/mpl/bind/dist/bin/tests/system/dlzexternal: driver.c
src/external/mpl/bind/dist/bin/tests/system/rsabigexponent: bigkey.c
src/external/mpl/bind/dist/contrib/dlz/example: dlz_example.c
src/external/mpl/bind/dist/contrib/dlz/modules/include: dlz_list.h
src/external/mpl/bind/dist/lib/bind9: check.c
src/external/mpl/bind/dist/lib/dns: adb.c cache.c client.c diff.c
dnssec.c dnstap.c dst_api.c dst_parse.c dyndb.c gen.c gssapi_link.c
gssapictx.c journal.c keymgr.c master.c masterdump.c message.c
name.c nsec.c nsec3.c private.c rbt.c rbtdb.c rcode.c rdata.c
resolver.c sdb.c sdlz.c spnego_asn1.c time.c timer.c tkey.c ttl.c
update.c view.c xfrin.c zone.c
src/external/mpl/bind/dist/lib/dns/include/dns: name.h
src/external/mpl/bind/dist/lib/dns/rdata: rdatastructpre.h
src/external/mpl/bind/dist/lib/dns/rdata/in_1: wks_11.c
src/external/mpl/bind/dist/lib/dns/tests: dnstest.c tsig_test.c
src/external/mpl/bind/dist/lib/irs: getnameinfo.c
src/external/mpl/bind/dist/lib/isc: base32.c base64.c hex.c mem.c
regex.c task.c
src/external/mpl/bind/dist/lib/isc/include/isc: buffer.h event.h list.h
mem.h region.h util.h
src/external/mpl/bind/dist/lib/isc/pthreads: mutex.c
src/external/mpl/bind/dist/lib/isc/tests: isctest.h
src/external/mpl/bind/dist/lib/isc/unix: socket.c
src/external/mpl/bind/dist/lib/isc/win32: ntgroups.c socket.c
src/external/mpl/bind/dist/lib/isc/win32/include/isc: mutex.h net.h
src/external/mpl/bind/dist/lib/isccc/include/isccc: util.h
src/external/mpl/bind/dist/lib/isccfg: namedconf.c parser.c
src/external/mpl/bind/dist/lib/isccfg/tests: duration_test.c
parser_test.c
src/external/mpl/bind/dist/lib/ns: hooks.c query.c server.c update.c
xfrout.c
src/external/mpl/bind/dist/lib/ns/tests: nstest.h

Log Message:
bind: remove unnecessary CONSTCOND comments

Since lint1/tree.c 1.202 from 2021-01-31, lint no longer needs the
/*CONSTCOND*/ for do-while-0 "loops".

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/bind/dist/bin/check/check-tool.c \
src/external/mpl/bind/dist/bin/check/named-checkconf.c \
src/external/mpl/bind/dist/bin/check/named-checkzone.c
cvs rdiff -u -r1.4 -r1.5 src/external/mpl/bind/dist/bin/confgen/util.h
cvs rdiff -u -r1.8 -r1.9 src/external/mpl/bind/dist/bin/delv/delv.c
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/bind/dist/bin/dig/dig.c
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/bind/dist/bin/named/controlconf.c
cvs rdiff -u -r1.5 -r1.6 src/external/mpl/bind/dist/bin/named/logconf.c \
src/external/mpl/bind/dist/bin/named/tkeyconf.c
cvs rdiff -u -r1.12 -r1.13 src/external/mpl/bind/dist/bin/named/server.c
cvs rdiff -u -r1.9 -r1.10 src/external/mpl/bind/dist/bin/named/statschannel.c \
src/external/mpl/bind/dist/bin/named/zoneconf.c
cvs rdiff -u -r1.8 -r1.9 \
src/external/mpl/bind/dist/bin/named/unix/dlz_dlopen_driver.c
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/bind/dist/bin/named/unix/os.c
cvs rdiff -u -r1.6 -r1.7 \
src/external/mpl/bind/dist/bin/named/win32/dlz_dlopen_driver.c
cvs rdiff -u -r1.4 -r1.5 src/external/mpl/bind/dist/bin/rndc/util.h
cvs rdiff -u -r1.5 -r1.6 src/external/mpl/bind/dist/bin/tests/makejournal.c
cvs rdiff -u -r1.9 -r1.10 \
src/external/mpl/bind/dist/bin/tests/system/dlzexternal/driver.c
cvs rdiff -u -r1.5 -r1.6 \
src/external/mpl/bind/dist/bin/tests/system/rsabigexponent/bigkey.c
cvs rdiff -u -r1.4 -r1.5 \
src/external/mpl/bind/dist/contrib/dlz/example/dlz_example.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/mpl/bind/dist/contrib/dlz/modules/include/dlz_list.h
cvs rdiff -u -r1.10 -r1.11 src/external/mpl/bind/dist/lib/bind9/check.c
cvs rdiff -u -r1.7 -r1.8 src/external/mpl/bind/dist/lib/dns/adb.c \
src/external/mpl/bind/dist/lib/dns/dnssec.c \
src/external/mpl/bind/dist/lib/dns/dyndb.c \
src/external/mpl/bind/dist/lib/dns/gen.c \
src/external/mpl/bind/dist/lib/dns/master.c \
src/external/mpl/bind/dist/lib/dns/nsec3.c \
src/exte

CVS commit: src/external/mpl/bind/dist

2021-04-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Apr  5 11:29:49 UTC 2021

Modified Files:
src/external/mpl/bind/dist/bin/named: server.c statschannel.c
src/external/mpl/bind/dist/lib/dns: cache.c rbt.c
src/external/mpl/bind/dist/lib/isc/include/isc: radix.h

Log Message:
bind: remove non-canonical redundant CONSTCOND comments

Since lint1/tree.c 1.202 from 2021-01-31, lint no longer needs the
/*CONSTCOND*/ for do-while-0 "loops".

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/mpl/bind/dist/bin/named/server.c
cvs rdiff -u -r1.10 -r1.11 \
src/external/mpl/bind/dist/bin/named/statschannel.c
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/bind/dist/lib/dns/cache.c
cvs rdiff -u -r1.8 -r1.9 src/external/mpl/bind/dist/lib/dns/rbt.c
cvs rdiff -u -r1.5 -r1.6 \
src/external/mpl/bind/dist/lib/isc/include/isc/radix.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/mpl/bind/dist/bin/named/server.c
diff -u src/external/mpl/bind/dist/bin/named/server.c:1.13 src/external/mpl/bind/dist/bin/named/server.c:1.14
--- src/external/mpl/bind/dist/bin/named/server.c:1.13	Mon Apr  5 11:27:00 2021
+++ src/external/mpl/bind/dist/bin/named/server.c	Mon Apr  5 11:29:49 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: server.c,v 1.13 2021/04/05 11:27:00 rillig Exp $	*/
+/*	$NetBSD: server.c,v 1.14 2021/04/05 11:29:49 rillig Exp $	*/
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -3161,7 +3161,7 @@ cleanup:
 			result = ISC_R_RANGE;  \
 			goto cleanup;  \
 		}  \
-	} while (/*CONSTCOND*/ 0)
+	} while (0)
 
 #define CHECK_RRL_RATE(rate, def, max_rate, name)   \
 	do {\
@@ -3176,7 +3176,7 @@ cleanup:
 			rrl->rate.r = def;  \
 		}   \
 		rrl->rate.scaled = rrl->rate.r; \
-	} while (/*CONSTCOND*/ 0)
+	} while (0)
 
 static isc_result_t
 configure_rrl(dns_view_t *view, const cfg_obj_t *config, const cfg_obj_t *map) {

Index: src/external/mpl/bind/dist/bin/named/statschannel.c
diff -u src/external/mpl/bind/dist/bin/named/statschannel.c:1.10 src/external/mpl/bind/dist/bin/named/statschannel.c:1.11
--- src/external/mpl/bind/dist/bin/named/statschannel.c:1.10	Mon Apr  5 11:27:00 2021
+++ src/external/mpl/bind/dist/bin/named/statschannel.c	Mon Apr  5 11:29:49 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: statschannel.c,v 1.10 2021/04/05 11:27:00 rillig Exp $	*/
+/*	$NetBSD: statschannel.c,v 1.11 2021/04/05 11:29:49 rillig Exp $	*/
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -177,7 +177,7 @@ static const char *gluecachestats_xmldes
 		xmlrc = (a);\
 		if (xmlrc < 0)  \
 			goto error; \
-	} while(/*CONSTCOND*/0)
+	} while (0)
 
 /*%
  * Mapping arrays to represent statistics counters in the order of our
@@ -2580,7 +2580,7 @@ render_xml_traffic(const char *url, isc_
 		result = (m);\
 		if (result != ISC_R_SUCCESS) \
 			goto error;  \
-	} while(/*CONSTCOND*/0)
+	} while (0)
 
 #define CHECKMEM(m)  \
 	do { \
@@ -2588,7 +2588,7 @@ render_xml_traffic(const char *url, isc_
 			result = ISC_R_NOMEMORY; \
 			goto error;  \
 		}\
-	} while(/*CONSTCOND*/0)
+	} while (0)
 
 static void
 wrap_jsonfree(isc_buffer_t *buffer, void *arg) {

Index: src/external/mpl/bind/dist/lib/dns/cache.c
diff -u src/external/mpl/bind/dist/lib/dns/cache.c:1.6 src/external/mpl/bind/dist/lib/dns/cache.c:1.7
--- src/external/mpl/bind/dist/lib/dns/cache.c:1.6	Mon Apr  5 11:27:01 2021
+++ src/external/mpl/bind/dist/lib/dns/cache.c	Mon Apr  5 11:29:49 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cache.c,v 1.6 2021/04/05 11:27:01 rillig Exp $	*/
+/*	$NetBSD: cache.c,v 1.7 2021/04/05 11:29:49 rillig Exp $	*/
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -1430,7 +1430,7 @@ error:
 			result = ISC_R_NOMEMORY; \
 			goto error;  \
 		}\
-	} while(/*CONSTCOND*/0)
+	} while (0)
 
 isc_result_t
 dns_cache_renderjson(dns_cache_t *cache, void *cstats0) {

Index: src/external/mpl/bind/dist/lib/dns/rbt.c
diff -u src/external/mpl/bind/dist/lib/dns/rbt.c:1.8 src/external/mpl/bind/dist/lib/dns/rbt.c:1.9
--- src/external/mpl/bind/dist/lib/dns/rbt.c:1.8	Mon Apr  5 11:27:02 2021
+++ src/external/mpl/bind/dist/lib/dns/rbt.c	Mon Apr  5 11:29:49 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: rbt.c,v 1.8 2021/04/05 11:27:02 rillig Exp $	*/
+/*	$NetBSD: rbt.c,v 1.9 2021/04/05 11:29:49 rillig Exp $	*/
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -772,7 +772,7 @@ clea

CVS commit: src/external/mpl/bind/dist

2021-04-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Apr  5 11:36:56 UTC 2021

Modified Files:
src/external/mpl/bind/dist/bin/named: server.c
src/external/mpl/bind/dist/lib/dns: dnsrps.c dnssec.c gen.c peer.c
src/external/mpl/bind/dist/lib/dns/tests: dnstest.h
src/external/mpl/bind/dist/lib/isc/netmgr: udp.c

Log Message:
bind: remove unnecessary local modifications

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/mpl/bind/dist/bin/named/server.c
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/bind/dist/lib/dns/dnsrps.c
cvs rdiff -u -r1.8 -r1.9 src/external/mpl/bind/dist/lib/dns/dnssec.c \
src/external/mpl/bind/dist/lib/dns/gen.c
cvs rdiff -u -r1.7 -r1.8 src/external/mpl/bind/dist/lib/dns/peer.c
cvs rdiff -u -r1.5 -r1.6 src/external/mpl/bind/dist/lib/dns/tests/dnstest.h
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/bind/dist/lib/isc/netmgr/udp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/mpl/bind/dist/bin/named/server.c
diff -u src/external/mpl/bind/dist/bin/named/server.c:1.14 src/external/mpl/bind/dist/bin/named/server.c:1.15
--- src/external/mpl/bind/dist/bin/named/server.c:1.14	Mon Apr  5 11:29:49 2021
+++ src/external/mpl/bind/dist/bin/named/server.c	Mon Apr  5 11:36:55 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: server.c,v 1.14 2021/04/05 11:29:49 rillig Exp $	*/
+/*	$NetBSD: server.c,v 1.15 2021/04/05 11:36:55 rillig Exp $	*/
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -9198,6 +9198,7 @@ load_configuration(const char *filename,
 		goto cleanup;
 	}
 #endif
+
 #ifdef HAVE_LMDB
 	/*
 	 * Reopen NZD databases.

Index: src/external/mpl/bind/dist/lib/dns/dnsrps.c
diff -u src/external/mpl/bind/dist/lib/dns/dnsrps.c:1.6 src/external/mpl/bind/dist/lib/dns/dnsrps.c:1.7
--- src/external/mpl/bind/dist/lib/dns/dnsrps.c:1.6	Fri Feb 19 16:42:15 2021
+++ src/external/mpl/bind/dist/lib/dns/dnsrps.c	Mon Apr  5 11:36:55 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: dnsrps.c,v 1.6 2021/02/19 16:42:15 christos Exp $	*/
+/*	$NetBSD: dnsrps.c,v 1.7 2021/04/05 11:36:55 rillig Exp $	*/
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -15,7 +15,6 @@
 
 #include 
 #include 
-#include 
 
 #ifdef USE_DNSRPS
 

Index: src/external/mpl/bind/dist/lib/dns/dnssec.c
diff -u src/external/mpl/bind/dist/lib/dns/dnssec.c:1.8 src/external/mpl/bind/dist/lib/dns/dnssec.c:1.9
--- src/external/mpl/bind/dist/lib/dns/dnssec.c:1.8	Mon Apr  5 11:27:01 2021
+++ src/external/mpl/bind/dist/lib/dns/dnssec.c	Mon Apr  5 11:36:55 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: dnssec.c,v 1.8 2021/04/05 11:27:01 rillig Exp $	*/
+/*	$NetBSD: dnssec.c,v 1.9 2021/04/05 11:36:55 rillig Exp $	*/
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -360,7 +360,7 @@ dns_dnssec_sign(const dns_name_t *name, 
 	}
 
 	ret = dns_rdata_fromstruct(sigrdata, sig.common.rdclass,
-  sig.common.rdtype, &sig, buffer);
+   sig.common.rdtype, &sig, buffer);
 
 cleanup_array:
 	isc_mem_put(mctx, rdatas, nrdatas * sizeof(dns_rdata_t));
Index: src/external/mpl/bind/dist/lib/dns/gen.c
diff -u src/external/mpl/bind/dist/lib/dns/gen.c:1.8 src/external/mpl/bind/dist/lib/dns/gen.c:1.9
--- src/external/mpl/bind/dist/lib/dns/gen.c:1.8	Mon Apr  5 11:27:02 2021
+++ src/external/mpl/bind/dist/lib/dns/gen.c	Mon Apr  5 11:36:55 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: gen.c,v 1.8 2021/04/05 11:27:02 rillig Exp $	*/
+/*	$NetBSD: gen.c,v 1.9 2021/04/05 11:36:55 rillig Exp $	*/
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -814,7 +814,7 @@ main(int argc, char **argv) {
 		fprintf(stdout, "\t\t\t*(_tp) = _d; \\\n");
 		fprintf(stdout, "\t\t\treturn (ISC_R_SUCCESS); \\\n");
 		fprintf(stdout, "\t\t} \\\n");
-		fprintf(stdout, "\t} while (/*CONSTCOND*/0)\n\n");
+		fprintf(stdout, "\t} while (0)\n\n");
 
 		fprintf(stdout, "#define RDATATYPE_FROMTEXT_SW(_hash,"
 "_typename,_length,_typep) \\\n");

Index: src/external/mpl/bind/dist/lib/dns/peer.c
diff -u src/external/mpl/bind/dist/lib/dns/peer.c:1.7 src/external/mpl/bind/dist/lib/dns/peer.c:1.8
--- src/external/mpl/bind/dist/lib/dns/peer.c:1.7	Mon Apr  5 10:19:34 2021
+++ src/external/mpl/bind/dist/lib/dns/peer.c	Mon Apr  5 11:36:55 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: peer.c,v 1.7 2021/04/05 10:19:34 rillig Exp $	*/
+/*	$NetBSD: peer.c,v 1.8 2021/04/05 11:36:55 rillig Exp $	*/
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -215,6 +215,7 @@ dns_peer_newprefix(isc_mem_t *mem, const
 	REQUIRE(peerptr != NULL && *peerptr == NULL);
 
 	peer = isc_mem_get(mem, sizeof(*peer));
+
 	*peer = (dns_peer_t){
 		.magic = DNS_PEER_MAGIC,
 		.address = *addr,

Index: src/external/mpl/bind/dist/lib/dns/tests/dnstest.h
diff -u src/external/mpl/bind/dist/lib/dns/tests/dnstest.h:1.5 src/external/mpl/bind/dist/lib/dns/tests/dnstest.h:1.6
--- src/external/mpl/bind/dist/lib/dns/tests/dnstest.h:1.5	Fri Feb 1

CVS commit: src/sys/arch/sparc64/dev

2021-04-05 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Mon Apr  5 12:19:22 UTC 2021

Modified Files:
src/sys/arch/sparc64/dev: ldc.c

Log Message:
sun4v: Ignore spurious ldc CTRL/ACK/VERS messages (do not reset the connection 
anymore). Fixes occationals stalls when vdsk uses the ldc service. Observed on 
both T2000 and T5 host systems


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sparc64/dev/ldc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sparc64/dev/ldc.c
diff -u src/sys/arch/sparc64/dev/ldc.c:1.6 src/sys/arch/sparc64/dev/ldc.c:1.7
--- src/sys/arch/sparc64/dev/ldc.c:1.6	Tue Oct 15 00:13:52 2019
+++ src/sys/arch/sparc64/dev/ldc.c	Mon Apr  5 12:19:22 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ldc.c,v 1.6 2019/10/15 00:13:52 chs Exp $	*/
+/*	$NetBSD: ldc.c,v 1.7 2021/04/05 12:19:22 palle Exp $	*/
 /*	$OpenBSD: ldc.c,v 1.12 2015/03/21 18:02:58 kettenis Exp $	*/
 /*
  * Copyright (c) 2009 Mark Kettenis
@@ -76,24 +76,25 @@ ldc_rx_ctrl_vers(struct ldc_conn *lc, st
 {
 	switch (lp->stype) {
 	case LDC_INFO:
-		DPRINTF(("CTRL/INFO/VERS\n"));
+		DPRINTF(("CTRL/INFO/VERS major %d minor %d\n", lp->major, lp->minor));
 		if (lp->major == LDC_VERSION_MAJOR &&
 		lp->minor == LDC_VERSION_MINOR)
 			ldc_send_ack(lc);
 		else {
 			/* XXX do nothing for now. */
+			DPRINTF(("CTRL/INFO/VERS unsupported major/minor\n"));
 		}
 		break;
 
 	case LDC_ACK:
+		DPRINTF(("CTRL/ACK/VERS\n"));
 		if (lc->lc_state != LDC_SND_VERS) {
-			DPRINTF(("Spurious CTRL/ACK/VERS: state %d\n",
-			lc->lc_state));
-			ldc_reset(lc);
-			return;
+			DPRINTF(("Spurious CTRL/ACK/VERS: state %d major %d minor %d (ignored)\n",
+	 lc->lc_state, lp->major, lp->minor));
+		}
+		else {		
+			ldc_send_rts(lc);
 		}
-		DPRINTF(("CTRL/ACK/VERS\n"));
-		ldc_send_rts(lc);
 		break;
 
 	case LDC_NACK:
@@ -263,6 +264,7 @@ ldc_send_vers(struct ldc_conn *lc)
 	lp->ctrl = LDC_VERS;
 	lp->major = 1;
 	lp->minor = 0;
+	DPRINTF(("ldc_send_vers() major %d minor %d\n", lp->major, lp->minor));
 
 	tx_tail += sizeof(*lp);
 	tx_tail &= ((lc->lc_txq->lq_nentries * sizeof(*lp)) - 1);
@@ -274,6 +276,7 @@ ldc_send_vers(struct ldc_conn *lc)
 	}
 
 	lc->lc_state = LDC_SND_VERS;
+	DPRINTF(("ldc_send_vers() setting lc->lc_state to %d\n", lc->lc_state));
 	mutex_exit(&lc->lc_txq->lq_mtx);
 }
 
@@ -309,6 +312,7 @@ ldc_send_ack(struct ldc_conn *lc)
 	}
 
 	lc->lc_state = LDC_RCV_VERS;
+	DPRINTF(("ldc_send_ack() setting lc->lc_state to %d\n", lc->lc_state));
 	mutex_exit(&lc->lc_txq->lq_mtx);
 }
 
@@ -344,6 +348,7 @@ ldc_send_rts(struct ldc_conn *lc)
 	}
 
 	lc->lc_state = LDC_SND_RTS;
+	DPRINTF(("ldc_send_rts() setting lc->lc_state to %d\n", lc->lc_state));
 	mutex_exit(&lc->lc_txq->lq_mtx);
 }
 
@@ -379,6 +384,7 @@ ldc_send_rtr(struct ldc_conn *lc)
 	}
 
 	lc->lc_state = LDC_SND_RTR;
+	DPRINTF(("ldc_send_rtr() setting lc->lc_state to %d\n", lc->lc_state));
 	mutex_exit(&lc->lc_txq->lq_mtx);
 }
 
@@ -414,6 +420,7 @@ ldc_send_rdx(struct ldc_conn *lc)
 	}
 
 	lc->lc_state = LDC_SND_RDX;
+	DPRINTF(("ldc_send_rdx() setting lc->lc_state to %d\n", lc->lc_state));
 	mutex_exit(&lc->lc_txq->lq_mtx);
 }
 



CVS commit: src/usr.bin/make

2021-04-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Apr  5 12:51:35 UTC 2021

Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: directive-export-impl.exp vardebug.exp
varmod-match-escape.exp

Log Message:
make: clean up debug logging for ':M' and ':N'

Using square brackets as quotes was confusing since patterns can contain
square brackets themselves.

The debug logging for VarMatch was a bit too detailed.  Having the
"before" and "after" states is enough for all practically relevant
cases.


To generate a diff of this commit:
cvs rdiff -u -r1.907 -r1.908 src/usr.bin/make/var.c
cvs rdiff -u -r1.8 -r1.9 \
src/usr.bin/make/unit-tests/directive-export-impl.exp
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/make/unit-tests/vardebug.exp
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/varmod-match-escape.exp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.907 src/usr.bin/make/var.c:1.908
--- src/usr.bin/make/var.c:1.907	Sun Apr  4 13:35:25 2021
+++ src/usr.bin/make/var.c	Mon Apr  5 12:51:35 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.907 2021/04/04 13:35:25 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.908 2021/04/05 12:51:35 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.907 2021/04/04 13:35:25 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.908 2021/04/05 12:51:35 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -1412,7 +1412,7 @@ static void
 ModifyWord_Match(const char *word, SepBuf *buf, void *data)
 {
 	const char *pattern = data;
-	DEBUG2(VAR, "VarMatch [%s] [%s]\n", word, pattern);
+
 	if (Str_Match(word, pattern))
 		SepBuf_AddStr(buf, word);
 }
@@ -1425,6 +1425,7 @@ static void
 ModifyWord_NoMatch(const char *word, SepBuf *buf, void *data)
 {
 	const char *pattern = data;
+
 	if (!Str_Match(word, pattern))
 		SepBuf_AddStr(buf, word);
 }
@@ -2853,8 +2854,7 @@ ParseModifier_Match(const char **pp, con
 		free(old_pattern);
 	}
 
-	DEBUG3(VAR, "Pattern[%s] for [%s] is [%s]\n",
-	   expr->name, expr->value.str, pattern);
+	DEBUG2(VAR, "Pattern for ':%c' is \"%s\"\n", mod[0], pattern);
 
 	*out_pattern = pattern;
 }

Index: src/usr.bin/make/unit-tests/directive-export-impl.exp
diff -u src/usr.bin/make/unit-tests/directive-export-impl.exp:1.8 src/usr.bin/make/unit-tests/directive-export-impl.exp:1.9
--- src/usr.bin/make/unit-tests/directive-export-impl.exp:1.8	Sun Apr  4 10:13:09 2021
+++ src/usr.bin/make/unit-tests/directive-export-impl.exp	Mon Apr  5 12:51:35 2021
@@ -6,7 +6,7 @@ ParseReadLine (32): ': ${UT_VAR:N*}'
 Var_Parse: ${UT_VAR:N*} (eval-defined)
 Var_Parse: ${REF}> (eval-defined)
 Applying ${UT_VAR:N...} to "<>" (eval-defined, regular)
-Pattern[UT_VAR] for [<>] is [*]
+Pattern for ':N' is "*"
 ModifyWords: split "<>" into 1 words
 Result of ${UT_VAR:N*} is "" (eval-defined, regular)
 ParseDependency(: )
@@ -27,7 +27,7 @@ ParseReadLine (50): ': ${UT_VAR:N*}'
 Var_Parse: ${UT_VAR:N*} (eval-defined)
 Var_Parse: ${REF}> (eval-defined)
 Applying ${UT_VAR:N...} to "<>" (eval-defined, regular)
-Pattern[UT_VAR] for [<>] is [*]
+Pattern for ':N' is "*"
 ModifyWords: split "<>" into 1 words
 Result of ${UT_VAR:N*} is "" (eval-defined, regular)
 ParseDependency(: )

Index: src/usr.bin/make/unit-tests/vardebug.exp
diff -u src/usr.bin/make/unit-tests/vardebug.exp:1.19 src/usr.bin/make/unit-tests/vardebug.exp:1.20
--- src/usr.bin/make/unit-tests/vardebug.exp:1.19	Sat Apr  3 22:02:59 2021
+++ src/usr.bin/make/unit-tests/vardebug.exp	Mon Apr  5 12:51:35 2021
@@ -19,15 +19,12 @@ Global:VAR = 1 2
 Global:VAR = 1 2 3
 Var_Parse: ${VAR:M[2]} (eval-defined)
 Applying ${VAR:M...} to "1 2 3" (eval-defined, regular)
-Pattern[VAR] for [1 2 3] is [[2]]
+Pattern for ':M' is "[2]"
 ModifyWords: split "1 2 3" into 3 words
-VarMatch [1] [[2]]
-VarMatch [2] [[2]]
-VarMatch [3] [[2]]
 Result of ${VAR:M[2]} is "2" (eval-defined, regular)
 Var_Parse: ${VAR:N[2]} (eval-defined)
 Applying ${VAR:N...} to "1 2 3" (eval-defined, regular)
-Pattern[VAR] for [1 2 3] is [[2]]
+Pattern for ':N' is "[2]"
 ModifyWords: split "1 2 3" into 3 words
 Result of ${VAR:N[2]} is "1 3" (eval-defined, regular)
 Var_Parse: ${VAR:S,2,two,} (eval-defined)
@@ -54,14 +51,12 @@ Applying ${:U...} to "" (eval-defined, u
 Result of ${:UM*e} is "M*e" (eval-defined, defined)
 Indirect modifier "M*e" from "${:UM*e}"
 Applying ${:M...} to "value" (eval-defined, defined)
-Pattern[] for [value] is [*e]
+Pattern for ':M' is "*e"
 ModifyWords: split "value" into 1 words
-VarMatch [value] [*e]
 Result of ${:M*e} is "value" (eval-defined, defined)
 Applying ${:M...} to "value" (eval-defined, defined)
-Pattern[] for [value] is [valu[e]]
+Pattern for ':M' is "valu[e]"
 ModifyWords: split "valu

CVS commit: src/usr.bin/make

2021-04-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Apr  5 13:14:55 UTC 2021

Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: directive-export-impl.exp
directive-unexport-env.exp var-eval-short.exp var-op-append.exp
vardebug.exp varmod-assign.exp varmod-defined.exp
varmod-indirect.exp varmod-match-escape.exp varname-empty.exp
varname.exp

Log Message:
make: be more verbose in -dv debug logging

The previous log output was too brief to be understandable.  Give more
hints by describing each part of the expression when evaluating a
modifier.  Distinguish between parse-only mode and eval mode since in
parse-only mode most of the details are irrelevant.


To generate a diff of this commit:
cvs rdiff -u -r1.908 -r1.909 src/usr.bin/make/var.c
cvs rdiff -u -r1.9 -r1.10 \
src/usr.bin/make/unit-tests/directive-export-impl.exp
cvs rdiff -u -r1.7 -r1.8 \
src/usr.bin/make/unit-tests/directive-unexport-env.exp \
src/usr.bin/make/unit-tests/var-op-append.exp
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/make/unit-tests/var-eval-short.exp \
src/usr.bin/make/unit-tests/varname-empty.exp
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/make/unit-tests/vardebug.exp
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/varmod-assign.exp
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/varmod-defined.exp
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/make/unit-tests/varmod-indirect.exp
cvs rdiff -u -r1.10 -r1.11 \
src/usr.bin/make/unit-tests/varmod-match-escape.exp
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/make/unit-tests/varname.exp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.908 src/usr.bin/make/var.c:1.909
--- src/usr.bin/make/var.c:1.908	Mon Apr  5 12:51:35 2021
+++ src/usr.bin/make/var.c	Mon Apr  5 13:14:54 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.908 2021/04/05 12:51:35 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.909 2021/04/05 13:14:54 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.908 2021/04/05 12:51:35 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.909 2021/04/05 13:14:54 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -3661,11 +3661,20 @@ LogBeforeApply(const ModChain *ch, const
 	const Expr *expr = ch->expr;
 	bool is_single_char = mod[0] != '\0' && IsDelimiter(mod[1], ch);
 
-	/* At this point, only the first character of the modifier can
-	 * be used since the end of the modifier is not yet known. */
-	debug_printf("Applying ${%s:%c%s} to \"%s\" (%s, %s)\n",
-	expr->name, mod[0], is_single_char ? "" : "...",
-	expr->value.str,
+	/*
+	 * At this point, only the first character of the modifier can
+	 * be used since the end of the modifier is not yet known.
+	 */
+
+	if (!Expr_ShouldEval(expr)) {
+		debug_printf("Parsing modifier ${%s:%c%s}\n",
+		expr->name, mod[0], is_single_char ? "" : "...");
+		return;
+	}
+
+	debug_printf(
+	"Evaluating modifier ${%s:%c%s} on value \"%s\" (%s, %s)\n",
+	expr->name, mod[0], is_single_char ? "" : "...", expr->value.str,
 	VarEvalMode_Name[expr->emode],
 	ExprDefined_Name[expr->defined]);
 }

Index: src/usr.bin/make/unit-tests/directive-export-impl.exp
diff -u src/usr.bin/make/unit-tests/directive-export-impl.exp:1.9 src/usr.bin/make/unit-tests/directive-export-impl.exp:1.10
--- src/usr.bin/make/unit-tests/directive-export-impl.exp:1.9	Mon Apr  5 12:51:35 2021
+++ src/usr.bin/make/unit-tests/directive-export-impl.exp	Mon Apr  5 13:14:55 2021
@@ -5,19 +5,19 @@ Global:.MAKE.EXPORTED = UT_VAR
 ParseReadLine (32): ': ${UT_VAR:N*}'
 Var_Parse: ${UT_VAR:N*} (eval-defined)
 Var_Parse: ${REF}> (eval-defined)
-Applying ${UT_VAR:N...} to "<>" (eval-defined, regular)
+Evaluating modifier ${UT_VAR:N...} on value "<>" (eval-defined, regular)
 Pattern for ':N' is "*"
 ModifyWords: split "<>" into 1 words
 Result of ${UT_VAR:N*} is "" (eval-defined, regular)
 ParseDependency(: )
 CondParser_Eval: ${:!echo "\$UT_VAR"!} != "<>"
 Var_Parse: ${:!echo "\$UT_VAR"!} != "<>" (eval-defined)
-Applying ${:!...} to "" (eval-defined, undefined)
+Evaluating modifier ${:!...} on value "" (eval-defined, undefined)
 Modifier part: "echo "$UT_VAR""
 Var_Parse: ${.MAKE.EXPORTED:O:u} (eval)
-Applying ${.MAKE.EXPORTED:O} to "UT_VAR" (eval, regular)
+Evaluating modifier ${.MAKE.EXPORTED:O} on value "UT_VAR" (eval, regular)
 Result of ${.MAKE.EXPORTED:O} is "UT_VAR" (eval, regular)
-Applying ${.MAKE.EXPORTED:u} to "UT_VAR" (eval, regular)
+Evaluating modifier ${.MAKE.EXPORTED:u} on value "UT_VAR" (eval, regular)
 Result of ${.MAKE.EXPORTED:u} is "UT_VAR" (eval, regular)
 Var_Parse: ${UT_VAR} (eval)
 Var_Parse: ${REF}> (eval)
@@ -26,7 +26,7 @@ lhs = "<>", rhs = "<>", op =

CVS commit: src/usr.bin/make

2021-04-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Apr  5 13:27:30 UTC 2021

Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: directive-export-impl.exp
directive-unexport-env.exp vardebug.exp varmod-assign.exp
varmod-match-escape.exp

Log Message:
make: omit unnecessary details from -dv debug log

When an expression is based on a defined variable, it does not matter
whether the evaluation mode is "eval" or "eval-defined", therefore omit
these details to reduce confusion.


To generate a diff of this commit:
cvs rdiff -u -r1.909 -r1.910 src/usr.bin/make/var.c
cvs rdiff -u -r1.10 -r1.11 \
src/usr.bin/make/unit-tests/directive-export-impl.exp
cvs rdiff -u -r1.8 -r1.9 \
src/usr.bin/make/unit-tests/directive-unexport-env.exp
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/make/unit-tests/vardebug.exp
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/varmod-assign.exp
cvs rdiff -u -r1.11 -r1.12 \
src/usr.bin/make/unit-tests/varmod-match-escape.exp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.909 src/usr.bin/make/var.c:1.910
--- src/usr.bin/make/var.c:1.909	Mon Apr  5 13:14:54 2021
+++ src/usr.bin/make/var.c	Mon Apr  5 13:27:30 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.909 2021/04/05 13:14:54 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.910 2021/04/05 13:27:30 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.909 2021/04/05 13:14:54 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.910 2021/04/05 13:27:30 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -3672,11 +3672,19 @@ LogBeforeApply(const ModChain *ch, const
 		return;
 	}
 
+	if ((expr->emode == VARE_WANTRES || expr->emode == VARE_UNDEFERR) &&
+	expr->defined == DEF_REGULAR) {
+		debug_printf(
+		"Evaluating modifier ${%s:%c%s} on value \"%s\"\n",
+		expr->name, mod[0], is_single_char ? "" : "...",
+		expr->value.str);
+		return;
+	}
+
 	debug_printf(
 	"Evaluating modifier ${%s:%c%s} on value \"%s\" (%s, %s)\n",
 	expr->name, mod[0], is_single_char ? "" : "...", expr->value.str,
-	VarEvalMode_Name[expr->emode],
-	ExprDefined_Name[expr->defined]);
+	VarEvalMode_Name[expr->emode], ExprDefined_Name[expr->defined]);
 }
 
 static void

Index: src/usr.bin/make/unit-tests/directive-export-impl.exp
diff -u src/usr.bin/make/unit-tests/directive-export-impl.exp:1.10 src/usr.bin/make/unit-tests/directive-export-impl.exp:1.11
--- src/usr.bin/make/unit-tests/directive-export-impl.exp:1.10	Mon Apr  5 13:14:55 2021
+++ src/usr.bin/make/unit-tests/directive-export-impl.exp	Mon Apr  5 13:27:30 2021
@@ -5,7 +5,7 @@ Global:.MAKE.EXPORTED = UT_VAR
 ParseReadLine (32): ': ${UT_VAR:N*}'
 Var_Parse: ${UT_VAR:N*} (eval-defined)
 Var_Parse: ${REF}> (eval-defined)
-Evaluating modifier ${UT_VAR:N...} on value "<>" (eval-defined, regular)
+Evaluating modifier ${UT_VAR:N...} on value "<>"
 Pattern for ':N' is "*"
 ModifyWords: split "<>" into 1 words
 Result of ${UT_VAR:N*} is "" (eval-defined, regular)
@@ -15,9 +15,9 @@ Var_Parse: ${:!echo "\$UT_VAR"!} != "<>"
 Evaluating modifier ${:!...} on value "" (eval-defined, undefined)
 Modifier part: "echo "$UT_VAR""
 Var_Parse: ${.MAKE.EXPORTED:O:u} (eval)
-Evaluating modifier ${.MAKE.EXPORTED:O} on value "UT_VAR" (eval, regular)
+Evaluating modifier ${.MAKE.EXPORTED:O} on value "UT_VAR"
 Result of ${.MAKE.EXPORTED:O} is "UT_VAR" (eval, regular)
-Evaluating modifier ${.MAKE.EXPORTED:u} on value "UT_VAR" (eval, regular)
+Evaluating modifier ${.MAKE.EXPORTED:u} on value "UT_VAR"
 Result of ${.MAKE.EXPORTED:u} is "UT_VAR" (eval, regular)
 Var_Parse: ${UT_VAR} (eval)
 Var_Parse: ${REF}> (eval)
@@ -26,7 +26,7 @@ lhs = "<>", rhs = "<>", op = !=
 ParseReadLine (50): ': ${UT_VAR:N*}'
 Var_Parse: ${UT_VAR:N*} (eval-defined)
 Var_Parse: ${REF}> (eval-defined)
-Evaluating modifier ${UT_VAR:N...} on value "<>" (eval-defined, regular)
+Evaluating modifier ${UT_VAR:N...} on value "<>"
 Pattern for ':N' is "*"
 ModifyWords: split "<>" into 1 words
 Result of ${UT_VAR:N*} is "" (eval-defined, regular)
@@ -38,9 +38,9 @@ Var_Parse: ${:!echo "\$UT_VAR"!} != " (eval)

Index: src/usr.bin/make/unit-tests/directive-unexport-env.exp
diff -u src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.8 src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.9
--- src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.8	Mon Apr  5 13:14:55 2021
+++ src/usr.bin/make/unit-tests/directive-unexport-env.exp	Mon Apr  5 13:27:30 2021
@@ -5,9 +5,9 @@ Global:UT_UNEXPORTED = value
 Global:.MAKE.EXPORTED = UT_EXPORTED
 make: "directive-unexport-env.mk" line 21: The directive .unexport-env does not take arguments
 Var_Parse: ${.MAKE.EXPORTED:O:u}

CVS commit: src/usr.bin/make

2021-04-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Apr  5 13:35:41 UTC 2021

Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: deptgt-makeflags.exp
directive-export-impl.exp directive-unexport-env.exp directive.exp
opt-debug.exp var-eval-short.exp var-op-append.exp vardebug.exp
varmod-assign.exp varmod-defined.exp varmod-indirect.exp
varmod-match-escape.exp varname-dot-shell.exp varname-empty.exp
varname.exp

Log Message:
make: in debug log, add space between scope and variable name

Without this space, the debug log looked more like line noise, even
though the only punctuation was a single innocent ':'.  From a make
user's perspective, the variable name is a word of its own and should
not be visually glued to its namespace.


To generate a diff of this commit:
cvs rdiff -u -r1.910 -r1.911 src/usr.bin/make/var.c
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/deptgt-makeflags.exp \
src/usr.bin/make/unit-tests/opt-debug.exp
cvs rdiff -u -r1.11 -r1.12 \
src/usr.bin/make/unit-tests/directive-export-impl.exp \
src/usr.bin/make/unit-tests/varname-dot-shell.exp
cvs rdiff -u -r1.9 -r1.10 \
src/usr.bin/make/unit-tests/directive-unexport-env.exp
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/directive.exp
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/var-eval-short.exp \
src/usr.bin/make/unit-tests/varmod-match-escape.exp \
src/usr.bin/make/unit-tests/varname-empty.exp
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/var-op-append.exp
cvs rdiff -u -r1.22 -r1.23 src/usr.bin/make/unit-tests/vardebug.exp
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/make/unit-tests/varmod-assign.exp
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/varmod-defined.exp
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/make/unit-tests/varmod-indirect.exp
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/make/unit-tests/varname.exp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.910 src/usr.bin/make/var.c:1.911
--- src/usr.bin/make/var.c:1.910	Mon Apr  5 13:27:30 2021
+++ src/usr.bin/make/var.c	Mon Apr  5 13:35:41 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.910 2021/04/05 13:27:30 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.911 2021/04/05 13:35:41 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.910 2021/04/05 13:27:30 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.911 2021/04/05 13:35:41 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -476,7 +476,7 @@ VarAdd(const char *name, const char *val
 	Var *v = VarNew(FStr_InitRefer(/* aliased to */ he->key), value,
 	false, (flags & VAR_SET_READONLY) != 0);
 	HashEntry_Set(he, v);
-	DEBUG3(VAR, "%s:%s = %s\n", scope->name, name, value);
+	DEBUG3(VAR, "%s: %s = %s\n", scope->name, name, value);
 	return v;
 }
 
@@ -930,7 +930,7 @@ ExistsInCmdline(const char *name, const 
 		return false;
 
 	if (v->fromCmd) {
-		DEBUG3(VAR, "%s:%s = %s ignored!\n",
+		DEBUG3(VAR, "%s: %s = %s ignored!\n",
 		SCOPE_GLOBAL->name, name, val);
 		return true;
 	}
@@ -975,14 +975,14 @@ Var_SetWithFlags(GNode *scope, const cha
 		v = VarAdd(name, val, scope, flags);
 	} else {
 		if (v->readOnly && !(flags & VAR_SET_READONLY)) {
-			DEBUG3(VAR, "%s:%s = %s ignored (read-only)\n",
+			DEBUG3(VAR, "%s: %s = %s ignored (read-only)\n",
 			scope->name, name, val);
 			return;
 		}
 		Buf_Empty(&v->val);
 		Buf_AddStr(&v->val, val);
 
-		DEBUG3(VAR, "%s:%s = %s\n", scope->name, name, val);
+		DEBUG3(VAR, "%s: %s = %s\n", scope->name, name, val);
 		if (v->exported)
 			ExportVar(name, VEM_PLAIN);
 	}
@@ -1107,7 +1107,7 @@ Var_Append(GNode *scope, const char *nam
 		Buf_AddByte(&v->val, ' ');
 		Buf_AddStr(&v->val, val);
 
-		DEBUG3(VAR, "%s:%s = %s\n", scope->name, name, v->val.data);
+		DEBUG3(VAR, "%s: %s = %s\n", scope->name, name, v->val.data);
 
 		if (v->fromEnv) {
 			/*

Index: src/usr.bin/make/unit-tests/deptgt-makeflags.exp
diff -u src/usr.bin/make/unit-tests/deptgt-makeflags.exp:1.4 src/usr.bin/make/unit-tests/deptgt-makeflags.exp:1.5
--- src/usr.bin/make/unit-tests/deptgt-makeflags.exp:1.4	Mon Mar 15 15:39:13 2021
+++ src/usr.bin/make/unit-tests/deptgt-makeflags.exp	Mon Apr  5 13:35:41 2021
@@ -1,10 +1,10 @@
 Global:delete DOLLAR (not found)
-Command:DOLLAR = 
-Global:.MAKEOVERRIDES =  VAR DOLLAR
+Command: DOLLAR = 
+Global: .MAKEOVERRIDES =  VAR DOLLAR
 CondParser_Eval: ${DOLLAR} != "\$\$"
 Var_Parse: ${DOLLAR} != "\$\$" (eval-defined)
 lhs = "$$", rhs = "$$", op = !=
-Global:.MAKEFLAGS =  -r -k -D VAR -D VAR -d cv -d
-Global:.MAKEFLAGS =  -r -k -D VAR -D VAR -d cv -d 0
+Global: .MAKEFLAGS =  -r -k -D VAR -D VAR -d cv -d
+Global: .MAKEFLAGS =  -r 

CVS commit: src/sys/arch/sparc64

2021-04-05 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Mon Apr  5 22:36:27 UTC 2021

Modified Files:
src/sys/arch/sparc64/include: cpu.h
src/sys/arch/sparc64/sparc64: cpu.c

Log Message:
Fix build w/o options SUN4V.


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/sys/arch/sparc64/include/cpu.h
cvs rdiff -u -r1.139 -r1.140 src/sys/arch/sparc64/sparc64/cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sparc64/include/cpu.h
diff -u src/sys/arch/sparc64/include/cpu.h:1.131 src/sys/arch/sparc64/include/cpu.h:1.132
--- src/sys/arch/sparc64/include/cpu.h:1.131	Sat Apr  3 17:01:24 2021
+++ src/sys/arch/sparc64/include/cpu.h	Mon Apr  5 22:36:27 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.131 2021/04/03 17:01:24 palle Exp $ */
+/*	$NetBSD: cpu.h,v 1.132 2021/04/05 22:36:27 nakayama Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -198,7 +198,7 @@ struct cpu_info {
 
 	/* TSB description (sun4v). */
 	struct tsb_desc *ci_tsb_desc;
-	
+
 	/* MMU Fault Status Area (sun4v).
 	 * Will be initialized to the physical address of the bottom of
 	 * the interrupt stack.
@@ -440,9 +440,6 @@ void	switchtoctx_usiii(int);
 void	next_tick(long);
 void	next_stick(long);
 void	next_stick_init(void);
-#ifdef SUN4V
-voidcpu_idle_sun4v(void);
-#endif
 /* trap.c */
 void	cpu_vmspace_exec(struct lwp *, vaddr_t, vaddr_t);
 int	rwindow_save(struct lwp *);

Index: src/sys/arch/sparc64/sparc64/cpu.c
diff -u src/sys/arch/sparc64/sparc64/cpu.c:1.139 src/sys/arch/sparc64/sparc64/cpu.c:1.140
--- src/sys/arch/sparc64/sparc64/cpu.c:1.139	Sat Apr  3 17:01:24 2021
+++ src/sys/arch/sparc64/sparc64/cpu.c	Mon Apr  5 22:36:27 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.139 2021/04/03 17:01:24 palle Exp $ */
+/*	$NetBSD: cpu.c,v 1.140 2021/04/05 22:36:27 nakayama Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -52,7 +52,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.139 2021/04/03 17:01:24 palle Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.140 2021/04/05 22:36:27 nakayama Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -95,6 +95,7 @@ struct cpu_bootargs *cpu_args;	/* alloca
 struct pool_cache *fpstate_cache;
 
 static struct cpu_info *alloc_cpuinfo(u_int);
+static void cpu_idle_sun4v(void);
 
 /* The following are used externally (sysctl_hw). */
 char	machine[] = MACHINE;		/* from  */
@@ -700,16 +701,15 @@ cpu_attach(device_t parent, device_t dev
 	 * cpu_idle setup (currently only necessary for sun4v)
 	 */
 	if (CPU_ISSUN4V) {
-	  ci->ci_idlespin = cpu_idle_sun4v;
+		ci->ci_idlespin = cpu_idle_sun4v;
 	}
 }
 
-#ifdef SUN4V
-void cpu_idle_sun4v(void)
+static void
+cpu_idle_sun4v(void)
 {
-  hv_cpu_yield();
+	hv_cpu_yield();
 }
-#endif
 
 int
 cpu_myid(void)



CVS commit: src/sys/conf

2021-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Apr  5 22:52:03 UTC 2021

Modified Files:
src/sys/conf: Makefile.kern.inc

Log Message:
Don't use /usr/bin/time (it is not portable)


To generate a diff of this commit:
cvs rdiff -u -r1.278 -r1.279 src/sys/conf/Makefile.kern.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.278 src/sys/conf/Makefile.kern.inc:1.279
--- src/sys/conf/Makefile.kern.inc:1.278	Mon Apr  5 02:22:00 2021
+++ src/sys/conf/Makefile.kern.inc	Mon Apr  5 18:52:03 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.278 2021/04/05 06:22:00 simonb Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.279 2021/04/05 22:52:03 christos Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -262,7 +262,7 @@ SYSTEM_LD_TAIL_STAGE1=	${SYSTEM_LD_TAIL}
 SYSTEM_LD_TAIL_STAGE2=	${SYSTEM_LD_TAIL}
 .if defined(CTFMERGE)
 SYSTEM_LD_TAIL_STAGE2+= && echo ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ... \
-			&& time -t ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} \
+			&& ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} \
 			${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
 .endif
 .if defined(COPY_SYMTAB)



CVS commit: src/usr.bin/time

2021-04-05 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Apr  5 23:01:55 UTC 2021

Modified Files:
src/usr.bin/time: time.1

Log Message:
Since there is a -t option, and the option itself is documented, there
doesn't seem to be any reason to exclude ``t'' from the usage summary.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/time/time.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/time/time.1
diff -u src/usr.bin/time/time.1:1.29 src/usr.bin/time/time.1:1.30
--- src/usr.bin/time/time.1:1.29	Thu Apr 23 07:54:53 2020
+++ src/usr.bin/time/time.1	Mon Apr  5 23:01:55 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: time.1,v 1.29 2020/04/23 07:54:53 simonb Exp $
+.\"	$NetBSD: time.1,v 1.30 2021/04/05 23:01:55 pgoyette Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)time.1	8.1 (Berkeley) 6/6/93
 .\"
-.Dd April 23, 2020
+.Dd April 5, 2021
 .Dt TIME 1
 .Os
 .Sh NAME
@@ -37,7 +37,7 @@
 .Nd time command execution
 .Sh SYNOPSIS
 .Nm
-.Op Fl clp
+.Op Fl clpt
 .Op Fl f Ar fmt
 .Ar command
 .Op Ar argument ...



CVS commit: [thorpej-cfargs] src/sys/dev/audio

2021-04-05 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Apr  6 00:16:48 UTC 2021

Modified Files:
src/sys/dev/audio [thorpej-cfargs]: audio.c

Log Message:
audiosearch(): Remove a stray CFARG_LOCATORS tag.


To generate a diff of this commit:
cvs rdiff -u -r1.91.2.7 -r1.91.2.8 src/sys/dev/audio/audio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/audio/audio.c
diff -u src/sys/dev/audio/audio.c:1.91.2.7 src/sys/dev/audio/audio.c:1.91.2.8
--- src/sys/dev/audio/audio.c:1.91.2.7	Mon Apr  5 00:48:53 2021
+++ src/sys/dev/audio/audio.c	Tue Apr  6 00:16:48 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.91.2.7 2021/04/05 00:48:53 thorpej Exp $	*/
+/*	$NetBSD: audio.c,v 1.91.2.8 2021/04/06 00:16:48 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -138,7 +138,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.91.2.7 2021/04/05 00:48:53 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.91.2.8 2021/04/06 00:16:48 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -1405,7 +1405,6 @@ audiosearch(device_t parent, cfdata_t cf
 
 	if (config_probe(parent, cf, aux))
 		config_attach(parent, cf, aux, NULL,
-		CFARG_LOCATORS,
 		CFARG_EOL);
 
 	return 0;



CVS commit: src/tests/lib/libcurses/director

2021-04-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Apr  6 00:35:58 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: don't waste time calling strlen needlessly


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libcurses/director/testlang_parse.y
diff -u src/tests/lib/libcurses/director/testlang_parse.y:1.49 src/tests/lib/libcurses/director/testlang_parse.y:1.50
--- src/tests/lib/libcurses/director/testlang_parse.y:1.49	Mon Feb 15 15:55:50 2021
+++ src/tests/lib/libcurses/director/testlang_parse.y	Tue Apr  6 00:35:58 2021
@@ -1,5 +1,5 @@
 %{
-/*	$NetBSD: testlang_parse.y,v 1.49 2021/02/15 15:55:50 joerg Exp $	*/
+/*	$NetBSD: testlang_parse.y,v 1.50 2021/04/06 00:35:58 rillig Exp $	*/
 
 /*-
  * Copyright 2009 Brett Lymn 
@@ -876,8 +876,7 @@ check_function_table(char *function, con
 	int i;
 
 	for (i = 0; i < nfunctions; i++) {
-		if ((strlen(function) == strlen(table[i])) &&
-		(strcmp(function, table[i]) == 0))
+		if (strcmp(function, table[i]) == 0)
 			return 1;
 	}
 



CVS commit: src/tests/lib/libcurses/director

2021-04-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Apr  6 00:47:00 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: clean up table of input functions

The previous "table" was an insult to any reader.  It was unsorted,
listed the functions shuffled, and was not even formatted consistently.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libcurses/director/testlang_parse.y
diff -u src/tests/lib/libcurses/director/testlang_parse.y:1.50 src/tests/lib/libcurses/director/testlang_parse.y:1.51
--- src/tests/lib/libcurses/director/testlang_parse.y:1.50	Tue Apr  6 00:35:58 2021
+++ src/tests/lib/libcurses/director/testlang_parse.y	Tue Apr  6 00:47:00 2021
@@ -1,5 +1,5 @@
 %{
-/*	$NetBSD: testlang_parse.y,v 1.50 2021/04/06 00:35:58 rillig Exp $	*/
+/*	$NetBSD: testlang_parse.y,v 1.51 2021/04/06 00:47:00 rillig Exp $	*/
 
 /*-
  * Copyright 2009 Brett Lymn 
@@ -148,13 +148,17 @@ static void	set_cchar(char *, void *);
 static void	set_wchar(char *);
 static wchar_t *add_to_vals(data_enum_t, void *);
 
+#define variants(fn) "" fn, "mv" fn, "w" fn, "mvw" fn
 static const char *input_functions[] = {
-	"getch", "mvgetch", "mvwgetch", "wgetch", "getnstr", "getstr", "mvgetnstr",
-	"mvgetstr", "mvwgetnstr", "mvwgetstr", "wgetnstr", "wgetstr", "mvscanw",
-	"mvwscanw", "scanw", "wscanw", "get_wch", "mvget_wch", "mvwget_wch",
-	"wget_wch", "getn_wstr", "get_wstr", "mvgetn_wstr", "mvget_wstr",
-	"mvwgetn_wstr","mvwget_wstr", "wgetn_wstr", "wget_wstr"
+	variants("getch"),
+	variants("getnstr"),
+	variants("getstr"),
+	variants("getn_wstr"),
+	variants("get_wch"),
+	variants("get_wstr"),
+	variants("scanw"),
 };
+#undef variants
 
 static const unsigned ninput_functions =
 	sizeof(input_functions) / sizeof(char *);



CVS commit: src/tests/lib/libcurses/director

2021-04-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Apr  6 01:29:37 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
tests/libcurses: fix names of over-the-wire data types

The test 'mvscanw' reported that it would send '%s' as 'numeric', which
was rather suspicious.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libcurses/director/testlang_parse.y
diff -u src/tests/lib/libcurses/director/testlang_parse.y:1.51 src/tests/lib/libcurses/director/testlang_parse.y:1.52
--- src/tests/lib/libcurses/director/testlang_parse.y:1.51	Tue Apr  6 00:47:00 2021
+++ src/tests/lib/libcurses/director/testlang_parse.y	Tue Apr  6 01:29:37 2021
@@ -1,5 +1,5 @@
 %{
-/*	$NetBSD: testlang_parse.y,v 1.51 2021/04/06 00:47:00 rillig Exp $	*/
+/*	$NetBSD: testlang_parse.y,v 1.52 2021/04/06 01:29:37 rillig Exp $	*/
 
 /*-
  * Copyright 2009 Brett Lymn 
@@ -82,9 +82,9 @@ static bool no_input;	/* don't need more
 static wchar_t *vals = NULL;	/* wchars to attach to a cchar type */
 static unsigned nvals;		/* number of wchars */
 
-const char *enum_names[] = {
-	"unused", "static", "numeric", "string", "byte", "cchar", "wchar", "ERR",
-	"OK", "NULL", "not NULL", "variable", "reference", "returns count",
+const char *enum_names[] = {	/* for data_enum_t */
+	"unused", "numeric", "static", "string", "byte", "cchar", "wchar", "ERR",
+	"OK", "NULL", "not NULL", "variable", "reference", "return count",
 	"slave error"
 };
 



CVS commit: src/usr.bin/make

2021-04-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Apr  6 01:38:39 UTC 2021

Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: directive-export-impl.exp
directive-unexport-env.exp vardebug.exp varmod-assign.exp
varmod-match-escape.exp

Log Message:
make: reduce verbosity of the -dv debug logging for standard cases

The verbosity was already removed from LogBeforeApply, now it is
consistent between LogBeforeApply and LogAfterApply.


To generate a diff of this commit:
cvs rdiff -u -r1.911 -r1.912 src/usr.bin/make/var.c
cvs rdiff -u -r1.12 -r1.13 \
src/usr.bin/make/unit-tests/directive-export-impl.exp
cvs rdiff -u -r1.10 -r1.11 \
src/usr.bin/make/unit-tests/directive-unexport-env.exp
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/make/unit-tests/vardebug.exp
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/make/unit-tests/varmod-assign.exp
cvs rdiff -u -r1.13 -r1.14 \
src/usr.bin/make/unit-tests/varmod-match-escape.exp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.911 src/usr.bin/make/var.c:1.912
--- src/usr.bin/make/var.c:1.911	Mon Apr  5 13:35:41 2021
+++ src/usr.bin/make/var.c	Tue Apr  6 01:38:39 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.911 2021/04/05 13:35:41 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.912 2021/04/06 01:38:39 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.911 2021/04/05 13:35:41 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.912 2021/04/06 01:38:39 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -3694,6 +3694,15 @@ LogAfterApply(const ModChain *ch, const 
 	const char *value = expr->value.str;
 	const char *quot = value == var_Error ? "" : "\"";
 
+	if ((expr->emode == VARE_WANTRES || expr->emode == VARE_UNDEFERR) &&
+	expr->defined == DEF_REGULAR) {
+
+		debug_printf("Result of ${%s:%.*s} is %s%s%s\n",
+		expr->name, (int)(p - mod), mod,
+		quot, value == var_Error ? "error" : value, quot);
+		return;
+	}
+
 	debug_printf("Result of ${%s:%.*s} is %s%s%s (%s, %s)\n",
 	expr->name, (int)(p - mod), mod,
 	quot, value == var_Error ? "error" : value, quot,

Index: src/usr.bin/make/unit-tests/directive-export-impl.exp
diff -u src/usr.bin/make/unit-tests/directive-export-impl.exp:1.12 src/usr.bin/make/unit-tests/directive-export-impl.exp:1.13
--- src/usr.bin/make/unit-tests/directive-export-impl.exp:1.12	Mon Apr  5 13:35:41 2021
+++ src/usr.bin/make/unit-tests/directive-export-impl.exp	Tue Apr  6 01:38:39 2021
@@ -8,7 +8,7 @@ Var_Parse: ${REF}> (eval-defined)
 Evaluating modifier ${UT_VAR:N...} on value "<>"
 Pattern for ':N' is "*"
 ModifyWords: split "<>" into 1 words
-Result of ${UT_VAR:N*} is "" (eval-defined, regular)
+Result of ${UT_VAR:N*} is ""
 ParseDependency(: )
 CondParser_Eval: ${:!echo "\$UT_VAR"!} != "<>"
 Var_Parse: ${:!echo "\$UT_VAR"!} != "<>" (eval-defined)
@@ -16,9 +16,9 @@ Evaluating modifier ${:!...} on value ""
 Modifier part: "echo "$UT_VAR""
 Var_Parse: ${.MAKE.EXPORTED:O:u} (eval)
 Evaluating modifier ${.MAKE.EXPORTED:O} on value "UT_VAR"
-Result of ${.MAKE.EXPORTED:O} is "UT_VAR" (eval, regular)
+Result of ${.MAKE.EXPORTED:O} is "UT_VAR"
 Evaluating modifier ${.MAKE.EXPORTED:u} on value "UT_VAR"
-Result of ${.MAKE.EXPORTED:u} is "UT_VAR" (eval, regular)
+Result of ${.MAKE.EXPORTED:u} is "UT_VAR"
 Var_Parse: ${UT_VAR} (eval)
 Var_Parse: ${REF}> (eval)
 Result of ${:!echo "\$UT_VAR"!} is "<>" (eval-defined, defined)
@@ -29,7 +29,7 @@ Var_Parse: ${REF}> (eval-defined)
 Evaluating modifier ${UT_VAR:N...} on value "<>"
 Pattern for ':N' is "*"
 ModifyWords: split "<>" into 1 words
-Result of ${UT_VAR:N*} is "" (eval-defined, regular)
+Result of ${UT_VAR:N*} is ""
 ParseDependency(: )
 ParseReadLine (54): 'REF=		defined'
 Global: REF = defined
@@ -39,9 +39,9 @@ Evaluating modifier ${:!...} on value ""
 Modifier part: "echo "$UT_VAR""
 Var_Parse: ${.MAKE.EXPORTED:O:u} (eval)
 Evaluating modifier ${.MAKE.EXPORTED:O} on value "UT_VAR"
-Result of ${.MAKE.EXPORTED:O} is "UT_VAR" (eval, regular)
+Result of ${.MAKE.EXPORTED:O} is "UT_VAR"
 Evaluating modifier ${.MAKE.EXPORTED:u} on value "UT_VAR"
-Result of ${.MAKE.EXPORTED:u} is "UT_VAR" (eval, regular)
+Result of ${.MAKE.EXPORTED:u} is "UT_VAR"
 Var_Parse: ${UT_VAR} (eval)
 Var_Parse: ${REF}> (eval)
 Result of ${:!echo "\$UT_VAR"!} is "" (eval-defined, defined)

Index: src/usr.bin/make/unit-tests/directive-unexport-env.exp
diff -u src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.10 src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.11
--- src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.10	Mon Apr  5 13:35:41 2021
+++ src/usr.bin/make/unit-tests/directive-unexport-env.exp	Tue Apr  6 01:38:39 2021
@

CVS commit: src/sys/opencrypto

2021-04-05 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Tue Apr  6 03:38:04 UTC 2021

Modified Files:
src/sys/opencrypto: cryptosoft.c

Log Message:
Fix ATF failures, sorry.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/opencrypto/cryptosoft.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/opencrypto/cryptosoft.c
diff -u src/sys/opencrypto/cryptosoft.c:1.60 src/sys/opencrypto/cryptosoft.c:1.61
--- src/sys/opencrypto/cryptosoft.c:1.60	Mon Apr  5 01:24:50 2021
+++ src/sys/opencrypto/cryptosoft.c	Tue Apr  6 03:38:04 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cryptosoft.c,v 1.60 2021/04/05 01:24:50 knakahara Exp $ */
+/*	$NetBSD: cryptosoft.c,v 1.61 2021/04/06 03:38:04 knakahara Exp $ */
 /*	$FreeBSD: src/sys/opencrypto/cryptosoft.c,v 1.2.2.1 2002/11/21 23:34:23 sam Exp $	*/
 /*	$OpenBSD: cryptosoft.c,v 1.35 2002/04/26 08:43:50 deraadt Exp $	*/
 
@@ -24,7 +24,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.60 2021/04/05 01:24:50 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.61 2021/04/06 03:38:04 knakahara Exp $");
 
 #include 
 #include 
@@ -712,7 +712,7 @@ swcr_compdec(struct cryptodesc *crd, con
 	 * copy in a buffer.
 	 */
 
-	data = kmem_alloc(crd->crd_len, KM_NOSLEEP);
+	data = malloc(crd->crd_len, M_CRYPTO_DATA, M_NOWAIT);
 	if (data == NULL)
 		return (EINVAL);
 	COPYDATA(outtype, buf, crd->crd_skip, crd->crd_len, data);
@@ -723,7 +723,7 @@ swcr_compdec(struct cryptodesc *crd, con
 		result = cxf->decompress(data, crd->crd_len, &out,
 	 *res_size);
 
-	kmem_free(data, crd->crd_len);
+	free(data, M_CRYPTO_DATA);
 	if (result == 0)
 		return EINVAL;
 
@@ -1115,7 +1115,7 @@ swcr_freesession_internal(struct swcr_da
 			break;
 		}
 
-		free(swd, M_CRYPTO_DATA);
+		kmem_free(swd, sizeof(*swd));
 	}
 }
 



CVS commit: src/bin/ps

2021-04-05 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Apr  6 04:49:41 UTC 2021

Modified Files:
src/bin/ps: Makefile

Log Message:
We only need -Wno-format-y2k for print.c .


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/bin/ps/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/ps/Makefile
diff -u src/bin/ps/Makefile:1.29 src/bin/ps/Makefile:1.30
--- src/bin/ps/Makefile:1.29	Sun Aug 14 10:53:17 2011
+++ src/bin/ps/Makefile	Tue Apr  6 04:49:41 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.29 2011/08/14 10:53:17 christos Exp $
+#	$NetBSD: Makefile,v 1.30 2021/04/06 04:49:41 simonb Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/2/93
 
 PROG=		ps
@@ -6,7 +6,6 @@ SRCS=		fmt.c keyword.c nlist.c print.c p
 DPADD=		${LIBM} ${LIBKVM}
 LDADD=		-lm -lkvm
 
-CWARNFLAGS+=	-Wno-format-y2k
-COPTS.print.c = -Wno-format-nonliteral
+COPTS.print.c = -Wno-format-nonliteral -Wno-format-y2k
 
 .include 



CVS commit: src/bin/ps

2021-04-05 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Apr  6 05:13:24 UTC 2021

Modified Files:
src/bin/ps: print.c

Log Message:
Fix the column width calculation for the lstart column if an empty
column header is specified.

Fixes bug pointed out by Ted Spradley in
https://mail-index.netbsd.org/netbsd-users/2021/04/05/msg026808.html .


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/bin/ps/print.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/ps/print.c
diff -u src/bin/ps/print.c:1.132 src/bin/ps/print.c:1.133
--- src/bin/ps/print.c:1.132	Wed Jun 19 21:25:50 2019
+++ src/bin/ps/print.c	Tue Apr  6 05:13:24 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: print.c,v 1.132 2019/06/19 21:25:50 kamil Exp $	*/
+/*	$NetBSD: print.c,v 1.133 2021/04/06 05:13:24 simonb Exp $	*/
 
 /*
  * Copyright (c) 2000, 2007 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
 #if 0
 static char sccsid[] = "@(#)print.c	8.6 (Berkeley) 4/16/94";
 #else
-__RCSID("$NetBSD: print.c,v 1.132 2019/06/19 21:25:50 kamil Exp $");
+__RCSID("$NetBSD: print.c,v 1.133 2021/04/06 05:13:24 simonb Exp $");
 #endif
 #endif /* not lint */
 
@@ -815,22 +815,33 @@ lstarted(struct pinfo *pi, VARENT *ve, e
 	char buf[100];
 
 	v = ve->var;
-	if (!k->p_uvalid) {
+	startt = k->p_ustart_sec;
+
+	if (mode == WIDTHMODE) {
 		/*
-		 * Minimum width is less than header - we don't
-		 * need to check it every time.
+		 * We only need to set the width once, as we assume
+		 * that all times are the same length.  We do need to
+		 * check against the header length as well, as "no
+		 * header" mode for this variable will set the field
+		 * width to the length of the header anyway (ref: the
+		 * P1003.1-2004 comment in findvar()).
+		 *
+		 * XXX: The hardcoded "STARTED" string.  Better or
+		 * worse than a "<= 7" or some other arbitary number?
 		 */
-		if (mode == PRINTMODE)
+		if (v->width <= (int)strlen("STARTED")) {
+			(void)strftime(buf, sizeof(buf) -1, "%c",
+			localtime(&startt));
+			strprintorsetwidth(v, buf, mode);
+		}
+	} else {
+		if (!k->p_uvalid) {
 			(void)printf("%*s", v->width, "-");
-		return;
-	}
-	startt = k->p_ustart_sec;
-
-	/* assume all times are the same length */
-	if (mode != WIDTHMODE || v->width == 0) {
-		(void)strftime(buf, sizeof(buf) -1, "%c",
-		localtime(&startt));
-		strprintorsetwidth(v, buf, mode);
+		} else {
+			(void)strftime(buf, sizeof(buf) -1, "%c",
+			localtime(&startt));
+			strprintorsetwidth(v, buf, mode);
+		}
 	}
 }