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

2020-11-13 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Sat Nov 14 07:36:00 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: objdir-writable.mk

Log Message:
Remove RO_OBJDIR when done


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/objdir-writable.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/objdir-writable.mk
diff -u src/usr.bin/make/unit-tests/objdir-writable.mk:1.3 src/usr.bin/make/unit-tests/objdir-writable.mk:1.4
--- src/usr.bin/make/unit-tests/objdir-writable.mk:1.3	Fri Nov 13 09:01:59 2020
+++ src/usr.bin/make/unit-tests/objdir-writable.mk	Sat Nov 14 07:36:00 2020
@@ -1,4 +1,4 @@
-# $NetBSD: objdir-writable.mk,v 1.3 2020/11/13 09:01:59 rillig Exp $
+# $NetBSD: objdir-writable.mk,v 1.4 2020/11/14 07:36:00 sjg Exp $
 
 # test checking for writable objdir
 
@@ -15,6 +15,10 @@ all: no-objdir ro-objdir explicit-objdir
 # make it now
 x!= echo; mkdir -p ${RO_OBJDIR};  chmod 555 ${RO_OBJDIR}
 
+.END: rm-objdir
+rm-objdir:
+	@rmdir ${RO_OBJDIR}
+
 no-objdir:
 	@MAKEOBJDIR=${RO_OBJDIR} ${.MAKE} -r -f /dev/null -C /tmp -V .OBJDIR
 



CVS commit: src/usr.bin/make

2020-11-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Nov 14 06:15:11 UTC 2020

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

Log Message:
make(1): clarify what 'recently' means in the comments in dir.c


To generate a diff of this commit:
cvs rdiff -u -r1.204 -r1.205 src/usr.bin/make/dir.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/dir.c
diff -u src/usr.bin/make/dir.c:1.204 src/usr.bin/make/dir.c:1.205
--- src/usr.bin/make/dir.c:1.204	Sat Nov 14 06:10:28 2020
+++ src/usr.bin/make/dir.c	Sat Nov 14 06:15:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: dir.c,v 1.204 2020/11/14 06:10:28 rillig Exp $	*/
+/*	$NetBSD: dir.c,v 1.205 2020/11/14 06:15:11 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -134,7 +134,7 @@
 #include "job.h"
 
 /*	"@(#)dir.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: dir.c,v 1.204 2020/11/14 06:10:28 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.205 2020/11/14 06:15:11 rillig Exp $");
 
 #define DIR_DEBUG0(text) DEBUG0(DIR, text)
 #define DIR_DEBUG1(fmt, arg1) DEBUG1(DIR, fmt, arg1)
@@ -168,9 +168,9 @@ MAKE_RCSID("$NetBSD: dir.c,v 1.204 2020/
  *	the process too much, it could severely affect the amount of
  *	parallelism available as each directory open would take another file
  *	descriptor out of play for handling I/O for another job. Given that
- *	it is only recently that UNIX OS's have taken to allowing more than
- *	20 or 32 file descriptors for a process, this doesn't seem acceptable
- *	to me.
+ *	it is only recently (as of 1993 or earlier) that UNIX OS's have taken
+ *	to allowing more than 20 or 32 file descriptors for a process, this
+ *	doesn't seem acceptable to me.
  *
  * 3)	record the mtime of the directory in the CachedDir structure and
  *	verify the directory hasn't changed since the contents were cached.
@@ -184,11 +184,11 @@ MAKE_RCSID("$NetBSD: dir.c,v 1.204 2020/
  *	resort to using stat in its place.
  *
  * An additional thing to consider is that pmake is used primarily to create
- * C programs and until recently pcc-based compilers refused to allow you to
- * specify where the resulting object file should be placed. This forced all
- * objects to be created in the current directory. This isn't meant as a full
- * excuse, just an explanation of some of the reasons for the caching used
- * here.
+ * C programs and until recently (as of 1993 or earlier) pcc-based compilers
+ * refused to allow you to specify where the resulting object file should be
+ * placed. This forced all objects to be created in the current directory.
+ * This isn't meant as a full excuse, just an explanation of some of the
+ * reasons for the caching used here.
  *
  * One more note: the location of a target's file is only performed on the
  * downward traversal of the graph and then only for terminal nodes in the



CVS commit: src/usr.bin/make

2020-11-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Nov 14 06:10:28 UTC 2020

Modified Files:
src/usr.bin/make: arch.c dir.c

Log Message:
make(1): fix typo in comments

This typo may have been influenced by all the '$' in the code.


To generate a diff of this commit:
cvs rdiff -u -r1.175 -r1.176 src/usr.bin/make/arch.c
cvs rdiff -u -r1.203 -r1.204 src/usr.bin/make/dir.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.175 src/usr.bin/make/arch.c:1.176
--- src/usr.bin/make/arch.c:1.175	Sun Nov  8 19:53:11 2020
+++ src/usr.bin/make/arch.c	Sat Nov 14 06:10:28 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: arch.c,v 1.175 2020/11/08 19:53:11 rillig Exp $	*/
+/*	$NetBSD: arch.c,v 1.176 2020/11/14 06:10:28 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -71,7 +71,7 @@
 /* Manipulate libraries, archives and their members.
  *
  * The first time an archive is referenced, all of its members' headers are
- * read and cashed and the archive closed again.  All cashed archives are kept
+ * read and cached and the archive closed again.  All cached archives are kept
  * on a list which is searched each time an archive member is referenced.
  *
  * The interface to this module is:
@@ -125,7 +125,7 @@
 #include "config.h"
 
 /*	"@(#)arch.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: arch.c,v 1.175 2020/11/08 19:53:11 rillig Exp $");
+MAKE_RCSID("$NetBSD: arch.c,v 1.176 2020/11/14 06:10:28 rillig Exp $");
 
 typedef struct List ArchList;
 typedef struct ListNode ArchListNode;

Index: src/usr.bin/make/dir.c
diff -u src/usr.bin/make/dir.c:1.203 src/usr.bin/make/dir.c:1.204
--- src/usr.bin/make/dir.c:1.203	Sat Nov 14 06:08:24 2020
+++ src/usr.bin/make/dir.c	Sat Nov 14 06:10:28 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: dir.c,v 1.203 2020/11/14 06:08:24 rillig Exp $	*/
+/*	$NetBSD: dir.c,v 1.204 2020/11/14 06:10:28 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -134,7 +134,7 @@
 #include "job.h"
 
 /*	"@(#)dir.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: dir.c,v 1.203 2020/11/14 06:08:24 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.204 2020/11/14 06:10:28 rillig Exp $");
 
 #define DIR_DEBUG0(text) DEBUG0(DIR, text)
 #define DIR_DEBUG1(fmt, arg1) DEBUG1(DIR, fmt, arg1)
@@ -276,7 +276,7 @@ OpenDirs_Remove(OpenDirs *odirs, const c
 static OpenDirs openDirs;	/* the list of all open directories */
 
 /*
- * Variables for gathering statistics on the efficiency of the cashing
+ * Variables for gathering statistics on the efficiency of the caching
  * mechanism.
  */
 static int hits;		/* Found in directory cache */



