CVS commit: src/doc

2021-03-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 15 20:18:21 UTC 2021

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new nsd/unbound


To generate a diff of this commit:
cvs rdiff -u -r1.1784 -r1.1785 src/doc/3RDPARTY
cvs rdiff -u -r1.2785 -r1.2786 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1784 src/doc/3RDPARTY:1.1785
--- src/doc/3RDPARTY:1.1784	Fri Mar  5 13:04:18 2021
+++ src/doc/3RDPARTY	Mon Mar 15 16:18:21 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1784 2021/03/05 18:04:18 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1785 2021/03/15 20:18:21 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -164,8 +164,8 @@ Location:	external/mit/libuv/dist
 Notes:
 
 Package:	unbound
-Version:	1.9.6
-Current Vers:	1.10.1
+Version:	1.13.1
+Current Vers:	1.13.1
 Maintainer:	Nlnetlabs
 Archive Site:	https://www.unbound.net/downloads/unbound-latest.tar.gz
 Home Page:	https://www.unbound.net/
@@ -179,12 +179,12 @@ Use cleantags to import
 run configure and update config files in include
 
 Package:	nsd
-Version:	4.2.4
-Current Vers:	4.3.1
+Version:	4.3.5
+Current Vers:	4.3.5
 Maintainer:	Nlnetlabs
 Archive Site:	https://www.nlnetlabs.nl/svn/nsd/
 Home Page:	https://www.nlnetlabs.nl/projects/nsd/
-Date:		2020-06-13
+Date:		2021-03-15
 Mailing List:	https://open.nlnetlabs.nl/mailman/listinfo/nsd-users/
 Responsible:	christos
 License:	BSD-like
@@ -480,12 +480,12 @@ Before importing a new version of extern
 	  into gcc/dist/gcc/doc: cpp.1 cpp.info gcc.1 gcc.info gcov.1
 
 Package:	gdb
-Version:	8.3
-Current Vers:	9.2
+Version:	11.0.50
+Current Vers:	10.1
 Maintainer:	FSF
 Archive Site:	ftp://ftp.gnu.org/gnu/gdb/
 Home Page:	http://www.gnu.org/software/gdb/
-Date:		2020-06-13
+Date:		2021-03-15
 Mailing List:	bug-...@gnu.org
 Responsible:	christos
 License:	GPLv3, LGPLv3.1
@@ -498,11 +498,11 @@ When updating GDB, it is imperative to t
 
 Package:	binutils
 Version:	2.34
-Current Vers:	2.36
+Current Vers:	2.36.1
 Maintainer:	FSF
 Archive Site:	ftp://ftp.gnu.org/gnu/binutils/
 Home Page:	http://www.gnu.org/software/binutils/
-Date:		2020-06-13
+Date:		2021-03-15
 Mailing List:	bug-gnu-ut...@gnu.org
 Responsible:	thorpej, mrg
 License:	GPLv3, LGPLv3, GPLv2, LGPLv2, BSD

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2785 src/doc/CHANGES:1.2786
--- src/doc/CHANGES:1.2785	Fri Mar  5 13:04:18 2021
+++ src/doc/CHANGES	Mon Mar 15 16:18:21 2021
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2785 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2786 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -338,3 +338,5 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	wpa: Import wpa_supplicant and hostapd 2.9. [christos 20210228]
 	tzcode: Updated to 2021a. [christos 20210228]
 	OpenSSH: Import 8.5. [christos 20210304]
+	nsd: Import 4.3.5. [christos 20210315]
+	unbound(8): Import 1.13.1. [christos 20210315]



CVS commit: src/distrib/sets/lists

2021-03-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 15 20:17:04 UTC 2021

Modified Files:
src/distrib/sets/lists/base: shl.mi
src/distrib/sets/lists/debug: shl.mi

Log Message:
bump libunbound


To generate a diff of this commit:
cvs rdiff -u -r1.912 -r1.913 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.271 -r1.272 src/distrib/sets/lists/debug/shl.mi

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

Modified files:

Index: src/distrib/sets/lists/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.912 src/distrib/sets/lists/base/shl.mi:1.913
--- src/distrib/sets/lists/base/shl.mi:1.912	Fri Mar  5 13:08:21 2021
+++ src/distrib/sets/lists/base/shl.mi	Mon Mar 15 16:17:04 2021
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.912 2021/03/05 18:08:21 christos Exp $
+# $NetBSD: shl.mi,v 1.913 2021/03/15 20:17:04 christos Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -926,8 +926,8 @@
 ./usr/lib/libumem.so.0base-zfs-shlib		compatfile,zfs
 ./usr/lib/libumem.so.0.0			base-zfs-shlib		compatfile,zfs
 ./usr/lib/libunbound.sobase-sys-shlib		compatfile,unbound
-./usr/lib/libunbound.so.6			base-sys-shlib		compatfile,unbound
-./usr/lib/libunbound.so.6.2			base-sys-shlib		compatfile,unbound
+./usr/lib/libunbound.so.7			base-sys-shlib		compatfile,unbound
+./usr/lib/libunbound.so.7.0			base-sys-shlib		compatfile,unbound
 ./usr/lib/libusbhid.sobase-sys-shlib		compatfile
 ./usr/lib/libusbhid.so.1			base-sys-shlib		compatfile
 ./usr/lib/libusbhid.so.1.0			base-sys-shlib		compatfile

Index: src/distrib/sets/lists/debug/shl.mi
diff -u src/distrib/sets/lists/debug/shl.mi:1.271 src/distrib/sets/lists/debug/shl.mi:1.272
--- src/distrib/sets/lists/debug/shl.mi:1.271	Fri Mar  5 13:08:21 2021
+++ src/distrib/sets/lists/debug/shl.mi	Mon Mar 15 16:17:04 2021
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.271 2021/03/05 18:08:21 christos Exp $
+# $NetBSD: shl.mi,v 1.272 2021/03/15 20:17:04 christos Exp $
 ./usr/lib/libbfd_g.a		comp-c-debuglib	debuglib,compatfile,binutils
 ./usr/libdata/debug/lib		base-sys-usr	debug,dynamicroot,compatdir
 ./usr/libdata/debug/lib/libavl.so.0.0.debug			comp-zfs-debug	debug,dynamicroot,zfs
@@ -327,7 +327,7 @@
 ./usr/libdata/debug/usr/lib/libubsan.so.4.0.debug		comp-sys-debug	debug,compatfile,cxx,gcc=9
 ./usr/libdata/debug/usr/lib/libukfs.so.1.0.debug		comp-sys-debug	debug,compatfile,rump
 ./usr/libdata/debug/usr/lib/libumem.so.0.0.debug		comp-zfs-debug	debug,compatfile,zfs
-./usr/libdata/debug/usr/lib/libunbound.so.6.2.debug 		comp-net-debug	debug,compatfile,unbound
+./usr/libdata/debug/usr/lib/libunbound.so.7.0.debug 		comp-net-debug	debug,compatfile,unbound
 ./usr/libdata/debug/usr/lib/libusbhid.so.1.0.debug		comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libutil.so.7.23.debug		comp-obsolete	debug,compatfile,obsolete
 ./usr/libdata/debug/usr/lib/libutil.so.7.24.debug		comp-sys-debug	debug,compatfile



CVS import: src/external/bsd/unbound/dist

2021-03-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 15 20:01:15 UTC 2021

Update of /cvsroot/src/external/bsd/unbound/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv9333

Log Message:
Import unbound 1.13.1

4 February 2021: Wouter
- release 1.13.1rc2 tag on branch-1.13.1 with added changes of 2 feb.
  This became 1.13.1 release tag on 9 feb.  The main branch is set
  to version 1.13.2.

2 February 2021: Wouter
- branch-1.13.1 is created, with release-1.13.1rc1 tag.
- Fix dynlibmod link on rhel8 for -ldl inclusion.
- Fix windows dependency on libssp.dll because of default stack
  protector in mingw.
- Fix indentation of root anchor for use by windows install script.

1 February 2021: George
- Attempt to fix NULL keys in the reuse_tcp tree; relates to #411.

29 January 2021: Wouter
- Fix for doxygen 1.8.20 compatibility.

28 January 2021: Wouter
- Annotate that we ignore the return value of if_indextoname.
- Fix to use correct type for label count in rpz routine.
- Fix empty clause warning in config_file nsid parse.
- Fix to use correct type for label count in ipdnametoaddr rpz routine.
- Fix empty clause warning in edns pass for padding.
- Fix fwd ancil test post script when not supported.

26 January 2021: George
- Merge PR #408 from fobser: Prevent a few more yacc clashes.
- Merge PR #275 from Roland van Rijswijk-Deij: Add feature to return the
  original instead of a decrementing TTL ('serve-original-ttl')
- Merge PR #355 from noloader: Make ICANN Update CA and DS Trust Anchor
  static data.
