CVS commit: src/sys/dev/isa

2023-11-19 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Nov 20 04:26:34 UTC 2023

Modified Files:
src/sys/dev/isa: cy_isa.c

Log Message:
cy_isa_probe(): No need to put a ~3KB cy_softc on the stack.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/isa/cy_isa.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/isa/cy_isa.c
diff -u src/sys/dev/isa/cy_isa.c:1.23 src/sys/dev/isa/cy_isa.c:1.24
--- src/sys/dev/isa/cy_isa.c:1.23	Wed Mar 26 17:50:32 2008
+++ src/sys/dev/isa/cy_isa.c	Mon Nov 20 04:26:34 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: cy_isa.c,v 1.23 2008/03/26 17:50:32 matt Exp $	*/
+/*	$NetBSD: cy_isa.c,v 1.24 2023/11/20 04:26:34 thorpej Exp $	*/
 
 /*
  * cy.c
@@ -10,11 +10,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cy_isa.c,v 1.23 2008/03/26 17:50:32 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cy_isa.c,v 1.24 2023/11/20 04:26:34 thorpej Exp $");
 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -36,30 +37,32 @@ int
 cy_isa_probe(device_t parent, cfdata_t match, void *aux)
 {
 	struct isa_attach_args *ia = aux;
-	struct cy_softc sc;
-	int found;
+	struct cy_softc *sc;
+	int found = 0;
 
 	if (ia->ia_niomem < 1)
 		return (0);
 	if (ia->ia_nirq < 1)
 		return (0);
 
-	sc.sc_memt = ia->ia_memt;
-	sc.sc_bustype = CY_BUSTYPE_ISA;
-
 	/* Disallow wildcarded memory address. */
 	if (ia->ia_iomem[0].ir_addr == ISA_UNKNOWN_IOMEM)
 		return 0;
 	if (ia->ia_irq[0].ir_irq == ISA_UNKNOWN_IRQ)
 		return 0;
 
+	sc = kmem_zalloc(sizeof(*sc), KM_SLEEP);
+
+	sc->sc_memt = ia->ia_memt;
+	sc->sc_bustype = CY_BUSTYPE_ISA;
+
 	if (bus_space_map(ia->ia_memt, ia->ia_iomem[0].ir_addr, CY_MEMSIZE, 0,
-	_bsh) != 0)
-		return 0;
+	>sc_bsh) != 0)
+		goto out;
 
-	found = cy_find();
+	found = cy_find(sc);
 
-	bus_space_unmap(ia->ia_memt, sc.sc_bsh, CY_MEMSIZE);
+	bus_space_unmap(ia->ia_memt, sc->sc_bsh, CY_MEMSIZE);
 
 	if (found) {
 		ia->ia_niomem = 1;
@@ -70,6 +73,8 @@ cy_isa_probe(device_t parent, cfdata_t m
 		ia->ia_nio = 0;
 		ia->ia_ndrq = 0;
 	}
+ out:
+	kmem_free(sc, sizeof(*sc));
 	return (found);
 }
 



CVS commit: src/sys/dev/isa

2023-11-19 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Nov 20 04:26:34 UTC 2023

Modified Files:
src/sys/dev/isa: cy_isa.c

Log Message:
cy_isa_probe(): No need to put a ~3KB cy_softc on the stack.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/isa/cy_isa.c

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



CVS commit: src/sys/arch

2023-11-19 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Nov 20 03:05:48 UTC 2023

Modified Files:
src/sys/arch/amd64/amd64: process_machdep.c
src/sys/arch/amd64/include: ptrace.h
src/sys/arch/i386/i386: process_machdep.c
src/sys/arch/i386/include: ptrace.h

Log Message:
Note some large xstate stack objects what Somebody(tm) should look at
when they find some round tuits.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/amd64/amd64/process_machdep.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/amd64/include/ptrace.h
cvs rdiff -u -r1.96 -r1.97 src/sys/arch/i386/i386/process_machdep.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/i386/include/ptrace.h

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



CVS commit: src/sys/arch

2023-11-19 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Nov 20 03:05:48 UTC 2023

Modified Files:
src/sys/arch/amd64/amd64: process_machdep.c
src/sys/arch/amd64/include: ptrace.h
src/sys/arch/i386/i386: process_machdep.c
src/sys/arch/i386/include: ptrace.h