CVS commit: src/usr.bin/make

2020-11-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Nov 14 06:08:24 UTC 2020

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

Log Message:
make(1): flatten Dir_InitCur


To generate a diff of this commit:
cvs rdiff -u -r1.202 -r1.203 src/usr.bin/make/dir.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/dir.c
diff -u src/usr.bin/make/dir.c:1.202 src/usr.bin/make/dir.c:1.203
--- src/usr.bin/make/dir.c:1.202	Sun Nov  8 11:57:49 2020
+++ src/usr.bin/make/dir.c	Sat Nov 14 06:08:24 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: dir.c,v 1.202 2020/11/08 11:57:49 rillig Exp $	*/
+/*	$NetBSD: dir.c,v 1.203 2020/11/14 06:08:24 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -134,7 +134,7 @@
 #include "job.h"
 
 /*	"@(#)dir.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: dir.c,v 1.202 2020/11/08 11:57:49 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.203 2020/11/14 06:08:24 rillig Exp $");
 
 #define DIR_DEBUG0(text) DEBUG0(DIR, text)
 #define DIR_DEBUG1(fmt, arg1) DEBUG1(DIR, fmt, arg1)
@@ -417,23 +417,31 @@ Dir_InitCur(const char *cdname)
 {
 CachedDir *dir;
 
-if (cdname != NULL) {
+if (cdname == NULL)
+	return;
+
+/*
+ * Our build directory is not the same as our source directory.
+ * Keep this one around too.
+ */
+dir = Dir_AddDir(NULL, cdname);
+if (dir == NULL)
+	return;
+
+/* XXX: Reference counting is wrong here.
+ * If this function is called repeatedly with the same directory name,
+ * its reference count increases each time even though the number of
+ * actual references stays the same. */
+
+dir->refCount++;
+if (cur != NULL && cur != dir) {
 	/*
-	 * Our build directory is not the same as our source directory.
-	 * Keep this one around too.
+	 * We've been here before, clean up.
 	 */
-	if ((dir = Dir_AddDir(NULL, cdname))) {
-	dir->refCount++;
-	if (cur && cur != dir) {
-		/*
-		 * We've been here before, clean up.
-		 */
-		cur->refCount--;
-		Dir_Destroy(cur);
-	}
-	cur = dir;
-	}
+	cur->refCount--;
+	Dir_Destroy(cur);
 }
