CVS commit: src/lib/libossaudio

2020-10-17 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sat Oct 17 23:23:06 UTC 2020

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

Log Message:
ossaudio(3): Add initial support for the OSSv4.1 Mixer API

One or two calls from this API were supported previously and have been
moved to the correct place.

Mapping the controls correctly is a difficult task. There is a define
hidden in the OSS headers that would allow an AUDIO_MIXER_SET control
to be represented perfectly, but it seems to _only_ exist there, and
no software supports it. So for now only one member of a set can be
set at a time - unfortunate. I've hidden code that should unlock
doing this the proper way under #notyet.

I'm not too happy with the way this code is managing file descriptors.
Currently it has to open a new fd for each ioctl due to OSSv4 deciding
to specify the device number in a structure rather than in the filename.
In the future, we could reuse the file descriptor if the correct one is
detected open.

This allows the mixer programs provided with the OSSv4 sources to compile
and work cleanly. I've observed problems with it failing to work on
secondary devices, and should investigate this later. There may be
a fd leak somewhere.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/lib/libossaudio/ossaudio.c
cvs rdiff -u -r1.25 -r1.26 src/lib/libossaudio/soundcard.h

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



CVS commit: src/lib/libossaudio

2020-10-17 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sat Oct 17 23:23:06 UTC 2020

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

Log Message:
ossaudio(3): Add initial support for the OSSv4.1 Mixer API

One or two calls from this API were supported previously and have been
moved to the correct place.

Mapping the controls correctly is a difficult task. There is a define
hidden in the OSS headers that would allow an AUDIO_MIXER_SET control
to be represented perfectly, but it seems to _only_ exist there, and
no software supports it. So for now only one member of a set can be
set at a time - unfortunate. I've hidden code that should unlock
doing this the proper way under #notyet.

I'm not too happy with the way this code is managing file descriptors.
Currently it has to open a new fd for each ioctl due to OSSv4 deciding
to specify the device number in a structure rather than in the filename.
In the future, we could reuse the file descriptor if the correct one is
detected open.

This allows the mixer programs provided with the OSSv4 sources to compile
and work cleanly. I've observed problems with it failing to work on
secondary devices, and should investigate this later. There may be
a fd leak somewhere.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/lib/libossaudio/ossaudio.c
cvs rdiff -u -r1.25 -r1.26 src/lib/libossaudio/soundcard.h

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

Modified files:

Index: src/lib/libossaudio/ossaudio.c
diff -u src/lib/libossaudio/ossaudio.c:1.48 src/lib/libossaudio/ossaudio.c:1.49
--- src/lib/libossaudio/ossaudio.c:1.48	Fri Oct 16 20:24:35 2020
+++ src/lib/libossaudio/ossaudio.c	Sat Oct 17 23:23:06 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ossaudio.c,v 1.48 2020/10/16 20:24:35 nia Exp $	*/
+/*	$NetBSD: ossaudio.c,v 1.49 2020/10/17 23:23:06 nia Exp $	*/
 
 /*-
  * Copyright (c) 1997, 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: ossaudio.c,v 1.48 2020/10/16 20:24:35 nia Exp $");
+__RCSID("$NetBSD: ossaudio.c,v 1.49 2020/10/17 23:23:06 nia Exp $");
 
 /*
  * This is an Open Sound System compatibility layer, which provides
@@ -49,6 +49,7 @@ __RCSID("$NetBSD: ossaudio.c,v 1.48 2020
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -66,6 +67,9 @@ __RCSID("$NetBSD: ossaudio.c,v 1.48 2020
 
 static struct audiodevinfo *getdevinfo(int);
 
+static int getmixercount(void);
+static int getmixercontrolcount(int);
+
 static int getvol(u_int, u_char);
 static void setvol(int, int, bool);
 
@@ -73,7 +77,8 @@ static void setchannels(int, int, int);
 static void setblocksize(int, struct audio_info *);
 
 static int audio_ioctl(int, unsigned long, void *);
-static int mixer_ioctl(int, unsigned long, void *);
+static int mixer_oss3_ioctl(int, unsigned long, void *);
+static int mixer_oss4_ioctl(int, unsigned long, void *);
 static int opaque_to_enum(struct audiodevinfo *, audio_mixer_name_t *, int);
 static int enum_to_ord(struct audiodevinfo *, int);
 static int enum_to_mask(struct audiodevinfo *, int);
@@ -93,7 +98,9 @@ _oss_ioctl(int fd, unsigned long com, ..
 	if (IOCGROUP(com) == 'P')
 		return audio_ioctl(fd, com, argp);
 	else if (IOCGROUP(com) == 'M')
-		return mixer_ioctl(fd, com, argp);
+		return mixer_oss3_ioctl(fd, com, argp);
+	else if (IOCGROUP(com) == 'X')
+		return mixer_oss4_ioctl(fd, com, argp);
 	else
 		return ioctl(fd, com, argp);
 }
@@ -105,17 +112,9 @@ audio_ioctl(int fd, unsigned long com, v
 	struct audio_info tmpinfo, hwfmt;
 	struct audio_offset tmpoffs;
 	struct audio_buf_info bufinfo;
-	struct audio_format_query fmtq;
 	struct audio_errinfo *tmperrinfo;
 	struct count_info cntinfo;
 	struct audio_encoding tmpenc;
-	struct oss_sysinfo tmpsysinfo;
-	struct oss_audioinfo *tmpaudioinfo;
-	audio_device_t tmpaudiodev;
-	struct stat tmpstat;
-	dev_t devno;
-	char version[32] = "4.01";
-	char license[16] = "NetBSD";
 	u_int u;
 	u_int encoding;
 	u_int precision;
@@ -123,9 +122,7 @@ audio_ioctl(int fd, unsigned long com, v
 	static int totalperrors = 0;
 	static int totalrerrors = 0;
 	int idat, idata;
-	int props;
 	int retval;
-	int newfd;
 
 	idat = 0;
 
@@ -589,117 +586,6 @@ audio_ioctl(int fd, unsigned long com, v
 		cntinfo.ptr = tmpoffs.offset;
 		*(struct count_info *)argp = cntinfo;
 		break;
-	case SNDCTL_SYSINFO:
-		strlcpy(tmpsysinfo.product, "OSS/NetBSD",
-		sizeof tmpsysinfo.product);
-		strlcpy(tmpsysinfo.version, version, sizeof tmpsysinfo.version);
-		strlcpy(tmpsysinfo.license, license, sizeof tmpsysinfo.license);
-		tmpsysinfo.versionnum = SOUND_VERSION;
-		memset(tmpsysinfo.options, 0, 8);
-		tmpsysinfo.numaudios = OSS_MAX_AUDIO_DEVS;
-		tmpsysinfo.numaudioengines = 1;
-		memset(tmpsysinfo.openedaudio, 0, sizeof(tmpsysinfo.openedaudio));
-		tmpsysinfo.numsynths = 1;
-		tmpsysinfo.nummidis = -1;
-		tmpsysinfo.numtimers = -1;
-		tmpsysinfo.nummixers = 1;
-		tmpsysinfo.numcards = 1;
-		

CVS commit: src/crypto/external/bsd/netpgp/dist/src/netpgpverify

2020-10-17 Thread Jason High
Module Name:src
Committed By:   jhigh
Date:   Sat Oct 17 23:08:57 UTC 2020

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/netpgpverify: libverify.c

Log Message:
absorb issuer fingerprint (RFC4880bis 5.2.3.28) in libverify.c


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/crypto/external/bsd/netpgp/dist/src/netpgpverify/libverify.c

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

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/netpgpverify/libverify.c
diff -u src/crypto/external/bsd/netpgp/dist/src/netpgpverify/libverify.c:1.15 src/crypto/external/bsd/netpgp/dist/src/netpgpverify/libverify.c:1.16
--- src/crypto/external/bsd/netpgp/dist/src/netpgpverify/libverify.c:1.15	Mon May  4 00:18:34 2020
+++ src/crypto/external/bsd/netpgp/dist/src/netpgpverify/libverify.c	Sat Oct 17 23:08:57 2020
@@ -151,6 +151,8 @@ typedef struct pgpv_signature_t {
 	char			*features;
 	char			*why_revoked;
 	uint8_t			*revoke_fingerprint;
+	uint8_t			*issuer_fingerprint;
+	uint8_t			 ifver;
 	uint8_t			 revoke_alg;
 	uint8_t			 revoke_sensitive;
 	uint8_t			 trustsig;
@@ -925,6 +927,7 @@ str_to_keyid(const char *s, uint8_t *key
 #define SUBPKT_FEATURES			30
 #define SUBPKT_SIGNATURE_TARGET		31
 #define SUBPKT_EMBEDDED_SIGNATURE	32
+#define SUBPKT_ISSUER_FINGERPRINT	33
 
 #define UNCOMPRESSED			0
 #define ZIP_COMPRESSION			1
@@ -1180,6 +1183,10 @@ read_sig_subpackets(pgpv_t *pgp, pgpv_si
 			sigpkt->sig.revoked = *p++ + 1;
 			sigpkt->sig.why_revoked = (char *)(void *)p;
 			break;
+		case SUBPKT_ISSUER_FINGERPRINT:
+			sigpkt->sig.ifver = *p;
+			sigpkt->sig.issuer_fingerprint = [1];
+			break;
 		default:
 			printf("Ignoring unusual/reserved signature subpacket %d\n", subpkt.tag);
 			break;



CVS commit: src/crypto/external/bsd/netpgp/dist/src/netpgpverify

2020-10-17 Thread Jason High
Module Name:src
Committed By:   jhigh
Date:   Sat Oct 17 23:08:57 UTC 2020

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/netpgpverify: libverify.c

Log Message:
absorb issuer fingerprint (RFC4880bis 5.2.3.28) in libverify.c


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/crypto/external/bsd/netpgp/dist/src/netpgpverify/libverify.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

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 21:32:31 UTC 2020

Modified Files:
src/usr.bin/make: arch.c dir.c job.c nonints.h parse.c suff.c targ.c
var.c

Log Message:
make(1): normalize initialization and cleanup of the modules


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/usr.bin/make/arch.c
cvs rdiff -u -r1.162 -r1.163 src/usr.bin/make/dir.c
cvs rdiff -u -r1.262 -r1.263 src/usr.bin/make/job.c
cvs rdiff -u -r1.140 -r1.141 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.382 -r1.383 src/usr.bin/make/parse.c
cvs rdiff -u -r1.178 -r1.179 src/usr.bin/make/suff.c
cvs rdiff -u -r1.112 -r1.113 src/usr.bin/make/targ.c
cvs rdiff -u -r1.571 -r1.572 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.132 src/usr.bin/make/arch.c:1.133
--- src/usr.bin/make/arch.c:1.132	Mon Oct  5 19:27:47 2020
+++ src/usr.bin/make/arch.c	Sat Oct 17 21:32:30 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: arch.c,v 1.132 2020/10/05 19:27:47 rillig Exp $	*/
+/*	$NetBSD: arch.c,v 1.133 2020/10/17 21:32:30 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -114,7 +114,7 @@
  *
  *	Arch_Init	Initialize this module.
  *
- *	Arch_End	Cleanup this module.
+ *	Arch_End	Clean up this module.
  */
 
 #include
@@ -130,7 +130,7 @@
 #include"config.h"
 
 /*	"@(#)arch.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: arch.c,v 1.132 2020/10/05 19:27:47 rillig Exp $");
+MAKE_RCSID("$NetBSD: arch.c,v 1.133 2020/10/17 21:32:30 rillig Exp $");
 
 #ifdef TARGET_MACHINE
 #undef MAKE_MACHINE
@@ -1123,14 +1123,14 @@ Arch_LibOODate(GNode *gn)
 return oodate;
 }
 
-/* Initialize things for this module. */
+/* Initialize the archives module. */
 void
 Arch_Init(void)
 {
 archives = Lst_Init();
 }
 
