CVS commit: src/external/gpl2/xcvs/dist/src

2024-02-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb  4 21:42:24 UTC 2024

Modified Files:
src/external/gpl2/xcvs/dist/src: client.c

Log Message:
mention if we are prunning.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl2/xcvs/dist/src/client.c

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



CVS commit: src/external/gpl2/xcvs/dist/src

2024-02-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb  4 21:42:24 UTC 2024

Modified Files:
src/external/gpl2/xcvs/dist/src: client.c

Log Message:
mention if we are prunning.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl2/xcvs/dist/src/client.c

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

Modified files:

Index: src/external/gpl2/xcvs/dist/src/client.c
diff -u src/external/gpl2/xcvs/dist/src/client.c:1.5 src/external/gpl2/xcvs/dist/src/client.c:1.6
--- src/external/gpl2/xcvs/dist/src/client.c:1.5	Tue May 17 10:00:09 2016
+++ src/external/gpl2/xcvs/dist/src/client.c	Sun Feb  4 16:42:24 2024
@@ -10,7 +10,7 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.  */
 #include 
-__RCSID("$NetBSD: client.c,v 1.5 2016/05/17 14:00:09 christos Exp $");
+__RCSID("$NetBSD: client.c,v 1.6 2024/02/04 21:42:24 christos Exp $");
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -2289,6 +2289,7 @@ process_prune_candidates (void)
 struct save_dir *p;
 struct save_dir *q;
 
+processing = "prune";
 if (toplevel_wd)
 {
 	if (CVS_CHDIR (toplevel_wd) < 0)



CVS commit: src

2024-02-04 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Feb  4 20:50:30 UTC 2024

Modified Files:
src/etc/etc.macppc: MAKEDEV.conf
src/etc/etc.ofppc: MAKEDEV.conf
src/sys/dev/pci: mpii.c
src/sys/fs/udf: udf_subr.c

Log Message:
s/substract/subtract/ in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/etc/etc.macppc/MAKEDEV.conf
cvs rdiff -u -r1.11 -r1.12 src/etc/etc.ofppc/MAKEDEV.conf
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/pci/mpii.c
cvs rdiff -u -r1.174 -r1.175 src/sys/fs/udf/udf_subr.c

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

Modified files:

Index: src/etc/etc.macppc/MAKEDEV.conf
diff -u src/etc/etc.macppc/MAKEDEV.conf:1.14 src/etc/etc.macppc/MAKEDEV.conf:1.15
--- src/etc/etc.macppc/MAKEDEV.conf:1.14	Fri Aug 12 11:15:41 2022
+++ src/etc/etc.macppc/MAKEDEV.conf	Sun Feb  4 20:50:30 2024
@@ -1,4 +1,4 @@
-# $NetBSD: MAKEDEV.conf,v 1.14 2022/08/12 11:15:41 riastradh Exp $
+# $NetBSD: MAKEDEV.conf,v 1.15 2024/02/04 20:50:30 andvar Exp $
 
 all_md)
 	makedev wscons sd0 sd1 sd2 st0 st1 cd0 cd1 wd0 wd1 wd2 wd3
@@ -33,7 +33,7 @@ floppy)
 tty1[0-9])
 	# Mac uses special mapping - tty0[01] are the zstty ports,
 	# tty1? are 'com' ports; for 'com' ports, we need to start
-	# at correct offset, i.e. substract 10
+	# at correct offset, i.e. subtract 10
 	ounit=${i#tty}
 	ounit=$(($ounit + 0))
 	if [ $ounit -lt 10 ]; then

Index: src/etc/etc.ofppc/MAKEDEV.conf
diff -u src/etc/etc.ofppc/MAKEDEV.conf:1.11 src/etc/etc.ofppc/MAKEDEV.conf:1.12
--- src/etc/etc.ofppc/MAKEDEV.conf:1.11	Sun Jan 27 08:53:29 2019
+++ src/etc/etc.ofppc/MAKEDEV.conf	Sun Feb  4 20:50:29 2024
@@ -1,4 +1,4 @@
-# $NetBSD: MAKEDEV.conf,v 1.11 2019/01/27 08:53:29 maxv Exp $
+# $NetBSD: MAKEDEV.conf,v 1.12 2024/02/04 20:50:29 andvar Exp $
 
 all_md)
 	makedev wscons sd0 sd1 sd2 st0 st1 cd0 cd1 wd0 wd1 fd0 fd1
@@ -28,7 +28,7 @@ floppy)
 tty1[0-9])
 	# Mac uses special mapping - tty0[01] are the zstty ports,
 	# tty1? are 'com' ports; for 'com' ports, we need to start