Log Message:
Note some large xstate stack objects what Somebody(tm) should look at
when they find some round tuits.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/amd64/amd64/process_machdep.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/amd64/include/ptrace.h
cvs rdiff -u -r1.96 -r1.97 src/sys/arch/i386/i386/process_machdep.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/i386/include/ptrace.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/arch/amd64/amd64/process_machdep.c
diff -u src/sys/arch/amd64/amd64/process_machdep.c:1.49 src/sys/arch/amd64/amd64/process_machdep.c:1.50
--- src/sys/arch/amd64/amd64/process_machdep.c:1.49	Mon Oct 19 17:47:37 2020
+++ src/sys/arch/amd64/amd64/process_machdep.c	Mon Nov 20 03:05:48 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: process_machdep.c,v 1.49 2020/10/19 17:47:37 christos Exp $	*/
+/*	$NetBSD: process_machdep.c,v 1.50 2023/11/20 03:05:48 simonb Exp $	*/
 
 /*
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.49 2020/10/19 17:47:37 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.50 2023/11/20 03:05:48 simonb Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_xen.h"
@@ -396,7 +396,7 @@ process_machdep_doxstate(struct lwp *cur
 	/* l:			 traced */
 {
 	int error;
-	struct xstate r;
+	struct xstate r;	/* XXX FIXME big stack object */
 	char *kv;
 	ssize_t kl;
 

Index: src/sys/arch/amd64/include/ptrace.h
diff -u src/sys/arch/amd64/include/ptrace.h:1.22 src/sys/arch/amd64/include/ptrace.h:1.23
--- src/sys/arch/amd64/include/ptrace.h:1.22	Sat May 30 08:41:22 2020
+++ src/sys/arch/amd64/include/ptrace.h	Mon Nov 20 03:05:48 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptrace.h,v 1.22 2020/05/30 08:41:22 maxv Exp $	*/
+/*	$NetBSD: ptrace.h,v 1.23 2023/11/20 03:05:48 simonb Exp $	*/
 
 /*
  * Copyright (c) 1993 Christopher G. Demetriou
@@ -117,7 +117,7 @@ MODULE_HOOK(netbsd32_process_doxmmregs_h
 #define PT64_GETXSTATE		PT_GETXSTATE
 #define COREDUMP_MACHDEP_LWP_NOTES(l, ns, name)\
 {	\
-	struct xstate xstate;		\
+	struct xstate xstate;	/* XXX FIXME big stack object */	\
 	memset(, 0, sizeof(xstate));\
 	if (!process_read_xstate(l, ))\
 	{\

Index: src/sys/arch/i386/i386/process_machdep.c
diff -u src/sys/arch/i386/i386/process_machdep.c:1.96 src/sys/arch/i386/i386/process_machdep.c:1.97
--- src/sys/arch/i386/i386/process_machdep.c:1.96	Mon Oct 19 17:47:37 2020
+++ src/sys/arch/i386/i386/process_machdep.c	Mon Nov 20 03:05:48 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: process_machdep.c,v 1.96 2020/10/19 17:47:37 christos Exp $	*/
+/*	$NetBSD: process_machdep.c,v 1.97 2023/11/20 03:05:48 simonb Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.96 2020/10/19 17:47:37 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.97 2023/11/20 03:05:48 simonb Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ptrace.h"
@@ -408,7 +408,7 @@ process_machdep_doxstate(struct lwp *cur
 	/* l:			 traced */
 {
 	int error;
-	struct xstate r;
+	struct xstate r;	/* XXX FIXME big stack object */
 	char *kv;
 	ssize_t kl;
 

Index: src/sys/arch/i386/include/ptrace.h
diff -u src/sys/arch/i386/include/ptrace.h:1.26 src/sys/arch/i386/include/ptrace.h:1.27
--- src/sys/arch/i386/include/ptrace.h:1.26	Sat May 30 08:41:23 2020
+++ src/sys/arch/i386/include/ptrace.h	Mon Nov 20 03:05:48 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptrace.h,v 1.26 2020/05/30 08:41:23 maxv Exp $	*/
+/*	$NetBSD: ptrace.h,v 1.27 2023/11/20 03:05:48 simonb Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -162,7 +162,7 @@
 #define PT32_GETXSTATE		PT_GETXSTATE
 #define COREDUMP_MACHDEP_LWP_NOTES(l, ns, name)\
 {	\
-	struct xstate xstate;		\
+	struct xstate xstate;	/* XXX FIXME big stack object */	\
 	memset(, 0, sizeof(xstate));\
 	if (!process_read_xstate(l, ))\
 	{\



CVS commit: src/usr.bin/make

2023-11-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Nov 19 22:50:11 UTC 2023

Modified Files:
src/usr.bin/make: arch.c cond.c for.c parse.c suff.c var.c

Log Message:
make: replace 'variable expression' with 'expression' in comments

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.213 -r1.214 src/usr.bin/make/arch.c
cvs rdiff -u -r1.354 -r1.355 src/usr.bin/make/cond.c
cvs rdiff -u -r1.176 -r1.177 src/usr.bin/make/for.c
cvs rdiff -u -r1.709 -r1.710 src/usr.bin/make/parse.c
cvs rdiff -u -r1.369 -r1.370 src/usr.bin/make/suff.c
cvs rdiff -u -r1.1074 -r1.1075 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/arch.c
diff -u src/usr.bin/make/arch.c:1.213 src/usr.bin/make/arch.c:1.214
--- src/usr.bin/make/arch.c:1.213	Tue Feb 14 21:08:00 2023
+++ src/usr.bin/make/arch.c	Sun Nov 19 22:50:11 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: arch.c,v 1.213 2023/02/14 21:08:00 rillig Exp $	*/
+/*	$NetBSD: arch.c,v 1.214 2023/11/19 22:50:11 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.213 2023/02/14 21:08:00 rillig Exp $");
+MAKE_RCSID("$NetBSD: arch.c,v 1.214 2023/11/19 22:50:11 rillig Exp $");
 
 typedef struct List ArchList;
 typedef struct ListNode ArchListNode;
@@ -205,7 +205,7 @@ Arch_ParseArchive(char **pp, GNodeList *
 	FStr lib;		/* Library-part of specification */
 	FStr mem;		/* Member-part of specification */
 	char saveChar;		/* Ending delimiter of member-name */
-	bool expandLib;		/* Whether the parsed lib contains variable
+	bool expandLib;		/* Whether the parsed lib contains
  * expressions that need to be expanded */
 
 	spec = *pp;
@@ -214,7 +214,7 @@ Arch_ParseArchive(char **pp, GNodeList *
 
 	for (cp = lib.str; *cp != '(' && *cp != '\0';) {
 		if (*cp == '$') {
-			/* Expand nested variable expressions. */
+			/* Expand nested expressions. */
 			/* XXX: This code can probably be shortened. */
 			const char *nested_p = cp;
 			FStr result;
@@ -251,7 +251,7 @@ Arch_ParseArchive(char **pp, GNodeList *
 		mem = FStr_InitRefer(cp);
 		while (*cp != '\0' && *cp != ')' && !ch_isspace(*cp)) {
 			if (*cp == '$') {
-/* Expand nested variable expressions. */
+/* Expand nested expressions. */
 /*
  * XXX: This code can probably be shortened.
  */

Index: src/usr.bin/make/cond.c
diff -u src/usr.bin/make/cond.c:1.354 src/usr.bin/make/cond.c:1.355
--- src/usr.bin/make/cond.c:1.354	Fri Aug 11 04:56:31 2023
+++ src/usr.bin/make/cond.c	Sun Nov 19 22:50:11 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: cond.c,v 1.354 2023/08/11 04:56:31 rillig Exp $	*/
+/*	$NetBSD: cond.c,v 1.355 2023/11/19 22:50:11 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -92,7 +92,7 @@
 #include "dir.h"
 
 /*	"@(#)cond.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: cond.c,v 1.354 2023/08/11 04:56:31 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.355 2023/11/19 22:50:11 rillig Exp $");
 
 /*
  * Conditional expressions conform to this grammar:
@@ -154,10 +154,10 @@ typedef struct CondParser {
 	 * expanded before it is evaluated, due to ease of implementation.
 	 * This means that at the point where the condition is evaluated,
 	 * make cannot know anymore whether the left-hand side had originally
-	 * been a variable expression or a plain word.
+	 * been an expression or a plain word.
 	 *
 	 * In conditional directives like '.if', the left-hand side must
-	 * either be a variable expression, a quoted string or a number.
+	 * either be an expression, a quoted string or a number.
 	 */
 	bool leftUnquotedOK;
 
@@ -383,7 +383,7 @@ is_separator(char ch)
 }
 
 /*
- * In a quoted or unquoted string literal or a number, parse a variable
+ * In a quoted or unquoted string literal or a number, parse an
  * expression and add its value to the buffer.
  *
  * Return whether to continue parsing the leaf.
@@ -429,7 +429,7 @@ CondParser_StringExpr(CondParser *par, c
 }
 
 /*
- * Parse a string from a variable expression or an optionally quoted string,
+ * Parse a string from an expression or an optionally quoted string,
  * on the left-hand and right-hand sides of comparisons.
  *
  * Results:
@@ -489,7 +489,7 @@ CondParser_Leaf(CondParser *par, bool do
 			!ch_isdigit(*start)) {
 /*
  * The left-hand side must be quoted,
- * a variable expression or a number.
+ * an expression or a number.
  */
 str = FStr_InitRefer(NULL);
 goto return_str;
@@ -734,7 +734,7 @@ CondParser_FuncCall(CondParser *par, boo
 /*
  * Parse a comparison that neither starts with '"' nor '$', such as the
  * unusual 'bare == right' or '3 == ${VAR}', or a simple leaf without
- * operator, which is a number, a variable expression or a string literal.
+ * operator, which is a number, an 

CVS commit: src/usr.bin/make

2023-11-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Nov 19 22:50:11 UTC 2023

Modified Files:
src/usr.bin/make: arch.c cond.c for.c parse.c suff.c var.c

Log Message:
make: replace 'variable expression' with 'expression' in comments

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.213 -r1.214 src/usr.bin/make/arch.c
cvs rdiff -u -r1.354 -r1.355 src/usr.bin/make/cond.c
cvs rdiff -u -r1.176 -r1.177 src/usr.bin/make/for.c
cvs rdiff -u -r1.709 -r1.710 src/usr.bin/make/parse.c
cvs rdiff -u -r1.369 -r1.370 src/usr.bin/make/suff.c
cvs rdiff -u -r1.1074 -r1.1075 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.



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

2023-11-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Nov 19 22:32:44 UTC 2023

Modified Files:
src/usr.bin/make/unit-tests: cond-short.mk dep-var.mk
deptgt-makeflags.mk directive-for-escape.mk directive.mk
moderrs.exp moderrs.mk var-op-default.mk varmod-indirect.mk
varname-make_print_var_on_error-jobs.mk varparse-dynamic.mk
varparse-errors.mk

Log Message:
tests/make: replace 'variable expressions' with 'expressions'


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.bin/make/unit-tests/cond-short.mk \
src/usr.bin/make/unit-tests/directive-for-escape.mk
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/dep-var.mk
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/deptgt-makeflags.mk \
src/usr.bin/make/unit-tests/directive.mk
cvs rdiff -u -r1.33 -r1.34 src/usr.bin/make/unit-tests/moderrs.exp
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/make/unit-tests/moderrs.mk
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/var-op-default.mk
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/varmod-indirect.mk
cvs rdiff -u -r1.3 -r1.4 \
src/usr.bin/make/unit-tests/varname-make_print_var_on_error-jobs.mk
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/varparse-dynamic.mk
cvs rdiff -u -r1.10 -r1.11 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.



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

2023-11-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Nov 19 22:32:44 UTC 2023

Modified Files:
src/usr.bin/make/unit-tests: cond-short.mk dep-var.mk
deptgt-makeflags.mk directive-for-escape.mk directive.mk
moderrs.exp moderrs.mk var-op-default.mk varmod-indirect.mk
varname-make_print_var_on_error-jobs.mk varparse-dynamic.mk
varparse-errors.mk

Log Message:
tests/make: replace 'variable expressions' with 'expressions'


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.bin/make/unit-tests/cond-short.mk \
src/usr.bin/make/unit-tests/directive-for-escape.mk
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/dep-var.mk
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/deptgt-makeflags.mk \
src/usr.bin/make/unit-tests/directive.mk
cvs rdiff -u -r1.33 -r1.34 src/usr.bin/make/unit-tests/moderrs.exp
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/make/unit-tests/moderrs.mk
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/var-op-default.mk
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/varmod-indirect.mk
cvs rdiff -u -r1.3 -r1.4 \
src/usr.bin/make/unit-tests/varname-make_print_var_on_error-jobs.mk
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/varparse-dynamic.mk
cvs rdiff -u -r1.10 -r1.11 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/unit-tests/cond-short.mk
diff -u src/usr.bin/make/unit-tests/cond-short.mk:1.22 src/usr.bin/make/unit-tests/cond-short.mk:1.23
--- src/usr.bin/make/unit-tests/cond-short.mk:1.22	Sun Nov 19 21:47:52 2023
+++ src/usr.bin/make/unit-tests/cond-short.mk	Sun Nov 19 22:32:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: cond-short.mk,v 1.22 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: cond-short.mk,v 1.23 2023/11/19 22:32:44 rillig Exp $
 #
 # Demonstrates that in conditions, the right-hand side of an && or ||
 # is only evaluated if it can actually influence the result.
@@ -11,7 +11,7 @@
 # Var_Parse got a new parameter named 'wantit'.  Since then it would have been
 # possible to skip evaluation of irrelevant expressions and only
 # parse them.  They were still evaluated though, the only difference to
-# relevant expressions was that in the irrelevant variable
+# relevant expressions was that in the irrelevant
 # expressions, undefined variables were allowed.  This allowed for conditions
 # like 'defined(VAR) && ${VAR:S,from,to,} != ""', which no longer produced an
 # error message 'Malformed conditional', but the irrelevant expression was
Index: src/usr.bin/make/unit-tests/directive-for-escape.mk
diff -u src/usr.bin/make/unit-tests/directive-for-escape.mk:1.22 src/usr.bin/make/unit-tests/directive-for-escape.mk:1.23
--- src/usr.bin/make/unit-tests/directive-for-escape.mk:1.22	Sun Nov 19 21:47:52 2023
+++ src/usr.bin/make/unit-tests/directive-for-escape.mk	Sun Nov 19 22:32:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: directive-for-escape.mk,v 1.22 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: directive-for-escape.mk,v 1.23 2023/11/19 22:32:44 rillig Exp $
 #
 # Test escaping of special characters in the iteration values of a .for loop.
 # These values get expanded later using the :U variable modifier, and this
@@ -156,7 +156,7 @@ NUMBERS=	one two three
 .endfor
 
 # Before for.c 1.173 from 2023-05-08, the name of the iteration variable
-# could contain braces, which allowed to replace sequences of variable
+# could contain braces, which allowed to replace sequences of
 # expressions.  This possibility was neither intended nor documented.
 BASENAME=	one
 EXT=		.c

Index: src/usr.bin/make/unit-tests/dep-var.mk
diff -u src/usr.bin/make/unit-tests/dep-var.mk:1.9 src/usr.bin/make/unit-tests/dep-var.mk:1.10
--- src/usr.bin/make/unit-tests/dep-var.mk:1.9	Sun Nov 19 21:47:52 2023
+++ src/usr.bin/make/unit-tests/dep-var.mk	Sun Nov 19 22:32:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: dep-var.mk,v 1.9 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: dep-var.mk,v 1.10 2023/11/19 22:32:44 rillig Exp $
 #
 # Tests for variable references in dependency declarations.
 #
@@ -63,7 +63,7 @@ INDIRECT_3=	indirect
 UNDEF1=	undef1
 DEF2=	def2
 
-# Cover the code in SuffExpandChildren that deals with malformed variable
+# Cover the code in SuffExpandChildren that deals with malformed
 # expressions.
 #
 # This seems to be an edge case that never happens in practice, and it would

Index: src/usr.bin/make/unit-tests/deptgt-makeflags.mk
diff -u src/usr.bin/make/unit-tests/deptgt-makeflags.mk:1.8 src/usr.bin/make/unit-tests/deptgt-makeflags.mk:1.9
--- src/usr.bin/make/unit-tests/deptgt-makeflags.mk:1.8	Sun Nov 19 21:47:52 2023
+++ src/usr.bin/make/unit-tests/deptgt-makeflags.mk	Sun Nov 19 22:32:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: deptgt-makeflags.mk,v 1.8 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: deptgt-makeflags.mk,v 1.9 2023/11/19 22:32:44 rillig Exp $
 #
 # Tests for the special 

CVS commit: src/usr.bin/make

2023-11-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Nov 19 22:06:15 UTC 2023

Modified Files:
src/usr.bin/make: suff.c var.c
src/usr.bin/make/unit-tests: cmd-errors-jobs.exp cmd-errors-lint.exp
cmd-errors.exp dep-var.exp directive-for-escape.exp moderrs.exp
varmisc.exp varmod-edge.exp varmod-edge.mk varmod-order.exp
varparse-errors.exp

Log Message:
make: replace 'variable expression' with 'expression' in diagnostics


To generate a diff of this commit:
cvs rdiff -u -r1.368 -r1.369 src/usr.bin/make/suff.c
cvs rdiff -u -r1.1073 -r1.1074 src/usr.bin/make/var.c
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/cmd-errors-jobs.exp \
src/usr.bin/make/unit-tests/cmd-errors-lint.exp
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/cmd-errors.exp
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/dep-var.exp
cvs rdiff -u -r1.22 -r1.23 \
src/usr.bin/make/unit-tests/directive-for-escape.exp
cvs rdiff -u -r1.32 -r1.33 src/usr.bin/make/unit-tests/moderrs.exp
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/make/unit-tests/varmisc.exp \
src/usr.bin/make/unit-tests/varmod-edge.mk
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/make/unit-tests/varmod-edge.exp
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/varmod-order.exp
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/varparse-errors.exp

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



CVS commit: src/usr.bin/make

2023-11-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Nov 19 22:06:15 UTC 2023

Modified Files:
src/usr.bin/make: suff.c var.c
src/usr.bin/make/unit-tests: cmd-errors-jobs.exp cmd-errors-lint.exp
cmd-errors.exp dep-var.exp directive-for-escape.exp moderrs.exp
varmisc.exp varmod-edge.exp varmod-edge.mk varmod-order.exp
varparse-errors.exp

Log Message:
make: replace 'variable expression' with 'expression' in diagnostics


To generate a diff of this commit:
cvs rdiff -u -r1.368 -r1.369 src/usr.bin/make/suff.c
cvs rdiff -u -r1.1073 -r1.1074 src/usr.bin/make/var.c
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/cmd-errors-jobs.exp \
src/usr.bin/make/unit-tests/cmd-errors-lint.exp
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/cmd-errors.exp
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/dep-var.exp
cvs rdiff -u -r1.22 -r1.23 \
src/usr.bin/make/unit-tests/directive-for-escape.exp
cvs rdiff -u -r1.32 -r1.33 src/usr.bin/make/unit-tests/moderrs.exp
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/make/unit-tests/varmisc.exp \
src/usr.bin/make/unit-tests/varmod-edge.mk
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/make/unit-tests/varmod-edge.exp
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/varmod-order.exp
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/varparse-errors.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/suff.c
diff -u src/usr.bin/make/suff.c:1.368 src/usr.bin/make/suff.c:1.369
--- src/usr.bin/make/suff.c:1.368	Tue Feb 14 21:38:31 2023
+++ src/usr.bin/make/suff.c	Sun Nov 19 22:06:15 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: suff.c,v 1.368 2023/02/14 21:38:31 rillig Exp $	*/
+/*	$NetBSD: suff.c,v 1.369 2023/11/19 22:06:15 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -115,7 +115,7 @@
 #include "dir.h"
 
 /*	"@(#)suff.c	8.4 (Berkeley) 3/21/94"	*/
-MAKE_RCSID("$NetBSD: suff.c,v 1.368 2023/02/14 21:38:31 rillig Exp $");
+MAKE_RCSID("$NetBSD: suff.c,v 1.369 2023/11/19 22:06:15 rillig Exp $");
 
 typedef List SuffixList;
 typedef ListNode SuffixListNode;
@@ -1316,7 +1316,7 @@ ExpandChildrenRegular(char *cp, GNode *p
 			/* TODO: handle errors */
 			if (junk.str == var_Error) {
 Parse_Error(PARSE_FATAL,
-"Malformed variable expression at \"%s\"",
+"Malformed expression at \"%s\"",
 cp);
 cp++;
 			} else {

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.1073 src/usr.bin/make/var.c:1.1074
--- src/usr.bin/make/var.c:1.1073	Sun Nov 19 12:11:34 2023
+++ src/usr.bin/make/var.c	Sun Nov 19 22:06:15 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.1073 2023/11/19 12:11:34 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.1074 2023/11/19 22:06:15 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1073 2023/11/19 12:11:34 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1074 2023/11/19 22:06:15 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -3972,8 +3972,8 @@ ApplyModifiersIndirect(ModChain *ch, con
 	if (*p == ':')
 		p++;
 	else if (*p == '\0' && ch->endc != '\0') {
-		Error("Unclosed variable expression after indirect "
-		  "modifier, expecting '%c' for variable \"%s\"",
+		Error("Unclosed expression after indirect modifier, "
+		  "expecting '%c' for variable \"%s\"",
 		ch->endc, expr->name);
 		*pp = p;
 		return AMIR_OUT;
@@ -4025,7 +4025,7 @@ ApplySingleModifier(const char **pp, Mod
 
 	if (*p == '\0' && ch->endc != '\0') {
 		Error(
-		"Unclosed variable expression, expecting '%c' for "
+		"Unclosed expression, expecting '%c' for "
 		"modifier \"%.*s\" of variable \"%s\" with value \"%s\"",
 		ch->endc,
 		(int)(p - mod), mod,
@@ -4083,7 +4083,7 @@ ApplyModifiers(
 
 	if (*p == '\0' && endc != '\0') {
 		Error(
-		"Unclosed variable expression (expecting '%c') for \"%s\"",
+		"Unclosed expression, expecting '%c' for \"%s\"",
 		ch.endc, expr->name);
 		goto cleanup;
 	}

Index: src/usr.bin/make/unit-tests/cmd-errors-jobs.exp
diff -u src/usr.bin/make/unit-tests/cmd-errors-jobs.exp:1.3 src/usr.bin/make/unit-tests/cmd-errors-jobs.exp:1.4
--- src/usr.bin/make/unit-tests/cmd-errors-jobs.exp:1.3	Sun Sep 25 12:51:37 2022
+++ src/usr.bin/make/unit-tests/cmd-errors-jobs.exp	Sun Nov 19 22:06:15 2023
@@ -1,7 +1,7 @@
 : undefined--eol
 make: Unclosed variable "UNCLOSED"
 : unclosed-variable-
-make: Unclosed variable expression (expecting '}') for "UNCLOSED"
+make: Unclosed expression, expecting '}' for "UNCLOSED"
 : unclosed-modifier-
 make: Unknown modifier "Z"
 : unknown-modifier--eol
Index: src/usr.bin/make/unit-tests/cmd-errors-lint.exp
diff -u src/usr.bin/make/unit-tests/cmd-errors-lint.exp:1.3 src/usr.bin/make/unit-tests/cmd-errors-lint.exp:1.4
--- 

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

2023-11-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Nov 19 21:47:52 UTC 2023

Modified Files:
src/usr.bin/make/unit-tests: cmdline-undefined.mk comment.mk
cond-cmp-string.mk cond-cmp-unary.mk cond-eof.mk
cond-func-defined.exp cond-func-defined.mk cond-func-empty.mk
cond-func-exists.mk cond-func.mk cond-late.mk cond-short.mk
cond-token-number.mk cond-token-plain.exp cond-token-plain.mk
cond-token-string.exp cond-token-string.mk cond-token-var.mk
dep-var.mk deptgt-makeflags.mk deptgt.mk directive-else.mk
directive-for-empty.mk directive-for-errors.mk
directive-for-escape.mk directive-for-if.mk directive-ifmake.mk
lint.mk opt-debug-file.mk opt-debug-jobs.mk opt-debug-lint.mk
opt-debug-var.mk parse-var.mk sh-dots.mk var-op-assign.mk
var-op-default.mk var-op-expand.mk var-recursive.mk
var-scope-cmdline.mk var-scope-local.mk varmod-assign.mk
varmod-defined.mk varmod-edge.mk varmod-gmtime.mk varmod-ifelse.exp
varmod-ifelse.mk varmod-indirect.mk varmod-l-name-to-value.mk
varmod-localtime.mk varmod-loop-varname.mk varmod-loop.mk
varmod-match-escape.mk varmod-match.mk varmod-range.mk
varmod-subst-regex.mk varmod-sysv.mk varmod-to-separator.mk
varmod-undefined.mk varmod.mk varname-empty.mk varname.mk
varparse-errors.mk varparse-mod.mk varparse-undef-partial.mk

Log Message:
tests/make: replace 'variable expression' with 'expression'

Each expression is based on a variable, there's no need for the
verbosity.  The wording in make's diagnostics will be changed in a
follow-up commit.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/cmdline-undefined.mk \
src/usr.bin/make/unit-tests/sh-dots.mk \
src/usr.bin/make/unit-tests/var-op-default.mk \
src/usr.bin/make/unit-tests/var-scope-cmdline.mk \
src/usr.bin/make/unit-tests/varparse-undef-partial.mk
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/comment.mk \
src/usr.bin/make/unit-tests/cond-cmp-unary.mk \
src/usr.bin/make/unit-tests/cond-eof.mk \
src/usr.bin/make/unit-tests/opt-debug-jobs.mk \
src/usr.bin/make/unit-tests/var-recursive.mk \
src/usr.bin/make/unit-tests/varmod-loop-varname.mk
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/make/unit-tests/cond-cmp-string.mk \
src/usr.bin/make/unit-tests/varmod-edge.mk \
src/usr.bin/make/unit-tests/varmod-ifelse.exp
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/cond-func-defined.exp \
src/usr.bin/make/unit-tests/cond-token-var.mk \
src/usr.bin/make/unit-tests/deptgt-makeflags.mk \
src/usr.bin/make/unit-tests/var-scope-local.mk \
src/usr.bin/make/unit-tests/varmod-l-name-to-value.mk \
src/usr.bin/make/unit-tests/varmod-subst-regex.mk
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/cond-func-defined.mk \
src/usr.bin/make/unit-tests/cond-token-string.exp \
src/usr.bin/make/unit-tests/var-op-assign.mk
cvs rdiff -u -r1.22 -r1.23 src/usr.bin/make/unit-tests/cond-func-empty.mk
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/cond-func-exists.mk \
src/usr.bin/make/unit-tests/directive-for-errors.mk
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/cond-func.mk \
src/usr.bin/make/unit-tests/varmod-localtime.mk \
src/usr.bin/make/unit-tests/varname.mk
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/cond-late.mk \
src/usr.bin/make/unit-tests/lint.mk
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/make/unit-tests/cond-short.mk \
src/usr.bin/make/unit-tests/directive-for-escape.mk
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/cond-token-number.mk \
src/usr.bin/make/unit-tests/opt-debug-file.mk \
src/usr.bin/make/unit-tests/varname-empty.mk \
src/usr.bin/make/unit-tests/varparse-errors.mk
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/make/unit-tests/cond-token-plain.exp
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/make/unit-tests/cond-token-plain.mk \
src/usr.bin/make/unit-tests/var-op-expand.mk
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/cond-token-string.mk \
src/usr.bin/make/unit-tests/dep-var.mk \
src/usr.bin/make/unit-tests/directive-else.mk \
src/usr.bin/make/unit-tests/parse-var.mk \
src/usr.bin/make/unit-tests/varmod-range.mk \
src/usr.bin/make/unit-tests/varmod-undefined.mk \
src/usr.bin/make/unit-tests/varmod.mk
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/make/unit-tests/deptgt.mk
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/directive-for-empty.mk \
src/usr.bin/make/unit-tests/directive-for-if.mk \
src/usr.bin/make/unit-tests/opt-debug-var.mk
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/make/unit-tests/directive-ifmake.mk \
src/usr.bin/make/unit-tests/varmod-match-escape.mk
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/make/unit-tests/opt-debug-lint.mk \

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

2023-11-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Nov 19 21:47:52 UTC 2023

Modified Files:
src/usr.bin/make/unit-tests: cmdline-undefined.mk comment.mk
cond-cmp-string.mk cond-cmp-unary.mk cond-eof.mk
cond-func-defined.exp cond-func-defined.mk cond-func-empty.mk
cond-func-exists.mk cond-func.mk cond-late.mk cond-short.mk
cond-token-number.mk cond-token-plain.exp cond-token-plain.mk
cond-token-string.exp cond-token-string.mk cond-token-var.mk
dep-var.mk deptgt-makeflags.mk deptgt.mk directive-else.mk
directive-for-empty.mk directive-for-errors.mk
directive-for-escape.mk directive-for-if.mk directive-ifmake.mk
lint.mk opt-debug-file.mk opt-debug-jobs.mk opt-debug-lint.mk
opt-debug-var.mk parse-var.mk sh-dots.mk var-op-assign.mk
var-op-default.mk var-op-expand.mk var-recursive.mk
var-scope-cmdline.mk var-scope-local.mk varmod-assign.mk
varmod-defined.mk varmod-edge.mk varmod-gmtime.mk varmod-ifelse.exp
varmod-ifelse.mk varmod-indirect.mk varmod-l-name-to-value.mk
varmod-localtime.mk varmod-loop-varname.mk varmod-loop.mk
varmod-match-escape.mk varmod-match.mk varmod-range.mk
varmod-subst-regex.mk varmod-sysv.mk varmod-to-separator.mk
varmod-undefined.mk varmod.mk varname-empty.mk varname.mk
varparse-errors.mk varparse-mod.mk varparse-undef-partial.mk

Log Message:
tests/make: replace 'variable expression' with 'expression'

Each expression is based on a variable, there's no need for the
verbosity.  The wording in make's diagnostics will be changed in a
follow-up commit.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/cmdline-undefined.mk \
src/usr.bin/make/unit-tests/sh-dots.mk \
src/usr.bin/make/unit-tests/var-op-default.mk \
src/usr.bin/make/unit-tests/var-scope-cmdline.mk \
src/usr.bin/make/unit-tests/varparse-undef-partial.mk
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/comment.mk \
src/usr.bin/make/unit-tests/cond-cmp-unary.mk \
src/usr.bin/make/unit-tests/cond-eof.mk \
src/usr.bin/make/unit-tests/opt-debug-jobs.mk \
src/usr.bin/make/unit-tests/var-recursive.mk \
src/usr.bin/make/unit-tests/varmod-loop-varname.mk
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/make/unit-tests/cond-cmp-string.mk \
src/usr.bin/make/unit-tests/varmod-edge.mk \
src/usr.bin/make/unit-tests/varmod-ifelse.exp
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/cond-func-defined.exp \
src/usr.bin/make/unit-tests/cond-token-var.mk \
src/usr.bin/make/unit-tests/deptgt-makeflags.mk \
src/usr.bin/make/unit-tests/var-scope-local.mk \
src/usr.bin/make/unit-tests/varmod-l-name-to-value.mk \
src/usr.bin/make/unit-tests/varmod-subst-regex.mk
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/cond-func-defined.mk \
src/usr.bin/make/unit-tests/cond-token-string.exp \
src/usr.bin/make/unit-tests/var-op-assign.mk
cvs rdiff -u -r1.22 -r1.23 src/usr.bin/make/unit-tests/cond-func-empty.mk
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/cond-func-exists.mk \
src/usr.bin/make/unit-tests/directive-for-errors.mk
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/cond-func.mk \
src/usr.bin/make/unit-tests/varmod-localtime.mk \
src/usr.bin/make/unit-tests/varname.mk
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/cond-late.mk \
src/usr.bin/make/unit-tests/lint.mk
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/make/unit-tests/cond-short.mk \
src/usr.bin/make/unit-tests/directive-for-escape.mk
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/cond-token-number.mk \
src/usr.bin/make/unit-tests/opt-debug-file.mk \
src/usr.bin/make/unit-tests/varname-empty.mk \
src/usr.bin/make/unit-tests/varparse-errors.mk
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/make/unit-tests/cond-token-plain.exp
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/make/unit-tests/cond-token-plain.mk \
src/usr.bin/make/unit-tests/var-op-expand.mk
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/cond-token-string.mk \
src/usr.bin/make/unit-tests/dep-var.mk \
src/usr.bin/make/unit-tests/directive-else.mk \
src/usr.bin/make/unit-tests/parse-var.mk \
src/usr.bin/make/unit-tests/varmod-range.mk \
src/usr.bin/make/unit-tests/varmod-undefined.mk \
src/usr.bin/make/unit-tests/varmod.mk
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/make/unit-tests/deptgt.mk
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/directive-for-empty.mk \
src/usr.bin/make/unit-tests/directive-for-if.mk \
src/usr.bin/make/unit-tests/opt-debug-var.mk
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/make/unit-tests/directive-ifmake.mk \
src/usr.bin/make/unit-tests/varmod-match-escape.mk
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/make/unit-tests/opt-debug-lint.mk \

CVS commit: src/sys/arch/alpha/conf

2023-11-19 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Nov 19 20:01:48 UTC 2023

Modified Files:
src/sys/arch/alpha/conf: GENERIC.QEMU

Log Message:
Add some VirtIO devies.  virtio-scsi and virtio-rng are tested a bit,
virtio-blk does not work, virtio-net not yet tested.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/alpha/conf/GENERIC.QEMU

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/alpha/conf/GENERIC.QEMU
diff -u src/sys/arch/alpha/conf/GENERIC.QEMU:1.1 src/sys/arch/alpha/conf/GENERIC.QEMU:1.2
--- src/sys/arch/alpha/conf/GENERIC.QEMU:1.1	Sun May 23 01:34:17 2021
+++ src/sys/arch/alpha/conf/GENERIC.QEMU	Sun Nov 19 20:01:48 2023
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC.QEMU,v 1.1 2021/05/23 01:34:17 thorpej Exp $
+# $NetBSD: GENERIC.QEMU,v 1.2 2023/11/19 20:01:48 thorpej Exp $
 #
 # Generic Alpha kernel specifically configured for Qemu.
 
@@ -8,3 +8,12 @@ include	"arch/alpha/conf/GENERIC"
 # because Qemu does not load the symbol table when loading the
 # kernel.
 makeoptions	COPY_SYMTAB=1
+
+# Virtio devices
+virtio*	at pci? dev ? function ?	# Virtio PCI device
+#viomb*	at virtio?			# Virtio memory balloon device
+ld*	at virtio?			# Virtio disk device
+vioif*	at virtio?			# Virtio network device
+viornd*	at virtio?			# Virtio entropy device
+vioscsi* at virtio?			# Virtio SCSI device
+#vio9p*	at virtio?			# Virtio 9P device



CVS commit: src/sys/arch/alpha/conf

2023-11-19 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Nov 19 20:01:48 UTC 2023

Modified Files:
src/sys/arch/alpha/conf: GENERIC.QEMU

Log Message:
Add some VirtIO devies.  virtio-scsi and virtio-rng are tested a bit,
virtio-blk does not work, virtio-net not yet tested.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/alpha/conf/GENERIC.QEMU

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



CVS commit: src/sys/dev/pci

2023-11-19 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Nov 19 19:49:44 UTC 2023

Modified Files:
src/sys/dev/pci: virtio_pci.c

Log Message:
On alpha and sparc64, use VirtIO 1.0 and VIRTIO_F_ACCESS_PLATFORM so
that DMA to PCI-attached VirtIO devices works properly.  This is needed
for Qemu to select the appropriate address space for PCI DMA.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/pci/virtio_pci.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/pci/virtio_pci.c
diff -u src/sys/dev/pci/virtio_pci.c:1.43 src/sys/dev/pci/virtio_pci.c:1.44
--- src/sys/dev/pci/virtio_pci.c:1.43	Fri Jul  7 07:19:36 2023
+++ src/sys/dev/pci/virtio_pci.c	Sun Nov 19 19:49:44 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: virtio_pci.c,v 1.43 2023/07/07 07:19:36 rin Exp $ */
+/* $NetBSD: virtio_pci.c,v 1.44 2023/11/19 19:49:44 thorpej Exp $ */
 
 /*
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: virtio_pci.c,v 1.43 2023/07/07 07:19:36 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: virtio_pci.c,v 1.44 2023/11/19 19:49:44 thorpej Exp $");
 
 #include 
 #include 
@@ -50,6 +50,15 @@ __KERNEL_RCSID(0, "$NetBSD: virtio_pci.c
 #define VIRTIO_PRIVATE
 #include  /* XXX: move to non-pci */
 
+#if defined(__alpha__) || defined(__sparc64__)
+/*
+ * XXX VIRTIO_F_ACCESS_PLATFORM is required for standard PCI DMA
+ * XXX to work on these platforms, at least by Qemu.
+ * XXX
+ * XXX Generalize this later.
+ */
+#define	__NEED_VIRTIO_F_ACCESS_PLATFORM
+#endif /* __alpha__ || __sparc64__ */
 
 #define VIRTIO_PCI_LOG(_sc, _use_log, _fmt, _args...)	\
 do {			\
@@ -275,8 +284,28 @@ virtio_pci_attach(device_t parent, devic
 		ret = virtio_pci_attach_10(self, aux);
 	}
 	if (ret == 0 && revision == 0) {
-		/* revision 0 means 0.9 only or both 0.9 and 1.0 */
+		/*
+		 * revision 0 means 0.9 only or both 0.9 and 1.0.  The
+		 * latter are so-called "Transitional Devices".  For
+		 * those devices, we want to use the 1.0 interface if
+		 * possible.
+		 *
+		 * XXX Currently only on platforms that require 1.0
+		 * XXX features, such as VIRTIO_F_ACCESS_PLATFORM.
+		 */
+#ifdef __NEED_VIRTIO_F_ACCESS_PLATFORM
+		/* First, try to attach 1.0 */
+		ret = virtio_pci_attach_10(self, aux);
+		if (ret != 0) {
+			aprint_error_dev(self,
+			"VirtIO 1.0 error = %d, falling back to 0.9\n",
+			ret);
+			/* Fall back to 0.9. */
+			ret = virtio_pci_attach_09(self, aux);
+		}
+#else
 		ret = virtio_pci_attach_09(self, aux);
+#endif /* __NEED_VIRTIO_F_ACCESS_PLATFORM */
 	}
 	if (ret) {
 		aprint_error_dev(self, "cannot attach (%d)\n", ret);
@@ -781,6 +810,10 @@ virtio_pci_negotiate_features_10(struct 
 	uint64_t host, negotiated, device_status;
 
 	guest_features |= VIRTIO_F_VERSION_1;
+#ifdef __NEED_VIRTIO_F_ACCESS_PLATFORM
+	/* XXX This could use some work. */
+	guest_features |= VIRTIO_F_ACCESS_PLATFORM;
+#endif /* __NEED_VIRTIO_F_ACCESS_PLATFORM */
 	/* notify on empty is 0.9 only */
 	guest_features &= ~VIRTIO_F_NOTIFY_ON_EMPTY;
 	sc->sc_active_features = 0;



CVS commit: src/sys/dev/pci

2023-11-19 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Nov 19 19:49:44 UTC 2023

Modified Files:
src/sys/dev/pci: virtio_pci.c

Log Message:
On alpha and sparc64, use VirtIO 1.0 and VIRTIO_F_ACCESS_PLATFORM so
that DMA to PCI-attached VirtIO devices works properly.  This is needed
for Qemu to select the appropriate address space for PCI DMA.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/pci/virtio_pci.c

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



CVS commit: src/sys/dev/pci

2023-11-19 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Nov 19 19:47:03 UTC 2023

Modified Files:
src/sys/dev/pci: virtioreg.h

Log Message:
Define the VIRTIO_F_ACCESS_PLATFORM, VIRTIO_F_RING_PACKED,
VIRTIO_F_ORDER_PLATFORM, and VIRTIO_F_SR_IOV feature bits.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/virtioreg.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/pci/virtioreg.h
diff -u src/sys/dev/pci/virtioreg.h:1.12 src/sys/dev/pci/virtioreg.h:1.13
--- src/sys/dev/pci/virtioreg.h:1.12	Wed Mar 29 09:45:05 2023
+++ src/sys/dev/pci/virtioreg.h	Sun Nov 19 19:47:03 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: virtioreg.h,v 1.12 2023/03/29 09:45:05 riastradh Exp $	*/
+/*	$NetBSD: virtioreg.h,v 1.13 2023/11/19 19:47:03 thorpej Exp $	*/
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -84,6 +84,10 @@
 #define  VIRTIO_F_RING_EVENT_IDX		__BIT(29)
 #define  VIRTIO_F_BAD_FEATURE			__BIT(30)
 #define  VIRTIO_F_VERSION_1			__BIT(32)
+#define  VIRTIO_F_ACCESS_PLATFORM		__BIT(33)
+#define  VIRTIO_F_RING_PACKED			__BIT(34)
+#define  VIRTIO_F_ORDER_PLATFORM		__BIT(36)
+#define  VIRTIO_F_SR_IOV			__BIT(37)
 
 /* common device status flags */
 #define  VIRTIO_CONFIG_DEVICE_STATUS_RESET		  0
@@ -101,6 +105,10 @@
 /* common device/guest features */
 #define VIRTIO_COMMON_FLAG_BITS			\
 "\177\020"\
+	"b\x24" "SR_IOV\0"			\
+	"b\x23" "ORDER_PLATFORM\0"		\
+	"b\x22" "RING_PACKED\0"			\
+	"b\x21" "ACCESS_PLATFORM\0"		\
 	"b\x20" "V1\0"\
 	"b\x1e" "BAD_FEATURE\0"			\
 	"b\x1d" "EVENT_IDX\0"			\



CVS commit: src/sys/dev/pci

2023-11-19 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Nov 19 19:47:03 UTC 2023

Modified Files:
src/sys/dev/pci: virtioreg.h

Log Message:
Define the VIRTIO_F_ACCESS_PLATFORM, VIRTIO_F_RING_PACKED,
VIRTIO_F_ORDER_PLATFORM, and VIRTIO_F_SR_IOV feature bits.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/virtioreg.h

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



CVS commit: src/lib/libc/stdlib

2023-11-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov 19 18:57:11 UTC 2023

Modified Files:
src/lib/libc/stdlib: strfmon.c

Log Message:
minimize diffs with FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/stdlib/strfmon.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/libc/stdlib/strfmon.c
diff -u src/lib/libc/stdlib/strfmon.c:1.19 src/lib/libc/stdlib/strfmon.c:1.20
--- src/lib/libc/stdlib/strfmon.c:1.19	Thu Sep 28 06:03:41 2023
+++ src/lib/libc/stdlib/strfmon.c	Sun Nov 19 13:57:11 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: strfmon.c,v 1.19 2023/09/28 10:03:41 martin Exp $	*/
+/*	$NetBSD: strfmon.c,v 1.20 2023/11/19 18:57:11 christos Exp $	*/
 
 /*-
  * Copyright (c) 2001 Alexey Zelkin 
@@ -32,7 +32,7 @@
 #if 0
 __FBSDID("$FreeBSD: src/lib/libc/stdlib/strfmon.c,v 1.14 2003/03/20 08:18:55 ache Exp $");
 #else
-__RCSID("$NetBSD: strfmon.c,v 1.19 2023/09/28 10:03:41 martin Exp $");
+__RCSID("$NetBSD: strfmon.c,v 1.20 2023/11/19 18:57:11 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -61,53 +61,53 @@ __RCSID("$NetBSD: strfmon.c,v 1.19 2023/
 #define	SUPPRESS_CURR_SYMBOL	0x10	/* suppress the currency from output */
 #define	LEFT_JUSTIFY		0x20	/* left justify */
 #define	USE_INTL_CURRENCY	0x40	/* use international currency symbol */
-#define IS_NEGATIVE		0x80	/* is argument value negative ? */
-
-#ifndef NBCHAR_MAX
-#define NBCHAR_MAX ((unsigned char)CHAR_MAX)
-#endif
+#define	IS_NEGATIVE		0x80	/* is argument value negative ? */
 
 /* internal macros */
-#define PRINT(CH) do {		\
+#define	PRINT(CH) do {		\
 	if (dst >= s + maxsize) \
 		goto e2big_error;\
 	*dst++ = CH;		\
 } while (0)
 
-#define PRINTS(STR) do {	\
+#define	PRINTS(STR) do {	\
 	const char *tmps = STR;	\
 	while (*tmps != '\0')	\
 		PRINT(*tmps++);	\
 } while (0)
 
-#define GET_NUMBER(VAR)	do {	\
+#define	GET_NUMBER(VAR, LOC)	do {\
 	VAR = 0;		\
-	while (isdigit((unsigned char)*fmt)) {			\
+	while (isdigit_l((unsigned char)*fmt, LOC)) {		\
+		if (VAR > INT_MAX / 10)\
+			goto e2big_error;			\
 		VAR *= 10;	\
 		VAR += *fmt - '0';\
-		if (VAR > 0x00ff)\
+		if (VAR < 0)	\
 			goto e2big_error;			\
 		fmt++;		\
 	}			\
 } while (0)
 
-#define GRPCPY(howmany) do {	\
+#define	GRPCPY(howmany) do {	\
 	int i = howmany;	\
 	while (i-- > 0) {	\
 		avalue_size--;	\
-		*--bufend = *(avalue+avalue_size+padded);	\
+		*--bufend = *(avalue + avalue_size + padded);	\
 	}			\
 } while (0)
 
-#define GRPSEP do {		\
+#define	GRPSEP do {		\
 	bufend -= thousands_sep_size;\
 	memcpy(bufend, thousands_sep, thousands_sep_size);	\
 	groups++;		\
 } while (0)
 
-static void __setup_vars(struct lconv *, int, char *, char *, char *, const char **);
-static int __calc_left_pad(struct lconv *, int, char *);
-static char *__format_grouped_double(struct lconv *, double, int *, int, int, int);
+static void __setup_vars(int, char *, char *, char *, const char **,
+struct lconv *);
+static int __calc_left_pad(int, char *, struct lconv *);
+static char *__format_grouped_double(double, int *, int, int, int,
+struct lconv *, locale_t loc);
 
 static ssize_t
 vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc,
@@ -150,7 +150,7 @@ vstrfmon_l(char * __restrict s, size_t m
 		/* '%' found ! */
 
 		/* "%%" mean just '%' */
-		if (*(fmt+1) == '%') {
+		if (*(fmt + 1) == '%') {
 			fmt++;
 	literal:
 			PRINT(*fmt++);
@@ -200,9 +200,9 @@ vstrfmon_l(char * __restrict s, size_t m
 		}
 
 		/* field Width */
-		if (isdigit((unsigned char)*fmt)) {
+		if (isdigit_l((unsigned char)*fmt, loc)) {
 			ptrdiff_t d = dst - s;
-			GET_NUMBER(width);
+			GET_NUMBER(width, loc);
 			/* Do we have enough space to put number with
 			 * required width ?
 			 */
@@ -213,18 +213,18 @@ vstrfmon_l(char * __restrict s, size_t m
 
 		/* Left precision */
 		if (*fmt == '#') {
-			if (!isdigit((unsigned char)*++fmt))
+			if (!isdigit_l((unsigned char)*++fmt, loc))
 goto format_error;
-			GET_NUMBER(left_prec);
+			GET_NUMBER(left_prec, loc);
 			if ((unsigned int)left_prec >= maxsize - (dst - s))
 goto e2big_error;
 		}
 
 		/* Right precision */
 		if (*fmt == '.') {
-			if (!isdigit((unsigned char)*++fmt))
+			if (!isdigit_l((unsigned char)*++fmt, loc))
 goto format_error;
-			GET_NUMBER(right_prec);
+			GET_NUMBER(right_prec, loc);
 			if ((unsigned int)right_prec >= maxsize - (dst - s) -
 			left_prec)
 goto e2big_error;
@@ -243,7 +243,7 @@ vstrfmon_l(char * __restrict s, size_t m
 goto format_error;
 		}
 
-		if (currency_symbol)
+		if (currency_symbol != NULL)
 			free(currency_symbol);
 		if (flags & USE_INTL_CURRENCY) {
 			currency_symbol = strdup(lc->int_curr_symbol);
@@ -252,7 +252,6 @@ vstrfmon_l(char * __restrict s, size_t m
 space_char = currency_symbol[3];
 

CVS commit: src/lib/libc/stdlib

2023-11-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov 19 18:57:11 UTC 2023

Modified Files:
src/lib/libc/stdlib: strfmon.c

Log Message:
minimize diffs with FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/stdlib/strfmon.c

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



CVS commit: src/sys/kern

2023-11-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Nov 19 17:16:00 UTC 2023

Modified Files:
src/sys/kern: sys_eventfd.c

Log Message:
eventfd(2): Prune dead branch.

Fallout from PR kern/57703 fix.

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/kern/sys_eventfd.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/kern/sys_eventfd.c
diff -u src/sys/kern/sys_eventfd.c:1.10 src/sys/kern/sys_eventfd.c:1.11
--- src/sys/kern/sys_eventfd.c:1.10	Sun Nov 19 04:13:37 2023
+++ src/sys/kern/sys_eventfd.c	Sun Nov 19 17:16:00 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_eventfd.c,v 1.10 2023/11/19 04:13:37 riastradh Exp $	*/
+/*	$NetBSD: sys_eventfd.c,v 1.11 2023/11/19 17:16:00 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sys_eventfd.c,v 1.10 2023/11/19 04:13:37 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_eventfd.c,v 1.11 2023/11/19 17:16:00 riastradh Exp $");
 
 /*
  * eventfd
@@ -196,9 +196,7 @@ eventfd_wake(struct eventfd * const efd,
 		sel = >efd_write_sel;
 		pollev = POLLOUT | POLLWRNORM;
 	}
-	if (waitcv != NULL) {
-		cv_broadcast(waitcv);
-	}
+	cv_broadcast(waitcv);
 	selnotify(sel, pollev, NOTE_SUBMIT);
 }
 



CVS commit: src/sys/kern

2023-11-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Nov 19 17:16:00 UTC 2023

Modified Files:
src/sys/kern: sys_eventfd.c

Log Message:
eventfd(2): Prune dead branch.

Fallout from PR kern/57703 fix.

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/kern/sys_eventfd.c

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



CVS commit: src/usr.bin/make

2023-11-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Nov 19 12:11:34 UTC 2023

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

Log Message:
tests/make: cover all code paths for the ':mtime' modifier


To generate a diff of this commit:
cvs rdiff -u -r1.1072 -r1.1073 src/usr.bin/make/var.c
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/varmod-mtime.exp
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/varmod-mtime.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.1072 src/usr.bin/make/var.c:1.1073
--- src/usr.bin/make/var.c:1.1072	Sun Nov 19 11:47:49 2023
+++ src/usr.bin/make/var.c	Sun Nov 19 12:11:34 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.1072 2023/11/19 11:47:49 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.1073 2023/11/19 12:11:34 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1072 2023/11/19 11:47:49 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1073 2023/11/19 12:11:34 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -2897,9 +2897,8 @@ ApplyModifier_Mtime(const char **pp, Mod
 			goto invalid_argument;
 		*pp = p;
 	}
-	if (!ModChain_ShouldEval(ch))
-		return AMR_OK;
-	ModifyWords(ch, ModifyWord_Mtime, , ch->oneBigWord);
+	if (ModChain_ShouldEval(ch))
+		ModifyWords(ch, ModifyWord_Mtime, , ch->oneBigWord);
 	return args.rc;
 
 invalid_argument:

Index: src/usr.bin/make/unit-tests/varmod-mtime.exp
diff -u src/usr.bin/make/unit-tests/varmod-mtime.exp:1.6 src/usr.bin/make/unit-tests/varmod-mtime.exp:1.7
--- src/usr.bin/make/unit-tests/varmod-mtime.exp:1.6	Sun Nov 19 11:47:49 2023
+++ src/usr.bin/make/unit-tests/varmod-mtime.exp	Sun Nov 19 12:11:34 2023
@@ -5,6 +5,10 @@ make: "varmod-mtime.mk" line 70: Cannot 
 make: "varmod-mtime.mk" line 70: Malformed conditional (${no/such/file1 no/such/file2:L:mtime=error})
 make: "varmod-mtime.mk" line 81: Invalid argument 'errorhandler-no' for modifier ':mtime'
 make: "varmod-mtime.mk" line 81: Malformed conditional (${MAKEFILE:mtime=errorhandler-no} > 0)
+make: "varmod-mtime.mk" line 90: Invalid argument 'warn' for modifier ':mtime'
+make: "varmod-mtime.mk" line 90: Malformed conditional (${MAKEFILE:mtime=warn} > 0)
+make: "varmod-mtime.mk" line 115: Unknown modifier "mtim"
+make: "varmod-mtime.mk" line 115: Malformed conditional (${anything:L:mtim})
 make: Fatal errors encountered -- cannot continue
 make: stopped in unit-tests
 exit status 1

Index: src/usr.bin/make/unit-tests/varmod-mtime.mk
diff -u src/usr.bin/make/unit-tests/varmod-mtime.mk:1.7 src/usr.bin/make/unit-tests/varmod-mtime.mk:1.8
--- src/usr.bin/make/unit-tests/varmod-mtime.mk:1.7	Sun Nov 19 11:47:49 2023
+++ src/usr.bin/make/unit-tests/varmod-mtime.mk	Sun Nov 19 12:11:34 2023
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-mtime.mk,v 1.7 2023/11/19 11:47:49 rillig Exp $
+# $NetBSD: varmod-mtime.mk,v 1.8 2023/11/19 12:11:34 rillig Exp $
 #
 # Tests for the ':mtime' variable modifier, which maps each word of the
 # expression to that file's modification time.
@@ -84,9 +84,36 @@ _!=	rm -f ${COOKIE}
 .endif
 
 
+# Only the word 'error' can be used as a fallback argument to the modifier.
+# expect+2: Invalid argument 'warn' for modifier ':mtime'
+# expect+1: Malformed conditional (${MAKEFILE:mtime=warn} > 0)
+.if ${MAKEFILE:mtime=warn} > 0
+.  error
+.else
+.  error
+.endif
+
+
 # Ensure that the fallback for a missing modification time is indeed the
 # current time, and not any later time.
 end:=	${%s:L:gmtime}
 .if ${not_found_mtime} > ${end}
 .  error
 .endif
+
+
+# If the expression is irrelevant, the ':mtime' modifier is only parsed, it
+# does not perform any filesystem operations.
+.if 0 && ${anything:L:mtime}
+.  error
+.endif
+
+
+# If there is a typo in the modifier name, it does not match.
+# expect+2: Unknown modifier "mtim"
+# expect+1: Malformed conditional (${anything:L:mtim})
+.if ${anything:L:mtim}
+.  error
+.else
+.  error
+.endif



CVS commit: src/usr.bin/make

2023-11-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Nov 19 12:11:34 UTC 2023

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

Log Message:
tests/make: cover all code paths for the ':mtime' modifier


To generate a diff of this commit:
cvs rdiff -u -r1.1072 -r1.1073 src/usr.bin/make/var.c
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/varmod-mtime.exp
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/varmod-mtime.mk

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



CVS commit: src/usr.bin/make

2023-11-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Nov 19 11:47:49 UTC 2023

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

Log Message:
make: produce more accurate error message for invalid ':mtime' argument


To generate a diff of this commit:
cvs rdiff -u -r1.1071 -r1.1072 src/usr.bin/make/var.c
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/varmod-mtime.exp
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/varmod-mtime.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.1071 src/usr.bin/make/var.c:1.1072
--- src/usr.bin/make/var.c:1.1071	Sun Nov 19 11:30:28 2023
+++ src/usr.bin/make/var.c	Sun Nov 19 11:47:49 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.1071 2023/11/19 11:30:28 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.1072 2023/11/19 11:47:49 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1071 2023/11/19 11:30:28 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1072 2023/11/19 11:47:49 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -2888,22 +2888,25 @@ ApplyModifier_Mtime(const char **pp, Mod
 	if (args.use_fallback) {
 		p++;
 		if (TryParseTime(, )) {
-		} else if (strncmp(p, "error", 5) == 0
-		&& IsDelimiter(p[5], ch)) {
+		} else if (strncmp(p, "error", 5) == 0) {
 			p += 5;
 			args.error = true;
-		} else {
-			Parse_Error(PARSE_FATAL,
-			"Invalid argument '%.*s' for modifier ':mtime'",
-			(int)strcspn(p, ":{}()"), p);
-			return AMR_CLEANUP;
-		}
+		} else
+			goto invalid_argument;
+		if (!IsDelimiter(*p, ch))
+			goto invalid_argument;
 		*pp = p;
 	}
 	if (!ModChain_ShouldEval(ch))
 		return AMR_OK;
 	ModifyWords(ch, ModifyWord_Mtime, , ch->oneBigWord);
 	return args.rc;
+
+invalid_argument:
+	Parse_Error(PARSE_FATAL,
+	"Invalid argument '%.*s' for modifier ':mtime'",
+	(int)strcspn(*pp + 1, ":{}()"), *pp + 1);
+	return AMR_CLEANUP;
 }
 
 static void

Index: src/usr.bin/make/unit-tests/varmod-mtime.exp
diff -u src/usr.bin/make/unit-tests/varmod-mtime.exp:1.5 src/usr.bin/make/unit-tests/varmod-mtime.exp:1.6
--- src/usr.bin/make/unit-tests/varmod-mtime.exp:1.5	Sun Nov 19 11:37:44 2023
+++ src/usr.bin/make/unit-tests/varmod-mtime.exp	Sun Nov 19 11:47:49 2023
@@ -1,4 +1,4 @@
-make: "varmod-mtime.mk" line 47: Unknown modifier "x"
+make: "varmod-mtime.mk" line 47: Invalid argument '123x' for modifier ':mtime'
 make: "varmod-mtime.mk" line 47: Malformed conditional (${no/such/file:L:mtime=123x})
 make: "varmod-mtime.mk" line 70: Cannot determine mtime for 'no/such/file1': 
 make: "varmod-mtime.mk" line 70: Cannot determine mtime for 'no/such/file2': 

Index: src/usr.bin/make/unit-tests/varmod-mtime.mk
diff -u src/usr.bin/make/unit-tests/varmod-mtime.mk:1.6 src/usr.bin/make/unit-tests/varmod-mtime.mk:1.7
--- src/usr.bin/make/unit-tests/varmod-mtime.mk:1.6	Sun Nov 19 11:37:44 2023
+++ src/usr.bin/make/unit-tests/varmod-mtime.mk	Sun Nov 19 11:47:49 2023
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-mtime.mk,v 1.6 2023/11/19 11:37:44 rillig Exp $
+# $NetBSD: varmod-mtime.mk,v 1.7 2023/11/19 11:47:49 rillig Exp $
 #
 # Tests for the ':mtime' variable modifier, which maps each word of the
 # expression to that file's modification time.
@@ -42,7 +42,7 @@ not_found_mtime:=	${no/such/file:L:mtime
 
 
 # The fallback timestamp must only be an integer, without trailing characters.
-# expect+2: Unknown modifier "x"
+# expect+2: Invalid argument '123x' for modifier ':mtime'
 # expect+1: Malformed conditional (${no/such/file:L:mtime=123x})
 .if ${no/such/file:L:mtime=123x}
 .  error



CVS commit: src/usr.bin/make

2023-11-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Nov 19 11:47:49 UTC 2023

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

Log Message:
make: produce more accurate error message for invalid ':mtime' argument


To generate a diff of this commit:
cvs rdiff -u -r1.1071 -r1.1072 src/usr.bin/make/var.c
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/varmod-mtime.exp
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/varmod-mtime.mk

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



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

2023-11-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Nov 19 11:37:44 UTC 2023

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

Log Message:
tests/make: test non-integer fallback in ':mtime' modifier


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/varmod-mtime.exp
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/varmod-mtime.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-mtime.exp
diff -u src/usr.bin/make/unit-tests/varmod-mtime.exp:1.4 src/usr.bin/make/unit-tests/varmod-mtime.exp:1.5
--- src/usr.bin/make/unit-tests/varmod-mtime.exp:1.4	Sat Aug 19 01:34:21 2023
+++ src/usr.bin/make/unit-tests/varmod-mtime.exp	Sun Nov 19 11:37:44 2023
@@ -1,8 +1,10 @@
-make: "varmod-mtime.mk" line 60: Cannot determine mtime for 'no/such/file1': 
-make: "varmod-mtime.mk" line 60: Cannot determine mtime for 'no/such/file2': 
-make: "varmod-mtime.mk" line 60: Malformed conditional (${no/such/file1 no/such/file2:L:mtime=error})
-make: "varmod-mtime.mk" line 71: Invalid argument 'errorhandler-no' for modifier ':mtime'
-make: "varmod-mtime.mk" line 71: Malformed conditional (${MAKEFILE:mtime=errorhandler-no} > 0)
+make: "varmod-mtime.mk" line 47: Unknown modifier "x"
+make: "varmod-mtime.mk" line 47: Malformed conditional (${no/such/file:L:mtime=123x})
+make: "varmod-mtime.mk" line 70: Cannot determine mtime for 'no/such/file1': 
+make: "varmod-mtime.mk" line 70: Cannot determine mtime for 'no/such/file2': 
+make: "varmod-mtime.mk" line 70: Malformed conditional (${no/such/file1 no/such/file2:L:mtime=error})
+make: "varmod-mtime.mk" line 81: Invalid argument 'errorhandler-no' for modifier ':mtime'
+make: "varmod-mtime.mk" line 81: Malformed conditional (${MAKEFILE:mtime=errorhandler-no} > 0)
 make: Fatal errors encountered -- cannot continue
 make: stopped in unit-tests
 exit status 1

Index: src/usr.bin/make/unit-tests/varmod-mtime.mk
diff -u src/usr.bin/make/unit-tests/varmod-mtime.mk:1.5 src/usr.bin/make/unit-tests/varmod-mtime.mk:1.6
--- src/usr.bin/make/unit-tests/varmod-mtime.mk:1.5	Sat Aug 19 08:19:25 2023
+++ src/usr.bin/make/unit-tests/varmod-mtime.mk	Sun Nov 19 11:37:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-mtime.mk,v 1.5 2023/08/19 08:19:25 rillig Exp $
+# $NetBSD: varmod-mtime.mk,v 1.6 2023/11/19 11:37:44 rillig Exp $
 #
 # Tests for the ':mtime' variable modifier, which maps each word of the
 # expression to that file's modification time.
@@ -41,6 +41,16 @@ not_found_mtime:=	${no/such/file:L:mtime
 .endif
 
 
+# The fallback timestamp must only be an integer, without trailing characters.
+# expect+2: Unknown modifier "x"
+# expect+1: Malformed conditional (${no/such/file:L:mtime=123x})
+.if ${no/such/file:L:mtime=123x}
+.  error
+.else
+.  error
+.endif
+
+
 # The timestamp of a newly created file must be at least as great as the
 # timestamp when parsing of this makefile started.
 COOKIE=	${TMPDIR:U/tmp}/varmod-mtime.cookie



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

2023-11-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Nov 19 11:37:44 UTC 2023

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

Log Message:
tests/make: test non-integer fallback in ':mtime' modifier


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/varmod-mtime.exp
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/varmod-mtime.mk

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



CVS commit: src/usr.bin/make

2023-11-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Nov 19 11:30:28 UTC 2023

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

Log Message:
make: extract detection of ':from=to' to a separate function

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.1070 -r1.1071 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.1070 src/usr.bin/make/var.c:1.1071
--- src/usr.bin/make/var.c:1.1070	Sun Nov 19 09:45:19 2023
+++ src/usr.bin/make/var.c	Sun Nov 19 11:30:28 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.1070 2023/11/19 09:45:19 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.1071 2023/11/19 11:30:28 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1070 2023/11/19 09:45:19 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1071 2023/11/19 11:30:28 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -3687,6 +3687,26 @@ ApplyModifier_Unique(const char **pp, Mo
 }
 
 #ifdef SYSVVARSUB
+/* Test whether the modifier has the form '='. */
+static bool
+IsSysVModifier(const char *p, char startc, char endc)
+{
+	bool eqFound = false;
+
+	int depth = 1;
+	while (*p != '\0' && depth > 0) {
+		if (*p == '=')	/* XXX: should also test depth == 1 */
+			eqFound = true;
+		else if (*p == endc)
+			depth--;
+		else if (*p == startc)
+			depth++;
+		if (depth > 0)
+			p++;
+	}
+	return *p == endc && eqFound;
+}
+
 /* :from=to */
 static ApplyModifierResult
 ApplyModifier_SysV(const char **pp, ModChain *ch)
@@ -3699,26 +3719,8 @@ ApplyModifier_SysV(const char **pp, ModC
 	const char *lhsSuffix;
 
 	const char *mod = *pp;
-	bool eqFound = false;
 
-	/*
-	 * First we make a pass through the string trying to verify it is a
-	 * SysV-make-style translation. It must be: =
-	 */
-	int depth = 1;
-	const char *p = mod;
-	while (*p != '\0' && depth > 0) {
-		if (*p == '=') {	/* XXX: should also test depth == 1 */
-			eqFound = true;
-			/* continue looking for ch->endc */
-		} else if (*p == ch->endc)
-			depth--;
-		else if (*p == ch->startc)
-			depth++;
-		if (depth > 0)
-			p++;
-	}
-	if (*p != ch->endc || !eqFound)
+	if (!IsSysVModifier(mod, ch->startc, ch->endc))
 		return AMR_UNKNOWN;
 
 	if (!ParseModifierPart(pp, '=', expr->emode, ch, ))



CVS commit: src/usr.bin/make

2023-11-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Nov 19 11:30:28 UTC 2023

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

Log Message:
make: extract detection of ':from=to' to a separate function

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.1070 -r1.1071 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.



CVS commit: src/usr.bin/make

2023-11-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Nov 19 09:45:19 UTC 2023

Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: directive-export-gmake.exp
directive-export-gmake.mk directive-export.exp directive-export.mk

Log Message:
tests/make: test and explain exporting of variables


To generate a diff of this commit:
cvs rdiff -u -r1.1069 -r1.1070 src/usr.bin/make/var.c
cvs rdiff -u -r1.5 -r1.6 \
src/usr.bin/make/unit-tests/directive-export-gmake.exp \
src/usr.bin/make/unit-tests/directive-export.exp
cvs rdiff -u -r1.7 -r1.8 \
src/usr.bin/make/unit-tests/directive-export-gmake.mk
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/directive-export.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.1069 src/usr.bin/make/var.c:1.1070
--- src/usr.bin/make/var.c:1.1069	Sat Nov 18 20:19:08 2023
+++ src/usr.bin/make/var.c	Sun Nov 19 09:45:19 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.1069 2023/11/18 20:19:08 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.1070 2023/11/19 09:45:19 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1069 2023/11/18 20:19:08 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1070 2023/11/19 09:45:19 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -615,13 +615,8 @@ ExportVarEnv(Var *v)
 		return true;
 	}
 
-	if (v->inUse) {
-		/*
-		 * We recursed while exporting in a child.
-		 * This isn't going to end well, just skip it.
-		 */
-		return false;
-	}
+	if (v->inUse)
+		return false;	/* see EMPTY_SHELL in directive-export.mk */
 
 	/* XXX: name is injected without escaping it */
 	expr = str_concat3("${", name, "}");

Index: src/usr.bin/make/unit-tests/directive-export-gmake.exp
diff -u src/usr.bin/make/unit-tests/directive-export-gmake.exp:1.5 src/usr.bin/make/unit-tests/directive-export-gmake.exp:1.6
--- src/usr.bin/make/unit-tests/directive-export-gmake.exp:1.5	Sun Aug 20 20:48:32 2023
+++ src/usr.bin/make/unit-tests/directive-export-gmake.exp	Sun Nov 19 09:45:19 2023
@@ -1,5 +1,6 @@
 make: "directive-export-gmake.mk" line 71: Invalid line 'export VAR=${:U1}', expanded to 'export VAR=1'
 make: "directive-export-gmake.mk" line 85: 16:00:00
+make: "directive-export-gmake.mk" line 92: Variable/Value missing from "export"
 make: Fatal errors encountered -- cannot continue
 make: stopped in unit-tests
 exit status 1
Index: src/usr.bin/make/unit-tests/directive-export.exp
diff -u src/usr.bin/make/unit-tests/directive-export.exp:1.5 src/usr.bin/make/unit-tests/directive-export.exp:1.6
--- src/usr.bin/make/unit-tests/directive-export.exp:1.5	Sun Aug 20 20:48:32 2023
+++ src/usr.bin/make/unit-tests/directive-export.exp	Sun Nov 19 09:45:19 2023
@@ -1,4 +1,4 @@
-make: "directive-export.mk" line 50: 00:00:00
-make: "directive-export.mk" line 55: 00:00:00
-make: "directive-export.mk" line 58: 16:00:00
+make: "directive-export.mk" line 56: 00:00:00
+make: "directive-export.mk" line 61: 00:00:00
+make: "directive-export.mk" line 64: 16:00:00
 exit status 0

Index: src/usr.bin/make/unit-tests/directive-export-gmake.mk
diff -u src/usr.bin/make/unit-tests/directive-export-gmake.mk:1.7 src/usr.bin/make/unit-tests/directive-export-gmake.mk:1.8
--- src/usr.bin/make/unit-tests/directive-export-gmake.mk:1.7	Sun Aug 20 20:48:32 2023
+++ src/usr.bin/make/unit-tests/directive-export-gmake.mk	Sun Nov 19 09:45:19 2023
@@ -1,4 +1,4 @@
-# $NetBSD: directive-export-gmake.mk,v 1.7 2023/08/20 20:48:32 rillig Exp $
+# $NetBSD: directive-export-gmake.mk,v 1.8 2023/11/19 09:45:19 rillig Exp $
 #
 # Tests for the export directive (without leading dot), as in GNU make.
 
@@ -83,3 +83,24 @@ INDIRECT_TZ=	${:UAmerica/Los_Angeles}
 export TZ=${INDIRECT_TZ}
 # expect+1: 16:00:00
 .info ${%T:L:localtime=86400}
+
+
+# The '=' must be present in the unexpanded line, it cannot be generated by
+# an expression.
+EQ=	=
+# expect+1: Variable/Value missing from "export"
+export EQ_VAR${EQ}eq-value
+.if ${:!env!:MEQ_VAR=*}
+.  error
+.endif
+
+
+# The variable name must be given directly, it is not expanded.  The name of
+# the exported variable thus starts with a '$', and that name may be filtered
+# out by the platform.
+INDIRECT_NAME=	I_NAME
+INDIRECT_VALUE=	indirect value
+export ${INDIRECT_NAME}=${INDIRECT_VALUE}
+.if ${:!env!:MI_NAME=*}
+.  error
+.endif

Index: src/usr.bin/make/unit-tests/directive-export.mk
diff -u src/usr.bin/make/unit-tests/directive-export.mk:1.9 src/usr.bin/make/unit-tests/directive-export.mk:1.10
--- src/usr.bin/make/unit-tests/directive-export.mk:1.9	Sun Aug 20 20:48:32 2023
+++ src/usr.bin/make/unit-tests/directive-export.mk	Sun Nov 19 09:45:19 2023
@@ -1,4 +1,4 @@
-# $NetBSD: directive-export.mk,v 1.9 2023/08/20 

CVS commit: src/usr.bin/make

2023-11-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Nov 19 09:45:19 UTC 2023

Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: directive-export-gmake.exp
directive-export-gmake.mk directive-export.exp directive-export.mk

Log Message:
tests/make: test and explain exporting of variables


To generate a diff of this commit:
cvs rdiff -u -r1.1069 -r1.1070 src/usr.bin/make/var.c
cvs rdiff -u -r1.5 -r1.6 \
src/usr.bin/make/unit-tests/directive-export-gmake.exp \
src/usr.bin/make/unit-tests/directive-export.exp
cvs rdiff -u -r1.7 -r1.8 \
src/usr.bin/make/unit-tests/directive-export-gmake.mk
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/directive-export.mk

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