-/* Clean up things for this module. */
+/* Clean up the archives module. */
 void
 Arch_End(void)
 {

Index: src/usr.bin/make/dir.c
diff -u src/usr.bin/make/dir.c:1.162 src/usr.bin/make/dir.c:1.163
--- src/usr.bin/make/dir.c:1.162	Sat Oct 17 17:47:14 2020
+++ src/usr.bin/make/dir.c	Sat Oct 17 21:32:30 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: dir.c,v 1.162 2020/10/17 17:47:14 rillig Exp $	*/
+/*	$NetBSD: dir.c,v 1.163 2020/10/17 21:32:30 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -82,7 +82,7 @@
  *
  *	Dir_InitDot	Set the dot CachedDir.
  *
- *	Dir_End		Cleanup the module.
+ *	Dir_End		Clean up the module.
  *
  *	Dir_SetPATH	Set ${.PATH} to reflect state of dirSearchPath.
  *
@@ -135,7 +135,7 @@
 #include "job.h"
 
 /*	"@(#)dir.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: dir.c,v 1.162 2020/10/17 17:47:14 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.163 2020/10/17 21:32:30 rillig Exp $");
 
 #define DIR_DEBUG0(text) DEBUG0(DIR, text)
 #define DIR_DEBUG1(fmt, arg1) DEBUG1(DIR, fmt, arg1)
@@ -388,7 +388,7 @@ cached_lstat(const char *pathname, struc
 return cached_stats(, pathname, st, CST_LSTAT);
 }
 
-/* Initialize things for this module. */
+/* Initialize the directories module. */
 void
 Dir_Init(void)
 {
@@ -427,7 +427,7 @@ Dir_InitCur(const char *cdname)
 	dir->refCount++;
 	if (cur && cur != dir) {
 		/*
-		 * We've been here before, cleanup.
+		 * We've been here before, clean up.
 		 */
 		cur->refCount--;
 		Dir_Destroy(cur);
@@ -462,7 +462,7 @@ Dir_InitDot(void)
 Dir_SetPATH();		/* initialize */
 }
 
-/* Clean up things for this module. */
+/* Clean up the directories module. */
 void
 Dir_End(void)
 {

Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.262 src/usr.bin/make/job.c:1.263
--- src/usr.bin/make/job.c:1.262	Tue Oct  6 16:39:23 2020
+++ src/usr.bin/make/job.c	Sat Oct 17 21:32:30 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.262 2020/10/06 16:39:23 rillig Exp $	*/
+/*	$NetBSD: job.c,v 1.263 2020/10/17 21:32:30 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -97,7 +97,7 @@
  *			Hence, the makefile must have been parsed
  *			before this function is called.
  *
- *	Job_End		Cleanup any memory used.
+ *	Job_End		Clean up any memory used.
  *
  *	Job_ParseShell	Given the line following a .SHELL target, parse
  *			the line as a shell specification. Returns
@@ -143,7 +143,7 @@
 #include "trace.h"
 
 /*	"@(#)job.c	8.2 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: job.c,v 1.262 2020/10/06 16:39:23 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.263 2020/10/17 21:32:30 rillig Exp $");
 
 # define STATIC static
 

Index: src/usr.bin/make/nonints.h
diff -u src/usr.bin/make/nonints.h:1.140 src/usr.bin/make/nonints.h:1.141
--- src/usr.bin/make/nonints.h:1.140	Mon Oct  5 19:27:47 2020
+++ src/usr.bin/make/nonints.h	Sat Oct 17 21:32:30 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nonints.h,v 1.140 2020/10/05 19:27:47 rillig Exp $	*/
+/*	$NetBSD: nonints.h,v 1.141 2020/10/17 21:32:30 

CVS commit: src/usr.bin/make

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 21:32:31 UTC 2020

Modified Files:
src/usr.bin/make: arch.c dir.c job.c nonints.h parse.c suff.c targ.c
var.c

Log Message:
make(1): normalize initialization and cleanup of the modules


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/usr.bin/make/arch.c
cvs rdiff -u -r1.162 -r1.163 src/usr.bin/make/dir.c
cvs rdiff -u -r1.262 -r1.263 src/usr.bin/make/job.c
cvs rdiff -u -r1.140 -r1.141 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.382 -r1.383 src/usr.bin/make/parse.c
cvs rdiff -u -r1.178 -r1.179 src/usr.bin/make/suff.c
cvs rdiff -u -r1.112 -r1.113 src/usr.bin/make/targ.c
cvs rdiff -u -r1.571 -r1.572 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

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 21:21:38 UTC 2020

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

Log Message:
make(1): remove struct ParseLinkSrcArgs

Inlining Lst_ForEach removes the need for the void pointers and the
additional parameter struct.


To generate a diff of this commit:
cvs rdiff -u -r1.381 -r1.382 src/usr.bin/make/parse.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/parse.c
diff -u src/usr.bin/make/parse.c:1.381 src/usr.bin/make/parse.c:1.382
--- src/usr.bin/make/parse.c:1.381	Sat Oct 17 20:57:08 2020
+++ src/usr.bin/make/parse.c	Sat Oct 17 21:21:37 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.381 2020/10/17 20:57:08 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.382 2020/10/17 21:21:37 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -131,7 +131,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.381 2020/10/17 20:57:08 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.382 2020/10/17 21:21:37 rillig Exp $");
 
 /* types and constants */
 
@@ -752,33 +752,22 @@ ParseMessage(const char *directive)
 return TRUE;
 }
 
-struct ParseLinkSrcArgs {
-GNode *cgn;
-
-/* The special target of the current dependency line. */
-/* Example: for ".END: action", it is 'End'. */
-ParseSpecial specType;
-};
-
 /* Add the child to the parent's children.
  *
- * Add the parent to the child's parents, but only if the target is not
- * special.  An example for such a special target is .END, which does not
- * need to be informed once the child target has been made. */
-static void
-ParseLinkSrc(void *pgnp, void *data)
-{
-const struct ParseLinkSrcArgs *args = data;
-GNode *pgn = pgnp;
-GNode *cgn = args->cgn;
-
+ * Additionally, add the parent to the child's parents, but only if the
+ * target is not special.  An example for such a special target is .END,
+ * which does not need to be informed once the child target has been made. */
+static void
+LinkSource(GNode *pgn, GNode *cgn, Boolean isSpecial)
+{
 if ((pgn->type & OP_DOUBLEDEP) && !Lst_IsEmpty(pgn->cohorts))
 	pgn = LstNode_Datum(Lst_Last(pgn->cohorts));
 
 Lst_Append(pgn->children, cgn);
 pgn->unmade++;
 
-if (args->specType == Not)
+/* Special targets like .END don't need any children. */
+if (!isSpecial)
 	Lst_Append(cgn->parents, pgn);
 
 if (DEBUG(PARSE)) {
@@ -789,6 +778,15 @@ ParseLinkSrc(void *pgnp, void *data)
 }
 }
 
+/* Add the node to each target from the current dependency group. */
+static void
+LinkToTargets(GNode *gn, Boolean isSpecial)
+{
+GNodeListNode *ln;
+for (ln = targets->first; ln != NULL; ln = ln->next)
+	LinkSource(ln->datum, gn, isSpecial);
+}
+
 static Boolean
 TryApplyDependencyOperator(GNode *gn, GNodeType op)
 {
@@ -887,10 +885,7 @@ ParseDoSrcKeyword(const char *src, Parse
 		if (doing_depend)
 		ParseMark(gn);
 		gn->type = OP_WAIT | OP_PHONY | OP_DEPENDS | OP_NOTMAIN;
-		{
-		struct ParseLinkSrcArgs args = { gn, specType };
-		Lst_ForEach(targets, ParseLinkSrc, );
-		}
+		LinkToTargets(gn, specType != Not);
 		return TRUE;
 	}
 	}
@@ -968,10 +963,7 @@ ParseDoSrcOther(const char *src, GNodeTy
 if (tOp) {
 	gn->type |= tOp;
 } else {
-	{
-	struct ParseLinkSrcArgs args = { gn, specType };
-	Lst_ForEach(targets, ParseLinkSrc, );
-	}
+	LinkToTargets(gn, specType != Not);
 }
 }
 



CVS commit: src/usr.bin/make

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 21:21:38 UTC 2020

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

Log Message:
make(1): remove struct ParseLinkSrcArgs

Inlining Lst_ForEach removes the need for the void pointers and the
additional parameter struct.


To generate a diff of this commit:
cvs rdiff -u -r1.381 -r1.382 src/usr.bin/make/parse.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

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 20:57:08 UTC 2020

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

Log Message:
make(1): extract ParseLine from Parse_File


To generate a diff of this commit:
cvs rdiff -u -r1.380 -r1.381 src/usr.bin/make/parse.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

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 20:57:08 UTC 2020

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

Log Message:
make(1): extract ParseLine from Parse_File


To generate a diff of this commit:
cvs rdiff -u -r1.380 -r1.381 src/usr.bin/make/parse.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/parse.c
diff -u src/usr.bin/make/parse.c:1.380 src/usr.bin/make/parse.c:1.381
--- src/usr.bin/make/parse.c:1.380	Sat Oct 17 20:51:34 2020
+++ src/usr.bin/make/parse.c	Sat Oct 17 20:57:08 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.380 2020/10/17 20:51:34 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.381 2020/10/17 20:57:08 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -131,7 +131,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.380 2020/10/17 20:51:34 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.381 2020/10/17 20:57:08 rillig Exp $");
 
 /* types and constants */
 
@@ -3041,6 +3041,46 @@ ParseDependency(char *line)
 	ParseLine_ShellCommand(shellcmd);
 }
 
+static void
+ParseLine(char *line)
+{
+if (ParseDirective(line))
+	return;
+
+if (*line == '\t') {
+	ParseLine_ShellCommand(line + 1);
+	return;
+}
+
+#ifdef SYSVINCLUDE
+if (IsSysVInclude(line)) {
+	/*
+	 * It's an S3/S5-style "include".
+	 */
+	ParseTraditionalInclude(line);
+	return;
+}
+#endif
+
+#ifdef GMAKEEXPORT
+if (strncmp(line, "export", 6) == 0 && ch_isspace(line[6]) &&
+	strchr(line, ':') == NULL) {
+	/*
+	 * It's a Gmake "export".
+	 */
+	ParseGmakeExport(line);
+	return;
+}
+#endif
+
+if (ParseVarassign(line))
+	return;
+
+FinishDependencyGroup();
+
+ParseDependency(line);
+}
+
 /* Parse a top-level makefile into its component parts, incorporating them
  * into the global dependency graph.
  *
@@ -3066,42 +3106,9 @@ Parse_File(const char *name, int fd)
 curFile->lf = lf;
 
 do {
-	for (; (line = ParseReadLine()) != NULL; ) {
+	while ((line = ParseReadLine()) != NULL) {
 	DEBUG2(PARSE, "ParseReadLine (%d): '%s'\n", curFile->lineno, line);
-
-	if (ParseDirective(line))
-		continue;
-
-	if (*line == '\t') {
-		ParseLine_ShellCommand(line + 1);
-		continue;
-	}
-
-#ifdef SYSVINCLUDE
-	if (IsSysVInclude(line)) {
-		/*
-		 * It's an S3/S5-style "include".
-		 */
-		ParseTraditionalInclude(line);
-		continue;
-	}
-#endif
-#ifdef GMAKEEXPORT
-	if (strncmp(line, "export", 6) == 0 && ch_isspace(line[6]) &&
-		strchr(line, ':') == NULL) {
-		/*
-		 * It's a Gmake "export".
-		 */
-		ParseGmakeExport(line);
-		continue;
-	}
-#endif
-	if (ParseVarassign(line))
-		continue;
-
-	FinishDependencyGroup();
-
-	ParseDependency(line);
+	ParseLine(line);
 	}
 	/*
 	 * Reached EOF, but it may be just EOF of an include file...



CVS commit: src/usr.bin/make

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 20:51:34 UTC 2020

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

Log Message:
make(1): extract FindSemicolon from ParseDependency


To generate a diff of this commit:
cvs rdiff -u -r1.379 -r1.380 src/usr.bin/make/parse.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

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 20:51:34 UTC 2020

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

Log Message:
make(1): extract FindSemicolon from ParseDependency


To generate a diff of this commit:
cvs rdiff -u -r1.379 -r1.380 src/usr.bin/make/parse.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/parse.c
diff -u src/usr.bin/make/parse.c:1.379 src/usr.bin/make/parse.c:1.380
--- src/usr.bin/make/parse.c:1.379	Sat Oct 17 20:37:38 2020
+++ src/usr.bin/make/parse.c	Sat Oct 17 20:51:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.379 2020/10/17 20:37:38 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.380 2020/10/17 20:51:34 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -131,7 +131,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.379 2020/10/17 20:37:38 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.380 2020/10/17 20:51:34 rillig Exp $");
 
 /* types and constants */
 
@@ -2943,13 +2943,42 @@ ParseVarassign(const char *line)
 return FALSE;
 }
 
+static char *
+FindSemicolon(char *p)
+{
+int level = 0;
+
+for (; *p != '\0'; p++) {
+	if (*p == '\\' && p[1] != '\0') {
+	p++;
+	continue;
+	}
+
+	if (*p == '$' && (p[1] == '(' || p[1] == '{')) {
+	level++;
+	continue;
+	}
+
+	if (level > 0 && (*p == ')' || *p == '}')) {
+	level--;
+	continue;
+	}
+
+	if (level == 0 && *p == ';') {
+	break;
+	}
+}
+return p;
+}
+
 /* dependency	-> target... op [source...]
  * op		-> ':' | '::' | '!' */
 static void
-ParseDependency(char *line, const char **out_shellcmd)
+ParseDependency(char *line)
 {
 VarEvalFlags eflags;
 char *expanded_line;
+const char *shellcmd = NULL;
 
 /*
  * For some reason - probably to make the parser impossible -
@@ -2957,35 +2986,12 @@ ParseDependency(char *line, const char *
  * Attempt to avoid ';' inside substitution patterns.
  */
 {
-	int level = 0;
-	char *cp;
-
-	for (cp = line; *cp != 0; cp++) {
-	if (*cp == '\\' && cp[1] != 0) {
-		cp++;
-		continue;
-	}
-	if (*cp == '$' &&
-		(cp[1] == '(' || cp[1] == '{')) {
-		level++;
-		continue;
-	}
-	if (level > 0) {
-		if (*cp == ')' || *cp == '}') {
-		level--;
-		continue;
-		}
-	} else if (*cp == ';') {
-		break;
-	}
-	}
-
-	if (*cp != 0) {
+char *semicolon = FindSemicolon(line);
+	if (*semicolon != '\0') {
 	/* Terminate the dependency list at the ';' */
-	*cp++ = 0;
-	*out_shellcmd = cp;
-	} else
-	*out_shellcmd = NULL;
+	*semicolon = '\0';
+	shellcmd = semicolon + 1;
+	}
 }
 
 /*
@@ -3030,6 +3036,9 @@ ParseDependency(char *line, const char *
 
 ParseDoDependency(expanded_line);
 free(expanded_line);
+
+if (shellcmd != NULL)
+	ParseLine_ShellCommand(shellcmd);
 }
 
 /* Parse a top-level makefile into its component parts, incorporating them
@@ -3090,18 +3099,9 @@ Parse_File(const char *name, int fd)
 	if (ParseVarassign(line))
 		continue;
 
-#ifndef POSIX
-	if (ParseNoviceMistake())
-	continue;
-#endif
 	FinishDependencyGroup();
 
-	{
-		const char *shellcmd;
-		ParseDependency(line, );
-		if (shellcmd != NULL)
-		ParseLine_ShellCommand(shellcmd);
-	}
+	ParseDependency(line);
 	}
 	/*
 	 * Reached EOF, but it may be just EOF of an include file...



CVS commit: src/usr.bin/make

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 20:37:38 UTC 2020

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

Log Message:
make(1): split Parse_File into smaller functions


To generate a diff of this commit:
cvs rdiff -u -r1.378 -r1.379 src/usr.bin/make/parse.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/parse.c
diff -u src/usr.bin/make/parse.c:1.378 src/usr.bin/make/parse.c:1.379
--- src/usr.bin/make/parse.c:1.378	Sat Oct 17 20:32:20 2020
+++ src/usr.bin/make/parse.c	Sat Oct 17 20:37:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.378 2020/10/17 20:32:20 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.379 2020/10/17 20:37:38 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -131,7 +131,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.378 2020/10/17 20:32:20 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.379 2020/10/17 20:37:38 rillig Exp $");
 
 /* types and constants */
 
@@ -2883,6 +2883,155 @@ ParseLine_ShellCommand(const char *p)
 }
 }
 