- Ignore cache blacklisting when trying to reply with expired data from
  cache (#394).

26 January 2021: Wouter
- Fix compile of unbound-dnstap-socket without dnstap installed.

22 January 2021: Willem
- Padding of queries and responses with DNS over TLS as specified in
  RFC7830 and RFC8467.

22 January 2021: George
- Fix TTL of SOA record for negative answers (localzone and
  authzone data) to be the minimum of the SOA TTL and the SOA.MINIMUM.

19 January 2021: Willem
- Support for RFC5001: DNS Name Server Identifier (NSID) Option
  with the nsid: option in unbound.conf

18 January 2021: Wouter
- Fix #404: DNS query with small edns bufsize fail.
- Fix declaration before statement and signed comparison warning in
  dns64.

15 January 2021: Wouter
- Merge #402 from fobser: Implement IPv4-Embedded addresses according
  to RFC6052.

14 January 2021: Wouter
- Fix for #93: dynlibmodule import library is named libunbound.dll.a.

13 January 2021: Wouter
- Merge #399 from xiangbao227: The lock of lruhash table should
  unlocked after markdel entry.
- Fix for #93: dynlibmodule link fix for Windows.

12 January 2021: Wouter
- Fix #397: [Feature request] add new type always_null to local-zone
  similar to always_nxdomain.
- Fix so local zone types always_nodata and always_deny can be used
  from the config file.

8 January 2021: Wouter
- Merge PR #391 from fhriley: Add start_time to reply callbacks so
  modules can compute the response time.
- For #391: use struct timeval* start_time for callback information.
- For #391: fix indentation.
- For #391: more double casts in python start time calculation.
- Add comment documentation.
- Fix clang analysis warning.

6 January 2021: Wouter
- Fix #379: zone loading over HTTP appears to have buffer issues.
- Merge PR #395 from mptre: add missing null check.
- Fix #387: client-subnet-always-forward seems to effectively bypass
  any caching?

5 January 2021: Wouter
- Fix #385: autoconf 2.70 impacts unbound build
- Merge PR #375 by fhriley: Add rpz_enable and rpz_disable commands
  to unbound-control.

4 January 2021: Wouter
- For #376: Fix that comm point event is not double removed or double
  added to event map.
- iana portlist updated.

16 December 2020: George
- Fix error cases when udp-connect is set and send() returns an error
  (modified patch from Xin Li @delphij).

11 December 2020: Wouter
- Fix #371: unbound-control timeout when Unbound is not running.
- Fix to squelch permission denied and other errors from remote host,
  they are logged at higher verbosity but not on low verbosity.
- Merge PR #335 from fobser: Sprinkle in some static to prevent
  missing prototype warnings.
- Merge PR #373 from fobser: Warning: arithmetic on a pointer to void
  is a GNU extension.
- Fix missing prototypes in the code.

3 December 2020: Wouter
- make depend.
- iana portlist updated.

2 December 2020: Wouter
 

CVS commit: src/usr.bin/make

2021-03-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 15 20:00:51 UTC 2021

Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: varmod-indirect.mk

Log Message:
make: rename ApplyModifiersState to ModChain

The new name accurately describes the structural element that holds such
properties as the separator character and whether the expression value
is considered a single word.  The old name ApplyModifiersState was too
long and was meant as a placeholder anyway, when I introduced it in
var.c 1.236 from 2020-07-03.


To generate a diff of this commit:
cvs rdiff -u -r1.890 -r1.891 src/usr.bin/make/var.c
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/varmod-indirect.mk

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.890 src/usr.bin/make/var.c:1.891
--- src/usr.bin/make/var.c:1.890	Mon Mar 15 19:15:04 2021
+++ src/usr.bin/make/var.c	Mon Mar 15 20:00:50 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.890 2021/03/15 19:15:04 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.891 2021/03/15 20:00:50 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.890 2021/03/15 19:15:04 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.891 2021/03/15 20:00:50 rillig Exp $");
 
 typedef enum VarFlags {
 	VFL_NONE	= 0,
@@ -1831,7 +1831,7 @@ Words_JoinFree(Words words)
 
 	for (i = 0; i < words.len; i++) {
 		if (i != 0) {
-			/* XXX: Use st->sep instead of ' ', for consistency. */
+			/* XXX: Use ch->sep instead of ' ', for consistency. */
 			Buf_AddByte(, ' ');
 		}
 		Buf_AddStr(, words.words[i]);
@@ -1978,7 +1978,7 @@ VarStrftime(const char *fmt, Boolean zul
  *
  * If parsing succeeds, the parsing position *pp is updated to point to the
  * first character following the modifier, which typically is either ':' or
- * st->endc.  The modifier doesn't have to check for this delimiter character,
+ * ch->endc.  The modifier doesn't have to check for this delimiter character,
  * this is done by ApplyModifiers.
  *
  * XXX: As of 2020-11-15, some modifiers such as :S, :C, :P, :L do not
@@ -2012,7 +2012,7 @@ VarStrftime(const char *fmt, Boolean zul
  * Some modifiers such as ':sh' or '::=' have noticeable side effects though.
  *
  * Evaluating the modifier usually takes the current value of the variable
- * expression from st->expr->value, or the variable name from st->var->name
+ * expression from ch->expr->value, or the variable name from ch->var->name
  * and stores the result back in expr->value via Expr_SetValueOwn or
  * Expr_SetValueRefer.
  *
@@ -2079,7 +2079,7 @@ typedef struct Expr {
  *
  * See varmod-indirect.mk.
  */
-typedef struct ApplyModifiersState {
+typedef struct ModChain {
 	Expr *expr;
 	/* '\0' or '{' or '(' */
 	const char startc;
@@ -2093,7 +2093,7 @@ typedef struct ApplyModifiersState {
 	 * big word, possibly containing spaces.
 	 */
 	Boolean oneBigWord;
-} ApplyModifiersState;
+} ModChain;
 
 static void
 Expr_Define(Expr *expr)
@@ -2148,7 +2148,7 @@ ParseModifierPartSubst(
 const char **pp,
 char delim,
 VarEvalFlags eflags,
-ApplyModifiersState *st,
+ModChain *ch,
 char **out_part,
 /* Optionally stores the length of the returned string, just to save
  * another strlen call. */
@@ -2204,7 +2204,7 @@ ParseModifierPartSubst(
 			VarEvalFlags nested_eflags = eflags;
 			nested_eflags.keepDollar = FALSE;
 
-			(void)Var_Parse(_p, st->expr->scope,
+			(void)Var_Parse(_p, ch->expr->scope,
 			nested_eflags, _val);
 			/* TODO: handle errors */
 			Buf_AddStr(, nested_val.str);
@@ -2255,7 +2255,7 @@ ParseModifierPartSubst(
 	if (*p != delim) {
 		*pp = p;
 		Error("Unfinished modifier for \"%s\" ('%c' missing)",
-		st->expr->var->name.str, delim);
+		ch->expr->var->name.str, delim);
 		*out_part = NULL;
 		return VPR_ERR;
 	}
@@ -2288,35 +2288,35 @@ ParseModifierPart(
 char delim,
 /* Flags for evaluating nested variables. */
 VarEvalFlags eflags,
-ApplyModifiersState *st,
+ModChain *ch,
 char **out_part
 )
 {
-	return ParseModifierPartSubst(pp, delim, eflags, st, out_part,
+	return ParseModifierPartSubst(pp, delim, eflags, ch, out_part,
 	NULL, NULL, NULL);
 }
 
 MAKE_INLINE Boolean
-IsDelimiter(char ch, const ApplyModifiersState *st)
+IsDelimiter(char c, const ModChain *ch)
 {
-	return ch == ':' || ch == st->endc;
+	return c == ':' || c == ch->endc;
 }
 
 /* Test whether mod starts with modname, followed by a delimiter. */
 MAKE_INLINE Boolean
-ModMatch(const char *mod, const char *modname, const ApplyModifiersState *st)
+ModMatch(const char *mod, const char *modname, const ModChain *ch)
 {
 	size_t n = strlen(modname);
-	return strncmp(mod, modname, n) == 0 && IsDelimiter(mod[n], st);
+	return strncmp(mod, modname, n) == 0 && 

CVS commit: src/usr.bin/make

2021-03-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 15 19:15:05 UTC 2021

Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: var-op-assign.mk

Log Message:
make: improve documentation of ApplyModifiersState

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.889 -r1.890 src/usr.bin/make/var.c
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/var-op-assign.mk

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.889 src/usr.bin/make/var.c:1.890
--- src/usr.bin/make/var.c:1.889	Mon Mar 15 19:02:57 2021
+++ src/usr.bin/make/var.c	Mon Mar 15 19:15:04 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.889 2021/03/15 19:02:57 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.890 2021/03/15 19:15:04 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.889 2021/03/15 19:02:57 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.890 2021/03/15 19:15:04 rillig Exp $");
 
 typedef enum VarFlags {
 	VFL_NONE	= 0,
@@ -2059,17 +2059,20 @@ typedef struct Expr {
 } Expr;
 
 /*
- * Data that is used when applying a chain of modifiers to an expression.
- * For indirect modifiers, the effects of this data stop after the indirect
- * modifiers have been applied.
+ * The status of applying a chain of modifiers to an expression.
  *
- * For example, the expression ${VAR:M*:${indirect}:O:u} has 3 chains of
+ * The modifiers of an expression are broken into chains of modifiers,
+ * starting a new chain whenever an indirect modifier starts or ends.
+ *
+ * For example, the expression ${VAR:M*:${IND1}:${IND2}:O:u} has 4 chains of
  * modifiers:
  *
- *	Chain 1 is ':M', consisting of a single modifier.
- *	Chain 2 is whatever modifiers are in the value of the variable named
- *	'indirect'.
- *	Chain 3 is ':O:u', consisting of the 2 modifiers ':O' and ':u'.
+ *	Chain 1 is ':M*', consisting of the single modifier ':M*'.
+ *	Chain 2 is all modifiers from the value of the variable named 'IND1'.
+ *	Chain 3 is all modifiers from the value of the variable named 'IND2'.
+ *	Chain 4 is ':O:u', consisting of the 2 modifiers ':O' and ':u'.
+ *
+ * After such a chain has finished, its properties no longer have any effect.
  *
  * It may or may not have been intended that 'defined' has scope Expr while
  * 'sep' and 'oneBigWord' have smaller scope.

Index: src/usr.bin/make/unit-tests/var-op-assign.mk
diff -u src/usr.bin/make/unit-tests/var-op-assign.mk:1.7 src/usr.bin/make/unit-tests/var-op-assign.mk:1.8
--- src/usr.bin/make/unit-tests/var-op-assign.mk:1.7	Sun Nov 15 20:20:58 2020
+++ src/usr.bin/make/unit-tests/var-op-assign.mk	Mon Mar 15 19:15:04 2021
@@ -1,4 +1,4 @@
-# $NetBSD: var-op-assign.mk,v 1.7 2020/11/15 20:20:58 rillig Exp $
+# $NetBSD: var-op-assign.mk,v 1.8 2021/03/15 19:15:04 rillig Exp $
 #
 # Tests for the = variable assignment operator, which overwrites an existing
 # variable or creates it.
@@ -42,7 +42,7 @@ VAR=	new value and \# some $$ special ch
 # This alone would not produce any side-effects, therefore the variable has
 # a :!...! modifier that executes a shell command.  The :!...! modifier turns
 # an undefined expression into a defined one, see ApplyModifier_ShellCommand,
-# the call to ApplyModifiersState_Define.
+# the call to Expr_Define.
 #
 # Since the right-hand side of a '=' assignment is not expanded at the time
 # when the variable is defined, the first command is not run at all.



CVS commit: src/usr.bin/make

2021-03-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 15 19:02:57 UTC 2021

Modified Files:
src/usr.bin/make: var.c

Log Message:
make: document an example for a 'chain of modifiers'

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.888 -r1.889 src/usr.bin/make/var.c

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.888 src/usr.bin/make/var.c:1.889
--- src/usr.bin/make/var.c:1.888	Mon Mar 15 18:56:37 2021
+++ src/usr.bin/make/var.c	Mon Mar 15 19:02:57 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.888 2021/03/15 18:56:37 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.889 2021/03/15 19:02:57 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.888 2021/03/15 18:56:37 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.889 2021/03/15 19:02:57 rillig Exp $");
 
 typedef enum VarFlags {
 	VFL_NONE	= 0,
@@ -2063,6 +2063,14 @@ typedef struct Expr {
  * For indirect modifiers, the effects of this data stop after the indirect
  * modifiers have been applied.
  *
+ * For example, the expression ${VAR:M*:${indirect}:O:u} has 3 chains of
+ * modifiers:
+ *
+ *	Chain 1 is ':M', consisting of a single modifier.
+ *	Chain 2 is whatever modifiers are in the value of the variable named
+ *	'indirect'.
+ *	Chain 3 is ':O:u', consisting of the 2 modifiers ':O' and ':u'.
+ *
  * It may or may not have been intended that 'defined' has scope Expr while
  * 'sep' and 'oneBigWord' have smaller scope.
  *



CVS commit: src/usr.bin/make

2021-03-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 15 18:56:38 UTC 2021

Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: varmod-assign.exp varmod-assign.mk

Log Message:
make: fix double varname expansion in the variable modifier '::='

This is an edge case that doesn't occur in practice since pretty much
nobody dares to use variable names that contain an actual '$' in their
name.  This is not about the fairly common VAR.${param} (as written in
the makefile), but instead about the variable whose name is literally
'VAR.${param}'.

The test demonstrates that after the fix, the variable name is taken
exactly as-is for the simple assignment modifier '::='.  There are no
such tests for the modifiers '::+=', '::!=' and '::?=', but that's ok.
The code in ApplyModifier_Assign would look assymetrical and suspicious
enough if one of these modifiers would expand its variable name and the
others wouldn't.


To generate a diff of this commit:
cvs rdiff -u -r1.887 -r1.888 src/usr.bin/make/var.c
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/varmod-assign.exp
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/make/unit-tests/varmod-assign.mk

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.887 src/usr.bin/make/var.c:1.888
--- src/usr.bin/make/var.c:1.887	Mon Mar 15 16:51:14 2021
+++ src/usr.bin/make/var.c	Mon Mar 15 18:56:37 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.887 2021/03/15 16:51:14 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.888 2021/03/15 18:56:37 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.887 2021/03/15 16:51:14 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.888 2021/03/15 18:56:37 rillig Exp $");
 
 typedef enum VarFlags {
 	VFL_NONE	= 0,
@@ -3425,10 +3425,9 @@ ok:
 			VarFreeEnv(gv);
 	}
 
-	/* XXX: Expanding the variable name at this point sounds wrong. */
 	switch (op[0]) {
 	case '+':
-		Var_AppendExpand(scope, expr->var->name.str, val);
+		Var_Append(scope, expr->var->name.str, val);
 		break;
 	case '!': {
 		const char *errfmt;
@@ -3436,7 +3435,7 @@ ok:
 		if (errfmt != NULL)
 			Error(errfmt, val);
 		else
-			Var_SetExpand(scope, expr->var->name.str, cmd_output);
+			Var_Set(scope, expr->var->name.str, cmd_output);
 		free(cmd_output);
 		break;
 	}
@@ -3445,7 +3444,7 @@ ok:
 			break;
 		/* FALLTHROUGH */
 	default:
-		Var_SetExpand(scope, expr->var->name.str, val);
+		Var_Set(scope, expr->var->name.str, val);
 		break;
 	}
 	Expr_SetValueRefer(expr, "");

Index: src/usr.bin/make/unit-tests/varmod-assign.exp
diff -u src/usr.bin/make/unit-tests/varmod-assign.exp:1.10 src/usr.bin/make/unit-tests/varmod-assign.exp:1.11
--- src/usr.bin/make/unit-tests/varmod-assign.exp:1.10	Mon Mar 15 18:46:05 2021
+++ src/usr.bin/make/unit-tests/varmod-assign.exp	Mon Mar 15 18:56:38 2021
@@ -6,13 +6,10 @@ Var_Parse: ${${VARNAME}::=assigned-value
 Var_Parse: ${VARNAME}::=assigned-value} (eval-defined)
 Applying ${VAR.${param}::...} to "initial-value" (eval-defined, none, regular)
 Modifier part: "assigned-value"
-Var_Parse: ${param} (eval)
-Global:VAR.twice = assigned-value
+Global:VAR.${param} = assigned-value
 Result of ${VAR.${param}::=assigned-value} is "" (eval-defined, none, regular)
-Var_Parse: $ for symmetry with the usual assignment operators. (eval)
-make: "varmod-assign.mk" line 139: FIXME: don't expand the variable name twice here, for symmetry with the usual assignment operators.
-Var_Parse: ${${VARNAME}} != "initial-value" (eval-defined)
-Var_Parse: ${VARNAME}} != "initial-value" (eval-defined)
+Var_Parse: ${${VARNAME}} != "assigned-value" (eval-defined)
+Var_Parse: ${VARNAME}} != "assigned-value" (eval-defined)
 Global:.MAKEFLAGS =  -r -k -d v -d
 Global:.MAKEFLAGS =  -r -k -d v -d 0
 mod-assign: first=1.

Index: src/usr.bin/make/unit-tests/varmod-assign.mk
diff -u src/usr.bin/make/unit-tests/varmod-assign.mk:1.11 src/usr.bin/make/unit-tests/varmod-assign.mk:1.12
--- src/usr.bin/make/unit-tests/varmod-assign.mk:1.11	Mon Mar 15 18:46:05 2021
+++ src/usr.bin/make/unit-tests/varmod-assign.mk	Mon Mar 15 18:56:38 2021
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-assign.mk,v 1.11 2021/03/15 18:46:05 rillig Exp $
+# $NetBSD: varmod-assign.mk,v 1.12 2021/03/15 18:56:38 rillig Exp $
 #
 # Tests for the obscure ::= variable modifiers, which perform variable
 # assignments during evaluation, just like the = operator in C.
@@ -132,13 +132,10 @@ ${VARNAME}=	initial-value	# Sets 'VAR.${
 .if ${${VARNAME}::=assigned-value} # Here the variable name gets expanded once
 .  error			# too often.
 .endif
-.if !defined(VAR.twice)
-.  error			# FIXME: This is the unwanted current behavior.
-.else
-.  info		FIXME: don't expand the variable name twice here, $\
-	for symmetry with the usual assignment 

CVS commit: src/usr.bin/make/unit-tests

2021-03-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 15 18:46:05 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varmod-assign.exp varmod-assign.mk

Log Message:
tests/make: demonstrate that the modifier '::=' expands the varname


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/varmod-assign.exp
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/varmod-assign.mk

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/unit-tests/varmod-assign.exp
diff -u src/usr.bin/make/unit-tests/varmod-assign.exp:1.9 src/usr.bin/make/unit-tests/varmod-assign.exp:1.10
--- src/usr.bin/make/unit-tests/varmod-assign.exp:1.9	Tue Feb 23 16:07:14 2021
+++ src/usr.bin/make/unit-tests/varmod-assign.exp	Mon Mar 15 18:46:05 2021
@@ -1,3 +1,20 @@
+Global:param = twice
+Global:VARNAME = VAR.$${param}
+Var_Parse: ${VARNAME} (eval)
+Global:VAR.${param} = initial-value
+Var_Parse: ${${VARNAME}::=assigned-value} (eval-defined)
+Var_Parse: ${VARNAME}::=assigned-value} (eval-defined)
+Applying ${VAR.${param}::...} to "initial-value" (eval-defined, none, regular)
+Modifier part: "assigned-value"
+Var_Parse: ${param} (eval)
+Global:VAR.twice = assigned-value
+Result of ${VAR.${param}::=assigned-value} is "" (eval-defined, none, regular)
+Var_Parse: $ for symmetry with the usual assignment operators. (eval)
+make: "varmod-assign.mk" line 139: FIXME: don't expand the variable name twice here, for symmetry with the usual assignment operators.
+Var_Parse: ${${VARNAME}} != "initial-value" (eval-defined)
+Var_Parse: ${VARNAME}} != "initial-value" (eval-defined)
+Global:.MAKEFLAGS =  -r -k -d v -d
+Global:.MAKEFLAGS =  -r -k -d v -d 0
 mod-assign: first=1.
 mod-assign: last=3.
 mod-assign: appended=1 2 3.

Index: src/usr.bin/make/unit-tests/varmod-assign.mk
diff -u src/usr.bin/make/unit-tests/varmod-assign.mk:1.10 src/usr.bin/make/unit-tests/varmod-assign.mk:1.11
--- src/usr.bin/make/unit-tests/varmod-assign.mk:1.10	Sun Feb 14 12:14:37 2021
+++ src/usr.bin/make/unit-tests/varmod-assign.mk	Mon Mar 15 18:46:05 2021
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-assign.mk,v 1.10 2021/02/14 12:14:37 rillig Exp $
+# $NetBSD: varmod-assign.mk,v 1.11 2021/03/15 18:46:05 rillig Exp $
 #
 # Tests for the obscure ::= variable modifiers, which perform variable
 # assignments during evaluation, just like the = operator in C.
@@ -114,3 +114,31 @@ _:=	$(VAR::=current})
 .if ${VAR} != "current}"
 .  error
 .endif
+
+
+# Before var.c 1.888 from 2021-03-15, an expression using the modifier '::='
+# expanded its variable name once too often during evaluation.  This was only
+# relevant for variable names containing a '$' sign in their actual name, not
+# the usual VAR.${param}.
+.MAKEFLAGS: -dv
+param=		twice
+VARNAME=	VAR.$${param}	# Indirect variable name because of the '$',
+# to avoid difficult escaping rules.
+
+${VARNAME}=	initial-value	# Sets 'VAR.${param}' to 'expanded'.
+.if defined(VAR.twice)		# At this point, the '$$' is not expanded.
+.  error
+.endif
+.if ${${VARNAME}::=assigned-value} # Here the variable name gets expanded once
+.  error			# too often.
+.endif
+.if !defined(VAR.twice)
+.  error			# FIXME: This is the unwanted current behavior.
+.else
+.  info		FIXME: don't expand the variable name twice here, $\
+	for symmetry with the usual assignment operators.
+.endif
+.if ${${VARNAME}} != "initial-value"
+.  error
+.endif
+.MAKEFLAGS: -d0



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

2021-03-15 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Mon Mar 15 18:44:05 UTC 2021

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

Log Message:
sun4v: vnet - cleanup of debug code (no functional changes)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sparc64/dev/vnet.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/vnet.c
diff -u src/sys/arch/sparc64/dev/vnet.c:1.4 src/sys/arch/sparc64/dev/vnet.c:1.5
--- src/sys/arch/sparc64/dev/vnet.c:1.4	Sat Mar 13 20:21:37 2021
+++ src/sys/arch/sparc64/dev/vnet.c	Mon Mar 15 18:44:04 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnet.c,v 1.4 2021/03/13 20:21:37 palle Exp $	*/
+/*	$NetBSD: vnet.c,v 1.5 2021/03/15 18:44:04 palle Exp $	*/
 /*	$OpenBSD: vnet.c,v 1.62 2020/07/10 13:26:36 patrick Exp $	*/
 /*
  * Copyright (c) 2009, 2015 Mark Kettenis
@@ -16,14 +16,10 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#if 0
-FIXME openbsd
-#include "bpfilter.h"
-#endif
-
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -31,12 +27,6 @@ FIXME openbsd
 #include 
 #include 
 #include 
-#if 0
-FIXME openbsd
-#include 
-#else
-#include 
-#endif
 
 #include 
 #include 
@@ -58,9 +48,6 @@ FIXME openbsd
 #include 
 #include 
 
-#if 1
-#define VNET_DEBUG
-#endif
 #ifdef VNET_DEBUG
 #define DPRINTF(x)	printf x
 #else
@@ -137,12 +124,7 @@ void	vnet_dring_free(bus_dma_tag_t, stru
 
 struct vnet_soft_desc {
 	int		vsd_map_idx;
-#if 0
-FIXME openbsd		
-	caddr_t		vsd_buf;
-#else		
 	unsigned char *vsd_buf;
-#endif		
 };
 
 struct vnet_softc {
@@ -171,12 +153,7 @@ struct vnet_softc {
 #define VIO_ACK_RDX		0x0400
 #define VIO_RCV_RDX		0x0800
 
-#if 0
-FIXME openbsd		
-	struct timeout	sc_handshake_to;
-#else
 	struct callout	sc_handshake_co;
-#endif		
 
 	uint8_t		sc_xfer_mode;
 
@@ -284,19 +261,6 @@ vnet_attach(struct device *parent, struc
 	hv_ldc_tx_qconf(ca->ca_id, 0, 0);
 	hv_ldc_rx_qconf(ca->ca_id, 0, 0);
 
-#if 0
-FIXME openbsd	
-	sc->sc_tx_ih = bus_intr_establish(ca->ca_bustag, sc->sc_tx_ino,
-	IPL_NET, BUS_INTR_ESTABLISH_MPSAFE, vnet_tx_intr,
-	sc, sc->sc_dv.dv_xname);
-	sc->sc_rx_ih = bus_intr_establish(ca->ca_bustag, sc->sc_rx_ino,
-	IPL_NET, BUS_INTR_ESTABLISH_MPSAFE, vnet_rx_intr,
-	sc, sc->sc_dv.dv_xname);
-	if (sc->sc_tx_ih == NULL || sc->sc_rx_ih == NULL) {
-		printf(", can't establish interrupt\n");
-		return;
-	}
-#else
 	sc->sc_tx_ih = bus_intr_establish(ca->ca_bustag, sc->sc_tx_ino,
 	IPL_NET, vnet_tx_intr, sc);
 	sc->sc_rx_ih = bus_intr_establish(ca->ca_bustag, sc->sc_rx_ino,
@@ -305,7 +269,6 @@ FIXME openbsd	
 		printf(", can't establish interrupts\n");
 		return;
 	}
-#endif	
 
 	lc = >sc_lc;
 	lc->lc_id = ca->ca_id;
@@ -314,28 +277,10 @@ FIXME openbsd	
 	lc->lc_start = vnet_ldc_start;
 	lc->lc_rx_data = vio_rx_data;
 
-#if 0
-FIXME openbsd	
-	timeout_set(>sc_handshake_to, vnet_handshake, sc);
-#else
 	callout_init(>sc_handshake_co, 0);
-/* netbsd callout do silmilar function...*/
-#endif 
-	sc->sc_peer_state = VIO_DP_STOPPED;
 
-#if OPENBSD_BUSDMA
-	lc->lc_txq = ldc_queue_alloc(sc->sc_dmatag, VNET_TX_ENTRIES);
-	if (lc->lc_txq == NULL) {
-		printf(", can't allocate tx queue\n");
-		return;
-	}
+	sc->sc_peer_state = VIO_DP_STOPPED;
 
-	lc->lc_rxq = ldc_queue_alloc(sc->sc_dmatag, VNET_RX_ENTRIES);
-	if (lc->lc_rxq == NULL) {
-		printf(", can't allocate rx queue\n");
-		goto free_txqueue;
-	}
-#else	
 	lc->lc_txq = ldc_queue_alloc(VNET_TX_ENTRIES);
 	if (lc->lc_txq == NULL) {
 		printf(", can't allocate tx queue\n");
@@ -347,7 +292,6 @@ FIXME openbsd	
 		printf(", can't allocate rx queue\n");
 		goto free_txqueue;
 	}
-#endif
 	
 	if (OF_getprop(ca->ca_node, "local-mac-address",
    sc->sc_macaddr, ETHER_ADDR_LEN) > 0) {
@@ -360,63 +304,35 @@ FIXME openbsd	
 	/*
 	 * Each interface gets its own pool.
 	 */
-#if 0
-FIXME openbsd	
-	pool_init(>sc_pool, 2048, 0, IPL_NET, 0, sc->sc_dv.dv_xname, NULL);
-#else
 	pool_init(>sc_pool, 2048, 0, 0, 0, sc->sc_dv.dv_xname, NULL, IPL_NET);
-#endif
  
 	ifp = >sc_ethercom.ec_if;
 	ifp->if_softc = sc;
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
-#if 0	
-	ifp->if_link_state = LINK_STATE_DOWN;
-#endif	
 	ifp->if_init = vnet_init;
 	ifp->if_ioctl = vnet_ioctl;
 	ifp->if_start = vnet_start;
 	ifp->if_stop = vnet_stop;
 	ifp->if_watchdog = vnet_watchdog;
 	strlcpy(ifp->if_xname, device_xname(self), IFNAMSIZ);
-#if 0
-FIXME openbsd	
-	ifq_set_maxlen(>if_snd, 31); /* XXX */
-#else 
- IFQ_SET_MAXLEN(>if_snd, 31); /* XXX */
-#endif 
+	IFQ_SET_MAXLEN(>if_snd, 31); /* XXX */
 
 	ifmedia_init(>sc_media, 0, vnet_media_change, vnet_media_status);
 	ifmedia_add(>sc_media, IFM_ETHER | IFM_AUTO, 0, NULL);
 	ifmedia_set(>sc_media, IFM_ETHER | IFM_AUTO);
 
-#if 0	
-	int error = if_initialize(ifp);
-	if (error != 0) {
-		printf(", if_initialize() failed\n");
-		return;
-	}
-	ether_ifattach(ifp, sc->sc_macaddr);
-	

CVS import: src/external/bsd/nsd/dist

2021-03-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 15 18:39:00 UTC 2021

Update of /cvsroot/src/external/bsd/nsd/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv13216

Log Message:
Import 4.3.5:

19 January 2021: Wouter
- Set branch ready for 4.3.5 release.  Tag for 4.3.5rc1.
  Became the 4.3.5 release on 26 january 2021.  This branch continues
  with 4.3.6 in development.

15 January 2021: Wouter
- Fix #152: '*' in Rdata causes the return code to be NOERROR instead
  of NX.
- Add config.guess and config.sub to .gitignore for autoconf 2.70.
- Fix #150: TXT record validation difference with BIND.
- Fixup TXT record validation fix for escaped quotes.
- Fixup TXT record validation fix for escaped backslashes.
- Fixup escape character parse for quoted strings.

11 January 2021: Wouter
- Fix #151: DNAME not applied more than once to resolve the query.
- Fix dname test for #148.
- For #151: fix to not produce loops in output.

5 January 2021: Wouter
- Fix configure.ac for autoconf 2.70.

4 January 2021: Wouter
- Fix #148: CNAME need not be followed after a synthesized CNAME
  for a CNAME query.

11 December 2020: Wouter
- Fix that nsd-control has timeout when connection is down.
- remove windows socket ifdefs from nsd-control.

3 December 2020: Wouter
- For #145: Fix that service of remaining TCP and TLS connections
  does not allow new queries to be made, the connection is closed.
  Only existing queries and zone transfers are answered, new ones
  are rejected by a close of the channel.

30 November 2020: Wouter
- Fix #144: fix better.

27 November 2020: Wouter
- Fix #144: Typo fix in nsd.conf.5.in.

26 November 2020: Wouter
- Fix #143: xfrd no hysteresis with NOT IMPLEMENTED rcode.

24 November 2020: Wouter
- Merge PR #141: ZONEMD RR type.
- tag for 4.3.4rc1.  This became 4.3.4 release on 1 dec 2020.
  The code repo continues for 4.3.5 in development.

23 November 2020: Wouter
- Fix #142: NODATA answers missin SOA in authority section after
  CNAME chain.
- Fix for CVE-2020-28935 : Fix that symlink does not interfere
  with chown of pidfile.
- fix writepid for retvalue 0.

9 November 2020: Wouter
- Fix #138: NSD returns non-EDNS answer when QUESTION is empty.
- Fix to check nscount in previous fix for EDNS in formerr response
  when there is no question.

28 October 2020: Wouter
- Remove unused init_cfg_parse routine from configlexer.

20 October 2020: Wouter
- Fix to add missing closest encloser NSEC3 for wildcard nodata type
  DS answer.

14 October 2020: Wouter
- Fix #134: IPV4_MINIMAL_RESPONSE_SIZE vs EDNS_MAX_MESSAGE_LEN.

13 October 2020: Wouter
- Fix missing parenthesis on size of fix to init buffer.

12 October 2020: Wouter
- Fix #127: two minor `-Wcast-qual` cleanups
- Fix #126: minor header hygiene
- Fix #125: include config.h in compat/setproctitle.c and fix prototype 
of `setproctitle`
- Fix #133: fix 0-init of local ( stack ) buffer.

8 October 2020: Wouter
- tag for 4.3.3 release
- current repository contains 4.3.4 in development.
- Fix #129: ambiguous use of errno, in log message if sendmmsg fails.
- Fix #128: Fix that the invalid port number is logged for sendmmsg
  failed: Invalid argument.

1 October 2020: Wouter
- tag for 4.3.3rc1 release.

30 September 2020: Wouter
- Updated date in nsd -v output.
- Fixup bug013_truncate, checkconf and cutest_qroot tests for new
  default EDNS size.

29 September 2020: Willem
- Follow DNS flag day 2020 advice and
  set default EDNS message size to 1232.

4 September 2020: Wouter
- Remove unused space from LIBS on link line.

3 September 2020: Wouter
- Merge PR #121: Increase log level of recreated database from
  WARNING to ERR.

1 September 2020: Wouter
- Fix #119: fix compile warnings from new gcc.
- Fix #119: warn when trying to parse a directory.

27 August 2020: Wouter
- Merged PR #113 with fixes.  Instead of listing an IP-address to
  listen on, an interface name can be specified in nsd.conf, with
  ip-address: eth0.  The IP-addresses for that interface are then used.

26 August 2020: Wouter
- Add xstrdup for PR #113.
- Tidy up code like in PR #113.
- Import code from PR #113.
- Fix for unknown EVP_MAC_CTX_free function in openssl 3.0.0 tsig code.

24 August 2020: Wouter
- Fix that configure checks for EVP_sha256 to detect openssl, because
  HMAC_CTX_new is deprecated in 3.0.0.
- Port TSIG code for openssl 3.0.0-alpha6.
- Sync acx_nlnetlabs.m4 with the unbound repo.

CVS commit: src/share/man/man4

2021-03-15 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon Mar 15 18:21:51 UTC 2021

Modified Files:
src/share/man/man4: isapnp.4

Log Message:
Use inline cross-references.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/share/man/man4/isapnp.4

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

Modified files:

Index: src/share/man/man4/isapnp.4
diff -u src/share/man/man4/isapnp.4:1.25 src/share/man/man4/isapnp.4:1.26
--- src/share/man/man4/isapnp.4:1.25	Fri Feb 26 11:12:45 2021
+++ src/share/man/man4/isapnp.4	Mon Mar 15 18:21:51 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: isapnp.4,v 1.25 2021/02/26 11:12:45 nia Exp $
+.\"	$NetBSD: isapnp.4,v 1.26 2021/03/15 18:21:51 nia Exp $
 .\"
 .\" Copyright (c) 1997 Jonathan Stone
 .\" All rights reserved.
@@ -52,41 +52,41 @@ includes machine-independent ISAPNP driv
 and driver name:
 .Ss SCSI interfaces
 .Bl -tag -width pcdisplay -offset indent
-.It aha
+.It Xr aha 4
 Adaptec AHA-154[02]
 .Tn SCSI
 interfaces.
-.It aic
+.It Xr aic 4
 Adaptec AHA-1520B
 .Tn SCSI
 interfaces.
 .El
 .Ss Disk controllers
 .Bl -tag -width pcdisplay -offset indent
-.It wdc
+.It Xr wdc 4
 Standard IDE and ATAPI drive controller.
 .El
 .Ss Serial and parallel interfaces
 .Bl -tag -width pcdisplay -offset indent
-.It com
+.It Xr com 4
 8250/16450/16550-compatible ISA PnP serial cards and internal modems.
 .El
 .Ss Network interfaces
 .Bl -tag -width pcdisplay -offset indent
-.It an
+.It Xr an 4
 .Tn Aironet
 4500/4800 and
 .Tn Cisco
 340 series 802.11 interfaces.
-.It ep
+.It Xr ep 4
 3Com 3c509B EtherLink III
 .Tn Ethernet
 interface.
-.It le
+.It Xr le 4
 PCnet-PnP
 .Tn Ethernet
 interfaces based on the successor to the AMD LANCE chip.
-.It ne
+.It Xr ne 4
 NE2000-compatible
 .Tn Ethernet
 interfaces.
@@ -94,21 +94,21 @@ interfaces.
 .\"
 .Ss Sound cards
 .Bl -tag -width pcdisplay -offset indent
-.It ess
+.It Xr ess 4
 ESS Technology derived PnP sound cards and devices.
-.It guspnp
+.It Xr guspnp 4
 Gravis Ultrasound PnP sound cards.
-.It sb
+.It Xr sb 4
 SoundBlaster, SoundBlaster 16, and SoundBlaster Pro sound cards.
-.It wss
+.It Xr wss 4
 Windows Sound System compatible cards, e.g., most of the cards
 with Crystal Semiconductor chips.
-.It ym
+.It Xr ym 4
 Yamaha OPL3-SAx sound cards.
 .El
 .Ss Miscellaneous devices
 .Bl -tag -width pcdisplay -offset indent
-.It pcic
+.It Xr pcic 4
 .Tn PCI
 .Tn PCMCIA
 controllers, including the Cirrus Logic GD6729.
@@ -132,23 +132,9 @@ The manual pages for each individual
 driver also list
 the supported front-ends for other buses.
 .Sh SEE ALSO
-.Xr aha 4 ,
-.Xr aic 4 ,
-.Xr an 4 ,
-.Xr com 4 ,
-.Xr ep 4 ,
-.Xr ess 4 ,
-.Xr guspnp 4 ,
 .Xr intro 4 ,
 .Xr isa 4 ,
-.Xr le 4 ,
-.Xr ne 4 ,
-.Xr pcic 4 ,
-.Xr sb 4 ,
-.Xr tr 4 ,
-.Xr wdc 4 ,
-.Xr wss 4 ,
-.Xr ym 4
+.Xr isapnp 9
 .Sh HISTORY
 The
 .Nm



CVS commit: src/sys/arch/evbmips/stand/sbmips

2021-03-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 15 18:13:54 UTC 2021

Modified Files:
src/sys/arch/evbmips/stand/sbmips: Makefile.bootprogs

Log Message:
- 32 bit mips uses oabi, don't force it to n32.
- compile assembly code with soft-float to kill linker warnings


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbmips/stand/sbmips/Makefile.bootprogs

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/evbmips/stand/sbmips/Makefile.bootprogs
diff -u src/sys/arch/evbmips/stand/sbmips/Makefile.bootprogs:1.4 src/sys/arch/evbmips/stand/sbmips/Makefile.bootprogs:1.5
--- src/sys/arch/evbmips/stand/sbmips/Makefile.bootprogs:1.4	Sun Mar 14 18:58:10 2021
+++ src/sys/arch/evbmips/stand/sbmips/Makefile.bootprogs	Mon Mar 15 14:13:54 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.bootprogs,v 1.4 2021/03/14 22:58:10 christos Exp $
+# $NetBSD: Makefile.bootprogs,v 1.5 2021/03/15 18:13:54 christos Exp $
 
 NOSSP=yes
 NOPIE=yes
@@ -17,6 +17,7 @@ LDABI=	-melf32btsmipn32
 .	else
 LDABI=	-melf32ltsmipn32
 .	endif
+CPUFLAGS+=	-mabi=n32
 .endif
 
 STRIPFLAG=
@@ -33,13 +34,12 @@ STRIP?=	strip
 
 CHECKSIZE_CMD=	SIZE=${SIZE} ${HOST_SH} ${COMMON}/checksize.sh
 
-AFLAGS+=	-DASSEMBLER -D_LOCORE -mno-abicalls -mips64
+AFLAGS+=	-DASSEMBLER -D_LOCORE -mno-abicalls -mips64 -msoft-float
 # -I${.CURDIR}/../.. done by Makefile.inc
 CPPFLAGS+=	-nostdinc -I${.OBJDIR} -D_STANDALONE -I${S}
 CFLAGS=		-Os -g -ffreestanding -mno-abicalls -msoft-float -G 0
 CFLAGS+=	-mips64
 CFLAGS+=	-Werror ${CWARNFLAGS}
-CPUFLAGS+=	-mabi=n32
 
 NETBSD_VERS!=${HOST_SH} ${S}/conf/osrelease.sh
 CPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"'



CVS commit: src/usr.bin/make/unit-tests

2021-03-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 15 17:54:50 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varmod-loop.exp varmod-loop.mk

Log Message:
tests/make: convert varmod-loop to parse-time

In case of unexpected failures, this provides the line number of the
'.error' directive.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/varmod-loop.exp
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/varmod-loop.mk

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/unit-tests/varmod-loop.exp
diff -u src/usr.bin/make/unit-tests/varmod-loop.exp:1.7 src/usr.bin/make/unit-tests/varmod-loop.exp:1.8
--- src/usr.bin/make/unit-tests/varmod-loop.exp:1.7	Mon Mar 15 17:11:08 2021
+++ src/usr.bin/make/unit-tests/varmod-loop.exp	Mon Mar 15 17:54:49 2021
@@ -1,18 +1,12 @@
-ParseReadLine (133): 'USE_8_DOLLARS=	${:U1:@var@${8_DOLLARS}@} ${8_DOLLARS} '
+ParseReadLine (144): 'USE_8_DOLLARS=	${:U1:@var@${8_DOLLARS}@} ${8_DOLLARS} '
 CondParser_Eval: ${USE_8_DOLLARS} != "\$\$\$\$ \$\$\$\$ \$\$\$\$"
 lhs = "  ", rhs = "  ", op = !=
-ParseReadLine (138): 'SUBST_CONTAINING_LOOP:= ${USE_8_DOLLARS}'
+ParseReadLine (149): 'SUBST_CONTAINING_LOOP:= ${USE_8_DOLLARS}'
 CondParser_Eval: ${SUBST_CONTAINING_LOOP} != "\$\$ \$\$\$\$ \$\$\$\$"
 lhs = "$$  ", rhs = "$$  ", op = !=
-ParseReadLine (163): '.MAKEFLAGS: -d0'
+ParseReadLine (174): '.MAKEFLAGS: -d0'
 ParseDoDependency(.MAKEFLAGS: -d0)
-mod-loop-varname:
-:+one+ +two+ +three+:
-:x1y x2y x3y:
-:x1y x2y x3y:
-:mod-loop-varname: :x1y x2y x3y: ::
-:x1y x2y x3y:
-empty: :xy xy xy:
+:varname-overwriting-target: :x1y x2y x3y: ::
 mod-loop-resolve:w1d2d3w w2i3w w1i2d3 2i${RES3}w w1d2d3 2i${RES3} 1i${RES2}w:
 mod-loop-varname-dollar:(1) (2) (3).
 mod-loop-varname-dollar:() () ().

Index: src/usr.bin/make/unit-tests/varmod-loop.mk
diff -u src/usr.bin/make/unit-tests/varmod-loop.mk:1.12 src/usr.bin/make/unit-tests/varmod-loop.mk:1.13
--- src/usr.bin/make/unit-tests/varmod-loop.mk:1.12	Mon Mar 15 17:11:08 2021
+++ src/usr.bin/make/unit-tests/varmod-loop.mk	Mon Mar 15 17:54:49 2021
@@ -1,10 +1,10 @@
-# $NetBSD: varmod-loop.mk,v 1.12 2021/03/15 17:11:08 rillig Exp $
+# $NetBSD: varmod-loop.mk,v 1.13 2021/03/15 17:54:49 rillig Exp $
 #
 # Tests for the :@var@...${var}...@ variable modifier.
 
 .MAKE.SAVE_DOLLARS=	yes
 
-all: mod-loop-varname
+all: varname-overwriting-target
 all: mod-loop-resolve
 all: mod-loop-varname-dollar
 all: mod-loop-dollar
@@ -13,31 +13,42 @@ all: mod-loop-dollar
 # dynamically.  There's no practical use-case for this, and hopefully nobody
 # will ever depend on this, but technically it's possible.
 # Therefore, in -dL mode, this is forbidden, see lint.mk.
-mod-loop-varname:
-	@echo $@:
-	@echo :${:Uone two three:@${:Ubar:S,b,v,}@+${var}+@:Q}:
-
-	# ":::" is a very creative variable name, unlikely in practice.
-	# The expression ${\:\:\:} would not work since backslashes can only
-	# be escaped in the modifiers, but not in the variable name.
-	@echo :${:U1 2 3:@:::@x${${:U\:\:\:}}y@}:
+.if ${:Uone two three:@${:Ubar:S,b,v,}@+${var}+@} != "+one+ +two+ +three+"
+.  error
+.endif
+
+# ":::" is a very creative variable name, unlikely in practice.
+# The expression ${\:\:\:} would not work since backslashes can only
+# be escaped in the modifiers, but not in the variable name.
+.if ${:U1 2 3:@:::@x${${:U\:\:\:}}y@} != "x1y x2y x3y"
+.  error
+.endif
 
-	# "@@" is another creative variable name.
-	@echo :${:U1 2 3:@\@\@@x${@@}y@}:
+# "@@" is another creative variable name.
+.if ${:U1 2 3:@\@\@@x${@@}y@} != "x1y x2y x3y"
+.  error
+.endif
 
+varname-overwriting-target:
 	# Even "@" works as a variable name since the variable is installed
 	# in the "current" scope, which in this case is the one from the
-	# target.
+	# target.  Because of this, after the loop has finished, '$@' is
+	# undefined.  This is something that make doesn't expect, this may
+	# even trigger an assertion failure somewhere.
 	@echo :$@: :${:U1 2 3:@\@@x${@}y@}: :$@:
 
-	# In extreme cases, even the backslash can be used as variable name.
-	# It needs to be doubled though.
-	@echo :${:U1 2 3:@\\@x${${:Ux:S,x,\\,}}y@}:
-
-	# The variable name can technically be empty, and in this situation
-	# the variable value cannot be accessed since the empty "variable"
-	# is protected to always return an empty string.
-	@echo empty: :${:U1 2 3:@@x${}y@}:
+# In extreme cases, even the backslash can be used as variable name.
+# It needs to be doubled though.
+.if ${:U1 2 3:@\\@x${${:Ux:S,x,\\,}}y@} != "x1y x2y x3y"
+.  error
+.endif
+
+# The variable name can technically be empty, and in this situation
+# the variable value cannot be accessed since the empty "variable"
+# is protected to always return an empty string.
+.if ${:U1 2 3:@@x${}y@} != "xy xy xy"
+.  error
+.endif
 
 
 # The :@ 

CVS commit: src/usr.bin/make/unit-tests

2021-03-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 15 17:11:08 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: varmod-loop.exp varmod-loop.mk

Log Message:
tests/make: add position marker in test 'varmod-loop'


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/varmod-loop.exp
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/make/unit-tests/varmod-loop.mk

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/unit-tests/varmod-loop.exp
diff -u src/usr.bin/make/unit-tests/varmod-loop.exp:1.6 src/usr.bin/make/unit-tests/varmod-loop.exp:1.7
--- src/usr.bin/make/unit-tests/varmod-loop.exp:1.6	Tue Feb 23 14:17:21 2021
+++ src/usr.bin/make/unit-tests/varmod-loop.exp	Mon Mar 15 17:11:08 2021
@@ -1,11 +1,12 @@
-ParseReadLine (132): 'USE_8_DOLLARS=	${:U1:@var@${8_DOLLARS}@} ${8_DOLLARS} '
+ParseReadLine (133): 'USE_8_DOLLARS=	${:U1:@var@${8_DOLLARS}@} ${8_DOLLARS} '
 CondParser_Eval: ${USE_8_DOLLARS} != "\$\$\$\$ \$\$\$\$ \$\$\$\$"
 lhs = "  ", rhs = "  ", op = !=
-ParseReadLine (137): 'SUBST_CONTAINING_LOOP:= ${USE_8_DOLLARS}'
+ParseReadLine (138): 'SUBST_CONTAINING_LOOP:= ${USE_8_DOLLARS}'
 CondParser_Eval: ${SUBST_CONTAINING_LOOP} != "\$\$ \$\$\$\$ \$\$\$\$"
 lhs = "$$  ", rhs = "$$  ", op = !=
-ParseReadLine (162): '.MAKEFLAGS: -d0'
+ParseReadLine (163): '.MAKEFLAGS: -d0'
 ParseDoDependency(.MAKEFLAGS: -d0)
+mod-loop-varname:
 :+one+ +two+ +three+:
 :x1y x2y x3y:
 :x1y x2y x3y:

Index: src/usr.bin/make/unit-tests/varmod-loop.mk
diff -u src/usr.bin/make/unit-tests/varmod-loop.mk:1.11 src/usr.bin/make/unit-tests/varmod-loop.mk:1.12
--- src/usr.bin/make/unit-tests/varmod-loop.mk:1.11	Mon Mar 15 12:15:03 2021
+++ src/usr.bin/make/unit-tests/varmod-loop.mk	Mon Mar 15 17:11:08 2021
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-loop.mk,v 1.11 2021/03/15 12:15:03 rillig Exp $
+# $NetBSD: varmod-loop.mk,v 1.12 2021/03/15 17:11:08 rillig Exp $
 #
 # Tests for the :@var@...${var}...@ variable modifier.
 
@@ -14,6 +14,7 @@ all: mod-loop-dollar
 # will ever depend on this, but technically it's possible.
 # Therefore, in -dL mode, this is forbidden, see lint.mk.
 mod-loop-varname:
+	@echo $@:
 	@echo :${:Uone two three:@${:Ubar:S,b,v,}@+${var}+@:Q}:
 
 	# ":::" is a very creative variable name, unlikely in practice.



CVS commit: src/usr.bin/make

2021-03-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 15 16:51:14 UTC 2021

Modified Files:
src/usr.bin/make: var.c

Log Message:
make: clean up documentation of ApplyModifiersState

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.886 -r1.887 src/usr.bin/make/var.c

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.886 src/usr.bin/make/var.c:1.887
--- src/usr.bin/make/var.c:1.886	Mon Mar 15 15:39:13 2021
+++ src/usr.bin/make/var.c	Mon Mar 15 16:51:14 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.886 2021/03/15 15:39:13 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.887 2021/03/15 16:51:14 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.886 2021/03/15 15:39:13 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.887 2021/03/15 16:51:14 rillig Exp $");
 
 typedef enum VarFlags {
 	VFL_NONE	= 0,
@@ -2060,12 +2060,11 @@ typedef struct Expr {
 
 /*
  * Data that is used when applying a chain of modifiers to an expression.
- * For indirect modifiers, the effects of this data stops after the indirect
- * modifiers have been applies.
+ * For indirect modifiers, the effects of this data stop after the indirect
+ * modifiers have been applied.
  *
- * It may or may not be intended that 'status' has scope Expr while 'sep' and
- * 'oneBigWord' have smaller scope, terminating at the end of a chain of
- * indirect modifiers.
+ * It may or may not have been intended that 'defined' has scope Expr while
+ * 'sep' and 'oneBigWord' have smaller scope.
  *
  * See varmod-indirect.mk.
  */



CVS commit: src/usr.bin/make

2021-03-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 15 16:45:30 UTC 2021

Modified Files:
src/usr.bin/make: lst.c

Log Message:
make: fix documentation of Lst_MoveAll

In CLEANUP mode, was originally meant to track memory allocations but is
useful during debugging as well, initialize the list.  There is no
distinct constant representing an invalid pointer, otherwise that would
have been an even better choice.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/usr.bin/make/lst.c

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/lst.c
diff -u src/usr.bin/make/lst.c:1.104 src/usr.bin/make/lst.c:1.105
--- src/usr.bin/make/lst.c:1.104	Mon Feb  1 19:39:31 2021
+++ src/usr.bin/make/lst.c	Mon Mar 15 16:45:30 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: lst.c,v 1.104 2021/02/01 19:39:31 rillig Exp $ */
+/* $NetBSD: lst.c,v 1.105 2021/03/15 16:45:30 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -34,7 +34,7 @@
 
 #include "make.h"
 
-MAKE_RCSID("$NetBSD: lst.c,v 1.104 2021/02/01 19:39:31 rillig Exp $");
+MAKE_RCSID("$NetBSD: lst.c,v 1.105 2021/03/15 16:45:30 rillig Exp $");
 
 static ListNode *
 LstNodeNew(ListNode *prev, ListNode *next, void *datum)
@@ -205,7 +205,7 @@ Lst_FindDatum(List *list, const void *da
 
 /*
  * Move all nodes from src to the end of dst.
- * The source list becomes empty but is not freed.
+ * The source list becomes indeterminate.
  */
 void
 Lst_MoveAll(List *dst, List *src)
@@ -219,6 +219,10 @@ Lst_MoveAll(List *dst, List *src)
 
 		dst->last = src->last;
 	}
+#ifdef CLEANUP
+	src->first = NULL;
+	src->last = NULL;
+#endif
 }
 
 /* Copy the element data from src to the start of dst. */



CVS commit: src/usr.bin/make

2021-03-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 15 16:06:05 UTC 2021

Modified Files:
src/usr.bin/make: lst.h

Log Message:
make: indent inline functions for lists

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/usr.bin/make/lst.h

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/lst.h
diff -u src/usr.bin/make/lst.h:1.96 src/usr.bin/make/lst.h:1.97
--- src/usr.bin/make/lst.h:1.96	Mon Feb  1 18:55:15 2021
+++ src/usr.bin/make/lst.h	Mon Mar 15 16:06:05 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: lst.h,v 1.96 2021/02/01 18:55:15 rillig Exp $	*/
+/*	$NetBSD: lst.h,v 1.97 2021/03/15 16:06:05 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -118,15 +118,17 @@ void Lst_Free(List *);
 MAKE_INLINE void
 Lst_Init(List *list)
 {
-list->first = NULL;
-list->last = NULL;
+	list->first = NULL;
+	list->last = NULL;
 }
 
 /* Get information about a list */
 
 MAKE_INLINE Boolean
 Lst_IsEmpty(List *list)
-{ return list->first == NULL; }
+{
+	return list->first == NULL;
+}
 
 /* Find the first node that contains the given datum, or NULL. */
 ListNode *Lst_FindDatum(List *, const void *);



CVS commit: src/usr.bin/make

2021-03-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 15 16:00:05 UTC 2021

Modified Files:
src/usr.bin/make: enum.h

Log Message:
make: clean up header for runtime type information for enums

An enum with 32 bits would lead to signed integer overflow anyway, so
that definition is not worth keeping even if it works on typical
2-complement platforms.

The definitions for 2, 4 and 8 enum have been unused for several months
now.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/make/enum.h

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/enum.h
diff -u src/usr.bin/make/enum.h:1.18 src/usr.bin/make/enum.h:1.19
--- src/usr.bin/make/enum.h:1.18	Tue Feb  2 21:26:51 2021
+++ src/usr.bin/make/enum.h	Mon Mar 15 16:00:05 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: enum.h,v 1.18 2021/02/02 21:26:51 rillig Exp $	*/
+/*	$NetBSD: enum.h,v 1.19 2021/03/15 16:00:05 rillig Exp $	*/
 
 /*
  Copyright (c) 2020 Roland Illig 
@@ -114,19 +114,6 @@ const char *Enum_FlagsToString(char *, s
 
 /*
  * Declare the necessary data structures for calling Enum_FlagsToString
- * for an enum with 2 flags.
- */
-#define ENUM_FLAGS_RTTI_2(typnam, v1, v2) \
-	ENUM__FLAGS_RTTI(typnam, \
-	ENUM__SPECS_2( \
-		ENUM__SPEC_1(v1), \
-		ENUM__SPEC_1(v2)), \
-	ENUM__JOIN_2( \
-		ENUM__JOIN_STR_1(v1), \
-		ENUM__JOIN_STR_1(v2)))
-
-/*
- * Declare the necessary data structures for calling Enum_FlagsToString
  * for an enum with 3 flags.
  */
 #define ENUM_FLAGS_RTTI_3(typnam, v1, v2, v3) \
@@ -140,19 +127,6 @@ const char *Enum_FlagsToString(char *, s
 
 /*
  * Declare the necessary data structures for calling Enum_FlagsToString
- * for an enum with 4 flags.
- */
-#define ENUM_FLAGS_RTTI_4(typnam, v1, v2, v3, v4) \
-	ENUM__FLAGS_RTTI(typnam, \
-	ENUM__SPECS_2( \
-		ENUM__SPEC_2(v1, v2), \
-		ENUM__SPEC_2(v3, v4)), \
-	ENUM__JOIN_2( \
-		ENUM__JOIN_STR_2(v1, v2), \
-		ENUM__JOIN_STR_2(v3, v4)))
-
-/*
- * Declare the necessary data structures for calling Enum_FlagsToString
  * for an enum with 6 flags.
  */
 #define ENUM_FLAGS_RTTI_6(typnam, v1, v2, v3, v4, v5, v6) \
@@ -166,19 +140,6 @@ const char *Enum_FlagsToString(char *, s
 
 /*
  * Declare the necessary data structures for calling Enum_FlagsToString
- * for an enum with 8 flags.
- */
-#define ENUM_FLAGS_RTTI_8(typnam, v1, v2, v3, v4, v5, v6, v7, v8) \
-	ENUM__FLAGS_RTTI(typnam, \
-	ENUM__SPECS_2( \
-		ENUM__SPEC_4(v1, v2, v3, v4), \
-		ENUM__SPEC_4(v5, v6, v7, v8)), \
-	ENUM__JOIN_2( \
-		ENUM__JOIN_STR_4(v1, v2, v3, v4), \
-		ENUM__JOIN_STR_4(v5, v6, v7, v8)))
-
-/*
- * Declare the necessary data structures for calling Enum_FlagsToString
  * for an enum with 9 flags.
  */
 #define ENUM_FLAGS_RTTI_9(typnam, v1, v2, v3, v4, v5, v6, v7, v8, v9) \
@@ -215,25 +176,4 @@ const char *Enum_FlagsToString(char *, s
 	ENUM__JOIN_STR_2(v29, v30), \
 	ENUM__JOIN_STR_1(v31)))
 
-/*
- * Declare the necessary data structures for calling Enum_FlagsToString
- * for an enum with 32 flags.
- */
-#define ENUM_FLAGS_RTTI_32(typnam, \
-		 v01, v02, v03, v04, v05, v06, v07, v08, \
-		 v09, v10, v11, v12, v13, v14, v15, v16, \
-		 v17, v18, v19, v20, v21, v22, v23, v24, \
-		 v25, v26, v27, v28, v29, v30, v31, v32) \
-ENUM__FLAGS_RTTI(typnam, \
-	ENUM__SPECS_2( \
-	ENUM__SPEC_16(v01, v02, v03, v04, v05, v06, v07, v08, \
-			  v09, v10, v11, v12, v13, v14, v15, v16), \
-	ENUM__SPEC_16(v17, v18, v19, v20, v21, v22, v23, v24, \
-			  v25, v26, v27, v28, v29, v30, v31, v32)), \
-	ENUM__JOIN_2( \
-	ENUM__JOIN_STR_16(v01, v02, v03, v04, v05, v06, v07, v08, \
-			  v09, v10, v11, v12, v13, v14, v15, v16), \
-	ENUM__JOIN_STR_16(v17, v18, v19, v20, v21, v22, v23, v24, \
-			  v25, v26, v27, v28, v29, v30, v31, v32)))
-
 #endif



CVS commit: src/usr.bin/make

2021-03-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 15 15:39:13 UTC 2021

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

Log Message:
make: change debug log for variable evaluation flags to lowercase

This makes them easier distinguishable from variable names since the
latter are usually uppercase.

No functional change outside debug mode.


To generate a diff of this commit:
cvs rdiff -u -r1.205 -r1.206 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.885 -r1.886 src/usr.bin/make/var.c
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/deptgt-makeflags.exp
cvs rdiff -u -r1.4 -r1.5 \
src/usr.bin/make/unit-tests/directive-export-impl.exp \
src/usr.bin/make/unit-tests/varmod-defined.exp
cvs rdiff -u -r1.5 -r1.6 \
src/usr.bin/make/unit-tests/directive-unexport-env.exp \
src/usr.bin/make/unit-tests/var-op-append.exp
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/var-eval-short.exp \
src/usr.bin/make/unit-tests/varmod-match-escape.exp
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/make/unit-tests/vardebug.exp
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/varmod-indirect.exp \
src/usr.bin/make/unit-tests/varname.exp
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/varname-dot-shell.exp \
src/usr.bin/make/unit-tests/varname-empty.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/nonints.h
diff -u src/usr.bin/make/nonints.h:1.205 src/usr.bin/make/nonints.h:1.206
--- src/usr.bin/make/nonints.h:1.205	Mon Mar 15 12:15:03 2021
+++ src/usr.bin/make/nonints.h	Mon Mar 15 15:39:13 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: nonints.h,v 1.205 2021/03/15 12:15:03 rillig Exp $	*/
+/*	$NetBSD: nonints.h,v 1.206 2021/03/15 15:39:13 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -341,7 +341,7 @@ typedef struct VarEvalFlags {
 	 * int (since that is the default representation of Boolean in make),
 	 * even for initializers consisting entirely of constants.
 	 */
-	Boolean : 1;
+	Boolean : 0;
 } VarEvalFlags;
 
 #define VARE_PARSE_ONLY	(VarEvalFlags) { FALSE, FALSE, FALSE, FALSE }

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.885 src/usr.bin/make/var.c:1.886
--- src/usr.bin/make/var.c:1.885	Mon Mar 15 12:15:03 2021
+++ src/usr.bin/make/var.c	Mon Mar 15 15:39:13 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.885 2021/03/15 12:15:03 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.886 2021/03/15 15:39:13 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.885 2021/03/15 12:15:03 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.886 2021/03/15 15:39:13 rillig Exp $");
 
 typedef enum VarFlags {
 	VFL_NONE	= 0,
@@ -267,37 +267,25 @@ typedef struct SepBuf {
 	char sep;
 } SepBuf;
 
-enum {
-	VarEvalFlags_ToStringSize = sizeof
-	"VARE_UNDEFERR|VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF"
-};
-
-MAKE_INLINE char *
-str_append(char *dst, const char *src)
-{
-	size_t len = strlen(src);
-	memcpy(dst, src, len);
-	return dst + len;
-}
-
 static const char *
-VarEvalFlags_ToString(char *buf, VarEvalFlags eflags)
+VarEvalFlags_ToString(VarEvalFlags eflags)
 {
-	char *p = buf;
-
-	/* TODO: WANTRES should be mentioned before UNDEFERR */
-	if (eflags.undefErr)
-		p = str_append(p, "VARE_UNDEFERR|");
-	if (eflags.wantRes)
-		p = str_append(p, "VARE_WANTRES|");
+	if (!eflags.wantRes) {
+		assert(!eflags.undefErr);
+		assert(!eflags.keepDollar && !eflags.keepUndef);
+		return "parse-only";
+	}
+	if (eflags.undefErr) {
+		assert(!eflags.keepDollar && !eflags.keepUndef);
+		return "eval-defined";
+	}
+	if (eflags.keepDollar && eflags.keepUndef)
+		return "eval-keep-dollar-and-undefined";
 	if (eflags.keepDollar)
-		p = str_append(p, "VARE_KEEP_DOLLAR|");
+		return "eval-keep-dollar";
 	if (eflags.keepUndef)
-		p = str_append(p, "VARE_KEEP_UNDEF|");
-	if (p == buf)
-		return "none";
-	p[-1] = '\0';
-	return buf;
+		return "eval-keep-undefined";
+	return "eval";
 }
 
 /*
@@ -3618,7 +3606,6 @@ static void
 LogBeforeApply(const ApplyModifiersState *st, const char *mod)
 {
 	const Expr *expr = st->expr;
-	char eflags_str[VarEvalFlags_ToStringSize];
 	char vflags_str[VarFlags_ToStringSize];
 	Boolean is_single_char = mod[0] != '\0' && IsDelimiter(mod[1], st);
 
@@ -3627,7 +3614,7 @@ LogBeforeApply(const ApplyModifiersState
 	debug_printf("Applying ${%s:%c%s} to \"%s\" (%s, %s, %s)\n",
 	expr->var->name.str, mod[0], is_single_char ? "" : "...",
 	expr->value.str,
-	VarEvalFlags_ToString(eflags_str, expr->eflags),

CVS commit: src/usr.bin/make

2021-03-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 15 12:15:03 UTC 2021

Modified Files:
src/usr.bin/make: arch.c cond.c meta.c nonints.h parse.c suff.c var.c
src/usr.bin/make/unit-tests: cond-func-empty.mk recursive.mk
varmod-defined.mk varmod-ifelse.mk varmod-loop.mk
varparse-errors.mk

Log Message:
make: replace enum bit-field with struct bit-field for VarEvalFlags

This makes the code easier to read, especially in var.c.  It also makes
debugging sessions easier since some debuggers don't show enum
bit-fields symbolically as soon as more than one bit is set.

The code outside var.c is basically unchanged, except that instead of
passing the individual flags, there are 4 predefined evaluation modes.
These suffice for all practical use cases.  Only in the implementation
deep inside var.c, the value of the flags keepDollar and keepUndef
differs.

There is no way of passing the struct to EnumFlags_ToString, which means
the ToString function has to be spelled out explicitly.  This allows for
fine-tuning the representation in the debug log, to reduce the amount of
uppercae letters.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.197 -r1.198 src/usr.bin/make/arch.c
cvs rdiff -u -r1.258 -r1.259 src/usr.bin/make/cond.c
cvs rdiff -u -r1.178 -r1.179 src/usr.bin/make/meta.c
cvs rdiff -u -r1.204 -r1.205 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.551 -r1.552 src/usr.bin/make/parse.c
cvs rdiff -u -r1.347 -r1.348 src/usr.bin/make/suff.c
cvs rdiff -u -r1.884 -r1.885 src/usr.bin/make/var.c
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/cond-func-empty.mk
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/recursive.mk
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/varmod-defined.mk \
src/usr.bin/make/unit-tests/varmod-ifelse.mk
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/varmod-loop.mk
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/varparse-errors.mk

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/arch.c
diff -u src/usr.bin/make/arch.c:1.197 src/usr.bin/make/arch.c:1.198
--- src/usr.bin/make/arch.c:1.197	Fri Feb  5 05:15:12 2021
+++ src/usr.bin/make/arch.c	Mon Mar 15 12:15:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: arch.c,v 1.197 2021/02/05 05:15:12 rillig Exp $	*/
+/*	$NetBSD: arch.c,v 1.198 2021/03/15 12:15:03 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -126,7 +126,7 @@
 #include "config.h"
 
 /*	"@(#)arch.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: arch.c,v 1.197 2021/02/05 05:15:12 rillig Exp $");
+MAKE_RCSID("$NetBSD: arch.c,v 1.198 2021/03/15 12:15:03 rillig Exp $");
 
 typedef struct List ArchList;
 typedef struct ListNode ArchListNode;
@@ -207,7 +207,7 @@ Arch_ParseArchive(char **pp, GNodeList *
 
 			/* XXX: is expanded twice: once here and once below */
 			(void)Var_Parse(_p, scope,
-	VARE_WANTRES | VARE_UNDEFERR, );
+			VARE_UNDEFERR, );
 			/* TODO: handle errors */
 			isError = result.str == var_Error;
 			FStr_Done();
@@ -223,8 +223,7 @@ Arch_ParseArchive(char **pp, GNodeList *
 	*cp++ = '\0';
 	if (expandLibName) {
 		char *expanded;
-		(void)Var_Subst(libName.str, scope,
-		VARE_WANTRES | VARE_UNDEFERR, );
+		(void)Var_Subst(libName.str, scope, VARE_UNDEFERR, );
 		/* TODO: handle errors */
 		libName = MFStr_InitOwn(expanded);
 	}
@@ -250,8 +249,7 @@ Arch_ParseArchive(char **pp, GNodeList *
 const char *nested_p = cp;
 
 (void)Var_Parse(_p, scope,
-		VARE_WANTRES | VARE_UNDEFERR,
-		);
+VARE_UNDEFERR, );
 /* TODO: handle errors */
 isError = result.str == var_Error;
 FStr_Done();
@@ -306,9 +304,8 @@ Arch_ParseArchive(char **pp, GNodeList *
 			char *p;
 			char *unexpandedMemName = memName;
 
-			(void)Var_Subst(memName, scope,
-	VARE_WANTRES | VARE_UNDEFERR,
-	);
+			(void)Var_Subst(memName, scope, VARE_UNDEFERR,
+			);
 			/* TODO: handle errors */
 
 			/*

Index: src/usr.bin/make/cond.c
diff -u src/usr.bin/make/cond.c:1.258 src/usr.bin/make/cond.c:1.259
--- src/usr.bin/make/cond.c:1.258	Mon Mar 15 11:41:07 2021
+++ src/usr.bin/make/cond.c	Mon Mar 15 12:15:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cond.c,v 1.258 2021/03/15 11:41:07 rillig Exp $	*/
+/*	$NetBSD: cond.c,v 1.259 2021/03/15 12:15:03 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -95,7 +95,7 @@
 #include "dir.h"
 
 /*	"@(#)cond.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: cond.c,v 1.258 2021/03/15 11:41:07 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.259 2021/03/15 12:15:03 rillig Exp $");
 
 /*
  * The parsing of conditional expressions is based on this grammar:
@@ -265,7 +265,7 @@ ParseFuncArg(CondParser *par, const char
 			 * error, though perhaps we should.
 			 */
 			VarEvalFlags eflags = doEval
-			? VARE_WANTRES | VARE_UNDEFERR
+			? VARE_UNDEFERR
 			

CVS commit: src/usr.bin/make

2021-03-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Mon Mar 15 11:41:07 UTC 2021

Modified Files:
src/usr.bin/make: cond.c nonints.h parse.c suff.c var.c

Log Message:
make: rename VARE_NONE to VARE_PARSE_ONLY

The name 'NONE' described the bit pattern, which was not useful to
understand its meaning.  Omitting VARE_WANTRES only parses the
expression, without evaluating any part of it.

No functional change, not even in debug mode since Enum_FlagsToString
always returns "none" for all-bits-unset.


To generate a diff of this commit:
cvs rdiff -u -r1.257 -r1.258 src/usr.bin/make/cond.c
cvs rdiff -u -r1.203 -r1.204 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.550 -r1.551 src/usr.bin/make/parse.c
cvs rdiff -u -r1.346 -r1.347 src/usr.bin/make/suff.c
cvs rdiff -u -r1.883 -r1.884 src/usr.bin/make/var.c

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/cond.c
diff -u src/usr.bin/make/cond.c:1.257 src/usr.bin/make/cond.c:1.258
--- src/usr.bin/make/cond.c:1.257	Mon Feb 22 23:21:33 2021
+++ src/usr.bin/make/cond.c	Mon Mar 15 11:41:07 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cond.c,v 1.257 2021/02/22 23:21:33 rillig Exp $	*/
+/*	$NetBSD: cond.c,v 1.258 2021/03/15 11:41:07 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -95,7 +95,7 @@
 #include "dir.h"
 
 /*	"@(#)cond.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: cond.c,v 1.257 2021/02/22 23:21:33 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.258 2021/03/15 11:41:07 rillig Exp $");
 
 /*
  * The parsing of conditional expressions is based on this grammar:
@@ -266,7 +266,7 @@ ParseFuncArg(CondParser *par, const char
 			 */
 			VarEvalFlags eflags = doEval
 			? VARE_WANTRES | VARE_UNDEFERR
-			: VARE_NONE;
+			: VARE_PARSE_ONLY;
 			FStr nestedVal;
 			(void)Var_Parse(, SCOPE_CMDLINE, eflags, );
 			/* TODO: handle errors */
@@ -422,7 +422,7 @@ CondParser_StringExpr(CondParser *par, c
 	/* if we are in quotes, an undefined variable is ok */
 	eflags = doEval && !quoted ? VARE_WANTRES | VARE_UNDEFERR
 	: doEval ? VARE_WANTRES
-	: VARE_NONE;
+	: VARE_PARSE_ONLY;
 
 	nested_p = par->p;
 	atStart = nested_p == start;
@@ -740,8 +740,8 @@ ParseEmptyArg(CondParser *par MAKE_ATTR_
 	*out_arg = NULL;
 
 	(*pp)--;		/* Make (*pp)[1] point to the '('. */
-	(void)Var_Parse(pp, SCOPE_CMDLINE, doEval ? VARE_WANTRES : VARE_NONE,
-	);
+	(void)Var_Parse(pp, SCOPE_CMDLINE,
+	doEval ? VARE_WANTRES : VARE_PARSE_ONLY, );
 	/* TODO: handle errors */
 	/* If successful, *pp points beyond the closing ')' now. */
 

Index: src/usr.bin/make/nonints.h
diff -u src/usr.bin/make/nonints.h:1.203 src/usr.bin/make/nonints.h:1.204
--- src/usr.bin/make/nonints.h:1.203	Sun Feb 14 21:32:58 2021
+++ src/usr.bin/make/nonints.h	Mon Mar 15 11:41:07 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: nonints.h,v 1.203 2021/02/14 21:32:58 rillig Exp $	*/
+/*	$NetBSD: nonints.h,v 1.204 2021/03/15 11:41:07 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -293,7 +293,7 @@ void Var_Init(void);
 void Var_End(void);
 
 typedef enum VarEvalFlags {
-	VARE_NONE		= 0,
+	VARE_PARSE_ONLY		= 0,
 
 	/*
 	 * Expand and evaluate variables during parsing.

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.550 src/usr.bin/make/parse.c:1.551
--- src/usr.bin/make/parse.c:1.550	Mon Feb 22 23:21:33 2021
+++ src/usr.bin/make/parse.c	Mon Mar 15 11:41:07 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.550 2021/02/22 23:21:33 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.551 2021/03/15 11:41:07 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.550 2021/02/22 23:21:33 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.551 2021/03/15 11:41:07 rillig Exp $");
 
 /* types and constants */
 
@@ -1042,8 +1042,8 @@ ParseDependencyTargetWord(const char **p
 			const char *nested_p = cp;
 			FStr nested_val;
 
-			(void)Var_Parse(_p, SCOPE_CMDLINE, VARE_NONE,
-			_val);
+			(void)Var_Parse(_p, SCOPE_CMDLINE,
+			VARE_PARSE_ONLY, _val);
 			/* TODO: handle errors */
 			FStr_Done(_val);
 			cp += nested_p - cp;
@@ -1874,7 +1874,7 @@ VarCheckSyntax(VarAssignOp type, const c
 		if (type != VAR_SUBST && strchr(uvalue, '$') != NULL) {
 			char *expandedValue;
 
-			(void)Var_Subst(uvalue, scope, VARE_NONE,
+			(void)Var_Subst(uvalue, scope, VARE_PARSE_ONLY,
 			);
 			/* TODO: handle errors */
 			free(expandedValue);

Index: src/usr.bin/make/suff.c
diff -u src/usr.bin/make/suff.c:1.346 src/usr.bin/make/suff.c:1.347
--- src/usr.bin/make/suff.c:1.346	Tue Feb 23 15:56:29 2021
+++ src/usr.bin/make/suff.c	Mon Mar 15 11:41:07 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: suff.c,v 1.346 2021/02/23 15:56:29 rillig Exp $	*/
+/*	$NetBSD: suff.c,v 1.347 2021/03/15 11:41:07 rillig Exp $	*/
 
 /*
  * Copyright (c) 

CVS commit: src/lib/libossaudio

2021-03-15 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon Mar 15 10:58:05 UTC 2021

Modified Files:
src/lib/libossaudio: ossaudio.c

Log Message:
ossv4 mixer API: be extra careful with the inputs to AUDIO_MIXER_READ.

some drivers (not hdaudio(4), but uaudio(4), eap(4), sb(4), various other
old cards) will return error if a AUDIO_MIXER_VALUE is requested and the
number of channels is not specified as input. this is not documented as
well as it should be, unfortunately.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/lib/libossaudio/ossaudio.c

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

Modified files:

Index: src/lib/libossaudio/ossaudio.c
diff -u src/lib/libossaudio/ossaudio.c:1.65 src/lib/libossaudio/ossaudio.c:1.66
--- src/lib/libossaudio/ossaudio.c:1.65	Sat Dec 19 12:55:28 2020
+++ src/lib/libossaudio/ossaudio.c	Mon Mar 15 10:58:05 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ossaudio.c,v 1.65 2020/12/19 12:55:28 nia Exp $	*/
+/*	$NetBSD: ossaudio.c,v 1.66 2021/03/15 10:58:05 nia Exp $	*/
 
 /*-
  * Copyright (c) 1997, 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: ossaudio.c,v 1.65 2020/12/19 12:55:28 nia Exp $");
+__RCSID("$NetBSD: ossaudio.c,v 1.66 2021/03/15 10:58:05 nia Exp $");
 
 /*
  * This is an Open Sound System compatibility layer, which provides
@@ -1442,6 +1442,7 @@ mixer_oss4_ioctl(int fd, unsigned long c
 			errno = tmperrno;
 			return retval;
 		}
+		mc.type = mdi.type;
 		switch (mdi.type) {
 		case AUDIO_MIXER_ENUM:
 			if (mv->value >= mdi.un.e.num_mem) {
@@ -1469,6 +1470,7 @@ mixer_oss4_ioctl(int fd, unsigned long c
 #endif
 			break;
 		case AUDIO_MIXER_VALUE:
+			mc.un.value.num_channels = mdi.un.v.num_channels;
 			if (mdi.un.v.num_channels != 2) {
 for (i = 0; i < mdi.un.v.num_channels; ++i) {
 	mc.un.value.level[i] = mv->value;
@@ -1512,6 +1514,9 @@ mixer_oss4_ioctl(int fd, unsigned long c
 			return retval;
 		}
 		mc.dev = mdi.index;
+		mc.type = mdi.type;
+		if (mdi.type == AUDIO_MIXER_VALUE)
+			mc.un.value.num_channels = mdi.un.v.num_channels;
 		retval = ioctl(newfd, AUDIO_MIXER_READ, );
 		if (retval < 0) {
 			tmperrno = errno;



CVS commit: src/sys/dev/usb

2021-03-15 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon Mar 15 07:30:40 UTC 2021

Modified Files:
src/sys/dev/usb: usbdevs.h usbdevs_data.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.781 -r1.782 src/sys/dev/usb/usbdevs.h \
src/sys/dev/usb/usbdevs_data.h

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/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.781 src/sys/dev/usb/usbdevs.h:1.782
--- src/sys/dev/usb/usbdevs.h:1.781	Tue Mar  9 16:39:18 2021
+++ src/sys/dev/usb/usbdevs.h	Mon Mar 15 07:30:40 2021
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.781 2021/03/09 16:39:18 ryo Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.782 2021/03/15 07:30:40 nia Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.792 2021/03/09 16:38:49 ryo Exp
+ *	NetBSD: usbdevs,v 1.793 2021/03/15 07:29:26 nia Exp
  */
 
 /*-
@@ -1094,7 +1094,7 @@
 #define	USB_PRODUCT_BELKIN_F5D7051	0x7051		/* F5D7051 54g USB Network Adapter */
 #define	USB_PRODUCT_BELKIN_F5D7050A	0x705a		/* F5D705A 54g USB Network Adapter */
 #define	USB_PRODUCT_BELKIN_F5D7050C	0x705c		/* F5D705C 54g USB Network Adapter */
-#define	USB_PRODUCT_BELKIN_F5D7050E	0x705c		/* F5D705E 54g USB Network Adapter */
+#define	USB_PRODUCT_BELKIN_F5D7050E	0x705e		/* F5D705E 54g USB Network Adapter */
 #define	USB_PRODUCT_BELKIN_RT2870_1	0x8053		/* RT2870 */
 #define	USB_PRODUCT_BELKIN_RT2870_2	0x805c		/* RT2870 */
 #define	USB_PRODUCT_BELKIN_F5D8053V3	0x815c		/* F5D8053 v3 */
Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.781 src/sys/dev/usb/usbdevs_data.h:1.782
--- src/sys/dev/usb/usbdevs_data.h:1.781	Tue Mar  9 16:39:18 2021
+++ src/sys/dev/usb/usbdevs_data.h	Mon Mar 15 07:30:40 2021
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.781 2021/03/09 16:39:18 ryo Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.782 2021/03/15 07:30:40 nia Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.792 2021/03/09 16:38:49 ryo Exp
+ *	NetBSD: usbdevs,v 1.793 2021/03/15 07:29:26 nia Exp
  */
 
 /*-



CVS commit: src/sys/dev/usb

2021-03-15 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon Mar 15 07:29:27 UTC 2021

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
correct usb device id for BELKIN F5D7050E

matches freebsd / openbsd (sources of urtw driver), various online
sources

PR kern/56056


To generate a diff of this commit:
cvs rdiff -u -r1.792 -r1.793 src/sys/dev/usb/usbdevs

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/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.792 src/sys/dev/usb/usbdevs:1.793
--- src/sys/dev/usb/usbdevs:1.792	Tue Mar  9 16:38:49 2021
+++ src/sys/dev/usb/usbdevs	Mon Mar 15 07:29:26 2021
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.792 2021/03/09 16:38:49 ryo Exp $
+$NetBSD: usbdevs,v 1.793 2021/03/15 07:29:26 nia Exp $
 
 /*-
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -1087,7 +1087,7 @@ product BELKIN F5D7050		0x7050	F5D7050 5
 product BELKIN F5D7051		0x7051	F5D7051 54g USB Network Adapter
 product BELKIN F5D7050A		0x705a	F5D705A 54g USB Network Adapter
 product BELKIN F5D7050C		0x705c	F5D705C 54g USB Network Adapter
-product BELKIN F5D7050E		0x705c	F5D705E 54g USB Network Adapter
+product BELKIN F5D7050E		0x705e	F5D705E 54g USB Network Adapter
 product BELKIN RT2870_1		0x8053	RT2870
 product BELKIN RT2870_2		0x805c	RT2870
 product BELKIN F5D8053V3	0x815c	F5D8053 v3