+cur = dir;
 }
 
 /* (Re)initialize "dot" (current/object directory) path hash.
@@ -1383,6 +1391,7 @@ Dir_AddDir(SearchPath *path, const char 
 if (path != NULL && strcmp(name, ".DOTLAST") == 0) {
 	SearchPathNode *ln;
 
+	/* XXX: Linear search gets slow with thousands of entries. */
 	for (ln = path->first; ln != NULL; ln = ln->next) {
 	CachedDir *pathDir = ln->datum;
 	if (strcmp(pathDir->name, name) == 0)



CVS commit: src/external/ofl

2020-11-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Nov 14 04:32:44 UTC 2020

Modified Files:
src/external/ofl: Makefile

Log Message:
also check MKX11FONTS before installing fonts.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/ofl/Makefile

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

Modified files:

Index: src/external/ofl/Makefile
diff -u src/external/ofl/Makefile:1.3 src/external/ofl/Makefile:1.4
--- src/external/ofl/Makefile:1.3	Fri Nov 13 09:56:53 2020
+++ src/external/ofl/Makefile	Sat Nov 14 04:32:44 2020
@@ -1,8 +1,8 @@
-#	$NetBSD: Makefile,v 1.3 2020/11/13 09:56:53 maya Exp $
+#	$NetBSD: Makefile,v 1.4 2020/11/14 04:32:44 mrg Exp $
 
 .include 
 
-.if ${MKX11} != "no"
+.if ${MKX11} != "no" && ${MKX11FONTS} != "no"
 SUBDIR+=	font-liberation-ttf
 .endif
 



CVS commit: src/sys/arch/algor

2020-11-13 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Nov 14 02:23:04 UTC 2020

Modified Files:
src/sys/arch/algor/algor: algor_p4032_intr.c algor_p5064_intr.c
algor_p6032_intr.c
src/sys/arch/algor/pci: pcib.c

Log Message:
malloc(9) -> kmem(9)


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/algor/algor/algor_p4032_intr.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/algor/algor/algor_p5064_intr.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/algor/algor/algor_p6032_intr.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/algor/pci/pcib.c

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

Modified files:

Index: src/sys/arch/algor/algor/algor_p4032_intr.c
diff -u src/sys/arch/algor/algor/algor_p4032_intr.c:1.26 src/sys/arch/algor/algor/algor_p4032_intr.c:1.27
--- src/sys/arch/algor/algor/algor_p4032_intr.c:1.26	Sun Nov 10 21:16:21 2019
+++ src/sys/arch/algor/algor/algor_p4032_intr.c	Sat Nov 14 02:23:04 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: algor_p4032_intr.c,v 1.26 2019/11/10 21:16:21 chs Exp $	*/
+/*	$NetBSD: algor_p4032_intr.c,v 1.27 2020/11/14 02:23:04 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: algor_p4032_intr.c,v 1.26 2019/11/10 21:16:21 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: algor_p4032_intr.c,v 1.27 2020/11/14 02:23:04 thorpej Exp $");
 
 #include "opt_ddb.h"
 #define	__INTR_PRIVATE
@@ -49,7 +49,7 @@ __KERNEL_RCSID(0, "$NetBSD: algor_p4032_
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 
@@ -352,7 +352,7 @@ algor_p4032_intr_establish(int irq, int 
 
 	KASSERT(irq == irqmap->irqidx);
 
-	ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK);
+	ih = kmem_alloc(sizeof(*ih), KM_SLEEP);
 	ih->ih_func = func;
 	ih->ih_arg = arg;
 	ih->ih_irq = 0;
@@ -408,7 +408,7 @@ algor_p4032_intr_disestablish(void *cook
 
 	splx(s);
 
-	free(ih, M_DEVBUF);
+	kmem_free(ih, sizeof(*ih));
 }
 
 void

Index: src/sys/arch/algor/algor/algor_p5064_intr.c
diff -u src/sys/arch/algor/algor/algor_p5064_intr.c:1.29 src/sys/arch/algor/algor/algor_p5064_intr.c:1.30
--- src/sys/arch/algor/algor/algor_p5064_intr.c:1.29	Sun Nov 10 21:16:21 2019
+++ src/sys/arch/algor/algor/algor_p5064_intr.c	Sat Nov 14 02:23:04 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: algor_p5064_intr.c,v 1.29 2019/11/10 21:16:21 chs Exp $	*/
+/*	$NetBSD: algor_p5064_intr.c,v 1.30 2020/11/14 02:23:04 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: algor_p5064_intr.c,v 1.29 2019/11/10 21:16:21 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: algor_p5064_intr.c,v 1.30 2020/11/14 02:23:04 thorpej Exp $");
 
 #include "opt_ddb.h"
 #define	__INTR_PRIVATE
@@ -49,7 +49,7 @@ __KERNEL_RCSID(0, "$NetBSD: algor_p5064_
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 
@@ -445,7 +445,7 @@ algor_p5064_intr_establish(int irq, int 
 
 	KASSERT(irq == irqmap->irqidx);
 
-	ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK);
+	ih = kmem_alloc(sizeof(*ih), KM_SLEEP);
 	ih->ih_func = func;
 	ih->ih_arg = arg;
 	ih->ih_irq = 0;
@@ -501,7 +501,7 @@ algor_p5064_intr_disestablish(void *cook
 
 	splx(s);
 
-	free(ih, M_DEVBUF);
+	kmem_free(ih, sizeof(*ih));
 }
 
 void

Index: src/sys/arch/algor/algor/algor_p6032_intr.c
diff -u src/sys/arch/algor/algor/algor_p6032_intr.c:1.23 src/sys/arch/algor/algor/algor_p6032_intr.c:1.24
--- src/sys/arch/algor/algor/algor_p6032_intr.c:1.23	Sun Nov 10 21:16:21 2019
+++ src/sys/arch/algor/algor/algor_p6032_intr.c	Sat Nov 14 02:23:04 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: algor_p6032_intr.c,v 1.23 2019/11/10 21:16:21 chs Exp $	*/
+/*	$NetBSD: algor_p6032_intr.c,v 1.24 2020/11/14 02:23:04 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: algor_p6032_intr.c,v 1.23 2019/11/10 21:16:21 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: algor_p6032_intr.c,v 1.24 2020/11/14 02:23:04 thorpej Exp $");
 
 #include "opt_ddb.h"
 #define	__INTR_PRIVATE
@@ -48,7 +48,7 @@ __KERNEL_RCSID(0, "$NetBSD: algor_p6032_
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 
@@ -313,7 +313,7 @@ algor_p6032_intr_establish(int irq, int 
 
 	KASSERT(irq == irqmap->irqidx);
 
-	ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK);
+	ih = kmem_alloc(sizeof(*ih), KM_SLEEP);
 	ih->ih_func = func;
 	ih->ih_arg = arg;
 	ih->ih_irq = 0;
@@ -365,7 +365,7 @@ algor_p6032_intr_disestablish(void *cook
 
 	splx(s);
 
-	free(ih, M_DEVBUF);
+	kmem_free(ih, sizeof(*ih));
 }
 
 void

Index: src/sys/arch/algor/pci/pcib.c
diff -u src/sys/arch/algor/pci/pcib.c:1.25 src/sys/arch/algor/pci/pcib.c:1.26
--- src/sys/arch/algor/pci/pcib.c:1.25	Sun Nov 10 21:16:22 2019
+++ src/sys/arch/algor/pci/pcib.c	Sat Nov 14 02:23:04 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcib.c,v 1.25 2019/11/10 21:16:22 chs Exp $	*/

CVS commit: src/usr.bin/make

2020-11-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Nov 13 19:45:24 UTC 2020

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

Log Message:
make(1): clean up preprocessor macros in InitVarMachine


To generate a diff of this commit:
cvs rdiff -u -r1.457 -r1.458 src/usr.bin/make/main.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/main.c
diff -u src/usr.bin/make/main.c:1.457 src/usr.bin/make/main.c:1.458
--- src/usr.bin/make/main.c:1.457	Fri Nov 13 08:21:37 2020
+++ src/usr.bin/make/main.c	Fri Nov 13 19:45:24 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.457 2020/11/13 08:21:37 rillig Exp $	*/
+/*	$NetBSD: main.c,v 1.458 2020/11/13 19:45:24 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
 #include "trace.h"
 
 /*	"@(#)main.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: main.c,v 1.457 2020/11/13 08:21:37 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.458 2020/11/13 19:45:24 rillig Exp $");
 #if defined(MAKE_NATIVE) && !defined(lint)
 __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
 	"The Regents of the University of California.  "
@@ -988,15 +988,13 @@ InitVarMachine(const struct utsname *uts
 	if (machine != NULL)
 		return machine;
 
-#ifdef MAKE_NATIVE
+#if defined(MAKE_NATIVE)
 	return utsname->machine;
-#else
-#ifdef MAKE_MACHINE
+#elif defined(MAKE_MACHINE)
 	return MAKE_MACHINE;
 #else
 	return "unknown";
 #endif
-#endif
 }
 
 static const char *



CVS commit: xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k

2020-11-13 Thread Izumi Tsutsui
Module Name:xsrc
Committed By:   tsutsui
Date:   Fri Nov 13 17:49:57 UTC 2020

Modified Files:
xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k: X68kConfig

Log Message:
Sync with xorg-server: Fix typo in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k/X68kConfig

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

Modified files:

Index: xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k/X68kConfig
diff -u xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k/X68kConfig:1.2 xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k/X68kConfig:1.3
--- xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k/X68kConfig:1.2	Thu Nov  5 16:06:08 2020
+++ xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k/X68kConfig	Fri Nov 13 17:49:57 2020
@@ -1,4 +1,4 @@
-;; $NetBSD: X68kConfig,v 1.2 2020/11/05 16:06:08 tsutsui Exp $
+;; $NetBSD: X68kConfig,v 1.3 2020/11/13 17:49:57 tsutsui Exp $
 ;;
 ;; X68kConfig: sample configuration for X68k
 ;; written by Yasushi Yamasaki
@@ -81,7 +81,7 @@
   105040)
 
 ;
-; 1024x762x4bit StaticGray
+; 1024x768x4bit StaticGray
 ; CRTC-R20 = 0x041a(1050) VIDEOC-R0 = 0x0004
 ;
 (ModeDef NeedsMultiScan Graphic 4 StaticGray  1024 768



CVS commit: xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k

2020-11-13 Thread Izumi Tsutsui
Module Name:xsrc
Committed By:   tsutsui
Date:   Fri Nov 13 17:45:05 UTC 2020

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k: X68kConfig

Log Message:
Fix typo in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/X68kConfig

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

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/X68kConfig
diff -u xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/X68kConfig:1.2 xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/X68kConfig:1.3
--- xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/X68kConfig:1.2	Tue Nov  3 15:27:45 2020
+++ xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/X68kConfig	Fri Nov 13 17:45:05 2020
@@ -1,4 +1,4 @@
-;; $NetBSD: X68kConfig,v 1.2 2020/11/03 15:27:45 tsutsui Exp $
+;; $NetBSD: X68kConfig,v 1.3 2020/11/13 17:45:05 tsutsui Exp $
 ;;
 ;; X68kConfig: sample configuration for X68k
 ;; written by Yasushi Yamasaki
@@ -81,7 +81,7 @@
   105040)
 
 ;
-; 1024x762x4bit StaticGray
+; 1024x768x4bit StaticGray
 ; CRTC-R20 = 0x041a(1050) VIDEOC-R0 = 0x0004
 ;
 (ModeDef NeedsMultiScan Graphic 4 StaticGray  1024 768



CVS commit: src/usr.sbin/sysinst

2020-11-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 13 17:39:06 UTC 2020

Modified Files:
src/usr.sbin/sysinst: Makefile.inc

Log Message:
Disable all entropy checks for now untill consensus has been found how
to properly deal with it.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/usr.sbin/sysinst/Makefile.inc

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

Modified files:

Index: src/usr.sbin/sysinst/Makefile.inc
diff -u src/usr.sbin/sysinst/Makefile.inc:1.37 src/usr.sbin/sysinst/Makefile.inc:1.38
--- src/usr.sbin/sysinst/Makefile.inc:1.37	Wed Nov  4 14:29:40 2020
+++ src/usr.sbin/sysinst/Makefile.inc	Fri Nov 13 17:39:06 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.37 2020/11/04 14:29:40 martin Exp $
+#	$NetBSD: Makefile.inc,v 1.38 2020/11/13 17:39:06 martin Exp $
 #
 # Makefile for sysinst
 
@@ -47,7 +47,7 @@ SRCS+=	mbr.c
 CPPFLAGS+=	-DNO_CLONES
 .endif
 
-.if ${CHECK_ENTROPY:Uyes} != "no"
+.if ${CHECK_ENTROPY:Uno} != "no"
 MENUS_MI+=	menus.entropy
 CPPFLAGS+=	-DCHECK_ENTROPY=1
 .endif
@@ -205,7 +205,7 @@ msgtouch: ${DISTRIBVERDEP}
 MSG_MD+=	msg.pm.${SYSINSTLANG}
 .endif
 
-.if ${CHECK_ENTROPY:Uyes} != "no"
+.if ${CHECK_ENTROPY:Uno} != "no"
 MSG_MD+=	msg.entropy.${SYSINSTLANG}
 .endif
 



CVS commit: src/distrib/sets/lists/tests

2020-11-13 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Fri Nov 13 17:19:06 UTC 2020

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Add new make unit-test


To generate a diff of this commit:
cvs rdiff -u -r1.967 -r1.968 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.967 src/distrib/sets/lists/tests/mi:1.968
--- src/distrib/sets/lists/tests/mi:1.967	Tue Nov 10 22:23:37 2020
+++ src/distrib/sets/lists/tests/mi	Fri Nov 13 17:19:06 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.967 2020/11/10 22:23:37 rillig Exp $
+# $NetBSD: mi,v 1.968 2020/11/13 17:19:06 sjg Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -5127,6 +5127,8 @@
 ./usr/tests/usr.bin/make/unit-tests/modts.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/modword.exp	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/modword.mk	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/objdir-writable.exptests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/objdir-writable.mktests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/opt-backwards.exptests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/opt-backwards.mktests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/opt-chdir.exptests-usr.bin-tests	compattestfile,atf



CVS commit: src/external/ofl

2020-11-13 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Fri Nov 13 09:56:53 UTC 2020

Modified Files:
src/external/ofl: Makefile

Log Message:
Needs bsd.own.mk for MKX11.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/ofl/Makefile

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

Modified files:

Index: src/external/ofl/Makefile
diff -u src/external/ofl/Makefile:1.2 src/external/ofl/Makefile:1.3
--- src/external/ofl/Makefile:1.2	Fri Nov 13 08:33:07 2020
+++ src/external/ofl/Makefile	Fri Nov 13 09:56:53 2020
@@ -1,4 +1,6 @@
-#	$NetBSD: Makefile,v 1.2 2020/11/13 08:33:07 maya Exp $
+#	$NetBSD: Makefile,v 1.3 2020/11/13 09:56:53 maya Exp $
+
+.include 
 
 .if ${MKX11} != "no"
 SUBDIR+=	font-liberation-ttf



CVS commit: src/lib/libossaudio

2020-11-13 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Fri Nov 13 09:02:39 UTC 2020

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

Log Message:
ossaudio(3): Clone some useful behaviour from the Solaris kernel

Both SNDCTL_DSP_SPEED and SNDCTL_DSP_CHANNELS support a special value
0 to "query the configured value without changing it". In our case,
this actually means setting and querying the hardware rate.

I don't know if OSSv3 or FreeBSD or other implementations also do this.
But it seems safe and sensible to support.


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

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

Modified files:

Index: src/lib/libossaudio/ossaudio.c
diff -u src/lib/libossaudio/ossaudio.c:1.63 src/lib/libossaudio/ossaudio.c:1.64
--- src/lib/libossaudio/ossaudio.c:1.63	Wed Nov  4 22:59:24 2020
+++ src/lib/libossaudio/ossaudio.c	Fri Nov 13 09:02:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ossaudio.c,v 1.63 2020/11/04 22:59:24 nia Exp $	*/
+/*	$NetBSD: ossaudio.c,v 1.64 2020/11/13 09:02:39 nia Exp $	*/
 
 /*-
  * Copyright (c) 1997, 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: ossaudio.c,v 1.63 2020/11/04 22:59:24 nia Exp $");
+__RCSID("$NetBSD: ossaudio.c,v 1.64 2020/11/13 09:02:39 nia Exp $");
 
 /*
  * This is an Open Sound System compatibility layer, which provides
@@ -184,7 +184,26 @@ audio_ioctl(int fd, unsigned long com, v
 		break;
 	case SNDCTL_DSP_SPEED:
 		AUDIO_INITINFO();
-		/* Conform to kernel limits. */
+		/*
+		 * In Solaris, 0 is used a special value to query the
+		 * current rate. This seems useful to support.
+		 */
+		if (INTARG == 0) {
+			retval = ioctl(fd, AUDIO_GETBUFINFO, );
+			if (retval < 0)
+return retval;
+			retval = ioctl(fd, AUDIO_GETFORMAT, );
+			if (retval < 0)
+return retval;
+			INTARG = (tmpinfo.mode == AUMODE_RECORD) ?
+			hwfmt.record.sample_rate :
+			hwfmt.play.sample_rate;
+		}
+		/*
+		 * Conform to kernel limits.
+		 * NetBSD will reject unsupported sample rates, but OSS
+		 * applications need to be able to negotiate a supported one.
+		 */
 		if (INTARG < 1000)
 			INTARG = 1000;
 		if (INTARG > 192000)
@@ -1708,6 +1727,8 @@ setvol(int fd, int volume, bool record)
  * case an application is abusing SNDCTL_DSP_CHANNELS - OSSv4 always sets and
  * returns a reasonable value, even if it wasn't what the user requested.
  *
+ * Solaris guarantees this behaviour if nchannels = 0.
+ *
  * XXX: If a device is opened for both playback and recording, and supports
  * fewer channels for recording than playback, applications that do both will
  * behave very strangely. OSS doesn't allow for reporting separate channel



CVS commit: src/usr.bin/make

2020-11-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Nov 13 09:01:59 UTC 2020

Modified Files:
src/usr.bin/make: cond.c
src/usr.bin/make/unit-tests: directive-else.exp directive-else.mk
objdir-writable.mk

Log Message:
make(1): in lint mode, check for ".else "


To generate a diff of this commit:
cvs rdiff -u -r1.213 -r1.214 src/usr.bin/make/cond.c
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/directive-else.exp \
src/usr.bin/make/unit-tests/objdir-writable.mk
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/directive-else.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/cond.c
diff -u src/usr.bin/make/cond.c:1.213 src/usr.bin/make/cond.c:1.214
--- src/usr.bin/make/cond.c:1.213	Fri Nov 13 07:52:03 2020
+++ src/usr.bin/make/cond.c	Fri Nov 13 09:01:59 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cond.c,v 1.213 2020/11/13 07:52:03 rillig Exp $	*/
+/*	$NetBSD: cond.c,v 1.214 2020/11/13 09:01:59 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -94,7 +94,7 @@
 #include "dir.h"
 
 /*	"@(#)cond.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: cond.c,v 1.213 2020/11/13 07:52:03 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.214 2020/11/13 09:01:59 rillig Exp $");
 
 /*
  * The parsing of conditional expressions is based on this grammar:
@@ -1151,7 +1151,9 @@ Cond_EvalLine(const char *const line)
 	p += 2;
 	if (is_token(p, "se", 2)) {	/* It is an 'else'. */
 
-	/* TODO: check for extraneous  */
+	if (opts.lint && p[2] != '\0')
+		Parse_Error(PARSE_FATAL,
+			"The .else directive does not take arguments.");
 
 	if (cond_depth == cond_min_depth) {
 		Parse_Error(PARSE_FATAL, "if-less else");

Index: src/usr.bin/make/unit-tests/directive-else.exp
diff -u src/usr.bin/make/unit-tests/directive-else.exp:1.2 src/usr.bin/make/unit-tests/directive-else.exp:1.3
--- src/usr.bin/make/unit-tests/directive-else.exp:1.2	Sat Aug 29 18:50:25 2020
+++ src/usr.bin/make/unit-tests/directive-else.exp	Fri Nov 13 09:01:59 2020
@@ -1,8 +1,11 @@
-make: "directive-else.mk" line 10: ok
-make: "directive-else.mk" line 14: ok
-make: "directive-else.mk" line 20: if-less else
-make: "directive-else.mk" line 26: ok
-make: "directive-else.mk" line 27: warning: extra else
+make: "directive-else.mk" line 11: The .else directive does not take arguments.
+make: "directive-else.mk" line 12: ok
+make: "directive-else.mk" line 16: ok
+make: "directive-else.mk" line 17: The .else directive does not take arguments.
+make: "directive-else.mk" line 22: if-less else
+make: "directive-else.mk" line 28: ok
+make: "directive-else.mk" line 29: warning: extra else
+make: "directive-else.mk" line 42: The .else directive does not take arguments.
 make: Fatal errors encountered -- cannot continue
 make: stopped in unit-tests
 exit status 1
Index: src/usr.bin/make/unit-tests/objdir-writable.mk
diff -u src/usr.bin/make/unit-tests/objdir-writable.mk:1.2 src/usr.bin/make/unit-tests/objdir-writable.mk:1.3
--- src/usr.bin/make/unit-tests/objdir-writable.mk:1.2	Thu Nov 12 23:53:17 2020
+++ src/usr.bin/make/unit-tests/objdir-writable.mk	Fri Nov 13 09:01:59 2020
@@ -1,4 +1,4 @@
-# $NetBSD: objdir-writable.mk,v 1.2 2020/11/12 23:53:17 sjg Exp $
+# $NetBSD: objdir-writable.mk,v 1.3 2020/11/13 09:01:59 rillig Exp $
 
 # test checking for writable objdir
 
@@ -22,6 +22,6 @@ ro-objdir:
 	@MAKEOBJDIR=${RO_OBJDIR} ${.MAKE} -r -f /dev/null -C /tmp -V .OBJDIR MAKE_OBJDIR_CHECK_WRITABLE=no
 
 explicit-objdir:
-	@MAKEOBJDIR=/tmp ${.MAKE} -r -f ${MAKEFILE} -C /tmp do-objdir -V .OBJDIR
+	@MAKEOBJDIR=/tmp ${.MAKE} -r -f ${MAKEFILE:tA} -C /tmp do-objdir -V .OBJDIR
 .endif
 

Index: src/usr.bin/make/unit-tests/directive-else.mk
diff -u src/usr.bin/make/unit-tests/directive-else.mk:1.5 src/usr.bin/make/unit-tests/directive-else.mk:1.6
--- src/usr.bin/make/unit-tests/directive-else.mk:1.5	Fri Nov 13 08:35:34 2020
+++ src/usr.bin/make/unit-tests/directive-else.mk	Fri Nov 13 09:01:59 2020
@@ -1,7 +1,9 @@
-# $NetBSD: directive-else.mk,v 1.5 2020/11/13 08:35:34 rillig Exp $
+# $NetBSD: directive-else.mk,v 1.6 2020/11/13 09:01:59 rillig Exp $
 #
 # Tests for the .else directive.
 
+.MAKEFLAGS: -dL			# To enable the check for ".else "
+
 # The .else directive does not take any arguments.
 # As of 2020-08-29, make doesn't warn about this.
 .if 0



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

2020-11-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Nov 13 08:35:34 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: directive-else.mk

Log Message:
make(1): add more tests for parsing .else with argument


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/directive-else.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/directive-else.mk
diff -u src/usr.bin/make/unit-tests/directive-else.mk:1.4 src/usr.bin/make/unit-tests/directive-else.mk:1.5
--- src/usr.bin/make/unit-tests/directive-else.mk:1.4	Sat Oct 24 08:46:08 2020
+++ src/usr.bin/make/unit-tests/directive-else.mk	Fri Nov 13 08:35:34 2020
@@ -1,4 +1,4 @@
-# $NetBSD: directive-else.mk,v 1.4 2020/10/24 08:46:08 rillig Exp $
+# $NetBSD: directive-else.mk,v 1.5 2020/11/13 08:35:34 rillig Exp $
 #
 # Tests for the .else directive.
 
@@ -28,5 +28,17 @@
 .  info After an extra .else, everything is skipped.
 .endif
 
+# An .else may have a comment.  This comment does not count as an argument,
+# therefore no parse error.
+.if 0
+.else # comment
+.endif
+
+# A variable expression does count as an argument, even if it is empty.
+# XXX: This should be a parse error.
+.if 0
+.else ${:U}
+.endif
+
 all:
 	@:;



CVS commit: src/external/ofl

2020-11-13 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Fri Nov 13 08:33:07 UTC 2020

Modified Files:
src/external/ofl: Makefile

Log Message:
add rcsid, make font conditional on MKX11.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/ofl/Makefile

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

Modified files:

Index: src/external/ofl/Makefile
diff -u src/external/ofl/Makefile:1.1 src/external/ofl/Makefile:1.2
--- src/external/ofl/Makefile:1.1	Thu Nov 12 22:28:02 2020
+++ src/external/ofl/Makefile	Fri Nov 13 08:33:07 2020
@@ -1,3 +1,7 @@
+#	$NetBSD: Makefile,v 1.2 2020/11/13 08:33:07 maya Exp $
+
+.if ${MKX11} != "no"
 SUBDIR+=	font-liberation-ttf
+.endif
 
 .include 



CVS commit: src/usr.bin/make

2020-11-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Nov 13 08:21:37 UTC 2020

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

Log Message:
make(1): flatten #ifdef in InitVarMachineArch

Without proper indentation, that chain of nested #ifndef directives was
really hard to read.


To generate a diff of this commit:
cvs rdiff -u -r1.456 -r1.457 src/usr.bin/make/main.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/main.c
diff -u src/usr.bin/make/main.c:1.456 src/usr.bin/make/main.c:1.457
--- src/usr.bin/make/main.c:1.456	Thu Nov 12 23:35:21 2020
+++ src/usr.bin/make/main.c	Fri Nov 13 08:21:37 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.456 2020/11/12 23:35:21 sjg Exp $	*/
+/*	$NetBSD: main.c,v 1.457 2020/11/13 08:21:37 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
 #include "trace.h"
 
 /*	"@(#)main.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: main.c,v 1.456 2020/11/12 23:35:21 sjg Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.457 2020/11/13 08:21:37 rillig Exp $");
 #if defined(MAKE_NATIVE) && !defined(lint)
 __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
 	"The Regents of the University of California.  "
@@ -1022,17 +1022,13 @@ InitVarMachineArch(void)
 
 		return machine_arch_buf;
 	}
-#else
-#ifndef MACHINE_ARCH
-#ifdef MAKE_MACHINE_ARCH
+#elif defined(MACHINE_ARCH)
+	return MACHINE_ARCH;
+#elif defined(MAKE_MACHINE_ARCH)
 	return MAKE_MACHINE_ARCH;
 #else
 	return "unknown";
 #endif
-#else
-	return MACHINE_ARCH;
-#endif
-#endif
 }
 
 #ifndef NO_PWD_OVERRIDE