+static Boolean
+ParseDirective(char *line)
+{
+char *cp;
+
+if (*line == '.') {
+	/*
+	 * Lines that begin with the special character may be
+	 * include or undef directives.
+	 * On the other hand they can be suffix rules (.c.o: ...)
+	 * or just dependencies for filenames that start '.'.
+	 */
+	cp = line + 1;
+	pp_skip_whitespace();
+	if (IsInclude(cp, FALSE)) {
+	ParseDoInclude(cp);
+	return TRUE;
+	}
+	if (strncmp(cp, "undef", 5) == 0) {
+	const char *varname;
+	cp += 5;
+	pp_skip_whitespace();
+	varname = cp;
+	for (; !ch_isspace(*cp) && *cp != '\0'; cp++)
+		continue;
+	*cp = '\0';
+	Var_Delete(varname, VAR_GLOBAL);
+	/* TODO: undefine all variables, not only the first */
+	/* TODO: use Str_Words, like everywhere else */
+	return TRUE;
+	} else if (strncmp(cp, "export", 6) == 0) {
+	cp += 6;
+	pp_skip_whitespace();
+	Var_Export(cp, TRUE);
+	return TRUE;
+	} else if (strncmp(cp, "unexport", 8) == 0) {
+	Var_UnExport(cp);
+	return TRUE;
+	} else if (strncmp(cp, "info", 4) == 0 ||
+		   strncmp(cp, "error", 5) == 0 ||
+		   strncmp(cp, "warning", 7) == 0) {
+	if (ParseMessage(cp))
+		return TRUE;
+	}
+}
+return FALSE;
+}
+
+static Boolean
+ParseVarassign(const char *line)
+{
+VarAssign var;
+if (Parse_IsVar(line, )) {
+	FinishDependencyGroup();
+	Parse_DoVar(, VAR_GLOBAL);
+	return TRUE;
+}
+return FALSE;
+}
+
+/* dependency	-> target... op [source...]
+ * op		-> ':' | '::' | '!' */
+static void
+ParseDependency(char *line, const char **out_shellcmd)
+{
+VarEvalFlags eflags;
+char *expanded_line;
+
+/*
+ * For some reason - probably to make the parser impossible -
+ * a ';' can be used to separate commands from dependencies.
+ * Attempt to avoid ';' inside substitution patterns.
+ */
+{
+	int level = 0;
+	char *cp;
+
+	for (cp = line; *cp != 0; cp++) {
+	if (*cp == '\\' && cp[1] != 0) {
+		cp++;
+		continue;
+	}
+	if (*cp == '$' &&
+		(cp[1] == '(' || cp[1] == '{')) {
+		level++;
+		continue;
+	}
+	if (level > 0) {
+		if (*cp == ')' || *cp == '}') {
+		level--;
+		continue;
+		}
+	} else if (*cp == ';') {
+		break;
+	}
+	}
+
+	if (*cp != 0) {
+	/* Terminate the dependency list at the ';' */
+	*cp++ = 0;
+	*out_shellcmd = cp;
+	} else
+	*out_shellcmd = NULL;
+}
+
+/*
+ * We now know it's a dependency line so it needs to have all
+ * variables expanded before being parsed.
+ *
+ * XXX: Ideally the dependency line would first be split into
+ * its left-hand side, dependency operator and right-hand side,
+ * and then each side would be expanded on its own.  This would
+ * allow for the left-hand side to allow only defined variables
+ * and to allow variables on the right-hand side to be undefined
+ * as well.
+ *
+ * Parsing the line first would also prevent that targets
+ * generated from variable expressions are interpreted as the
+ * dependency operator, such as in "target${:U:} middle: source",
+ * in which the middle is interpreted as a source, not a target.
+ */
+
+/* In lint mode, allow undefined variables to appear in
+ * dependency lines.
+ *
+ * Ideally, only the right-hand side would allow undefined
+ * variables since it is common to have no dependencies.
+ * Having undefined variables on the left-hand side is more
+ * unusual though.  Since both sides are expanded in a single
+ * pass, there is not much choice what to do here.
+ *
+ * In normal mode, it does not matter whether undefined
+ * variables are allowed or not since as of 2020-09-14,
+ * Var_Parse does not print any parse errors in such a case.
+ * It simply returns the 

CVS commit: src/usr.bin/make

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 20:37:38 UTC 2020

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

Log Message:
make(1): split Parse_File into smaller functions


To generate a diff of this commit:
cvs rdiff -u -r1.378 -r1.379 src/usr.bin/make/parse.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

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 20:32:20 UTC 2020

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

Log Message:
make(1): remove dead and broken warning for novices

In non-POSIX mode (which can only be enabled by editing config.h),
having a shell command indented by spaces instead of tabs would generate
a warning, and then, contrary to the comment above the code, no command
would be added to the current targets, since *cp == '\0'.

This had been broken since parse.c 1.133 on 2007-02-24, therefore it
seems unnecessary to even try to fix this code.


To generate a diff of this commit:
cvs rdiff -u -r1.377 -r1.378 src/usr.bin/make/parse.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/parse.c
diff -u src/usr.bin/make/parse.c:1.377 src/usr.bin/make/parse.c:1.378
--- src/usr.bin/make/parse.c:1.377	Sat Oct 17 19:10:07 2020
+++ src/usr.bin/make/parse.c	Sat Oct 17 20:32:20 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.377 2020/10/17 19:10:07 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.378 2020/10/17 20:32:20 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -131,7 +131,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.377 2020/10/17 19:10:07 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.378 2020/10/17 20:32:20 rillig Exp $");
 
 /* types and constants */
 
@@ -2991,30 +2991,6 @@ Parse_File(const char *name, int fd)
 		}
 	}
 
-#ifndef POSIX
-	/*
-	 * To make life easier on novices, if the line is indented we
-	 * first make sure the line has a dependency operator in it.
-	 * If it doesn't have an operator and we're in a dependency
-	 * line's script, we assume it's actually a shell command
-	 * and add it to the current list of targets.
-	 */
-	cp = line;
-	if (ch_isspace(line[0])) {
-		pp_skip_whitespace();
-		while (*cp && (ParseIsEscaped(line, cp) ||
-			*cp != ':' && *cp != '!')) {
-		cp++;
-		}
-		if (*cp == '\0') {
-		if (targets == NULL) {
-			Parse_Error(PARSE_WARNING,
- "Shell command needs a leading tab");
-			goto shellCommand;
-		}
-		}
-	}
-#endif
 	FinishDependencyGroup();
 
 	/*



CVS commit: src/usr.bin/make

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 20:32:20 UTC 2020

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

Log Message:
make(1): remove dead and broken warning for novices

In non-POSIX mode (which can only be enabled by editing config.h),
having a shell command indented by spaces instead of tabs would generate
a warning, and then, contrary to the comment above the code, no command
would be added to the current targets, since *cp == '\0'.

This had been broken since parse.c 1.133 on 2007-02-24, therefore it
seems unnecessary to even try to fix this code.


To generate a diff of this commit:
cvs rdiff -u -r1.377 -r1.378 src/usr.bin/make/parse.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

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 20:10:04 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: dep-colon.exp dep-colon.mk

Log Message:
make(1): add test for "target: source; command"


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/dep-colon.exp
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/dep-colon.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/dep-colon.exp
diff -u src/usr.bin/make/unit-tests/dep-colon.exp:1.1 src/usr.bin/make/unit-tests/dep-colon.exp:1.2
--- src/usr.bin/make/unit-tests/dep-colon.exp:1.1	Sun Aug 16 12:07:51 2020
+++ src/usr.bin/make/unit-tests/dep-colon.exp	Sat Oct 17 20:10:04 2020
@@ -1 +1,3 @@
+making target1 from source1
+making target2 from source2
 exit status 0

Index: src/usr.bin/make/unit-tests/dep-colon.mk
diff -u src/usr.bin/make/unit-tests/dep-colon.mk:1.2 src/usr.bin/make/unit-tests/dep-colon.mk:1.3
--- src/usr.bin/make/unit-tests/dep-colon.mk:1.2	Sun Aug 16 14:25:16 2020
+++ src/usr.bin/make/unit-tests/dep-colon.mk	Sat Oct 17 20:10:04 2020
@@ -1,8 +1,20 @@
-# $NetBSD: dep-colon.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
+# $NetBSD: dep-colon.mk,v 1.3 2020/10/17 20:10:04 rillig Exp $
 #
 # Tests for the : operator in dependency declarations.
 
 # TODO: Implementation
 
-all:
-	@:;
+# In a dependency declaration line, there may be a shell command after the
+# sources.  It is separated by a semicolon.  This "feature" is required by
+# POSIX.  It is seldom used, if at all.
+all: target1
+target1: source1; @echo making ${.TARGET} from ${.ALLSRC}
+source1: .PHONY
+
+# The semicolon for separating the sources from the creation commands must
+# appear at the top-level.  The semicolons inside the :S;1;2; modifier are
+# skipped when looking for the semicolon that separates the sources from
+# the commands.
+all: target2
+target2: source${:U1:S;1;2;}; @echo making ${.TARGET} from ${.ALLSRC}
+source2: .PHONY



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

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 20:10:04 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: dep-colon.exp dep-colon.mk

Log Message:
make(1): add test for "target: source; command"


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/dep-colon.exp
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/dep-colon.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

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 19:10:07 UTC 2020

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

Log Message:
make(1): clean up ParseMessage

Since there is no code path that would lead to the "invalid syntax"
message, it has been removed.

The switch statement for choosing the log level was overly bloated.


To generate a diff of this commit:
cvs rdiff -u -r1.376 -r1.377 src/usr.bin/make/parse.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/parse.c
diff -u src/usr.bin/make/parse.c:1.376 src/usr.bin/make/parse.c:1.377
--- src/usr.bin/make/parse.c:1.376	Sat Oct 17 18:58:26 2020
+++ src/usr.bin/make/parse.c	Sat Oct 17 19:10:07 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.376 2020/10/17 18:58:26 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.377 2020/10/17 19:10:07 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -131,7 +131,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.376 2020/10/17 18:58:26 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.377 2020/10/17 19:10:07 rillig Exp $");
 
 /* types and constants */
 
@@ -726,38 +726,26 @@ Parse_Error(int type, const char *fmt, .
  * is malformed.
  */
 static Boolean
-ParseMessage(char *line)
+ParseMessage(const char *directive)
 {
-int mtype;
+const char *p = directive;
+int mtype = *p == 'i' ? PARSE_INFO :
+		*p == 'w' ? PARSE_WARNING : PARSE_FATAL;
+char *arg;
 
-switch (*line) {
-case 'i':
-	mtype = PARSE_INFO;
-	break;
-case 'w':
-	mtype = PARSE_WARNING;
-	break;
-case 'e':
-	mtype = PARSE_FATAL;
-	break;
-default:
-	Parse_Error(PARSE_WARNING, "invalid syntax: \".%s\"", line);
-	return FALSE;
-}
-
-while (ch_isalpha(*line))
-	line++;
-if (!ch_isspace(*line))
-	return FALSE;			/* not for us */
-pp_skip_whitespace();
+while (ch_isalpha(*p))
+	p++;
+if (!ch_isspace(*p))
+	return FALSE;		/* missing argument */
 
-(void)Var_Subst(line, VAR_CMD, VARE_WANTRES, );
+cpp_skip_whitespace();
+(void)Var_Subst(p, VAR_CMD, VARE_WANTRES, );
 /* TODO: handle errors */
-Parse_Error(mtype, "%s", line);
-free(line);
+
+Parse_Error(mtype, "%s", arg);
+free(arg);
 
 if (mtype == PARSE_FATAL) {
-	/* Terminate almost immediately. */
 	PrintOnError(NULL, NULL);
 	exit(1);
 }



CVS commit: src/usr.bin/make

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 19:10:07 UTC 2020

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

Log Message:
make(1): clean up ParseMessage

Since there is no code path that would lead to the "invalid syntax"
message, it has been removed.

The switch statement for choosing the log level was overly bloated.


To generate a diff of this commit:
cvs rdiff -u -r1.376 -r1.377 src/usr.bin/make/parse.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

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 18:58:26 UTC 2020

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

Log Message:
make(1): remove redundant macros from ParseEOF and Parse_File


To generate a diff of this commit:
cvs rdiff -u -r1.375 -r1.376 src/usr.bin/make/parse.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

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 18:58:26 UTC 2020

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

Log Message:
make(1): remove redundant macros from ParseEOF and Parse_File


To generate a diff of this commit:
cvs rdiff -u -r1.375 -r1.376 src/usr.bin/make/parse.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/parse.c
diff -u src/usr.bin/make/parse.c:1.375 src/usr.bin/make/parse.c:1.376
--- src/usr.bin/make/parse.c:1.375	Sat Oct 17 18:39:43 2020
+++ src/usr.bin/make/parse.c	Sat Oct 17 18:58:26 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.375 2020/10/17 18:39:43 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.376 2020/10/17 18:58:26 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -131,7 +131,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.375 2020/10/17 18:39:43 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.376 2020/10/17 18:58:26 rillig Exp $");
 
 /* types and constants */
 
@@ -153,15 +153,6 @@ typedef struct IFile {
 struct loadedfile *lf;	/* loadedfile object, if any */
 } IFile;
 
-
-/*
- * These values are returned by ParseEOF to tell Parse_File whether to
- * CONTINUE parsing, i.e. it had only reached the end of an include file,
- * or if it's DONE.
- */
-#define CONTINUE	1
-#define DONE		0
-
 /*
  * Tokens for target attributes
  */
@@ -2572,9 +2563,10 @@ ParseGmakeExport(char *line)
  * to reading the previous file at the previous location.
  *
  * Results:
- *	CONTINUE if there's more to do. DONE if not.
+ *	TRUE to continue parsing, i.e. it had only reached the end of an
+ *	included file, FALSE if the main file has been parsed completely.
  */
-static int
+static Boolean
 ParseEOF(void)
 {
 char *ptr;
@@ -2591,7 +2583,7 @@ ParseEOF(void)
 curFile->lineno = curFile->first_lineno;
 if (ptr != NULL) {
 	/* Iterate again */
-	return CONTINUE;
+	return TRUE;
 }
 
 /* Ensure the makefile (or loop) didn't have mismatched conditionals */
@@ -2614,7 +2606,7 @@ ParseEOF(void)
 	Var_Delete(".PARSEFILE", VAR_GLOBAL);
 	Var_Delete(".INCLUDEDFROMDIR", VAR_GLOBAL);
 	Var_Delete(".INCLUDEDFROMFILE", VAR_GLOBAL);
-	return DONE;
+	return FALSE;
 }
 
 curFile = Stack_Pop();
@@ -2622,7 +2614,7 @@ ParseEOF(void)
 	   curFile->fname, curFile->lineno);
 
 ParseSetParseFile(curFile->fname);
-return CONTINUE;
+return TRUE;
 }
 
 #define PARSE_RAW 1
@@ -3125,7 +3117,7 @@ Parse_File(const char *name, int fd)
 	/*
 	 * Reached EOF, but it may be just EOF of an include file...
 	 */
-} while (ParseEOF() == CONTINUE);
+} while (ParseEOF());
 
 FinishDependencyGroup();
 



CVS commit: src/usr.bin/make

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 18:39:44 UTC 2020

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

Log Message:
make(1): fix stylistic issues in parse.c


To generate a diff of this commit:
cvs rdiff -u -r1.374 -r1.375 src/usr.bin/make/parse.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/parse.c
diff -u src/usr.bin/make/parse.c:1.374 src/usr.bin/make/parse.c:1.375
--- src/usr.bin/make/parse.c:1.374	Sat Oct 17 18:36:56 2020
+++ src/usr.bin/make/parse.c	Sat Oct 17 18:39:43 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.374 2020/10/17 18:36:56 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.375 2020/10/17 18:39:43 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -131,7 +131,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.374 2020/10/17 18:36:56 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.375 2020/10/17 18:39:43 rillig Exp $");
 
 /* types and constants */
 
@@ -598,10 +598,10 @@ ParseFindKeyword(const char *str)
 int diff;
 
 start = 0;