-	# at correct offset, i.e. substract 10
+	# at correct offset, i.e. subtract 10
 	ounit=${i#tty}
 	ounit=$(($ounit + 0))
 	if [ $ounit -lt 10 ]; then

Index: src/sys/dev/pci/mpii.c
diff -u src/sys/dev/pci/mpii.c:1.30 src/sys/dev/pci/mpii.c:1.31
--- src/sys/dev/pci/mpii.c:1.30	Wed Oct 25 00:21:49 2023
+++ src/sys/dev/pci/mpii.c	Sun Feb  4 20:50:30 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: mpii.c,v 1.30 2023/10/25 00:21:49 buhrow Exp $ */
+/* $NetBSD: mpii.c,v 1.31 2024/02/04 20:50:30 andvar Exp $ */
 /*	$OpenBSD: mpii.c,v 1.115 2018/08/14 05:22:21 jmatthew Exp $	*/
 /*
  * Copyright (c) 2010, 2012 Mike Belopuhov
@@ -20,7 +20,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.30 2023/10/25 00:21:49 buhrow Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.31 2024/02/04 20:50:30 andvar Exp $");
 
 #include "bio.h"
 
@@ -3685,7 +3685,7 @@ mpii_bio_hs(struct mpii_softc *sc, struc
 			/*
 			 * diskid comparison is based on the idea that all
 			 * disks are counted by the bio(4) in sequence, thus
-			 * substracting the number of disks in the volume
+			 * subtracting the number of disks in the volume
 			 * from the diskid yields us a "relative" hotspare
 			 * number, which is good enough for us.
 			 */

Index: src/sys/fs/udf/udf_subr.c
diff -u src/sys/fs/udf/udf_subr.c:1.174 src/sys/fs/udf/udf_subr.c:1.175
--- src/sys/fs/udf/udf_subr.c:1.174	Sat Jun  3 20:41:45 2023
+++ src/sys/fs/udf/udf_subr.c	Sun Feb  4 20:50:30 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_subr.c,v 1.174 2023/06/03 20:41:45 andvar Exp $ */
+/* $NetBSD: udf_subr.c,v 1.175 2024/02/04 20:50:30 andvar Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -29,7 +29,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.174 2023/06/03 20:41:45 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.175 2024/02/04 20:50:30 andvar Exp $");
 #endif /* not lint */
 
 
@@ -4919,7 +4919,7 @@ udf_dir_detach(struct udf_mount *ump, st
 		refcnt = udf_rw16(udf_node->efe->link_cnt);
 	}
 #ifdef UDF_COMPLETE_DELETE
-	/* substract reference counter in attached node */
+	/* subtract reference counter in attached node */
 	refcnt -= 1;
 	if (udf_node->fe) {
 		udf_node->fe->link_cnt = udf_rw16(refcnt);
@@ -4934,7 +4934,7 @@ udf_dir_detach(struct udf_mount *ump, st
 	if (fid->file_char & UDF_FILE_CHAR_DIR) {
 		int drefcnt;
 
-		/* substract reference counter in directory node */
+		/* subtract reference counter in directory node */
 		/* note subtract 2 (?) for its was also backreferenced */
 		if (dir_node->fe) {
 			drefcnt  = udf_rw16(dir_node->fe->link_cnt);



CVS commit: src

2024-02-04 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Feb  4 20:50:30 UTC 2024

Modified Files:
src/etc/etc.macppc: MAKEDEV.conf
src/etc/etc.ofppc: MAKEDEV.conf
src/sys/dev/pci: mpii.c
src/sys/fs/udf: udf_subr.c

Log Message:
s/substract/subtract/ in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/etc/etc.macppc/MAKEDEV.conf
cvs rdiff -u -r1.11 -r1.12 src/etc/etc.ofppc/MAKEDEV.conf
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/pci/mpii.c
cvs rdiff -u -r1.174 -r1.175 src/sys/fs/udf/udf_subr.c

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



CVS commit: src/external/gpl2/xcvs/dist/src

2024-02-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb  4 20:47:26 UTC 2024

Modified Files:
src/external/gpl2/xcvs/dist/src: cvs.h main.c recurse.c

Log Message:
mention which processing step we are in.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl2/xcvs/dist/src/cvs.h
cvs rdiff -u -r1.8 -r1.9 src/external/gpl2/xcvs/dist/src/main.c
cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/recurse.c

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

Modified files:

Index: src/external/gpl2/xcvs/dist/src/cvs.h
diff -u src/external/gpl2/xcvs/dist/src/cvs.h:1.5 src/external/gpl2/xcvs/dist/src/cvs.h:1.6
--- src/external/gpl2/xcvs/dist/src/cvs.h:1.5	Fri Sep 15 17:03:26 2017
+++ src/external/gpl2/xcvs/dist/src/cvs.h	Sun Feb  4 15:47:25 2024
@@ -878,6 +878,7 @@ char *expand_path (const char *name, con
 
 /* User variables.  */
 extern List *variable_list;
+extern const char *processing;
 
 /* cvsacl patch */
 extern int cvsacl (int argc, char **argv);

Index: src/external/gpl2/xcvs/dist/src/main.c
diff -u src/external/gpl2/xcvs/dist/src/main.c:1.8 src/external/gpl2/xcvs/dist/src/main.c:1.9
--- src/external/gpl2/xcvs/dist/src/main.c:1.8	Thu Jan 20 09:46:06 2022
+++ src/external/gpl2/xcvs/dist/src/main.c	Sun Feb  4 15:47:25 2024
@@ -17,7 +17,7 @@
  *
  */
 #include 
-__RCSID("$NetBSD: main.c,v 1.8 2022/01/20 14:46:06 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.9 2024/02/04 20:47:25 christos Exp $");
 
 #include "cvs.h"
 
@@ -29,6 +29,7 @@ __RCSID("$NetBSD: main.c,v 1.8 2022/01/2
 const char *program_name;
 const char *program_path;
 const char *cvs_cmd_name;
+const char *processing = "init";
 
 const char *global_session_id; /* Random session ID */
 
@@ -516,8 +517,8 @@ show_status (int n)
 
 	if (getcwd(wd, sizeof(wd)) == NULL)
 		return;
-	n = snprintf(buf, sizeof(buf), "%s[%d]: working in %s\n", getprogname(),
-	(int)getpid(), wd);
+	n = snprintf(buf, sizeof(buf), "%s[%d]: %s in %s\n", getprogname(),
+	(int)getpid(), processing, wd);
 	if (n <= 0)
 		return;
 	write(ttyfd, buf, (size_t)n);

Index: src/external/gpl2/xcvs/dist/src/recurse.c
diff -u src/external/gpl2/xcvs/dist/src/recurse.c:1.3 src/external/gpl2/xcvs/dist/src/recurse.c:1.4
--- src/external/gpl2/xcvs/dist/src/recurse.c:1.3	Tue May 17 10:00:09 2016
+++ src/external/gpl2/xcvs/dist/src/recurse.c	Sun Feb  4 15:47:25 2024
@@ -14,7 +14,7 @@
  *
  */
 #include 
-__RCSID("$NetBSD: recurse.c,v 1.3 2016/05/17 14:00:09 christos Exp $");
+__RCSID("$NetBSD: recurse.c,v 1.4 2024/02/04 20:47:25 christos Exp $");
 
 #include "cvs.h"
 #include "save-cwd.h"
@@ -748,6 +748,7 @@ do_recursion (struct recursion_frame *fr
 if (dirlist != NULL && filelist == NULL)
 	dodoneproc = 0;
 
+processing = "scan";
 /*
  * If filelist or dirlist is already set, we don't look again. Otherwise,
  * find the files and directories
@@ -810,6 +811,8 @@ do_recursion (struct recursion_frame *fr
 	}
 }
 
+processing = "process";
+
 /* process the files (if any) */
 if (process_this_directory && filelist != NULL && frame->fileproc)
 {
@@ -859,6 +862,8 @@ do_recursion (struct recursion_frame *fr
 	dellist ();
 }
 
+processing = "cleanup";
+
 /* call-back files done proc (if any) */
 if (process_this_directory && dodoneproc && frame->filesdoneproc != NULL)
 	err = frame->filesdoneproc (frame->callerdat, err, repository,



CVS commit: src/external/gpl2/xcvs/dist/src

2024-02-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb  4 20:47:26 UTC 2024

Modified Files:
src/external/gpl2/xcvs/dist/src: cvs.h main.c recurse.c

Log Message:
mention which processing step we are in.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl2/xcvs/dist/src/cvs.h
cvs rdiff -u -r1.8 -r1.9 src/external/gpl2/xcvs/dist/src/main.c
cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/recurse.c

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



CVS commit: src/sys

2024-02-04 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Feb  4 18:52:36 UTC 2024

Modified Files:
src/sys/arch/arm/sa11x0: sa11x0_sspreg.h
src/sys/arch/hp300/hp300: locore.s
src/sys/dev/bi: uba_bi.c
src/sys/dev/marvell: if_mvgbe.c
src/sys/dev/pud: pud_dev.c
src/sys/rump: Makefile.rump

Log Message:
fix tripple/quadruple "r" letter typos in comments and log messages.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sa11x0/sa11x0_sspreg.h
cvs rdiff -u -r1.185 -r1.186 src/sys/arch/hp300/hp300/locore.s
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/bi/uba_bi.c
cvs rdiff -u -r1.66 -r1.67 src/sys/dev/marvell/if_mvgbe.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pud/pud_dev.c
cvs rdiff -u -r1.135 -r1.136 src/sys/rump/Makefile.rump

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/arm/sa11x0/sa11x0_sspreg.h
diff -u src/sys/arch/arm/sa11x0/sa11x0_sspreg.h:1.3 src/sys/arch/arm/sa11x0/sa11x0_sspreg.h:1.4
--- src/sys/arch/arm/sa11x0/sa11x0_sspreg.h:1.3	Mon Apr 28 20:23:14 2008
+++ src/sys/arch/arm/sa11x0/sa11x0_sspreg.h	Sun Feb  4 18:52:35 2024
@@ -1,4 +1,4 @@
-/*  $NetBSD: sa11x0_sspreg.h,v 1.3 2008/04/28 20:23:14 martin Exp $	*/
+/*  $NetBSD: sa11x0_sspreg.h,v 1.4 2024/02/04 18:52:35 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2001, The NetBSD Foundation, Inc.  All rights reserved.
@@ -65,4 +65,4 @@
 #define SR_BSY		0x08	/* SSP busy flag */
 #define SR_TFS		0x10	/* Transmit FIFO service request */
 #define SR_RFS		0x20	/* Receive FIFO service request */
-#define SR_ROR		0x40	/* Receive FIFO overrrun */
+#define SR_ROR		0x40	/* Receive FIFO overrun */

Index: src/sys/arch/hp300/hp300/locore.s
diff -u src/sys/arch/hp300/hp300/locore.s:1.185 src/sys/arch/hp300/hp300/locore.s:1.186
--- src/sys/arch/hp300/hp300/locore.s:1.185	Fri Jan 19 18:18:53 2024
+++ src/sys/arch/hp300/hp300/locore.s	Sun Feb  4 18:52:35 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.185 2024/01/19 18:18:53 thorpej Exp $	*/
+/*	$NetBSD: locore.s,v 1.186 2024/02/04 18:52:35 andvar Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -1033,7 +1033,7 @@ L_delay:
 #define BUSERR  0xfffc
 ASLOCAL(phys_badaddr)
 	ASRELOC(_bsave,%a3)
-	movl	BUSERR,%a3@		| save ROM bus errror handler
+	movl	BUSERR,%a3@		| save ROM bus error handler
 	ASRELOC(_ssave,%a3)
 	movl	%sp,%a3@		| and current stack pointer
 	ASRELOC(catchbad,%a3)

Index: src/sys/dev/bi/uba_bi.c
diff -u src/sys/dev/bi/uba_bi.c:1.15 src/sys/dev/bi/uba_bi.c:1.16
--- src/sys/dev/bi/uba_bi.c:1.15	Mon Nov 23 02:13:45 2009
+++ src/sys/dev/bi/uba_bi.c	Sun Feb  4 18:52:35 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: uba_bi.c,v 1.15 2009/11/23 02:13:45 rmind Exp $ */
+/*	$NetBSD: uba_bi.c,v 1.16 2024/02/04 18:52:35 andvar Exp $ */
 /*
  * Copyright (c) 1998 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uba_bi.c,v 1.15 2009/11/23 02:13:45 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uba_bi.c,v 1.16 2024/02/04 18:52:35 andvar Exp $");
 
 #include 
 #include 
@@ -76,7 +76,7 @@ static	void bua_purge(struct uba_softc *
 #define BUACSR_BUAEIE   0x0010  /* bua error interrupt enable (?) */
 #define BUACSR_UPI  0x0002  /* unibus power init */
 #define BUACSR_UREGDUMP 0x0001  /* microdiag register dump */
-#define BUACSR_IERRNO   0x00ff  /* mask for internal errror number */
+#define BUACSR_IERRNO   0x00ff  /* mask for internal error number */
 
 /* bua_offset */
 #define BUAOFFSET_MASK  0x3e00  /* hence max offset = 15872 */

Index: src/sys/dev/marvell/if_mvgbe.c
diff -u src/sys/dev/marvell/if_mvgbe.c:1.66 src/sys/dev/marvell/if_mvgbe.c:1.67
--- src/sys/dev/marvell/if_mvgbe.c:1.66	Sat May 21 10:33:05 2022
+++ src/sys/dev/marvell/if_mvgbe.c	Sun Feb  4 18:52:36 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_mvgbe.c,v 1.66 2022/05/21 10:33:05 rin Exp $	*/
+/*	$NetBSD: if_mvgbe.c,v 1.67 2024/02/04 18:52:36 andvar Exp $	*/
 /*
  * Copyright (c) 2007, 2008, 2013 KIYOHARA Takashi
  * All rights reserved.
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.66 2022/05/21 10:33:05 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.67 2024/02/04 18:52:36 andvar Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -921,7 +921,7 @@ mvgbe_attach(device_t parent, device_t s
 #ifdef MVGBE_EVENT_COUNTERS
 	/* Attach event counters. */
 	evcnt_attach_dynamic(>sc_ev_rxoverrun, EVCNT_TYPE_MISC,
-	NULL, device_xname(sc->sc_dev), "rxoverrrun");
+	NULL, device_xname(sc->sc_dev), "rxoverrun");
 	evcnt_attach_dynamic(>sc_ev_wdogsoft, EVCNT_TYPE_MISC,
 	NULL, device_xname(sc->sc_dev), "wdogsoft");
 #endif

Index: src/sys/dev/pud/pud_dev.c
diff -u src/sys/dev/pud/pud_dev.c:1.7 src/sys/dev/pud/pud_dev.c:1.8
--- src/sys/dev/pud/pud_dev.c:1.7	Tue Dec  8 20:36:15 2015
+++ 

CVS commit: src/sys

2024-02-04 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Feb  4 18:52:36 UTC 2024

Modified Files:
src/sys/arch/arm/sa11x0: sa11x0_sspreg.h
src/sys/arch/hp300/hp300: locore.s
src/sys/dev/bi: uba_bi.c
src/sys/dev/marvell: if_mvgbe.c
src/sys/dev/pud: pud_dev.c
src/sys/rump: Makefile.rump

Log Message:
fix tripple/quadruple "r" letter typos in comments and log messages.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sa11x0/sa11x0_sspreg.h
cvs rdiff -u -r1.185 -r1.186 src/sys/arch/hp300/hp300/locore.s
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/bi/uba_bi.c
cvs rdiff -u -r1.66 -r1.67 src/sys/dev/marvell/if_mvgbe.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pud/pud_dev.c
cvs rdiff -u -r1.135 -r1.136 src/sys/rump/Makefile.rump

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



CVS commit: src

2024-02-04 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Feb  4 18:47:27 UTC 2024

Modified Files:
src/lib/libedit: editline.3
src/sys/arch/vax/vax: ka780.c

Log Message:
s/interrrupt/interrupt/ in comment and editline(3) man page.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/lib/libedit/editline.3
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/vax/vax/ka780.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/libedit/editline.3
diff -u src/lib/libedit/editline.3:1.101 src/lib/libedit/editline.3:1.102
--- src/lib/libedit/editline.3:1.101	Sun Aug 15 10:12:54 2021
+++ src/lib/libedit/editline.3	Sun Feb  4 18:47:27 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: editline.3,v 1.101 2021/08/15 10:12:54 wiz Exp $
+.\"	$NetBSD: editline.3,v 1.102 2024/02/04 18:47:27 andvar Exp $
 .\"
 .\" Copyright (c) 1997-2014 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -512,7 +512,7 @@ If the
 .Fa flag
 argument is non-zero, then
 .Nm editline
-attempts to recover from read errors, ignoring the first interrrupted
+attempts to recover from read errors, ignoring the first interrupted
 error, and trying to reset the input file descriptor to reset non-blocking I/O.
 This is disabled by default, and desirable only when
 .Nm editline

Index: src/sys/arch/vax/vax/ka780.c
diff -u src/sys/arch/vax/vax/ka780.c:1.34 src/sys/arch/vax/vax/ka780.c:1.35
--- src/sys/arch/vax/vax/ka780.c:1.34	Sun Dec 17 18:39:02 2023
+++ src/sys/arch/vax/vax/ka780.c	Sun Feb  4 18:47:27 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: ka780.c,v 1.34 2023/12/17 18:39:02 andvar Exp $ */
+/*	$NetBSD: ka780.c,v 1.35 2024/02/04 18:47:27 andvar Exp $ */
 /*-
  * Copyright (c) 1982, 1986, 1988 The Regents of the University of California.
  * All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ka780.c,v 1.34 2023/12/17 18:39:02 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ka780.c,v 1.35 2024/02/04 18:47:27 andvar Exp $");
 
 #include 
 #include 
@@ -167,7 +167,7 @@ struct mcr780 {
 #define M780EU_SYN(mcr)		((mcr)->mc_reg[3] & 0x7f)
 #define M780EU_ADDR(mcr)	(((mcr)->mc_reg[3] >> 11) & 0x1)
 
-/* enable crd interrrupts */
+/* enable crd interrupts */
 void
 mem_sbi_attach(device_t parent, device_t self, void *aux)
 {



CVS commit: src

2024-02-04 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Feb  4 18:47:27 UTC 2024

Modified Files:
src/lib/libedit: editline.3
src/sys/arch/vax/vax: ka780.c

Log Message:
s/interrrupt/interrupt/ in comment and editline(3) man page.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/lib/libedit/editline.3
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/vax/vax/ka780.c

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



CVS commit: src/lib/libutil

2024-02-04 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Feb  4 18:44:54 UTC 2024

Modified Files:
src/lib/libutil: getrawpartition.3

Log Message:
getrawpartition(3): reword to clarify return value, use .Pq

"'a' == 0" is, stricly speaking false, and since 'a' is an int, it's
not immediately clear if it's 'a' or 0 that is returned.  Try to
clarify this.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libutil/getrawpartition.3

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

Modified files:

Index: src/lib/libutil/getrawpartition.3
diff -u src/lib/libutil/getrawpartition.3:1.11 src/lib/libutil/getrawpartition.3:1.12
--- src/lib/libutil/getrawpartition.3:1.11	Tue May  4 06:41:27 2010
+++ src/lib/libutil/getrawpartition.3	Sun Feb  4 18:44:54 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: getrawpartition.3,v 1.11 2010/05/04 06:41:27 jruoho Exp $
+.\"	$NetBSD: getrawpartition.3,v 1.12 2024/02/04 18:44:54 uwe Exp $
 .\"
 .\" Copyright (c) 1996 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -43,11 +43,15 @@ partition
 .Fn getrawpartition void
 .Sh DESCRIPTION
 .Fn getrawpartition
-returns the partition number (
-.Sq a
-== 0,
-.Sq b
-== 1, ...) of the
+returns the partition number
+.Po
+0 for
+.Ql a ,
+1 for
+.Ql b ,
+etc
+.Pc
+of the
 .Dq raw
 partition of the system's disks,
 or \-1 in case of an error, setting the global



CVS commit: src/lib/libutil

2024-02-04 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Feb  4 18:44:54 UTC 2024

Modified Files:
src/lib/libutil: getrawpartition.3

Log Message:
getrawpartition(3): reword to clarify return value, use .Pq

"'a' == 0" is, stricly speaking false, and since 'a' is an int, it's
not immediately clear if it's 'a' or 0 that is returned.  Try to
clarify this.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libutil/getrawpartition.3

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



CVS commit: src/common/lib/libc/atomic

2024-02-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb  4 16:19:12 UTC 2024

Modified Files:
src/common/lib/libc/atomic: atomic_store.c

Log Message:
mark unused argument


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/atomic/atomic_store.c

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

Modified files:

Index: src/common/lib/libc/atomic/atomic_store.c
diff -u src/common/lib/libc/atomic/atomic_store.c:1.4 src/common/lib/libc/atomic/atomic_store.c:1.5
--- src/common/lib/libc/atomic/atomic_store.c:1.4	Sat Apr  9 19:38:57 2022
+++ src/common/lib/libc/atomic/atomic_store.c	Sun Feb  4 11:19:12 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_store.c,v 1.4 2022/04/09 23:38:57 riastradh Exp $	*/
+/*	$NetBSD: atomic_store.c,v 1.5 2024/02/04 16:19:12 christos Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: atomic_store.c,v 1.4 2022/04/09 23:38:57 riastradh Exp $");
+__RCSID("$NetBSD: atomic_store.c,v 1.5 2024/02/04 16:19:12 christos Exp $");
 
 #include "atomic_op_namespace.h"
 
@@ -36,9 +36,10 @@ __RCSID("$NetBSD: atomic_store.c,v 1.4 2
 
 #define atomic_store_n(n,b) \
 void __atomic_store_ ## n(volatile void *, uint ## b ## _t, int); \
+/*ARGSUSED*/ \
 void \
 __atomic_store_ ## n(volatile void *ptr, uint ## b ## _t val, \
- int memmodel) \
+ int memmodel __unused) \
 { \
 	membar_release(); \
 	*(volatile uint ## b ## _t *)ptr = val; \



CVS commit: src/common/lib/libc/atomic

2024-02-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb  4 16:19:12 UTC 2024

Modified Files:
src/common/lib/libc/atomic: atomic_store.c

Log Message:
mark unused argument


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/atomic/atomic_store.c

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



CVS commit: [netbsd-10] src/doc

2024-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Feb  4 11:29:46 UTC 2024

Modified Files:
src/doc [netbsd-10]: CHANGES-10.0

Log Message:
Ticket #583


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.192 -r1.1.2.193 src/doc/CHANGES-10.0

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

Modified files:

Index: src/doc/CHANGES-10.0
diff -u src/doc/CHANGES-10.0:1.1.2.192 src/doc/CHANGES-10.0:1.1.2.193
--- src/doc/CHANGES-10.0:1.1.2.192	Sun Feb  4 11:09:44 2024
+++ src/doc/CHANGES-10.0	Sun Feb  4 11:29:46 2024
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-10.0,v 1.1.2.192 2024/02/04 11:09:44 martin Exp $
+# $NetBSD: CHANGES-10.0,v 1.1.2.193 2024/02/04 11:29:46 martin Exp $
 
 A complete list of changes from the initial NetBSD 10.0 branch on 2022-12-16
 until the 10.0 release:
@@ -15460,3 +15460,13 @@ usr.bin/gzip/unpack.c   
 
 	gzip(1): PR 57858, 57855: fix a few minor issues and cleanup.
 	[mrg, ticket #582]
+
+sys/kern/uipc_socket.c1.308
+sys/kern/uipc_syscalls.c			1.211
+sys/net/if_gre.c1.185
+sys/sys/socketvar.h1.168
+
+	PR 55690: fix pipe2(2) ignoring 'flags' on kernels with
+	options PIPE_SOCKETPAIR.
+	[jdolecek, ticket #583]
+



CVS commit: [netbsd-10] src/doc

2024-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Feb  4 11:29:46 UTC 2024

Modified Files:
src/doc [netbsd-10]: CHANGES-10.0

Log Message:
Ticket #583


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.192 -r1.1.2.193 src/doc/CHANGES-10.0

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



CVS commit: [netbsd-10] src/sys

2024-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Feb  4 11:20:15 UTC 2024

Modified Files:
src/sys/kern [netbsd-10]: uipc_socket.c uipc_syscalls.c
src/sys/net [netbsd-10]: if_gre.c
src/sys/sys [netbsd-10]: socketvar.h

Log Message:
Pull up following revision(s) (requested by jdolecek in ticket #583):

sys/kern/uipc_socket.c: revision 1.308
sys/kern/uipc_syscalls.c: revision 1.211
sys/sys/socketvar.h: revision 1.168
sys/net/if_gre.c: revision 1.185

fix PIPE_SOCKETPAIR variant of pipe1() to apply correctly the 'flags'
passed when called via pipe2(2), fixing repeatable process hang during
compilation with 'gcc -pipe'

refactor fsocreate() to return the new socket and file pointers,
expect the caller to call fd_affix() once initialization is fully complete
use the new fsocreate() to replace the duplicate open-coded 'flags' handling
in makesocket() used for socketpair(2), and in the PIPE_SOCKETPAIR pipe1()
this also fixes lib/libc/sys/t_pipe2 pipe2_cloexec test to succeed
on PIPE_SOCKETPAIR kernel

fixes PR kern/55690


To generate a diff of this commit:
cvs rdiff -u -r1.302 -r1.302.4.1 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.206 -r1.206.4.1 src/sys/kern/uipc_syscalls.c
cvs rdiff -u -r1.184 -r1.184.4.1 src/sys/net/if_gre.c
cvs rdiff -u -r1.165 -r1.165.4.1 src/sys/sys/socketvar.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/kern/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.302 src/sys/kern/uipc_socket.c:1.302.4.1
--- src/sys/kern/uipc_socket.c:1.302	Sat Apr  9 23:52:22 2022
+++ src/sys/kern/uipc_socket.c	Sun Feb  4 11:20:15 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket.c,v 1.302 2022/04/09 23:52:22 riastradh Exp $	*/
+/*	$NetBSD: uipc_socket.c,v 1.302.4.1 2024/02/04 11:20:15 martin Exp $	*/
 
 /*
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.302 2022/04/09 23:52:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.302.4.1 2024/02/04 11:20:15 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -568,44 +568,51 @@ socreate(int dom, struct socket **aso, i
 
 /*
  * fsocreate: create a socket and a file descriptor associated with it.
+ * Returns the allocated file structure in *fpp, but the descriptor
+ * is not visible yet for the process.
+ * Caller is responsible for calling fd_affix() for the returned *fpp once
+ * it's socket initialization is finished successfully, or fd_abort() if it's
+ * initialization fails.
+ * 
  *
- * => On success, write file descriptor to fdout and return zero.
- * => On failure, return non-zero; *fdout will be undefined.
+ * => On success, write file descriptor to *fdout and *fpp and return zero.
+ * => On failure, return non-zero; *fdout and *fpp will be undefined.
  */
 int
-fsocreate(int domain, struct socket **sop, int type, int proto, int *fdout)
+fsocreate(int domain, struct socket **sop, int type, int proto, int *fdout,
+file_t **fpp, struct socket *lockso)
 {
 	lwp_t *l = curlwp;
 	int error, fd, flags;
 	struct socket *so;
-	struct file *fp;
+	file_t *fp;
+
+	flags = type & SOCK_FLAGS_MASK;
+	type &= ~SOCK_FLAGS_MASK;
+	error = socreate(domain, , type, proto, l, lockso);
+	if (error) {
+		return error;
+	}
 
 	if ((error = fd_allocfile(, )) != 0) {
+		soclose(so);
 		return error;
 	}
-	flags = type & SOCK_FLAGS_MASK;
 	fd_set_exclose(l, fd, (flags & SOCK_CLOEXEC) != 0);
 	fp->f_flag = FREAD|FWRITE|((flags & SOCK_NONBLOCK) ? FNONBLOCK : 0)|
 	((flags & SOCK_NOSIGPIPE) ? FNOSIGPIPE : 0);
 	fp->f_type = DTYPE_SOCKET;
 	fp->f_ops = 
-
-	type &= ~SOCK_FLAGS_MASK;
-	error = socreate(domain, , type, proto, l, NULL);
-	if (error) {
-		fd_abort(curproc, fp, fd);
-		return error;
-	}
 	if (flags & SOCK_NONBLOCK) {
 		so->so_state |= SS_NBIO;
 	}
 	fp->f_socket = so;
-	fd_affix(curproc, fp, fd);
 
 	if (sop != NULL) {
 		*sop = so;
 	}
 	*fdout = fd;
+	*fpp = fp;
 	return error;
 }
 

Index: src/sys/kern/uipc_syscalls.c
diff -u src/sys/kern/uipc_syscalls.c:1.206 src/sys/kern/uipc_syscalls.c:1.206.4.1
--- src/sys/kern/uipc_syscalls.c:1.206	Fri Jul  1 22:30:51 2022
+++ src/sys/kern/uipc_syscalls.c	Sun Feb  4 11:20:15 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls.c,v 1.206 2022/07/01 22:30:51 riastradh Exp $	*/
+/*	$NetBSD: uipc_syscalls.c,v 1.206.4.1 2024/02/04 11:20:15 martin Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.206 2022/07/01 22:30:51 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.206.4.1 2024/02/04 11:20:15 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pipe.h"
@@ -111,10 +111,12 @@ sys___socket30(struct lwp *l, const stru
 		syscallarg(int)	protocol;
 	} */
 	int fd, error;
+	file_t *fp;
 
 	error = 

CVS commit: [netbsd-10] src/sys

2024-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Feb  4 11:20:15 UTC 2024

Modified Files:
src/sys/kern [netbsd-10]: uipc_socket.c uipc_syscalls.c
src/sys/net [netbsd-10]: if_gre.c
src/sys/sys [netbsd-10]: socketvar.h

Log Message:
Pull up following revision(s) (requested by jdolecek in ticket #583):

sys/kern/uipc_socket.c: revision 1.308
sys/kern/uipc_syscalls.c: revision 1.211
sys/sys/socketvar.h: revision 1.168
sys/net/if_gre.c: revision 1.185

fix PIPE_SOCKETPAIR variant of pipe1() to apply correctly the 'flags'
passed when called via pipe2(2), fixing repeatable process hang during
compilation with 'gcc -pipe'

refactor fsocreate() to return the new socket and file pointers,
expect the caller to call fd_affix() once initialization is fully complete
use the new fsocreate() to replace the duplicate open-coded 'flags' handling
in makesocket() used for socketpair(2), and in the PIPE_SOCKETPAIR pipe1()
this also fixes lib/libc/sys/t_pipe2 pipe2_cloexec test to succeed
on PIPE_SOCKETPAIR kernel

fixes PR kern/55690


To generate a diff of this commit:
cvs rdiff -u -r1.302 -r1.302.4.1 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.206 -r1.206.4.1 src/sys/kern/uipc_syscalls.c
cvs rdiff -u -r1.184 -r1.184.4.1 src/sys/net/if_gre.c
cvs rdiff -u -r1.165 -r1.165.4.1 src/sys/sys/socketvar.h

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



CVS commit: [netbsd-10] src/doc

2024-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Feb  4 11:09:44 UTC 2024

Modified Files:
src/doc [netbsd-10]: CHANGES-10.0

Log Message:
Tickets #580 - #582


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.191 -r1.1.2.192 src/doc/CHANGES-10.0

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

Modified files:

Index: src/doc/CHANGES-10.0
diff -u src/doc/CHANGES-10.0:1.1.2.191 src/doc/CHANGES-10.0:1.1.2.192
--- src/doc/CHANGES-10.0:1.1.2.191	Sat Feb  3 15:28:00 2024
+++ src/doc/CHANGES-10.0	Sun Feb  4 11:09:44 2024
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-10.0,v 1.1.2.191 2024/02/03 15:28:00 martin Exp $
+# $NetBSD: CHANGES-10.0,v 1.1.2.192 2024/02/04 11:09:44 martin Exp $
 
 A complete list of changes from the initial NetBSD 10.0 branch on 2022-12-16
 until the 10.0 release:
@@ -15443,3 +15443,20 @@ etc/etc.vax/ttys1.11
 	tty lines.
 	[tsutsui, ticket #579]
 
+distrib/utils/embedded/files/creds_msdos	1.6
+
+	creds_msdos(8): roperly quote arguments.
+	[mrg, ticket #580]
+
+doc/CHANGES	(apply patch)
+
+	Sync CHANGES with CHANGES.prev in HEAD.
+	[tsutsui, ticket #581]
+
+usr.bin/gzip/gzip.1 up to 1.32
+usr.bin/gzip/gzip.c up to 1.122
+usr.bin/gzip/unlz.c up to 1.8
+usr.bin/gzip/unpack.c   up to 1.4
+
+	gzip(1): PR 57858, 57855: fix a few minor issues and cleanup.
+	[mrg, ticket #582]



CVS commit: [netbsd-10] src/doc

2024-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Feb  4 11:09:44 UTC 2024

Modified Files:
src/doc [netbsd-10]: CHANGES-10.0

Log Message:
Tickets #580 - #582


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.191 -r1.1.2.192 src/doc/CHANGES-10.0

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



CVS commit: [netbsd-10] src/usr.bin/gzip

2024-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Feb  4 11:07:41 UTC 2024

Modified Files:
src/usr.bin/gzip [netbsd-10]: gzip.1 gzip.c unlz.c unpack.c

Log Message:
Pull up the following, requested by mrg in ticket #582:

usr.bin/gzip/gzip.1 up to 1.32
usr.bin/gzip/gzip.c up to 1.122
usr.bin/gzip/unlz.c up to 1.8
usr.bin/gzip/unpack.c   up to 1.4

Sync usr.bin/gzip to HEAD to fix a few minor issues, including
PR 57858 and PR 57855.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.31.10.1 src/usr.bin/gzip/gzip.1
cvs rdiff -u -r1.118 -r1.118.2.1 src/usr.bin/gzip/gzip.c
cvs rdiff -u -r1.7 -r1.7.2.1 src/usr.bin/gzip/unlz.c
cvs rdiff -u -r1.3 -r1.3.14.1 src/usr.bin/gzip/unpack.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/gzip/gzip.1
diff -u src/usr.bin/gzip/gzip.1:1.31 src/usr.bin/gzip/gzip.1:1.31.10.1
--- src/usr.bin/gzip/gzip.1:1.31	Fri Oct 26 22:10:15 2018
+++ src/usr.bin/gzip/gzip.1	Sun Feb  4 11:07:40 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: gzip.1,v 1.31 2018/10/26 22:10:15 christos Exp $
+.\"	$NetBSD: gzip.1,v 1.31.10.1 2024/02/04 11:07:40 martin Exp $
 .\"
 .\" Copyright (c) 1997, 2003, 2004, 2008, 2009, 2015, 2017 Matthew R. Green
 .\" All rights reserved.
@@ -217,4 +217,4 @@ version 20170803.
 This implementation of
 .Nm
 was written by
-.An Matthew R. Green Aq Mt m...@eterna.com.au .
+.An Matthew R. Green Aq Mt m...@eterna23.net .

Index: src/usr.bin/gzip/gzip.c
diff -u src/usr.bin/gzip/gzip.c:1.118 src/usr.bin/gzip/gzip.c:1.118.2.1
--- src/usr.bin/gzip/gzip.c:1.118	Sat Jan 22 14:00:45 2022
+++ src/usr.bin/gzip/gzip.c	Sun Feb  4 11:07:40 2024
@@ -1,8 +1,7 @@
-/*	$NetBSD: gzip.c,v 1.118 2022/01/22 14:00:45 christos Exp $	*/
+/*	$NetBSD: gzip.c,v 1.118.2.1 2024/02/04 11:07:40 martin Exp $	*/
 
 /*
- * Copyright (c) 1997, 1998, 2003, 2004, 2006, 2008, 2009, 2010, 2011, 2015, 2017
- *Matthew R. Green
+ * Copyright (c) 1997-2024 Matthew R. Green
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -29,9 +28,9 @@
 
 #include 
 #ifndef lint
-__COPYRIGHT("@(#) Copyright (c) 1997, 1998, 2003, 2004, 2006, 2008,\
- 2009, 2010, 2011, 2015, 2017 Matthew R. Green.  All rights reserved.");
-__RCSID("$NetBSD: gzip.c,v 1.118 2022/01/22 14:00:45 christos Exp $");
+__COPYRIGHT("@(#) Copyright (c) 1997-2024 Matthew R. Green. "
+	"All rights reserved.");
+__RCSID("$NetBSD: gzip.c,v 1.118.2.1 2024/02/04 11:07:40 martin Exp $");
 #endif /* not lint */
 
 /*
@@ -173,7 +172,7 @@ static suffixes_t suffixes[] = {
 #define NUM_SUFFIXES (sizeof suffixes / sizeof suffixes[0])
 #define SUFFIX_MAXLEN	30
 
-static	const char	gzip_version[] = "NetBSD gzip 20170803";
+static	const char	gzip_version[] = "NetBSD gzip 20240203";
 
 static	int	cflag;			/* stdout mode */
 static	int	dflag;			/* decompress mode */
@@ -1114,14 +1113,14 @@ copymodes(int fd, const struct stat *sbp
 	if (fchmod(fd, sb.st_mode) < 0)
 		maybe_warn("couldn't fchmod: %s", file);
 
-	/* only try flags if they exist already */
-if (sb.st_flags != 0 && fchflags(fd, sb.st_flags) < 0)
-		maybe_warn("couldn't fchflags: %s", file);
-
 	TIMESPEC_TO_TIMEVAL([0], _atimespec);
 	TIMESPEC_TO_TIMEVAL([1], _mtimespec);
 	if (futimes(fd, times) < 0)
 		maybe_warn("couldn't utimes: %s", file);
+
+	/* finally, only try flags if they exist already */
+if (sb.st_flags != 0 && fchflags(fd, sb.st_flags) < 0)
+		maybe_warn("couldn't fchflags: %s", file);
 }
 #endif
 
@@ -1400,7 +1399,7 @@ file_uncompress(char *file, char *outfil
 	struct stat isb, osb;
 	off_t size;
 	ssize_t rbytes;
-	unsigned char header1[4];
+	unsigned char fourbytes[4];
 	enum filetype method;
 	int fd, ofd, zfd = -1;
 	size_t in_size;
@@ -1434,8 +1433,8 @@ file_uncompress(char *file, char *outfil
 		goto lose;
 	}
 
-	rbytes = read(fd, header1, sizeof header1);
-	if (rbytes != sizeof header1) {
+	rbytes = read(fd, fourbytes, sizeof fourbytes);
+	if (rbytes != sizeof fourbytes) {
 		/* we don't want to fail here. */
 #ifndef SMALL
 		if (fflag)
@@ -1449,7 +1448,7 @@ file_uncompress(char *file, char *outfil
 	}
 	infile_newdata(rbytes);
 
-	method = file_gettype(header1);
+	method = file_gettype(fourbytes);
 #ifndef SMALL
 	if (fflag == 0 && method == FT_UNKNOWN) {
 		maybe_warnx("%s: not in gzip format", file);
@@ -1473,7 +1472,7 @@ file_uncompress(char *file, char *outfil
 		infile_newdata(rv);
 		timestamp = ts[3] << 24 | ts[2] << 16 | ts[1] << 8 | ts[0];
 
-		if (header1[3] & ORIG_NAME) {
+		if (fourbytes[3] & ORIG_NAME) {
 			rbytes = pread(fd, name, sizeof(name) - 1, GZIP_ORIGNAME);
 			if (rbytes < 0) {
 maybe_warn("can't read %s", file);
@@ -1787,7 +1786,7 @@ static void
 handle_stdin(void)
 {
 	struct stat isb;
-	unsigned char header1[4];
+	unsigned char 

CVS commit: [netbsd-10] src/usr.bin/gzip

2024-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Feb  4 11:07:41 UTC 2024

Modified Files:
src/usr.bin/gzip [netbsd-10]: gzip.1 gzip.c unlz.c unpack.c

Log Message:
Pull up the following, requested by mrg in ticket #582:

usr.bin/gzip/gzip.1 up to 1.32
usr.bin/gzip/gzip.c up to 1.122
usr.bin/gzip/unlz.c up to 1.8
usr.bin/gzip/unpack.c   up to 1.4

Sync usr.bin/gzip to HEAD to fix a few minor issues, including
PR 57858 and PR 57855.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.31.10.1 src/usr.bin/gzip/gzip.1
cvs rdiff -u -r1.118 -r1.118.2.1 src/usr.bin/gzip/gzip.c
cvs rdiff -u -r1.7 -r1.7.2.1 src/usr.bin/gzip/unlz.c
cvs rdiff -u -r1.3 -r1.3.14.1 src/usr.bin/gzip/unpack.c

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



CVS commit: [netbsd-10] src/doc

2024-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Feb  4 11:04:11 UTC 2024

Modified Files:
src/doc [netbsd-10]: CHANGES

Log Message:
Apply patch, requested by tsutsui in ticket #581:

doc/CHANGES (apply patch)

Sync doc/CHANGES with doc/CHANGES.prev in HEAD.


To generate a diff of this commit:
cvs rdiff -u -r1.2940.2.7 -r1.2940.2.8 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/CHANGES
diff -u src/doc/CHANGES:1.2940.2.7 src/doc/CHANGES:1.2940.2.8
--- src/doc/CHANGES:1.2940.2.7	Fri Oct 20 16:04:59 2023
+++ src/doc/CHANGES	Sun Feb  4 11:04:11 2024
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2940.2.7 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2940.2.8 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -241,11 +241,9 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	file(1): Upgraded to 5.39. [christos 20200614]
 	blocklist: import current version [christos 20200614]
 	dhcpcd: Import version 9.1.2 [roy 20200615]
-	evbmips: Create an "octeon.img.gz" bootable image for
-		evbmips64-eb release builds. [jmcneill 20200617]
 	evbarm: Add support for loading modules with the bootloader.
-		[jmcneill 20200221]
-	evbarm: Added boot.cfg support to efiboot [jmcneill 20200211]
+		[jmcneill 20200621]
+	evbarm: Added boot.cfg support to efiboot [jmcneill 20200621]
 	evbmips: Add ofctl(8) and /dev/openfirm support for Cavium
 		Octeon devices. [jmcneill 20200624]
 	mv(1): Add -h option to atomically replace a symlink to a
@@ -281,6 +279,8 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 		ERLITE -> OCTEON
 		INSTALL_ERLITE -> INSTALL_OCTEON
 		[simonb 20200715]
+	evbmips: Create an "octeon.img.gz" bootable image for
+		evbmips64-eb release builds. [jmcneill 20200717]
 	libc: Added ppoll() wrapper around native pollts(2) [kamil 20200717]
 	openresolv: Import version 3.11.0 [roy 20200722]
 	sun3: Add Xorg-Server-1.20'fied ancient monolithc Xsun servers.
@@ -511,7 +511,7 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 		and humidity sensor [brad 20211003]
 	network: Make pktq_rps_hash() pluggable for each interface type.
 		[knakahara 20211011]
-	wm(4): Add Tiger Lake and newer devices (I219V 15-V9 and LM 16-19).
+	wm(4): Add Tiger Lake and newer devices (I219V 15-V19 and LM 16-19).
 		[msaitoh 20211013]
 	sgp40mox(4): Driver for the Sensirion SGP40 MOx gas sensor for air
 		quality [brad 20211014]
@@ -773,6 +773,7 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 		[tsutsui 20230105]
 	vax: Fix smg(4) monochrome framebuffer that has been broken since
 		NetBSD 4.0. [tsutsui 20230113]
+	aq(4): add support for AQC113-116 [ryo 20230114]
 	next68k: Fix "cannot input from keyboard" problem that has been broken
 		since NetBSD 7.0. [tsutsui 20230127]
 	next68k: Fix silent stall of esp(4) SCSI driver that has been broken
@@ -793,12 +794,64 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 		[nia 20230211]
 	u3g(4): Add support for ZTE MF112 and D-Link DWM222 3G USB
 		modems [manu 20230213]
-	aq(4): add support for AQC113-116 [ryo 20230114]
+	ftp(1): Add option sslnoverify to control validation of SSL
+		certificates. Certificate validation is now enabled
+		by default. [mlelstv 20230225]
+	ftp(1): Add netrc processing to fetch-mode (URL on command line) to
+		enable options and autologin via netrc. [mlelstv 20230225]
+	tzdata: updated to 2023a (using the 2023agtz fork) [kre 20230323]
+	tzdata: updated to 2023b (using the 2023bgtz fork) [kre 20230324]
+	tzdata: updated to 2023c (using the 2023cgtz fork) [kre 20230331]
+	ftp(1): Add timeout for SSL connection setup, defaulting to 60 seconds.
+		[lukem 20230505]
+	openssl(1): Imported 3.0.8. [christos 20230510]
+	mips: Bump the maximum text size for binaries from 64MB
+		to 128MB. [he 20230514]
+	OpenSSL: Imported 3.0.9. [christos 20230531]
 	lua: Import version 5.4.6.
 		Bumped shlib minor because of API/ABI changes. [nikita 20230608]
+	pam(8): Disable pam_krb5, pam_ksu by default. [riastradh 20230620]
+	gcc(1): Import GCC 10.5.  [mrg 20230710]
+	amdgpu(4): Enable display core logic. [riastradh 20230714]
+	build: Force MKSTRIPSYM=no if MKDEBUG=yes. [lukem 20230723]
+	x86: Add serial console support to efiboot via raw I/O port
+		access. [rin 20230724]
+	OpenSSH: Import 9.3. [christos 20230726]
+	u3g(4): Add support for D-Link DWM-222 4G LTS USB adapter.
+		[manu 20230804]
+	amd64: Build legacy VIA DRM UMS driver module by default,
+		this allows basic acceleration on VIA integrated graphics
+		with modload(8) viadrmums. [andvar 20230809]
+	libfido2: Import 1.13.0 [christos 20230811]
+	igc(4): Add initial support to Intel I225/I226 series Ethernet devices.
+		[knakahara,rin,msaitoh 20231006]
 	gcc.old: Initial import of major vax toolchain fix by Kalvis Duckmanton.
 		[rin 20231007]
-	igc(4): Add initial support to Intel I225/I226 series Ethernet devices.
-		

CVS commit: [netbsd-10] src/doc

2024-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Feb  4 11:04:11 UTC 2024

Modified Files:
src/doc [netbsd-10]: CHANGES

Log Message:
Apply patch, requested by tsutsui in ticket #581:

doc/CHANGES (apply patch)

Sync doc/CHANGES with doc/CHANGES.prev in HEAD.


To generate a diff of this commit:
cvs rdiff -u -r1.2940.2.7 -r1.2940.2.8 src/doc/CHANGES

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



CVS commit: [netbsd-10] src/distrib/utils/embedded/files

2024-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Feb  4 10:59:54 UTC 2024

Modified Files:
src/distrib/utils/embedded/files [netbsd-10]: creds_msdos

Log Message:
Pull up following revision(s) (requested by mrg in ticket #580):

distrib/utils/embedded/files/creds_msdos: revision 1.6

properly quote arguments.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.2.1 src/distrib/utils/embedded/files/creds_msdos

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

Modified files:

Index: src/distrib/utils/embedded/files/creds_msdos
diff -u src/distrib/utils/embedded/files/creds_msdos:1.5 src/distrib/utils/embedded/files/creds_msdos:1.5.2.1
--- src/distrib/utils/embedded/files/creds_msdos:1.5	Sat Dec 11 19:24:18 2021
+++ src/distrib/utils/embedded/files/creds_msdos	Sun Feb  4 10:59:54 2024
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: creds_msdos,v 1.5 2021/12/11 19:24:18 mrg Exp $
+# $NetBSD: creds_msdos,v 1.5.2.1 2024/02/04 10:59:54 martin Exp $
 #
 # Copyright (c) 2019 Matthew R. Green
 # All rights reserved.
@@ -153,7 +153,7 @@ creds_msdos_start()
 	if [ -f "${creds_file}" ]; then
 		while read type user args; do
 			# strip cr
-			local clean_args=$(echo "$args" | tr -d '\015')
+			local clean_args="$(echo "$args" | tr -d '\015')"
 			case "$type" in
 			\#*|'')
 continue



CVS commit: [netbsd-10] src/distrib/utils/embedded/files

2024-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Feb  4 10:59:54 UTC 2024

Modified Files:
src/distrib/utils/embedded/files [netbsd-10]: creds_msdos

Log Message:
Pull up following revision(s) (requested by mrg in ticket #580):

distrib/utils/embedded/files/creds_msdos: revision 1.6

properly quote arguments.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.2.1 src/distrib/utils/embedded/files/creds_msdos

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

2024-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  4 10:03:10 UTC 2024

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

Log Message:
make: do not evaluate indirect modifiers in parse-only mode

Discovered by sjg.


To generate a diff of this commit:
cvs rdiff -u -r1.1097 -r1.1098 src/usr.bin/make/var.c
cvs rdiff -u -r1.26 -r1.27 src/usr.bin/make/unit-tests/varmod-indirect.exp
cvs rdiff -u -r1.17 -r1.18 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.1097 src/usr.bin/make/var.c:1.1098
--- src/usr.bin/make/var.c:1.1097	Sun Feb  4 09:56:24 2024
+++ src/usr.bin/make/var.c	Sun Feb  4 10:03:10 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.1097 2024/02/04 09:56:24 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.1098 2024/02/04 10:03:10 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.1097 2024/02/04 09:56:24 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1098 2024/02/04 10:03:10 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -3863,7 +3863,7 @@ ApplyModifiersIndirect(ModChain *ch, con
 	DEBUG3(VAR, "Indirect modifier \"%s\" from \"%.*s\"\n",
 	mods.str, (int)(p - *pp), *pp);
 
-	if (mods.str[0] != '\0') {
+	if (ModChain_ShouldEval(ch) && mods.str[0] != '\0') {
 		const char *modsp = mods.str;
 		ApplyModifiers(expr, , '\0', '\0');
 		if (Expr_Str(expr) == var_Error || *modsp != '\0') {

Index: src/usr.bin/make/unit-tests/varmod-indirect.exp
diff -u src/usr.bin/make/unit-tests/varmod-indirect.exp:1.26 src/usr.bin/make/unit-tests/varmod-indirect.exp:1.27
--- src/usr.bin/make/unit-tests/varmod-indirect.exp:1.26	Sun Feb  4 09:56:24 2024
+++ src/usr.bin/make/unit-tests/varmod-indirect.exp	Sun Feb  4 10:03:10 2024
@@ -38,12 +38,6 @@ Parsing line 197: .MAKEFLAGS: -d0
 ParseDependency(.MAKEFLAGS: -d0)
 Global: .MAKEFLAGS =  -r -k -d 0 -d pv -d
 Global: .MAKEFLAGS =  -r -k -d 0 -d pv -d 0
-make: "varmod-indirect.mk" line 275: Unknown modifier "Z"
-make: "varmod-indirect.mk" line 275: Malformed conditional (0 && ${VAR:${M_invalid}})
-make: "varmod-indirect.mk" line 282: Unknown modifier "Z"
-make: "varmod-indirect.mk" line 282: Malformed conditional (0 && ${VAR:${M_invalid:S,^,N*,:ts:}})
-make: "varmod-indirect.mk" line 288: Unknown modifier "Z"
-make: "varmod-indirect.mk" line 288: Malformed conditional (0 && ${VAR:${M_invalid:@m@N*$m@:ts:}})
 make: Fatal errors encountered -- cannot continue
 make: stopped in unit-tests
 exit status 1

Index: src/usr.bin/make/unit-tests/varmod-indirect.mk
diff -u src/usr.bin/make/unit-tests/varmod-indirect.mk:1.17 src/usr.bin/make/unit-tests/varmod-indirect.mk:1.18
--- src/usr.bin/make/unit-tests/varmod-indirect.mk:1.17	Sun Feb  4 09:56:24 2024
+++ src/usr.bin/make/unit-tests/varmod-indirect.mk	Sun Feb  4 10:03:10 2024
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-indirect.mk,v 1.17 2024/02/04 09:56:24 rillig Exp $
+# $NetBSD: varmod-indirect.mk,v 1.18 2024/02/04 10:03:10 rillig Exp $
 #
 # Tests for indirect variable modifiers, such as in ${VAR:${M_modifiers}}.
 # These can be used for very basic purposes like converting a string to either
@@ -258,7 +258,7 @@ _:=	before ${UNDEF:${:UZ}} after
 
 # In parse-only mode, the indirect modifiers must not be evaluated.
 #
-# Before var.c TODO from 2024-02-04, the expression for an indirect modifier
+# Before var.c 1.1098 from 2024-02-04, the expression for an indirect modifier
 # was partially evaluated (only the variable value, without applying any
 # modifiers) and then interpreted as modifiers to the main expression.
 #
@@ -270,20 +270,13 @@ _:=	before ${UNDEF:${:UZ}} after
 # The expression ${M_invalid} starts with the value "Z", which is an unknown
 # modifier.  Trying to apply this unknown modifier generated a warning.
 M_invalid=	Z
-# expect+2: Unknown modifier "Z"
-# expect+1: Malformed conditional (0 && ${VAR:${M_invalid}})
 .if 0 && ${VAR:${M_invalid}}
 .endif
-# The expression ${M_invalid} starts with the value "Z", and if its modifiers
-# were evaluated, would result in "N*Z", which is a valid modifier.  The
-# modifiers were not applied though, keeping the invalid value "Z".
-# expect+2: Unknown modifier "Z"
-# expect+1: Malformed conditional (0 && ${VAR:${M_invalid:S,^,N*,:ts:}})
+# The ':S' modifier does not change the expression value in parse-only mode,
+# keeping the "Z", which is then skipped in parse-only mode.
 .if 0 && ${VAR:${M_invalid:S,^,N*,:ts:}}
 .endif
 # The ':@' modifier does not change the expression value in parse-only mode,
-# keeping the "Z".
-# expect+2: Unknown modifier "Z"
-# expect+1: Malformed conditional (0 && ${VAR:${M_invalid:@m@N*$m@:ts:}})
+# keeping the 

CVS commit: src/usr.bin/make

2024-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  4 10:03:10 UTC 2024

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

Log Message:
make: do not evaluate indirect modifiers in parse-only mode

Discovered by sjg.


To generate a diff of this commit:
cvs rdiff -u -r1.1097 -r1.1098 src/usr.bin/make/var.c
cvs rdiff -u -r1.26 -r1.27 src/usr.bin/make/unit-tests/varmod-indirect.exp
cvs rdiff -u -r1.17 -r1.18 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.



CVS commit: src/usr.bin/make

2024-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  4 09:56:24 UTC 2024

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

Log Message:
make: in parse-only mode, don't evaluate modifiers

Previously, the ':S', ':ts', ':tA' and ':from=to' modifiers were
evaluated in parse-only mode, unnecessarily.  This is only noticeable
when an indirect modifier is evaluated in parse-only mode, which is
another bug that will be fixed in a follow-up commit.


To generate a diff of this commit:
cvs rdiff -u -r1.1096 -r1.1097 src/usr.bin/make/var.c
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/make/unit-tests/varmod-indirect.exp
cvs rdiff -u -r1.16 -r1.17 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.1096 src/usr.bin/make/var.c:1.1097
--- src/usr.bin/make/var.c:1.1096	Sat Feb  3 00:20:23 2024
+++ src/usr.bin/make/var.c	Sun Feb  4 09:56:24 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.1096 2024/02/03 00:20:23 sjg Exp $	*/
+/*	$NetBSD: var.c,v 1.1097 2024/02/04 09:56:24 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.1096 2024/02/03 00:20:23 sjg Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1097 2024/02/04 09:56:24 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -2274,6 +2274,9 @@ ModifyWords(ModChain *ch,
 	size_t i;
 	Substring word;
 
+	if (!ModChain_ShouldEval(ch))
+		return;
+
 	if (oneBigWord) {
 		SepBuf_Init(, ch->sep);
 		/* XXX: performance: Substring_InitStr calls strlen */
@@ -2806,8 +2809,7 @@ ApplyModifier_Mtime(const char **pp, Mod
 			goto invalid_argument;
 		*pp = p;
 	}
-	if (ModChain_ShouldEval(ch))
-		ModifyWords(ch, ModifyWord_Mtime, , ch->oneBigWord);
+	ModifyWords(ch, ModifyWord_Mtime, , ch->oneBigWord);
 	return args.rc;
 
 invalid_argument:
@@ -3552,8 +3554,7 @@ ApplyModifier_WordFunc(const char **pp, 
 		return AMR_UNKNOWN;
 	(*pp)++;
 
-	if (ModChain_ShouldEval(ch))
-		ModifyWords(ch, modifyWord, NULL, ch->oneBigWord);
+	ModifyWords(ch, modifyWord, NULL, ch->oneBigWord);
 
 	return AMR_OK;
 }

Index: src/usr.bin/make/unit-tests/varmod-indirect.exp
diff -u src/usr.bin/make/unit-tests/varmod-indirect.exp:1.25 src/usr.bin/make/unit-tests/varmod-indirect.exp:1.26
--- src/usr.bin/make/unit-tests/varmod-indirect.exp:1.25	Sun Feb  4 09:29:50 2024
+++ src/usr.bin/make/unit-tests/varmod-indirect.exp	Sun Feb  4 09:56:24 2024
@@ -40,8 +40,10 @@ Global: .MAKEFLAGS =  -r -k -d 0 -d pv -
 Global: .MAKEFLAGS =  -r -k -d 0 -d pv -d 0
 make: "varmod-indirect.mk" line 275: Unknown modifier "Z"
 make: "varmod-indirect.mk" line 275: Malformed conditional (0 && ${VAR:${M_invalid}})
-make: "varmod-indirect.mk" line 287: Unknown modifier "Z"
-make: "varmod-indirect.mk" line 287: Malformed conditional (0 && ${VAR:${M_invalid:@m@N*$m@:ts:}})
+make: "varmod-indirect.mk" line 282: Unknown modifier "Z"
+make: "varmod-indirect.mk" line 282: Malformed conditional (0 && ${VAR:${M_invalid:S,^,N*,:ts:}})
+make: "varmod-indirect.mk" line 288: Unknown modifier "Z"
+make: "varmod-indirect.mk" line 288: Malformed conditional (0 && ${VAR:${M_invalid:@m@N*$m@:ts:}})
 make: Fatal errors encountered -- cannot continue
 make: stopped in unit-tests
 exit status 1

Index: src/usr.bin/make/unit-tests/varmod-indirect.mk
diff -u src/usr.bin/make/unit-tests/varmod-indirect.mk:1.16 src/usr.bin/make/unit-tests/varmod-indirect.mk:1.17
--- src/usr.bin/make/unit-tests/varmod-indirect.mk:1.16	Sun Feb  4 09:29:50 2024
+++ src/usr.bin/make/unit-tests/varmod-indirect.mk	Sun Feb  4 09:56:24 2024
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-indirect.mk,v 1.16 2024/02/04 09:29:50 rillig Exp $
+# $NetBSD: varmod-indirect.mk,v 1.17 2024/02/04 09:56:24 rillig Exp $
 #
 # Tests for indirect variable modifiers, such as in ${VAR:${M_modifiers}}.
 # These can be used for very basic purposes like converting a string to either
@@ -258,7 +258,7 @@ _:=	before ${UNDEF:${:UZ}} after
 
 # In parse-only mode, the indirect modifiers must not be evaluated.
 #
-# Before var.c 1.1097 from 2024-02-04, the expression for an indirect modifier
+# Before var.c TODO from 2024-02-04, the expression for an indirect modifier
 # was partially evaluated (only the variable value, without applying any
 # modifiers) and then interpreted as modifiers to the main expression.
 #
@@ -277,7 +277,8 @@ M_invalid=	Z
 # The expression ${M_invalid} starts with the value "Z", and if its modifiers
 # were evaluated, would result in "N*Z", which is a valid modifier.  The
 # modifiers were not applied though, keeping the invalid value "Z".
-# FIXME: As of var.c 1.1096, the modifier ':S' _is_ actually evaluated.
+# expect+2: Unknown modifier "Z"
+# expect+1: Malformed 

CVS commit: src/usr.bin/make

2024-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  4 09:56:24 UTC 2024

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

Log Message:
make: in parse-only mode, don't evaluate modifiers

Previously, the ':S', ':ts', ':tA' and ':from=to' modifiers were
evaluated in parse-only mode, unnecessarily.  This is only noticeable
when an indirect modifier is evaluated in parse-only mode, which is
another bug that will be fixed in a follow-up commit.


To generate a diff of this commit:
cvs rdiff -u -r1.1096 -r1.1097 src/usr.bin/make/var.c
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/make/unit-tests/varmod-indirect.exp
cvs rdiff -u -r1.16 -r1.17 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.



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

2024-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  4 09:29:50 UTC 2024

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

Log Message:
tests/make: extend test for wrong evaluation in parse-only mode


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.bin/make/unit-tests/varmod-indirect.exp
cvs rdiff -u -r1.15 -r1.16 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/unit-tests/varmod-indirect.exp
diff -u src/usr.bin/make/unit-tests/varmod-indirect.exp:1.24 src/usr.bin/make/unit-tests/varmod-indirect.exp:1.25
--- src/usr.bin/make/unit-tests/varmod-indirect.exp:1.24	Sun Feb  4 08:51:57 2024
+++ src/usr.bin/make/unit-tests/varmod-indirect.exp	Sun Feb  4 09:29:50 2024
@@ -38,8 +38,10 @@ Parsing line 197: .MAKEFLAGS: -d0
 ParseDependency(.MAKEFLAGS: -d0)
 Global: .MAKEFLAGS =  -r -k -d 0 -d pv -d
 Global: .MAKEFLAGS =  -r -k -d 0 -d pv -d 0
-make: "varmod-indirect.mk" line 274: Unknown modifier "Z"
-make: "varmod-indirect.mk" line 274: Malformed conditional (0 && ${VAR:${M_invalid}})
+make: "varmod-indirect.mk" line 275: Unknown modifier "Z"
+make: "varmod-indirect.mk" line 275: Malformed conditional (0 && ${VAR:${M_invalid}})
+make: "varmod-indirect.mk" line 287: Unknown modifier "Z"
+make: "varmod-indirect.mk" line 287: Malformed conditional (0 && ${VAR:${M_invalid:@m@N*$m@:ts:}})
 make: Fatal errors encountered -- cannot continue
 make: stopped in unit-tests
 exit status 1

Index: src/usr.bin/make/unit-tests/varmod-indirect.mk
diff -u src/usr.bin/make/unit-tests/varmod-indirect.mk:1.15 src/usr.bin/make/unit-tests/varmod-indirect.mk:1.16
--- src/usr.bin/make/unit-tests/varmod-indirect.mk:1.15	Sun Feb  4 08:51:57 2024
+++ src/usr.bin/make/unit-tests/varmod-indirect.mk	Sun Feb  4 09:29:50 2024
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-indirect.mk,v 1.15 2024/02/04 08:51:57 rillig Exp $
+# $NetBSD: varmod-indirect.mk,v 1.16 2024/02/04 09:29:50 rillig Exp $
 #
 # Tests for indirect variable modifiers, such as in ${VAR:${M_modifiers}}.
 # These can be used for very basic purposes like converting a string to either
@@ -258,8 +258,9 @@ _:=	before ${UNDEF:${:UZ}} after
 
 # In parse-only mode, the indirect modifiers must not be evaluated.
 #
-# Before var.c 1.1096 from 2024-02-04, the expression for an indirect modifier
-# was evaluated.
+# Before var.c 1.1097 from 2024-02-04, the expression for an indirect modifier
+# was partially evaluated (only the variable value, without applying any
+# modifiers) and then interpreted as modifiers to the main expression.
 #
 # The expression ${:UZ} starts with the value "", and in parse-only mode, the
 # modifier ':UZ' does not modify the expression value.  This results in an
@@ -273,3 +274,15 @@ M_invalid=	Z
 # expect+1: Malformed conditional (0 && ${VAR:${M_invalid}})
 .if 0 && ${VAR:${M_invalid}}
 .endif
+# The expression ${M_invalid} starts with the value "Z", and if its modifiers
+# were evaluated, would result in "N*Z", which is a valid modifier.  The
+# modifiers were not applied though, keeping the invalid value "Z".
+# FIXME: As of var.c 1.1096, the modifier ':S' _is_ actually evaluated.
+.if 0 && ${VAR:${M_invalid:S,^,N*,:ts:}}
+.endif
+# The ':@' modifier does not change the expression value in parse-only mode,
+# keeping the "Z".
+# expect+2: Unknown modifier "Z"
+# expect+1: Malformed conditional (0 && ${VAR:${M_invalid:@m@N*$m@:ts:}})
+.if 0 && ${VAR:${M_invalid:@m@N*$m@:ts:}}
+.endif



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

2024-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  4 09:29:50 UTC 2024

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

Log Message:
tests/make: extend test for wrong evaluation in parse-only mode


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.bin/make/unit-tests/varmod-indirect.exp
cvs rdiff -u -r1.15 -r1.16 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.



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

2024-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  4 08:51:57 UTC 2024

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

Log Message:
tests/make: indirect modifiers are evaluated in parse-only mode

Found by sjg@.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/make/unit-tests/varmod-indirect.exp
cvs rdiff -u -r1.14 -r1.15 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/unit-tests/varmod-indirect.exp
diff -u src/usr.bin/make/unit-tests/varmod-indirect.exp:1.23 src/usr.bin/make/unit-tests/varmod-indirect.exp:1.24
--- src/usr.bin/make/unit-tests/varmod-indirect.exp:1.23	Thu Jun  1 20:56:35 2023
+++ src/usr.bin/make/unit-tests/varmod-indirect.exp	Sun Feb  4 08:51:57 2024
@@ -38,6 +38,8 @@ Parsing line 197: .MAKEFLAGS: -d0
 ParseDependency(.MAKEFLAGS: -d0)
 Global: .MAKEFLAGS =  -r -k -d 0 -d pv -d
 Global: .MAKEFLAGS =  -r -k -d 0 -d pv -d 0
+make: "varmod-indirect.mk" line 274: Unknown modifier "Z"
+make: "varmod-indirect.mk" line 274: Malformed conditional (0 && ${VAR:${M_invalid}})
 make: Fatal errors encountered -- cannot continue
 make: stopped in unit-tests
 exit status 1

Index: src/usr.bin/make/unit-tests/varmod-indirect.mk
diff -u src/usr.bin/make/unit-tests/varmod-indirect.mk:1.14 src/usr.bin/make/unit-tests/varmod-indirect.mk:1.15
--- src/usr.bin/make/unit-tests/varmod-indirect.mk:1.14	Sun Nov 19 22:32:44 2023
+++ src/usr.bin/make/unit-tests/varmod-indirect.mk	Sun Feb  4 08:51:57 2024
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-indirect.mk,v 1.14 2023/11/19 22:32:44 rillig Exp $
+# $NetBSD: varmod-indirect.mk,v 1.15 2024/02/04 08:51:57 rillig Exp $
 #
 # Tests for indirect variable modifiers, such as in ${VAR:${M_modifiers}}.
 # These can be used for very basic purposes like converting a string to either
@@ -255,4 +255,21 @@ _:=	before ${UNDEF:${:UZ}} after
 .  error
 .endif
 
-all:
+
+# In parse-only mode, the indirect modifiers must not be evaluated.
+#
+# Before var.c 1.1096 from 2024-02-04, the expression for an indirect modifier
+# was evaluated.
+#
+# The expression ${:UZ} starts with the value "", and in parse-only mode, the
+# modifier ':UZ' does not modify the expression value.  This results in an
+# empty string for the indirect modifiers, generating no warning.
+.if 0 && ${VAR:${:UZ}}
+.endif
+# The expression ${M_invalid} starts with the value "Z", which is an unknown
+# modifier.  Trying to apply this unknown modifier generated a warning.
+M_invalid=	Z
+# expect+2: Unknown modifier "Z"
+# expect+1: Malformed conditional (0 && ${VAR:${M_invalid}})
+.if 0 && ${VAR:${M_invalid}}
+.endif



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

2024-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Feb  4 08:51:57 UTC 2024

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

Log Message:
tests/make: indirect modifiers are evaluated in parse-only mode

Found by sjg@.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/make/unit-tests/varmod-indirect.exp
cvs rdiff -u -r1.14 -r1.15 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.