-end = (sizeof(parseKeywords)/sizeof(parseKeywords[0])) - 1;
+end = sizeof parseKeywords / sizeof parseKeywords[0] - 1;
 
 do {
-	cur = start + ((end - start) / 2);
+	cur = start + (end - start) / 2;
 	diff = strcmp(str, parseKeywords[cur].name);
 
 	if (diff == 0) {
@@ -2076,7 +2076,7 @@ ParseMaybeSubMake(const char *cmd)
 	MKV("$(.MAKE)"),
 	MKV("make"),
 };
-for (i = 0; i < sizeof(vals)/sizeof(vals[0]); i++) {
+for (i = 0; i < sizeof vals / sizeof vals[0]; i++) {
 	char *ptr;
 	if ((ptr = strstr(cmd, vals[i].name)) == NULL)
 	continue;
@@ -2213,8 +2213,8 @@ Parse_include_file(char *file, Boolean i
 	/*
 	 * Look for it on the system path
 	 */
-	fullname = Dir_FindFile(file,
-		Lst_IsEmpty(sysIncPath) ? defIncPath : sysIncPath);
+	SearchPath *path = Lst_IsEmpty(sysIncPath) ? defIncPath : sysIncPath;
+	fullname = Dir_FindFile(file, path);
 }
 
 if (fullname == NULL) {
@@ -2248,7 +2248,7 @@ ParseDoInclude(char *line)
 char endc;			/* the character which ends the file spec */
 char *cp;			/* current position in file spec */
 int silent = *line != 'i';
-char *file = [7 + silent];
+char *file = line + (silent ? 8 : 7);
 
 /* Skip to delimiter character so we know where to look */
 while (*file == ' ' || *file == '\t')
@@ -2452,7 +2452,7 @@ Parse_SetInput(const char *name, int lin
 ParseSetParseFile(name);
 }
 
-/* Check if the line is an include directive. */
+/* Check if the directive is an include directive. */
 static Boolean
 IsInclude(const char *dir, Boolean sysv)
 {
@@ -2477,7 +2477,7 @@ IsSysVInclude(const char *line)
 	if (!IsInclude(line, TRUE))
 		return FALSE;
 
-	/* Avoid interpeting a dependency line as an include */
+	/* Avoid interpreting a dependency line as an include */
 	for (p = line; (p = strchr(p, ':')) != NULL;) {
 		if (*++p == '\0') {
 			/* end of line -> dependency */
@@ -2535,11 +2535,11 @@ out:
 #endif
 
 #ifdef GMAKEEXPORT
-/* Parse export =, and actually export it. */
+/* Parse "export =", and actually export it. */
 static void
 ParseGmakeExport(char *line)
 {
-char *variable = [6];
+char *variable = line + 6;
 char *value;
 
 DEBUG2(PARSE, "%s: %s\n", __func__, variable);
@@ -2878,19 +2878,19 @@ FinishDependencyGroup(void)
 
 /* Add the command to each target from the current dependency spec. */
 static void
-ParseLine_ShellCommand(char *cp)
+ParseLine_ShellCommand(const char *p)
 {
-pp_skip_whitespace();
-if (*cp == '\0')
+cpp_skip_whitespace();
+if (*p == '\0')
 	return;			/* skip empty commands */
 
 if (targets == NULL) {
-	Parse_Error(PARSE_FATAL, "Unassociated shell command \"%s\"", cp);
+	Parse_Error(PARSE_FATAL, "Unassociated shell command \"%s\"", p);
 	return;
 }
 
 {
-	char *cmd = bmake_strdup(cp);
+	char *cmd = bmake_strdup(p);
 	GNodeListNode *ln;
 
 	for (ln = targets->first; ln != NULL; ln = ln->next) {



CVS commit: src/usr.bin/make

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 18:39:44 UTC 2020

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

Log Message:
make(1): fix stylistic issues in parse.c


To generate a diff of this commit:
cvs rdiff -u -r1.374 -r1.375 src/usr.bin/make/parse.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

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 18:36:56 UTC 2020

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

Log Message:
make(1): normalize spacing in parse.c


To generate a diff of this commit:
cvs rdiff -u -r1.373 -r1.374 src/usr.bin/make/parse.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/parse.c
diff -u src/usr.bin/make/parse.c:1.373 src/usr.bin/make/parse.c:1.374
--- src/usr.bin/make/parse.c:1.373	Sat Oct 17 17:47:14 2020
+++ src/usr.bin/make/parse.c	Sat Oct 17 18:36:56 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.373 2020/10/17 17:47:14 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.374 2020/10/17 18:36:56 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -131,7 +131,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.373 2020/10/17 17:47:14 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.374 2020/10/17 18:36:56 rillig Exp $");
 
 /* types and constants */
 
@@ -235,7 +235,7 @@ static StringList *targCmds;
  * Predecessor node for handling .ORDER. Initialized to NULL when .ORDER
  * seen, then set to each successive source on the line.
  */
-static GNode	*predecessor;
+static GNode *predecessor;
 
 /* parser state */
 
@@ -594,8 +594,8 @@ ParseMark(GNode *gn)
 static int
 ParseFindKeyword(const char *str)
 {
-intstart, end, cur;
-intdiff;
+int start, end, cur;
+int diff;
 
 start = 0;
 end = (sizeof(parseKeywords)/sizeof(parseKeywords[0])) - 1;
@@ -680,7 +680,7 @@ ParseVErrorInternal(FILE *f, const char 
 
 static void
 ParseErrorInternal(const char *cfname, size_t clineno, int type,
-const char *fmt, ...)
+		   const char *fmt, ...)
 {
 	va_list ap;
 
@@ -739,7 +739,7 @@ ParseMessage(char *line)
 {
 int mtype;
 
-switch(*line) {
+switch (*line) {
 case 'i':
 	mtype = PARSE_INFO;
 	break;
@@ -834,7 +834,7 @@ TryApplyDependencyOperator(GNode *gn, GN
 	 * and the new instance is linked to all parents of the initial
 	 * instance.
 	 */
-	GNode	*cohort;
+	GNode *cohort;
 
 	/*
 	 * Propagate copied bits to the initial node.  They'll be propagated
@@ -857,7 +857,7 @@ TryApplyDependencyOperator(GNode *gn, GN
 	cohort->centurion = gn;
 	gn->unmade_cohorts++;
 	snprintf(cohort->cohort_num, sizeof cohort->cohort_num, "#%d",
-		gn->unmade_cohorts % 100);
+		 gn->unmade_cohorts % 100);
 } else {
 	/*
 	 * We don't want to nuke any previous flags (whatever they were) so we
@@ -1101,7 +1101,7 @@ ParseDependencyTargetWord(/*const*/ char
 	 */
 	const char *nested_p = cp;
 	const char *nested_val;
-	void*freeIt;
+	void *freeIt;
 
 	(void)Var_Parse(_p, VAR_CMD, VARE_UNDEFERR|VARE_WANTRES,
 			_val, );
@@ -1289,7 +1289,7 @@ ParseDoDependencyTargetMundane(char *con
 
 /* Apply the targets. */
 
-while(!Lst_IsEmpty(curTargs)) {
+while (!Lst_IsEmpty(curTargs)) {
 	char *targName = Lst_Dequeue(curTargs);
 	GNode *gn = Suff_IsTransform(targName)
 		? Suff_AddTransform(targName)
@@ -1324,7 +1324,7 @@ ParseDoDependencyTargetExtraWarn(char **
 static void
 ParseDoDependencyCheckSpec(ParseSpecial const specType)
 {
-switch(specType) {
+switch (specType) {
 default:
 	Parse_Error(PARSE_WARNING,
 		"Special and mundane targets don't mix. Mundane ones ignored");
@@ -1586,7 +1586,7 @@ ParseDoDependencySourcesSpecial(char *li
 
 static Boolean
 ParseDoDependencySourcesMundane(char *line, char *cp,
-			 ParseSpecial specType, GNodeType tOp)
+ParseSpecial specType, GNodeType tOp)
 {
 while (*line) {
 	/*
@@ -1669,7 +1669,7 @@ ParseDoDependency(char *line)
 int tOp;			/* operator from special target */
 StringList *curTargs;	/* target names to be found and added
  * to the targets list */
-char	   *lstart = line;
+char *lstart = line;
 
 /*
  * specType contains the SPECial TYPE of the current target. It is Not
@@ -1749,7 +1749,7 @@ ParseDoDependency(char *line)
 	}
 	*line = '\0';
 } else if (specType == NotParallel || specType == SingleShell ||
-	specType == DeleteOnError) {
+	   specType == DeleteOnError) {
 	*line = '\0';
 }
 
@@ -1949,7 +1949,7 @@ VarAssign_Eval(VarAssign *var, GNode *ct
 	 *
 	 * And not get an error.
 	 */
-	Boolean	  oldOldVars = oldVars;
+	Boolean oldOldVars = oldVars;
 
 	oldVars = FALSE;
 
@@ -2114,11 +2114,11 @@ ParseAddCmd(GNode *gn, char *cmd)
 		 gn->name, gn->fname, gn->lineno);
 #else
 	Parse_Error(PARSE_WARNING,
-		 "duplicate script for target \"%s\" ignored",
-		 gn->name);
+		"duplicate script for target \"%s\" ignored",
+		gn->name);
 	ParseErrorInternal(gn->fname, (size_t)gn->lineno, PARSE_WARNING,
-			"using previous script for \"%s\" defined here",
-			gn->name);
+			   "using previous script for \"%s\" defined here",
+			   gn->name);
 #endif
 }
 }
@@ -2142,11 +2142,11 @@ 

CVS commit: src/usr.bin/make

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 18:36:56 UTC 2020

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

Log Message:
make(1): normalize spacing in parse.c


To generate a diff of this commit:
cvs rdiff -u -r1.373 -r1.374 src/usr.bin/make/parse.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

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 17:47:15 UTC 2020

Modified Files:
src/usr.bin/make: cond.c dir.c lst.c make.c parse.c suff.c var.c

Log Message:
make(1): fix indentation


To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/usr.bin/make/cond.c
cvs rdiff -u -r1.161 -r1.162 src/usr.bin/make/dir.c
cvs rdiff -u -r1.74 -r1.75 src/usr.bin/make/lst.c
cvs rdiff -u -r1.157 -r1.158 src/usr.bin/make/make.c
cvs rdiff -u -r1.372 -r1.373 src/usr.bin/make/parse.c
cvs rdiff -u -r1.177 -r1.178 src/usr.bin/make/suff.c
cvs rdiff -u -r1.570 -r1.571 src/usr.bin/make/var.c

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

Modified files:

Index: src/usr.bin/make/cond.c
diff -u src/usr.bin/make/cond.c:1.162 src/usr.bin/make/cond.c:1.163
--- src/usr.bin/make/cond.c:1.162	Mon Oct  5 19:59:07 2020
+++ src/usr.bin/make/cond.c	Sat Oct 17 17:47:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cond.c,v 1.162 2020/10/05 19:59:07 rillig Exp $	*/
+/*	$NetBSD: cond.c,v 1.163 2020/10/17 17:47:14 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -93,7 +93,7 @@
 #include "dir.h"
 
 /*	"@(#)cond.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: cond.c,v 1.162 2020/10/05 19:59:07 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.163 2020/10/17 17:47:14 rillig Exp $");
 
 /*
  * The parsing of conditional expressions is based on this grammar:
@@ -448,8 +448,8 @@ CondParser_String(CondParser *par, Boole
 	parseResult = Var_Parse(_p, VAR_CMD, eflags, , freeIt);
 	/* TODO: handle errors */
 	if (str == var_Error) {
-	if (parseResult & VPR_ANY_MSG)
-	par->printedError = TRUE;
+		if (parseResult & VPR_ANY_MSG)
+		par->printedError = TRUE;
 		if (*freeIt) {
 		free(*freeIt);
 		*freeIt = NULL;

Index: src/usr.bin/make/dir.c
diff -u src/usr.bin/make/dir.c:1.161 src/usr.bin/make/dir.c:1.162
--- src/usr.bin/make/dir.c:1.161	Mon Oct  5 22:45:47 2020
+++ src/usr.bin/make/dir.c	Sat Oct 17 17:47:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: dir.c,v 1.161 2020/10/05 22:45:47 rillig Exp $	*/
+/*	$NetBSD: dir.c,v 1.162 2020/10/17 17:47:14 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -135,7 +135,7 @@
 #include "job.h"
 
 /*	"@(#)dir.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: dir.c,v 1.161 2020/10/05 22:45:47 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.162 2020/10/17 17:47:14 rillig Exp $");
 
 #define DIR_DEBUG0(text) DEBUG0(DIR, text)
 #define DIR_DEBUG1(fmt, arg1) DEBUG1(DIR, fmt, arg1)
@@ -236,10 +236,10 @@ OpenDirs_Done(OpenDirs *odirs)
 {
 CachedDirListNode *ln = odirs->list->first;
 while (ln != NULL) {
-CachedDirListNode *next = ln->next;
-CachedDir *dir = ln->datum;
-Dir_Destroy(dir);	/* removes the dir from odirs->list */
-ln = next;
+	CachedDirListNode *next = ln->next;
+	CachedDir *dir = ln->datum;
+	Dir_Destroy(dir);	/* removes the dir from odirs->list */
+	ln = next;
 }
 Lst_Free(odirs->list);
 Hash_DeleteTable(>table);

Index: src/usr.bin/make/lst.c
diff -u src/usr.bin/make/lst.c:1.74 src/usr.bin/make/lst.c:1.75
--- src/usr.bin/make/lst.c:1.74	Wed Sep 30 06:27:02 2020
+++ src/usr.bin/make/lst.c	Sat Oct 17 17:47:14 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: lst.c,v 1.74 2020/09/30 06:27:02 rillig Exp $ */
+/* $NetBSD: lst.c,v 1.75 2020/10/17 17:47:14 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -34,7 +34,7 @@
 
 #include "make.h"
 
-MAKE_RCSID("$NetBSD: lst.c,v 1.74 2020/09/30 06:27:02 rillig Exp $");
+MAKE_RCSID("$NetBSD: lst.c,v 1.75 2020/10/17 17:47:14 rillig Exp $");
 
 /* Allocate and initialize a list node.
  *
@@ -313,7 +313,7 @@ Lst_ForEach(List *list, LstActionProc pr
 {
 ListNode *node;
 for (node = list->first; node != NULL; node = node->next)
-proc(node->datum, procData);
+	proc(node->datum, procData);
 }
 
 /* Apply the given function to each element of the given list. The function

Index: src/usr.bin/make/make.c
diff -u src/usr.bin/make/make.c:1.157 src/usr.bin/make/make.c:1.158
--- src/usr.bin/make/make.c:1.157	Thu Oct  1 22:42:00 2020
+++ src/usr.bin/make/make.c	Sat Oct 17 17:47:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: make.c,v 1.157 2020/10/01 22:42:00 rillig Exp $	*/
+/*	$NetBSD: make.c,v 1.158 2020/10/17 17:47:14 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -107,7 +107,7 @@
 #include"job.h"
 
 /*	"@(#)make.c	8.1 (Berkeley) 6/6/93"	*/
-MAKE_RCSID("$NetBSD: make.c,v 1.157 2020/10/01 22:42:00 rillig Exp $");
+MAKE_RCSID("$NetBSD: make.c,v 1.158 2020/10/17 17:47:14 rillig Exp $");
 
 /* Sequence # to detect recursion. */
 static unsigned int checked = 1;
@@ -480,7 +480,7 @@ HandleUseNodes(GNode *gn)
 GNodeListNode *ln, *nln;
 for (ln = gn->children->first; ln != NULL; ln = nln) {
 	nln = ln->next;
-MakeHandleUse(ln->datum, gn, ln);
+	

CVS commit: src/usr.bin/make

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 17:47:15 UTC 2020

Modified Files:
src/usr.bin/make: cond.c dir.c lst.c make.c parse.c suff.c var.c

Log Message:
make(1): fix indentation


To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/usr.bin/make/cond.c
cvs rdiff -u -r1.161 -r1.162 src/usr.bin/make/dir.c
cvs rdiff -u -r1.74 -r1.75 src/usr.bin/make/lst.c
cvs rdiff -u -r1.157 -r1.158 src/usr.bin/make/make.c
cvs rdiff -u -r1.372 -r1.373 src/usr.bin/make/parse.c
cvs rdiff -u -r1.177 -r1.178 src/usr.bin/make/suff.c
cvs rdiff -u -r1.570 -r1.571 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

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 17:23:23 UTC 2020

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

Log Message:
make(1): document the purpose of targCmds


To generate a diff of this commit:
cvs rdiff -u -r1.371 -r1.372 src/usr.bin/make/parse.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

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 17:23:23 UTC 2020

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

Log Message:
make(1): document the purpose of targCmds


To generate a diff of this commit:
cvs rdiff -u -r1.371 -r1.372 src/usr.bin/make/parse.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/parse.c
diff -u src/usr.bin/make/parse.c:1.371 src/usr.bin/make/parse.c:1.372
--- src/usr.bin/make/parse.c:1.371	Sat Oct 17 17:16:54 2020
+++ src/usr.bin/make/parse.c	Sat Oct 17 17:23:22 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.371 2020/10/17 17:16:54 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.372 2020/10/17 17:23:22 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -131,7 +131,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.371 2020/10/17 17:16:54 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.372 2020/10/17 17:23:22 rillig Exp $");
 
 /* types and constants */
 
@@ -224,7 +224,10 @@ static GNode *mainNode;
 static GNodeList *targets;
 
 #ifdef CLEANUP
-/* command lines for targets */
+/* All shell commands for all targets, in no particular order and possibly
+ * with duplicates.  Kept in a separate list since the commands from .USE or
+ * .USEBEFORE nodes are shared with other GNodes, thereby giving up the
+ * easily understandable ownership over the allocated strings. */
 static StringList *targCmds;
 #endif
 



CVS commit: src/usr.bin/make

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 17:16:55 UTC 2020

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

Log Message:
make(1): inline ParseHasCommands and ParseHasCommands


To generate a diff of this commit:
cvs rdiff -u -r1.370 -r1.371 src/usr.bin/make/parse.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

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 17:16:55 UTC 2020

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

Log Message:
make(1): inline ParseHasCommands and ParseHasCommands


To generate a diff of this commit:
cvs rdiff -u -r1.370 -r1.371 src/usr.bin/make/parse.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/parse.c
diff -u src/usr.bin/make/parse.c:1.370 src/usr.bin/make/parse.c:1.371
--- src/usr.bin/make/parse.c:1.370	Mon Oct  5 22:15:45 2020
+++ src/usr.bin/make/parse.c	Sat Oct 17 17:16:54 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.370 2020/10/05 22:15:45 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.371 2020/10/17 17:16:54 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -131,7 +131,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.370 2020/10/05 22:15:45 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.371 2020/10/17 17:16:54 rillig Exp $");
 
 /* types and constants */
 
@@ -2120,18 +2120,6 @@ ParseAddCmd(GNode *gn, char *cmd)
 }
 }
 
-/* Callback procedure for Parse_File when destroying the list of targets on
- * the last dependency line. Marks a target as already having commands if it
- * does, to keep from having shell commands on multiple dependency lines. */
-static void
-ParseHasCommands(void *gnp)
-{
-GNode *gn = (GNode *)gnp;
-if (!Lst_IsEmpty(gn->commands)) {
-	gn->type |= OP_HAS_COMMANDS;
-}
-}
-
 /* Add a directory to the path searched for included makefiles bracketed
  * by double-quotes. */
 void
@@ -2865,17 +2853,22 @@ ParseReadLine(void)
 }
 
 static void
-SuffEndTransform(void *target, void *unused MAKE_ATTR_UNUSED)
-{
-Suff_EndTransform(target);
-}
-
-static void
 FinishDependencyGroup(void)
 {
 if (targets != NULL) {
-	Lst_ForEach(targets, SuffEndTransform, NULL);
-	Lst_Destroy(targets, ParseHasCommands);
+	GNodeListNode *ln;
+	for (ln = targets->first; ln != NULL; ln = ln->next) {
+	GNode *gn = ln->datum;
+
+	Suff_EndTransform(gn);
+
+	/* Mark the target as already having commands if it does, to
+	 * keep from having shell commands on multiple dependency lines. */
+	if (!Lst_IsEmpty(gn->commands))
+		gn->type |= OP_HAS_COMMANDS;
+	}
+
+	Lst_Free(targets);
 	targets = NULL;
 }
 }



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

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 16:57:17 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: counter-append.mk counter.mk

Log Message:
make(1): document why the counter tests failed before 2020-09-23


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/counter-append.mk
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/counter.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/counter-append.mk
diff -u src/usr.bin/make/unit-tests/counter-append.mk:1.3 src/usr.bin/make/unit-tests/counter-append.mk:1.4
--- src/usr.bin/make/unit-tests/counter-append.mk:1.3	Wed Sep 23 07:54:08 2020
+++ src/usr.bin/make/unit-tests/counter-append.mk	Sat Oct 17 16:57:17 2020
@@ -1,10 +1,12 @@
-# $NetBSD: counter-append.mk,v 1.3 2020/09/23 07:54:08 rillig Exp $
+# $NetBSD: counter-append.mk,v 1.4 2020/10/17 16:57:17 rillig Exp $
 #
 # Demonstrates how to let make count the number of times a variable
 # is actually accessed, using the ::+= variable modifier.
 #
 # This works since 2020-09-23.  Before that, the counter ended up at having
 # 6 words, even though the NEXT variable was only accessed 3 times.
+# The cause for this surprising behavior was that the ::= variable modifiers
+# returned an error marker instead of a simple empty string.
 
 RELEVANT=	yes (load-time part)	# just to filter the output
 

Index: src/usr.bin/make/unit-tests/counter.mk
diff -u src/usr.bin/make/unit-tests/counter.mk:1.4 src/usr.bin/make/unit-tests/counter.mk:1.5
--- src/usr.bin/make/unit-tests/counter.mk:1.4	Wed Sep 23 07:54:08 2020
+++ src/usr.bin/make/unit-tests/counter.mk	Sat Oct 17 16:57:17 2020
@@ -1,10 +1,12 @@
-# $NetBSD: counter.mk,v 1.4 2020/09/23 07:54:08 rillig Exp $
+# $NetBSD: counter.mk,v 1.5 2020/10/17 16:57:17 rillig Exp $
 #
 # Demonstrates how to let make count the number of times a variable
 # is actually accessed, using the ::= variable modifier.
 #
 # This works since 2020-09-23.  Before that, the counter ended up at having
 # 4 words, even though the NEXT variable was only accessed 3 times.
+# The cause for this surprising behavior was that the ::= variable modifiers
+# returned an error marker instead of a simple empty string.
 
 RELEVANT=	yes (load-time part)	# just to filter the output
 



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

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 16:57:17 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: counter-append.mk counter.mk

Log Message:
make(1): document why the counter tests failed before 2020-09-23


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/counter-append.mk
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/counter.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

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 16:53:26 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: Makefile export.mk

Log Message:
make(1): document why the ampersand is not listed in export.exp


To generate a diff of this commit:
cvs rdiff -u -r1.165 -r1.166 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/export.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

2020-10-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Oct 17 16:53:26 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: Makefile export.mk

Log Message:
make(1): document why the ampersand is not listed in export.exp


To generate a diff of this commit:
cvs rdiff -u -r1.165 -r1.166 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/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/unit-tests/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.165 src/usr.bin/make/unit-tests/Makefile:1.166
--- src/usr.bin/make/unit-tests/Makefile:1.165	Sat Oct 10 19:25:19 2020
+++ src/usr.bin/make/unit-tests/Makefile	Sat Oct 17 16:53:26 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.165 2020/10/10 19:25:19 sjg Exp $
+# $NetBSD: Makefile,v 1.166 2020/10/17 16:53:26 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -393,12 +393,6 @@ FLAGS.varname-dot-shell= -dpv
 FLAGS.varname-empty=	-dv '$${:U}=cmdline-u' '=cmline-plain'
 
 # Some tests need extra postprocessing.
-SED_CMDS.export= \
-	-e '/^[^=_A-Za-z0-9]*=/d'
-# these all share the same requirement
-.for t in export-all export-env
-SED_CMDS.$t= ${SED_CMDS.export}
-.endfor
 SED_CMDS.job-output-long-lines= \
 	${:D Job separators on their own line are ok. } \
 	-e '/^--- job-[ab] ---$$/d' \

Index: src/usr.bin/make/unit-tests/export.mk
diff -u src/usr.bin/make/unit-tests/export.mk:1.6 src/usr.bin/make/unit-tests/export.mk:1.7
--- src/usr.bin/make/unit-tests/export.mk:1.6	Sun Sep 27 13:18:30 2020
+++ src/usr.bin/make/unit-tests/export.mk	Sat Oct 17 16:53:26 2020
@@ -1,4 +1,4 @@
-# $Id: export.mk,v 1.6 2020/09/27 13:18:30 rillig Exp $
+# $Id: export.mk,v 1.7 2020/10/17 16:53:26 rillig Exp $
 
 UT_TEST=export
 UT_FOO=foo${BAR}
@@ -29,6 +29,9 @@ ${:U!}=	exclamation		# A direct != would
 .export %
 .export *
 .export !
+# This is exported (see the .rawout file) but not displayed since the dash
+# shell filters it out.  To reach consistent output for each shell, the
+# ampersand is filtered out already by FILTER_CMD.
 .export &
 # This is ignored because it is undefined.
 .export UNDEFINED
@@ -37,7 +40,7 @@ BAR=bar is ${UT_FU}
 
 .MAKE.EXPORTED+= UT_ZOO UT_TEST
 
-FILTER_CMD?=	egrep -v '^(MAKEFLAGS|MALLOC_OPTIONS|PATH|PWD|SHLVL|_)='
+FILTER_CMD?=	egrep -v '^(MAKEFLAGS|MALLOC_OPTIONS|PATH|PWD|SHLVL|_|&)='
 
 all:
 	@env | ${FILTER_CMD} | sort



CVS commit: src/doc

2020-10-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 17 16:25:24 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new tzcode


To generate a diff of this commit:
cvs rdiff -u -r1.1754 -r1.1755 src/doc/3RDPARTY
cvs rdiff -u -r1.2747 -r1.2748 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1754 src/doc/3RDPARTY:1.1755
--- src/doc/3RDPARTY:1.1754	Sat Oct 17 04:29:48 2020
+++ src/doc/3RDPARTY	Sat Oct 17 12:25:24 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1754 2020/10/17 08:29:48 kre Exp $
+#	$NetBSD: 3RDPARTY,v 1.1755 2020/10/17 16:25:24 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1409,7 +1409,7 @@ Notes:
 Added changes from a5 -> a12 manually.
 
 Package:	tz
-Version:	tzcode2020b / tzdata2020c
+Version:	tzcode2020c / tzdata2020c
 Current Vers:	tzcode2020c / tzdata2020c
 Maintainer:	Paul Eggert 
 Archive Site:	ftp://ftp.iana.org/tz/releases/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2747 src/doc/CHANGES:1.2748
--- src/doc/CHANGES:1.2747	Sat Oct 17 04:29:48 2020
+++ src/doc/CHANGES	Sat Oct 17 12:25:24 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2747 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2748 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -294,3 +294,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	tzcode: Updated to 2020b. [christos 20201009]
 	dhcpcd: Update to version 9.3.1 [roy 20201012]
 	tzdata updated to 2020c  [kre 20201017]
+	tzcode: Updated to 2020c. [christos 20201017]



CVS commit: src/doc

2020-10-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 17 16:25:24 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new tzcode


To generate a diff of this commit:
cvs rdiff -u -r1.1754 -r1.1755 src/doc/3RDPARTY
cvs rdiff -u -r1.2747 -r1.2748 src/doc/CHANGES

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



CVS commit: src/lib/libc/time

2020-10-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 17 16:24:33 UTC 2020

Modified Files:
src/lib/libc/time: Makefile NEWS version

Log Message:
update to 2020c


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/lib/libc/time/Makefile
cvs rdiff -u -r1.31 -r1.32 src/lib/libc/time/NEWS
cvs rdiff -u -r1.14 -r1.15 src/lib/libc/time/version

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



CVS commit: src/lib/libc/time

2020-10-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 17 16:24:33 UTC 2020

Modified Files:
src/lib/libc/time: Makefile NEWS version

Log Message:
update to 2020c


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/lib/libc/time/Makefile
cvs rdiff -u -r1.31 -r1.32 src/lib/libc/time/NEWS
cvs rdiff -u -r1.14 -r1.15 src/lib/libc/time/version

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/time/Makefile
diff -u src/lib/libc/time/Makefile:1.46 src/lib/libc/time/Makefile:1.47
--- src/lib/libc/time/Makefile:1.46	Fri Oct  9 14:38:48 2020
+++ src/lib/libc/time/Makefile	Sat Oct 17 12:24:33 2020
@@ -1022,10 +1022,14 @@ tzdata$(VERSION)-rearguard.tar.gz: rearg
 		done
 		sed '1s/$$/-rearguard/' \
 		  tzdata$(VERSION)-rearguard.dir/version
+		: The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier.
+		touch -md 2020-10-12T22:53:00Z \
+		  tzdata$(VERSION)-rearguard.dir/pacificnew
 		touch -cmr version tzdata$(VERSION)-rearguard.dir/version
 		LC_ALL=C && export LC_ALL && \
 		  (cd tzdata$(VERSION)-rearguard.dir && \
-		   tar $(TARFLAGS) -cf - $(COMMON) $(DATA) $(MISC) | \
+		   tar $(TARFLAGS) -cf - \
+			$(COMMON) $(DATA) $(MISC) pacificnew | \
 		 gzip $(GZIPFLAGS)) >$@.out
 		mv $@.out $@
 

Index: src/lib/libc/time/NEWS
diff -u src/lib/libc/time/NEWS:1.31 src/lib/libc/time/NEWS:1.32
--- src/lib/libc/time/NEWS:1.31	Fri Oct  9 14:38:48 2020
+++ src/lib/libc/time/NEWS	Sat Oct 17 12:24:33 2020
@@ -1,5 +1,25 @@
 News for the tz database
 
+Release 2020c - 2020-10-16 11:15:53 -0700
+
+  Briefly:
+Fiji starts DST later than usual, on 2020-12-20.
+
+  Changes to future timestamps
+
+Fiji will start DST on 2020-12-20, instead of 2020-11-08 as
+previously predicted.  DST will still end on 2021-01-17.
+(Thanks to Raymond Kumar and Alan Mintz.)  Assume for now that
+the later-than-usual start date is a one-time departure from the
+recent pattern.
+
+  Changes to build procedure
+
+Rearguard tarballs now contain an empty file pacificnew.
+Some older downstream software expects this file to exist.
+(Problem reported by Mike Cullinan.)
+
+
 Release 2020b - 2020-10-06 18:35:04 -0700
 
   Briefly:

Index: src/lib/libc/time/version
diff -u src/lib/libc/time/version:1.14 src/lib/libc/time/version:1.15
--- src/lib/libc/time/version:1.14	Fri Oct  9 14:38:48 2020
+++ src/lib/libc/time/version	Sat Oct 17 12:24:33 2020
@@ -1 +1 @@
-2020b
+2020c



Re: CVS commit: [netbsd-9] src

2020-10-17 Thread Martin Husemann
On Fri, Oct 16, 2020 at 08:17:09AM +, Martin Husemann wrote:
> Module Name:  src
> Committed By: martin
> Date: Fri Oct 16 08:17:09 UTC 2020
> 
> Modified Files:
>   src/doc [netbsd-9]: CHANGES-9.1
>   src/external/gpl2/groff/tmac [netbsd-9]: mdoc.local
>   src/sys/sys [netbsd-9]: param.h
> 
> Log Message:
> Welcome to 9.1!

Just in case anyone is wondering - this version did not survive internal QA,
we will move the tag for some files and have a slightly different 9.1 -
hopefully soon. This is why no official binaries are available and there
was no anouncement yet.

Martin


CVS commit: src/lib/libc/arch/aarch64

2020-10-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 17 15:44:59 UTC 2020

Modified Files:
src/lib/libc/arch/aarch64: genassym.cf
src/lib/libc/arch/aarch64/sys: __sigtramp2.S

Log Message:
Change x30 to lr for ease of reading

NFCI


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/aarch64/genassym.cf
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/aarch64/sys/__sigtramp2.S

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/arch/aarch64/genassym.cf
diff -u src/lib/libc/arch/aarch64/genassym.cf:1.3 src/lib/libc/arch/aarch64/genassym.cf:1.4
--- src/lib/libc/arch/aarch64/genassym.cf:1.3	Tue Oct 13 01:59:55 2020
+++ src/lib/libc/arch/aarch64/genassym.cf	Sat Oct 17 15:44:59 2020
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.3 2020/10/13 01:59:55 kamil Exp $
+# $NetBSD: genassym.cf,v 1.4 2020/10/17 15:44:59 skrll Exp $
 
 #-
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@ define _UC_REGS_X26	offsetof(ucontext_t,
 define _UC_REGS_X27	offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X27])
 define _UC_REGS_X28	offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X28])
 define _UC_REGS_X29	offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X29])
-define _UC_REGS_X30	offsetof(ucontext_t, uc_mcontext.__gregs[_REG_X30])
+define _UC_REGS_LR	offsetof(ucontext_t, uc_mcontext.__gregs[_REG_LR])
 define _UC_REGS_SP	offsetof(ucontext_t, uc_mcontext.__gregs[_REG_SP])
 define _UC_REGS_PC	offsetof(ucontext_t, uc_mcontext.__gregs[_REG_PC])
 

Index: src/lib/libc/arch/aarch64/sys/__sigtramp2.S
diff -u src/lib/libc/arch/aarch64/sys/__sigtramp2.S:1.2 src/lib/libc/arch/aarch64/sys/__sigtramp2.S:1.3
--- src/lib/libc/arch/aarch64/sys/__sigtramp2.S:1.2	Tue Oct 13 01:59:55 2020
+++ src/lib/libc/arch/aarch64/sys/__sigtramp2.S	Sat Oct 17 15:44:59 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: __sigtramp2.S,v 1.2 2020/10/13 01:59:55 kamil Exp $ */
+/* $NetBSD: __sigtramp2.S,v 1.3 2020/10/17 15:44:59 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -81,7 +81,7 @@
 	.cfi_offset x27, _UC_REGS_X27
 	.cfi_offset x28, _UC_REGS_X28
 	.cfi_offset x29, _UC_REGS_X29
-	.cfi_offset x30, _UC_REGS_X30
+	.cfi_offset lr, _UC_REGS_LR
 	/* The unwinder will use the CFA to restore X31 (SP). */
 	nop
 ENTRY_NP(__sigtramp_siginfo_2)



CVS commit: src/lib/libc/arch/aarch64

2020-10-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 17 15:44:59 UTC 2020

Modified Files:
src/lib/libc/arch/aarch64: genassym.cf
src/lib/libc/arch/aarch64/sys: __sigtramp2.S

Log Message:
Change x30 to lr for ease of reading

NFCI


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/aarch64/genassym.cf
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/aarch64/sys/__sigtramp2.S

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



CVS commit: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu

2020-10-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Oct 17 10:47:28 UTC 2020

Modified Files:
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu: amdgpu_gart.c

Log Message:
mb (dsb sy) is not the same as membar_sync (dmb sy) on aarch64


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_gart.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/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_gart.c
diff -u src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_gart.c:1.3 src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_gart.c:1.4
--- src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_gart.c:1.3	Mon Aug 27 14:04:50 2018
+++ src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_gart.c	Sat Oct 17 10:47:28 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: amdgpu_gart.c,v 1.3 2018/08/27 14:04:50 riastradh Exp $	*/
+/*	$NetBSD: amdgpu_gart.c,v 1.4 2020/10/17 10:47:28 jmcneill Exp $	*/
 
 /*
  * Copyright 2008 Advanced Micro Devices, Inc.
@@ -28,7 +28,7 @@
  *  Jerome Glisse
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_gart.c,v 1.3 2018/08/27 14:04:50 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_gart.c,v 1.4 2020/10/17 10:47:28 jmcneill Exp $");
 
 #include 
 #include 
@@ -289,7 +289,7 @@ amdgpu_gart_post_update(struct amdgpu_de
 		gpu_pgstart*entsize, gpu_npages*entsize,
 		BUS_DMASYNC_PREWRITE);
 	}
-	membar_sync();		/* XXX overkill */
+	mb();
 	amdgpu_gart_flush_gpu_tlb(adev, 0);
 }
 #endif



CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/devinit

2020-10-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Oct 17 10:47:10 UTC 2020

Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/devinit: fbmem.h

Log Message:
wmb (dsb ishst) is not the same as membar_producer (dmb ishst) on aarch64


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/devinit/fbmem.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/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/devinit/fbmem.h
diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/devinit/fbmem.h:1.3 src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/devinit/fbmem.h:1.4
--- src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/devinit/fbmem.h:1.3	Mon Aug 27 14:51:33 2018
+++ src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/devinit/fbmem.h	Sat Oct 17 10:47:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: fbmem.h,v 1.3 2018/08/27 14:51:33 riastradh Exp $	*/
+/*	$NetBSD: fbmem.h,v 1.4 2020/10/17 10:47:10 jmcneill Exp $	*/
 
 /*
  * Copyright (C) 2010 Francisco Jerez.
@@ -112,11 +112,10 @@ fbmem_poke(struct io_mapping *fb, u32 of
 {
 	u8 __iomem *p = io_mapping_map_atomic_wc(fb, off & PAGE_MASK);
 	iowrite32(val, p + (off & ~PAGE_MASK));
+	wmb();
 #ifdef __NetBSD__
-	membar_producer();
 	io_mapping_unmap_atomic(fb, __UNVOLATILE(p));
 #else
-	wmb();
 	io_mapping_unmap_atomic(p);
 #endif
 }



CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/devinit

2020-10-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Oct 17 10:47:10 UTC 2020

Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/devinit: fbmem.h

Log Message:
wmb (dsb ishst) is not the same as membar_producer (dmb ishst) on aarch64


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/devinit/fbmem.h

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



CVS commit: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu

2020-10-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Oct 17 10:47:28 UTC 2020

Modified Files:
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu: amdgpu_gart.c

Log Message:
mb (dsb sy) is not the same as membar_sync (dmb sy) on aarch64


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_gart.c

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



CVS commit: src/sys/external/bsd/drm2/dist/drm/radeon

2020-10-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Oct 17 10:46:39 UTC 2020

Modified Files:
src/sys/external/bsd/drm2/dist/drm/radeon: radeon_gart.c

Log Message:
mb (dsb sy) is not the same as membar_sync (dmb sy) on aarch64


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
src/sys/external/bsd/drm2/dist/drm/radeon/radeon_gart.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/external/bsd/drm2/dist/drm/radeon/radeon_gart.c
diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon_gart.c:1.11 src/sys/external/bsd/drm2/dist/drm/radeon/radeon_gart.c:1.12
--- src/sys/external/bsd/drm2/dist/drm/radeon/radeon_gart.c:1.11	Mon Jan 20 23:22:09 2020
+++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_gart.c	Sat Oct 17 10:46:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: radeon_gart.c,v 1.11 2020/01/20 23:22:09 jmcneill Exp $	*/
+/*	$NetBSD: radeon_gart.c,v 1.12 2020/10/17 10:46:39 jmcneill Exp $	*/
 
 /*
  * Copyright 2008 Advanced Micro Devices, Inc.
@@ -28,7 +28,7 @@
  *  Jerome Glisse
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: radeon_gart.c,v 1.11 2020/01/20 23:22:09 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_gart.c,v 1.12 2020/10/17 10:46:39 jmcneill Exp $");
 
 #include 
 #include 
@@ -306,7 +306,7 @@ radeon_gart_post_update(struct radeon_de
 		BUS_DMASYNC_PREWRITE);
 	}
 	if (rdev->gart.ptr != NULL) {
-		membar_sync();		/* XXX overkill */
+		mb();
 		radeon_gart_tlb_flush(rdev);
 	}
 }



CVS commit: src/sys/external/bsd/drm2/dist/drm/radeon

2020-10-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Oct 17 10:46:39 UTC 2020

Modified Files:
src/sys/external/bsd/drm2/dist/drm/radeon: radeon_gart.c

Log Message:
mb (dsb sy) is not the same as membar_sync (dmb sy) on aarch64


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
src/sys/external/bsd/drm2/dist/drm/radeon/radeon_gart.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/wscons

2020-10-17 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Oct 17 10:28:10 UTC 2020

Modified Files:
src/sys/dev/wscons: wsksymdef.h

Log Message:
Correct KB_NEXT value. No impact since KB_NEXT isn't used anywhere.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/dev/wscons/wsksymdef.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/wscons/wsksymdef.h
diff -u src/sys/dev/wscons/wsksymdef.h:1.74 src/sys/dev/wscons/wsksymdef.h:1.75
--- src/sys/dev/wscons/wsksymdef.h:1.74	Sat Aug 29 22:42:53 2020
+++ src/sys/dev/wscons/wsksymdef.h	Sat Oct 17 10:28:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: wsksymdef.h,v 1.74 2020/08/29 22:42:53 macallan Exp $ */
+/*	$NetBSD: wsksymdef.h,v 1.75 2020/10/17 10:28:10 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -685,7 +685,7 @@ action(KB_UA,	0,	0x1200,	"ua",	,	"Ukrain
 
 /* Define all the KB_xx numeric values using above table */
 #define KBF_ENUM(tag, tagf, value, cc, ccf, country) tag=value,
-enum { KB_ENC_FUN(KBF_ENUM) KB_NEXT=0x1800 };
+enum { KB_ENC_FUN(KBF_ENUM) KB_NEXT=0x1d00 };
 
 /* Define list of KB_xxx and country codes for array initialisation */
 #define KBF_ENCTAB(tag, tagf, value, cc, ccf, country) { tag, cc },



CVS commit: src/sys/dev/wscons

2020-10-17 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Oct 17 10:28:10 UTC 2020

Modified Files:
src/sys/dev/wscons: wsksymdef.h

Log Message:
Correct KB_NEXT value. No impact since KB_NEXT isn't used anywhere.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/dev/wscons/wsksymdef.h

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



CVS commit: src/sys/kern

2020-10-17 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Oct 17 09:45:20 UTC 2020

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

Log Message:
validate unix socker buffer size and truncate path to prevent overflow.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/kern/uipc_domain.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/uipc_domain.c
diff -u src/sys/kern/uipc_domain.c:1.106 src/sys/kern/uipc_domain.c:1.107
--- src/sys/kern/uipc_domain.c:1.106	Thu Dec 27 07:56:43 2018
+++ src/sys/kern/uipc_domain.c	Sat Oct 17 09:45:20 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_domain.c,v 1.106 2018/12/27 07:56:43 maxv Exp $	*/
+/*	$NetBSD: uipc_domain.c,v 1.107 2020/10/17 09:45:20 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_domain.c,v 1.106 2018/12/27 07:56:43 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_domain.c,v 1.107 2020/10/17 09:45:20 mlelstv Exp $");
 
 #include 
 #include 
@@ -412,6 +412,13 @@ static int
 sun_print(char *buf, size_t len, const void *v)
 {
 	const struct sockaddr_un *sun = v;
+	size_t plen;
+
+	KASSERT(sun->sun_len >= offsetof(struct sockaddr_un, sun_path[0]));
+	plen = sun->sun_len - offsetof(struct sockaddr_un, sun_path[0]);
+
+	len = MIN(len, plen);
+
 	return snprintf(buf, len, "%s", sun->sun_path);
 }
 



CVS commit: src/sys/kern

2020-10-17 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Oct 17 09:45:20 UTC 2020

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

Log Message:
validate unix socker buffer size and truncate path to prevent overflow.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/kern/uipc_domain.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

2020-10-17 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Oct 17 09:42:36 UTC 2020

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

Log Message:
Attach disk info even for zero sized disks.
Slight refactoring.


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/sys/kern/subr_disk.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/subr_disk.c
diff -u src/sys/kern/subr_disk.c:1.131 src/sys/kern/subr_disk.c:1.132
--- src/sys/kern/subr_disk.c:1.131	Thu Jun 11 02:32:06 2020
+++ src/sys/kern/subr_disk.c	Sat Oct 17 09:42:35 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_disk.c,v 1.131 2020/06/11 02:32:06 thorpej Exp $	*/
+/*	$NetBSD: subr_disk.c,v 1.132 2020/10/17 09:42:35 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1999, 2000, 2009 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.131 2020/06/11 02:32:06 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.132 2020/10/17 09:42:35 mlelstv Exp $");
 
 #include 
 #include 
@@ -687,21 +687,17 @@ disk_set_info(device_t dev, struct disk 
 	dk->dk_blkshift = DK_BSIZE2BLKSHIFT(dg->dg_secsize);
 	dk->dk_byteshift = DK_BSIZE2BYTESHIFT(dg->dg_secsize);
 
-	if (dg->dg_secperunit == 0 && dg->dg_ncylinders == 0) {
-#ifdef DIAGNOSTIC
-		printf("%s: secperunit and ncylinders are zero\n", dk->dk_name);
-#endif
-		return;
-	}
-
 	if (dg->dg_secperunit == 0) {
-		if (dg->dg_nsectors == 0 || dg->dg_ntracks == 0) {
 #ifdef DIAGNOSTIC
+		if (dg->dg_ncylinders == 0) {
+			printf("%s: secperunit and ncylinders are zero\n",
+			dk->dk_name);
+		}
+		if (dg->dg_nsectors == 0 || dg->dg_ntracks == 0) {
 			printf("%s: secperunit and (sectors or tracks) "
 			"are zero\n", dk->dk_name);
-#endif
-			return;
 		}
+#endif
 		dg->dg_secperunit = (int64_t) dg->dg_nsectors *
 		dg->dg_ntracks * dg->dg_ncylinders;
 	}



CVS commit: src/sys/kern

2020-10-17 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Oct 17 09:42:36 UTC 2020

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

Log Message:
Attach disk info even for zero sized disks.
Slight refactoring.


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/sys/kern/subr_disk.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/sdmmc

2020-10-17 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Oct 17 09:36:45 UTC 2020

Modified Files:
src/sys/dev/sdmmc: sdmmc_io.c

Log Message:
Fix error message. No functional change, both commands use the same
bit to select read or write mode.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/sdmmc/sdmmc_io.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/sdmmc

2020-10-17 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Oct 17 09:36:45 UTC 2020

Modified Files:
src/sys/dev/sdmmc: sdmmc_io.c

Log Message:
Fix error message. No functional change, both commands use the same
bit to select read or write mode.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/sdmmc/sdmmc_io.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/sdmmc/sdmmc_io.c
diff -u src/sys/dev/sdmmc/sdmmc_io.c:1.20 src/sys/dev/sdmmc/sdmmc_io.c:1.21
--- src/sys/dev/sdmmc/sdmmc_io.c:1.20	Sun May 24 17:26:18 2020
+++ src/sys/dev/sdmmc/sdmmc_io.c	Sat Oct 17 09:36:45 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmc_io.c,v 1.20 2020/05/24 17:26:18 riastradh Exp $	*/
+/*	$NetBSD: sdmmc_io.c,v 1.21 2020/10/17 09:36:45 mlelstv Exp $	*/
 /*	$OpenBSD: sdmmc_io.c,v 1.10 2007/09/17 01:33:33 krw Exp $	*/
 
 /*
@@ -20,7 +20,7 @@
 /* Routines for SD I/O cards. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdmmc_io.c,v 1.20 2020/05/24 17:26:18 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdmmc_io.c,v 1.21 2020/10/17 09:36:45 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -375,7 +375,7 @@ sdmmc_io_rw_direct(struct sdmmc_softc *s
 		device_printf(sc->sc_dev,
 		"direct I/O error %d, r=%d p=%p %s\n",
 		error, reg, datap,
-		ISSET(arg, SD_ARG_CMD53_WRITE) ? "write" : "read");
+		ISSET(arg, SD_ARG_CMD52_WRITE) ? "write" : "read");
 	}
 
 	return error;



CVS commit: src/share/man/man7

2020-10-17 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Oct 17 09:20:33 UTC 2020

Modified Files:
src/share/man/man7: sysctl.7

Log Message:
Use Dv. Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.151 src/share/man/man7/sysctl.7

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

Modified files:

Index: src/share/man/man7/sysctl.7
diff -u src/share/man/man7/sysctl.7:1.150 src/share/man/man7/sysctl.7:1.151
--- src/share/man/man7/sysctl.7:1.150	Sat Oct 17 09:06:15 2020
+++ src/share/man/man7/sysctl.7	Sat Oct 17 09:20:33 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sysctl.7,v 1.150 2020/10/17 09:06:15 mlelstv Exp $
+.\"	$NetBSD: sysctl.7,v 1.151 2020/10/17 09:20:33 wiz Exp $
 .\"
 .\" Copyright (c) 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	@(#)sysctl.3	8.4 (Berkeley) 5/9/95
 .\"
-.Dd August 20, 2020
+.Dd October 17, 2020
 .Dt SYSCTL 7
 .Os
 .Sh NAME
@@ -1208,7 +1208,10 @@ See
 .Xr sched 3 .
 .El
 .It Li kern.sofixedbuf ( Dv KERN_SOFIXEDBUF )
-Prevent socket buffer autoscaling when a size is set with SO_SNDBUF or SO_RCVBUF.
+Prevent socket buffer autoscaling when a size is set with
+.Dv SO_SNDBUF
+or
+.Dv SO_RCVBUF .
 .It Li kern.somaxkva ( Dv KERN_SOMAXKVA )
 Maximum amount of kernel memory to be used for socket buffers in bytes.
 .It Li kern.sooptions



CVS commit: src/share/man/man7

2020-10-17 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Oct 17 09:20:33 UTC 2020

Modified Files:
src/share/man/man7: sysctl.7

Log Message:
Use Dv. Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.151 src/share/man/man7/sysctl.7

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



CVS commit: src

2020-10-17 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Oct 17 09:06:15 UTC 2020

Modified Files:
src/share/man/man7: sysctl.7
src/sys/kern: uipc_socket.c
src/sys/sys: sysctl.h

Log Message:
Setting a socket buffer size stops autoscaling. Add a sysctl to
prevent this behaviour. The default is not changed.


To generate a diff of this commit:
cvs rdiff -u -r1.149 -r1.150 src/share/man/man7/sysctl.7
cvs rdiff -u -r1.291 -r1.292 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.230 -r1.231 src/sys/sys/sysctl.h

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

Modified files:

Index: src/share/man/man7/sysctl.7
diff -u src/share/man/man7/sysctl.7:1.149 src/share/man/man7/sysctl.7:1.150
--- src/share/man/man7/sysctl.7:1.149	Fri Sep 11 15:16:48 2020
+++ src/share/man/man7/sysctl.7	Sat Oct 17 09:06:15 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sysctl.7,v 1.149 2020/09/11 15:16:48 roy Exp $
+.\"	$NetBSD: sysctl.7,v 1.150 2020/10/17 09:06:15 mlelstv Exp $
 .\"
 .\" Copyright (c) 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -359,6 +359,7 @@ privilege may change the value.
 .It kern.sbmax	integer	yes
 .It kern.sched	node	not applicable
 .It kern.securelevel	integer	raise only
+.It kern.sofixedbuf	boolean	yes
 .It kern.somaxkva	integer	yes
 .It kern.sooptions	integer	yes
 .It kern.synchronized_io	integer	no
@@ -1206,6 +1207,8 @@ Maximal POSIX real-time priority.
 See
 .Xr sched 3 .
 .El
+.It Li kern.sofixedbuf ( Dv KERN_SOFIXEDBUF )
+Prevent socket buffer autoscaling when a size is set with SO_SNDBUF or SO_RCVBUF.
 .It Li kern.somaxkva ( Dv KERN_SOMAXKVA )
 Maximum amount of kernel memory to be used for socket buffers in bytes.
 .It Li kern.sooptions

Index: src/sys/kern/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.291 src/sys/kern/uipc_socket.c:1.292
--- src/sys/kern/uipc_socket.c:1.291	Wed Aug 26 22:54:30 2020
+++ src/sys/kern/uipc_socket.c	Sat Oct 17 09:06:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket.c,v 1.291 2020/08/26 22:54:30 christos Exp $	*/
+/*	$NetBSD: uipc_socket.c,v 1.292 2020/10/17 09:06:15 mlelstv 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.291 2020/08/26 22:54:30 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.292 2020/10/17 09:06:15 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -166,6 +166,11 @@ int somaxkva = SOMAXKVA;
 static int socurkva;
 static kcondvar_t socurkva_cv;
 
+#ifndef SOFIXEDBUF
+#define SOFIXEDBUF true
+#endif
+bool sofixedbuf = SOFIXEDBUF;
+
 static kauth_listener_t socket_listener;
 
 #define	SOCK_LOAN_CHUNK		65536
@@ -1798,7 +1803,8 @@ sosetopt1(struct socket *so, const struc
 error = ENOBUFS;
 break;
 			}
-			so->so_snd.sb_flags &= ~SB_AUTOSIZE;
+			if (sofixedbuf)
+so->so_snd.sb_flags &= ~SB_AUTOSIZE;
 			break;
 
 		case SO_RCVBUF:
@@ -1806,7 +1812,8 @@ sosetopt1(struct socket *so, const struc
 error = ENOBUFS;
 break;
 			}
-			so->so_rcv.sb_flags &= ~SB_AUTOSIZE;
+			if (sofixedbuf)
+so->so_rcv.sb_flags &= ~SB_AUTOSIZE;
 			break;
 
 		/*
@@ -2540,6 +2547,13 @@ sysctl_kern_socket_setup(void)
 
 	sysctl_createv(_sysctllog, 0, NULL, NULL,
 		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+		   CTLTYPE_BOOL, "sofixedbuf",
+		   SYSCTL_DESCR("Prevent scaling of fixed socket buffers"),
+		   NULL, 0, , 0,
+		   CTL_KERN, KERN_SOFIXEDBUF, CTL_EOL);
+
+	sysctl_createv(_sysctllog, 0, NULL, NULL,
+		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
 		   CTLTYPE_INT, "sbmax",
 		   SYSCTL_DESCR("Maximum socket buffer size"),
 		   sysctl_kern_sbmax, 0, NULL, 0,

Index: src/sys/sys/sysctl.h
diff -u src/sys/sys/sysctl.h:1.230 src/sys/sys/sysctl.h:1.231
--- src/sys/sys/sysctl.h:1.230	Fri May 31 23:01:39 2019
+++ src/sys/sys/sysctl.h	Sat Oct 17 09:06:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysctl.h,v 1.230 2019/05/31 23:01:39 kamil Exp $	*/
+/*	$NetBSD: sysctl.h,v 1.231 2020/10/17 09:06:15 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -274,6 +274,7 @@ struct ctlname {
 #define	KERN_SYSVIPC		82	/* node: SysV IPC parameters */
 #define	KERN_BOOTTIME		83	/* struct: time kernel was booted */
 #define	KERN_EVCNT		84	/* struct: evcnts */
+#define	KERN_SOFIXEDBUF		85	/* bool: fixed socket buffer sizes */
 
 /*
  *  KERN_CLOCKRATE structure



CVS commit: src

2020-10-17 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Oct 17 09:06:15 UTC 2020

Modified Files:
src/share/man/man7: sysctl.7
src/sys/kern: uipc_socket.c
src/sys/sys: sysctl.h

Log Message:
Setting a socket buffer size stops autoscaling. Add a sysctl to
prevent this behaviour. The default is not changed.


To generate a diff of this commit:
cvs rdiff -u -r1.149 -r1.150 src/share/man/man7/sysctl.7
cvs rdiff -u -r1.291 -r1.292 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.230 -r1.231 src/sys/sys/sysctl.h

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



CVS commit: src/lib/libossaudio

2020-10-17 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Oct 17 09:04:59 UTC 2020

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

Log Message:
Use Fx and Nx. End Rs block. Remove trailing whitespace.
Remove unnecessary Pp.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libossaudio/ossaudio.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/libossaudio/ossaudio.3
diff -u src/lib/libossaudio/ossaudio.3:1.23 src/lib/libossaudio/ossaudio.3:1.24
--- src/lib/libossaudio/ossaudio.3:1.23	Fri Oct 16 20:51:54 2020
+++ src/lib/libossaudio/ossaudio.3	Sat Oct 17 09:04:59 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ossaudio.3,v 1.23 2020/10/16 20:51:54 nia Exp $
+.\"	$NetBSD: ossaudio.3,v 1.24 2020/10/17 09:04:59 wiz Exp $
 .\"
 .\" Copyright (c) 1997, 2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -51,7 +51,6 @@ building code written for other operatin
 .Ss Mixer Control Map
 The following table summarizes the mappings from native interface
 device names to OSS mixer controls.
-.Pp
 .Bl -column ".Sy Native Device Name" "SOUND_MIXER_SPEAKER"
 .It Sy "Native Device Name" Ta Sy "OSS Mixer Control"
 .It *.mic Ta SOUND_MIXER_MIC
@@ -77,9 +76,10 @@ described in:
 .Pp
 .Rs
 .%A 4Front Technologies
-.%T OSS 4.x Programmer's Guide 
+.%T OSS 4.x Programmer's Guide
 .%U http://manuals.opensound.com/developer/
 .%D 2007
+.Re
 .Sh SEE ALSO
 .Xr ioctl 2 ,
 .Xr audio 4 ,
@@ -94,10 +94,10 @@ library first appeared in
 The Open Sound System up to version 3 was originally the preferred
 API for writing audio code under Linux until ALSA became the new default
 in Linux 2.6.
-It remains the preferred API in FreeBSD and Solaris, and a large body
-of code exists supporting it.
+It remains the preferred API in
+.Fx
+and Solaris, and a large body of code exists supporting it.
 .Sh BUGS
-.Pp
 The emulation is incomplete, covering most of OSSv3 and some of OSSv4.
 Some obscure features are not included, but the essential ioctls used
 by the majority of software are covered.
@@ -107,7 +107,9 @@ The emulation uses a #define for
 so some obscure programs
 can fail to compile.
 .Pp
-Linux, FreeBSD, and Solaris provide
+Linux,
+.Fx ,
+and Solaris provide
 .Pa /dev/dsp
 and
 .Pa /dev/mixer
@@ -115,7 +117,8 @@ devices in place of the
 .Pa /dev/audio
 and
 .Pa /dev/mixer
-devices this compatibility layer must be accessed through on NetBSD.
+devices this compatibility layer must be accessed through on
+.Nx .
 However, changing this is typically trivial when porting programs.
 .Pp
 The emulation only covers



CVS commit: src/lib/libossaudio

2020-10-17 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Oct 17 09:04:59 UTC 2020

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

Log Message:
Use Fx and Nx. End Rs block. Remove trailing whitespace.
Remove unnecessary Pp.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libossaudio/ossaudio.3

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



CVS commit: src/sys/netinet

2020-10-17 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Oct 17 08:50:38 UTC 2020

Modified Files:
src/sys/netinet: tcp_usrreq.c

Log Message:
Fix RTT values reported by TCP_INFO.


To generate a diff of this commit:
cvs rdiff -u -r1.226 -r1.227 src/sys/netinet/tcp_usrreq.c

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



CVS commit: src/sys/netinet

2020-10-17 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Oct 17 08:50:38 UTC 2020

Modified Files:
src/sys/netinet: tcp_usrreq.c

Log Message:
Fix RTT values reported by TCP_INFO.


To generate a diff of this commit:
cvs rdiff -u -r1.226 -r1.227 src/sys/netinet/tcp_usrreq.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/netinet/tcp_usrreq.c
diff -u src/sys/netinet/tcp_usrreq.c:1.226 src/sys/netinet/tcp_usrreq.c:1.227
--- src/sys/netinet/tcp_usrreq.c:1.226	Mon Apr 13 15:54:45 2020
+++ src/sys/netinet/tcp_usrreq.c	Sat Oct 17 08:50:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_usrreq.c,v 1.226 2020/04/13 15:54:45 maxv Exp $	*/
+/*	$NetBSD: tcp_usrreq.c,v 1.227 2020/10/17 08:50:38 mlelstv Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -99,7 +99,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.226 2020/04/13 15:54:45 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.227 2020/10/17 08:50:38 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -258,8 +258,10 @@ tcp_fill_info(struct tcpcb *tp, struct t
 	ti->tcpi_rto = tp->t_rxtcur * tick;
 	ti->tcpi_last_data_recv = (long)(getticks() -
 	 (int)tp->t_rcvtime) * tick;
-	ti->tcpi_rtt = ((u_int64_t)tp->t_srtt * tick) >> TCP_RTT_SHIFT;
-	ti->tcpi_rttvar = ((u_int64_t)tp->t_rttvar * tick) >> TCP_RTTVAR_SHIFT;
+	ti->tcpi_rtt = ((u_int64_t)tp->t_srtt * tick / PR_SLOWHZ)
+	   >> (TCP_RTT_SHIFT + 2);
+	ti->tcpi_rttvar = ((u_int64_t)tp->t_rttvar * tick / PR_SLOWHZ)
+	   >> (TCP_RTTVAR_SHIFT + 2);
 
 	ti->tcpi_snd_ssthresh = tp->snd_ssthresh;
 	/* Linux API wants these in # of segments, apparently */



CVS commit: src/bin/csh

2020-10-17 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Oct 17 08:46:02 UTC 2020

Modified Files:
src/bin/csh: time.c

Log Message:
Print real maxrss value like other shells.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/bin/csh/time.c

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



CVS commit: src/bin/csh

2020-10-17 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Oct 17 08:46:02 UTC 2020

Modified Files:
src/bin/csh: time.c

Log Message:
Print real maxrss value like other shells.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/bin/csh/time.c

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

Modified files:

Index: src/bin/csh/time.c
diff -u src/bin/csh/time.c:1.22 src/bin/csh/time.c:1.23
--- src/bin/csh/time.c:1.22	Thu Apr 23 07:54:53 2020
+++ src/bin/csh/time.c	Sat Oct 17 08:46:02 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: time.c,v 1.22 2020/04/23 07:54:53 simonb Exp $ */
+/* $NetBSD: time.c,v 1.23 2020/10/17 08:46:02 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 1980, 1991, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)time.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: time.c,v 1.22 2020/04/23 07:54:53 simonb Exp $");
+__RCSID("$NetBSD: time.c,v 1.23 2020/10/17 08:46:02 mlelstv Exp $");
 #endif
 #endif /* not lint */
 
@@ -182,7 +182,7 @@ prusage1(FILE *fp, const char *cp, int p
 			 (r0->ru_ixrss + r0->ru_idrss + r0->ru_isrss)) / t));
 		break;
 	case 'M':		/* max. Resident Set Size */
-		(void)fprintf(fp, "%ld", r1->ru_maxrss / 2L);
+		(void)fprintf(fp, "%ld", r1->ru_maxrss);
 		break;
 	case 'O':		/* FS blocks out */
 		(void)fprintf(fp, "%ld", r1->ru_oublock - r0->ru_oublock);



CVS commit: src/doc

2020-10-17 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Oct 17 08:29:48 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note update of tzdata from 2020b to 2020c


To generate a diff of this commit:
cvs rdiff -u -r1.1753 -r1.1754 src/doc/3RDPARTY
cvs rdiff -u -r1.2746 -r1.2747 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1753 src/doc/3RDPARTY:1.1754
--- src/doc/3RDPARTY:1.1753	Fri Oct 16 11:17:54 2020
+++ src/doc/3RDPARTY	Sat Oct 17 08:29:48 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1753 2020/10/16 11:17:54 wiz Exp $
+#	$NetBSD: 3RDPARTY,v 1.1754 2020/10/17 08:29:48 kre Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1409,8 +1409,8 @@ Notes:
 Added changes from a5 -> a12 manually.
 
 Package:	tz
-Version:	tzcode2020b / tzdata2020b
-Current Vers:	tzcode2020b / tzdata2020b
+Version:	tzcode2020b / tzdata2020c
+Current Vers:	tzcode2020c / tzdata2020c
 Maintainer:	Paul Eggert 
 Archive Site:	ftp://ftp.iana.org/tz/releases/
 Archive Site:	ftp://munnari.oz.au/pub/oldtz/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2746 src/doc/CHANGES:1.2747
--- src/doc/CHANGES:1.2746	Mon Oct 12 14:10:37 2020
+++ src/doc/CHANGES	Sat Oct 17 08:29:48 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2746 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2747 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -293,3 +293,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	tzdata updated to 2020b  [kre 20201008]
 	tzcode: Updated to 2020b. [christos 20201009]
 	dhcpcd: Update to version 9.3.1 [roy 20201012]
+	tzdata updated to 2020c  [kre 20201017]



CVS commit: src/doc

2020-10-17 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Oct 17 08:29:48 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note update of tzdata from 2020b to 2020c


To generate a diff of this commit:
cvs rdiff -u -r1.1753 -r1.1754 src/doc/3RDPARTY
cvs rdiff -u -r1.2746 -r1.2747 src/doc/CHANGES

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



CVS commit: src/external/public-domain/tz/dist

2020-10-17 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Oct 17 08:27:56 UTC 2020

Modified Files:
src/external/public-domain/tz/dist: TZDATA_VERSION

Log Message:
Merge tzdata2020c


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/public-domain/tz/dist/TZDATA_VERSION

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

Modified files:

Index: src/external/public-domain/tz/dist/TZDATA_VERSION
diff -u src/external/public-domain/tz/dist/TZDATA_VERSION:1.20 src/external/public-domain/tz/dist/TZDATA_VERSION:1.21
--- src/external/public-domain/tz/dist/TZDATA_VERSION:1.20	Thu Oct  8 04:28:00 2020
+++ src/external/public-domain/tz/dist/TZDATA_VERSION	Sat Oct 17 08:27:56 2020
@@ -1 +1 @@
-tzdata-2020b
+tzdata-2020c



CVS commit: src/external/public-domain/tz/dist

2020-10-17 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Oct 17 08:27:56 UTC 2020

Modified Files:
src/external/public-domain/tz/dist: TZDATA_VERSION

Log Message:
Merge tzdata2020c


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/public-domain/tz/dist/TZDATA_VERSION

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



CVS import: src/external/public-domain/tz/dist

2020-10-17 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Oct 17 08:27:35 UTC 2020

Update of /cvsroot/src/external/public-domain/tz/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv5564

Log Message:
Import tzdata2020c from ftp://ftp.iana.org/tz/releases/tzdata2020c.tar.gz

News for the tz database

Release 2020c - 2020-10-16 11:15:53 -0700

Fiji starts DST later than usual, on 2020-12-20.

Status:

Vendor Tag: TZDATA
Release Tags:   TZDATA2020C

U src/external/public-domain/tz/dist/leap-seconds.list
U src/external/public-domain/tz/dist/calendars
U src/external/public-domain/tz/dist/CONTRIBUTING
U src/external/public-domain/tz/dist/LICENSE
U src/external/public-domain/tz/dist/Makefile
U src/external/public-domain/tz/dist/NEWS
U src/external/public-domain/tz/dist/README
U src/external/public-domain/tz/dist/theory.html
U src/external/public-domain/tz/dist/version
U src/external/public-domain/tz/dist/africa
U src/external/public-domain/tz/dist/antarctica
U src/external/public-domain/tz/dist/asia
U src/external/public-domain/tz/dist/australasia
U src/external/public-domain/tz/dist/europe
U src/external/public-domain/tz/dist/northamerica
U src/external/public-domain/tz/dist/southamerica
U src/external/public-domain/tz/dist/etcetera
U src/external/public-domain/tz/dist/factory
U src/external/public-domain/tz/dist/backward
U src/external/public-domain/tz/dist/backzone
U src/external/public-domain/tz/dist/iso3166.tab
U src/external/public-domain/tz/dist/checklinks.awk
U src/external/public-domain/tz/dist/leapseconds
U src/external/public-domain/tz/dist/zone1970.tab
U src/external/public-domain/tz/dist/zone.tab
U src/external/public-domain/tz/dist/leapseconds.awk
U src/external/public-domain/tz/dist/checktab.awk
U src/external/public-domain/tz/dist/zoneinfo2tdf.pl
U src/external/public-domain/tz/dist/ziguard.awk
U src/external/public-domain/tz/dist/zishrink.awk

No conflicts created by this import



CVS import: src/external/public-domain/tz/dist

2020-10-17 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Oct 17 08:27:35 UTC 2020

Update of /cvsroot/src/external/public-domain/tz/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv5564

Log Message:
Import tzdata2020c from ftp://ftp.iana.org/tz/releases/tzdata2020c.tar.gz

News for the tz database

Release 2020c - 2020-10-16 11:15:53 -0700

Fiji starts DST later than usual, on 2020-12-20.

Status:

Vendor Tag: TZDATA
Release Tags:   TZDATA2020C

U src/external/public-domain/tz/dist/leap-seconds.list
U src/external/public-domain/tz/dist/calendars
U src/external/public-domain/tz/dist/CONTRIBUTING
U src/external/public-domain/tz/dist/LICENSE
U src/external/public-domain/tz/dist/Makefile
U src/external/public-domain/tz/dist/NEWS
U src/external/public-domain/tz/dist/README
U src/external/public-domain/tz/dist/theory.html
U src/external/public-domain/tz/dist/version
U src/external/public-domain/tz/dist/africa
U src/external/public-domain/tz/dist/antarctica
U src/external/public-domain/tz/dist/asia
U src/external/public-domain/tz/dist/australasia
U src/external/public-domain/tz/dist/europe
U src/external/public-domain/tz/dist/northamerica
U src/external/public-domain/tz/dist/southamerica
U src/external/public-domain/tz/dist/etcetera
U src/external/public-domain/tz/dist/factory
U src/external/public-domain/tz/dist/backward
U src/external/public-domain/tz/dist/backzone
U src/external/public-domain/tz/dist/iso3166.tab
U src/external/public-domain/tz/dist/checklinks.awk
U src/external/public-domain/tz/dist/leapseconds
U src/external/public-domain/tz/dist/zone1970.tab
U src/external/public-domain/tz/dist/zone.tab
U src/external/public-domain/tz/dist/leapseconds.awk
U src/external/public-domain/tz/dist/checktab.awk
U src/external/public-domain/tz/dist/zoneinfo2tdf.pl
U src/external/public-domain/tz/dist/ziguard.awk
U src/external/public-domain/tz/dist/zishrink.awk

No conflicts created by this import



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

2020-10-17 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sat Oct 17 08:10:31 UTC 2020

Modified Files:
src/sys/arch/sparc64/sparc64: autoconf.c ofw_patch.h

Log Message:
Avoid declaring autoconf_debug twice when building with DEBUG.
Pointed out by palle@ - thanks!


To generate a diff of this commit:
cvs rdiff -u -r1.224 -r1.225 src/sys/arch/sparc64/sparc64/autoconf.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sparc64/sparc64/ofw_patch.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/sparc64/sparc64

2020-10-17 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sat Oct 17 08:10:31 UTC 2020

Modified Files:
src/sys/arch/sparc64/sparc64: autoconf.c ofw_patch.h

Log Message:
Avoid declaring autoconf_debug twice when building with DEBUG.
Pointed out by palle@ - thanks!


To generate a diff of this commit:
cvs rdiff -u -r1.224 -r1.225 src/sys/arch/sparc64/sparc64/autoconf.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sparc64/sparc64/ofw_patch.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/sparc64/sparc64/autoconf.c
diff -u src/sys/arch/sparc64/sparc64/autoconf.c:1.224 src/sys/arch/sparc64/sparc64/autoconf.c:1.225
--- src/sys/arch/sparc64/sparc64/autoconf.c:1.224	Fri Oct 16 07:35:16 2020
+++ src/sys/arch/sparc64/sparc64/autoconf.c	Sat Oct 17 08:10:31 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.224 2020/10/16 07:35:16 jdc Exp $ */
+/*	$NetBSD: autoconf.c,v 1.225 2020/10/17 08:10:31 jdc Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.224 2020/10/16 07:35:16 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.225 2020/10/17 08:10:31 jdc Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -116,6 +116,8 @@ __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v
 
 #include "ksyms.h"
 
+int autoconf_debug = 0x0;
+
 struct evcnt intr_evcnts[] = {
 	EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "intr", "spur"),
 	EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "intr", "lev1"),

Index: src/sys/arch/sparc64/sparc64/ofw_patch.h
diff -u src/sys/arch/sparc64/sparc64/ofw_patch.h:1.1 src/sys/arch/sparc64/sparc64/ofw_patch.h:1.2
--- src/sys/arch/sparc64/sparc64/ofw_patch.h:1.1	Fri Oct 16 07:35:16 2020
+++ src/sys/arch/sparc64/sparc64/ofw_patch.h	Sat Oct 17 08:10:31 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofw_patch.h,v 1.1 2020/10/16 07:35:16 jdc Exp $ */
+/*	$NetBSD: ofw_patch.h,v 1.2 2020/10/17 08:10:31 jdc Exp $ */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 #define ACDB_BOOTDEV0x1
 #define ACDB_PROBE  0x2
 #define ACDB_BOOTARGS   0x4
-int autoconf_debug = 0x0;
+extern int autoconf_debug;
 #define DPRINTF(l, s)   do { if (autoconf_debug & l) printf s; } while (0)
 #else
 #define DPRINTF(l, s)



CVS commit: src

2020-10-17 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Oct 17 07:41:25 UTC 2020

Modified Files:
src: UPDATING

Log Message:
note about mips kernel modules breaking update builds


To generate a diff of this commit:
cvs rdiff -u -r1.315 -r1.316 src/UPDATING

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

Modified files:

Index: src/UPDATING
diff -u src/UPDATING:1.315 src/UPDATING:1.316
--- src/UPDATING:1.315	Sat Sep 26 08:02:35 2020
+++ src/UPDATING	Sat Oct 17 07:41:25 2020
@@ -1,4 +1,4 @@
-$NetBSD: UPDATING,v 1.315 2020/09/26 08:02:35 mrg Exp $
+$NetBSD: UPDATING,v 1.316 2020/10/17 07:41:25 mrg Exp $
 
 This file (UPDATING) is intended to be a brief reference to recent
 changes that might cause problems in the build process, and a guide for
@@ -19,6 +19,10 @@ See also: BUILDING, build.sh, Makefile.
 Recent changes:
 ^^^
 
+20201016:
+	MIPS kernel modules have been disabled until they work.  This will
+	turn up in extra files in the DESTDIR, which should be cleaned.
+
 20200925:
 	GNU MPC and MPFR have been updated.  At least MPFR needs cleaning
 	in both the tools and external dirs.



CVS commit: src

2020-10-17 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Oct 17 07:41:25 UTC 2020

Modified Files:
src: UPDATING

Log Message:
note about mips kernel modules breaking update builds


To generate a diff of this commit:
cvs rdiff -u -r1.315 -r1.316 src/UPDATING

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



CVS commit: src/share/mk

2020-10-17 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Oct 17 07:40:21 UTC 2020

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
turn off kernel modules on mips since they don't work yet, and
we build 2 or 3 versions of them.


To generate a diff of this commit:
cvs rdiff -u -r1.1226 -r1.1227 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1226 src/share/mk/bsd.own.mk:1.1227
--- src/share/mk/bsd.own.mk:1.1226	Fri Oct 16 06:55:36 2020
+++ src/share/mk/bsd.own.mk	Sat Oct 17 07:40:21 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1226 2020/10/16 06:55:36 nia Exp $
+#	$NetBSD: bsd.own.mk,v 1.1227 2020/10/17 07:40:21 mrg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -833,10 +833,14 @@ MKGDB.or1k=	no
 MKGDB.riscv32=	no
 MKGDB.riscv64=	no
 
-# No kernel modules for or1k (yet)
+# No kernel modules for or1k, riscv or mips (yet)
 MKKMOD.or1k=	no
 MKKMOD.riscv32=	no
 MKKMOD.riscv64=	no
+MKKMOD.mipsel=	no
+MKKMOD.mipseb=	no
+MKKMOD.mips64el=no
+MKKMOD.mips64eb=no
 
 # No profiling for or1k (yet)
 MKPROFILE.or1k=	no



CVS commit: src/share/mk

2020-10-17 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Oct 17 07:40:21 UTC 2020

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
turn off kernel modules on mips since they don't work yet, and
we build 2 or 3 versions of them.


To generate a diff of this commit:
cvs rdiff -u -r1.1226 -r1.1227 src/share/mk/bsd.own.mk

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