CVS commit: src/sys/dev/sysmon

2020-10-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Oct 30 22:19:19 UTC 2020

Modified Files:
src/sys/dev/sysmon: sysmon_power.c

Log Message:
fix indentation


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/dev/sysmon/sysmon_power.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/sysmon/sysmon_power.c
diff -u src/sys/dev/sysmon/sysmon_power.c:1.64 src/sys/dev/sysmon/sysmon_power.c:1.65
--- src/sys/dev/sysmon/sysmon_power.c:1.64	Wed Jun 10 22:39:31 2020
+++ src/sys/dev/sysmon/sysmon_power.c	Fri Oct 30 18:19:18 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysmon_power.c,v 1.64 2020/06/11 02:39:31 thorpej Exp $	*/
+/*	$NetBSD: sysmon_power.c,v 1.65 2020/10/30 22:19:18 christos Exp $	*/
 
 /*-
  * Copyright (c) 2007 Juan Romero Pardines.
@@ -69,7 +69,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.64 2020/06/11 02:39:31 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.65 2020/10/30 22:19:18 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -555,17 +555,17 @@ filt_sysmon_power_read(struct knote *kn,
 }
 
 static const struct filterops sysmon_power_read_filtops = {
-.f_isfd = 1,
-.f_attach = NULL,
-.f_detach = filt_sysmon_power_rdetach,
-.f_event = filt_sysmon_power_read,
+	.f_isfd = 1,
+	.f_attach = NULL,
+	.f_detach = filt_sysmon_power_rdetach,
+	.f_event = filt_sysmon_power_read,
 };
 
 static const struct filterops sysmon_power_write_filtops = {
-.f_isfd = 1,
-.f_attach = NULL,
-.f_detach = filt_sysmon_power_rdetach,
-.f_event = filt_seltrue,
+	.f_isfd = 1,
+	.f_attach = NULL,
+	.f_detach = filt_sysmon_power_rdetach,
+	.f_event = filt_seltrue,
 };
 
 /*



CVS commit: src/sys/kern

2020-10-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Oct 30 22:19:00 UTC 2020

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

Log Message:
fix indentation


To generate a diff of this commit:
cvs rdiff -u -r1.393 -r1.394 src/sys/kern/kern_sig.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/kern_sig.c
diff -u src/sys/kern/kern_sig.c:1.393 src/sys/kern/kern_sig.c:1.394
--- src/sys/kern/kern_sig.c:1.393	Mon Oct 26 13:35:39 2020
+++ src/sys/kern/kern_sig.c	Fri Oct 30 18:19:00 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sig.c,v 1.393 2020/10/26 17:35:39 christos Exp $	*/
+/*	$NetBSD: kern_sig.c,v 1.394 2020/10/30 22:19:00 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008, 2019 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.393 2020/10/26 17:35:39 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.394 2020/10/30 22:19:00 christos Exp $");
 
 #include "opt_execfmt.h"
 #include "opt_ptrace.h"
@@ -2682,8 +2682,8 @@ filt_signal(struct knote *kn, long hint)
 }
 
 const struct filterops sig_filtops = {
-		.f_isfd = 0,
-		.f_attach = filt_sigattach,
-		.f_detach = filt_sigdetach,
-		.f_event = filt_signal,
+	.f_isfd = 0,
+	.f_attach = filt_sigattach,
+	.f_detach = filt_sigdetach,
+	.f_event = filt_signal,
 };



CVS commit: src/sys/arch

2020-10-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Oct 30 22:20:38 UTC 2020

Modified Files:
src/sys/arch/arm/xscale: pxa2x0_apm.c
src/sys/arch/macppc/dev: apm.c
src/sys/arch/mips/ralink: ralink_gpio.c

Log Message:
c99 struct initializers


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/xscale/pxa2x0_apm.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/macppc/dev/apm.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/ralink/ralink_gpio.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/arm/xscale/pxa2x0_apm.c
diff -u src/sys/arch/arm/xscale/pxa2x0_apm.c:1.4 src/sys/arch/arm/xscale/pxa2x0_apm.c:1.5
--- src/sys/arch/arm/xscale/pxa2x0_apm.c:1.4	Mon Nov 12 13:00:38 2012
+++ src/sys/arch/arm/xscale/pxa2x0_apm.c	Fri Oct 30 18:20:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pxa2x0_apm.c,v 1.4 2012/11/12 18:00:38 skrll Exp $	*/
+/*	$NetBSD: pxa2x0_apm.c,v 1.5 2020/10/30 22:20:38 christos Exp $	*/
 /*	$OpenBSD: pxa2x0_apm.c,v 1.28 2007/03/29 18:42:38 uwe Exp $	*/
 
 /*-
@@ -104,8 +104,12 @@ void	filt_apmrdetach(struct knote *kn);
 int	filt_apmread(struct knote *kn, long hint);
 int	apmkqfilter(dev_t dev, struct knote *kn);
 
-struct filterops apmread_filtops =
-	{ 1, NULL, filt_apmrdetach, filt_apmread};
+static const struct filterops apmread_filtops = {
+	.f_isfd = 1,
+	.f_attach = NULL,
+	.f_detach = filt_apmrdetach,
+	.f_event = filt_apmread,
+};
 #endif
 
 /*

Index: src/sys/arch/macppc/dev/apm.c
diff -u src/sys/arch/macppc/dev/apm.c:1.27 src/sys/arch/macppc/dev/apm.c:1.28
--- src/sys/arch/macppc/dev/apm.c:1.27	Fri Jul 25 04:10:34 2014
+++ src/sys/arch/macppc/dev/apm.c	Fri Oct 30 18:20:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: apm.c,v 1.27 2014/07/25 08:10:34 dholland Exp $	*/
+/*	$NetBSD: apm.c,v 1.28 2020/10/30 22:20:38 christos Exp $	*/
 /*	$OpenBSD: apm.c,v 1.5 2002/06/07 07:13:59 miod Exp $	*/
 
 /*-
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.27 2014/07/25 08:10:34 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.28 2020/10/30 22:20:38 christos Exp $");
 
 #include "apm.h"
 
@@ -431,8 +431,12 @@ filt_apmread(struct knote *kn, long hint
 	return (kn->kn_data > 0);
 }
 
-static struct filterops apmread_filtops =
-	{ 1, NULL, filt_apmrdetach, filt_apmread};
+static struct filterops apmread_filtops = {
+	.f_isfd = 1,
+	.f_attach = NULL,
+	.f_detach = filt_apmrdetach,
+	.f_event = filt_apmread,
+};
 
 int
 apmkqfilter(dev_t dev, struct knote *kn)

Index: src/sys/arch/mips/ralink/ralink_gpio.c
diff -u src/sys/arch/mips/ralink/ralink_gpio.c:1.8 src/sys/arch/mips/ralink/ralink_gpio.c:1.9
--- src/sys/arch/mips/ralink/ralink_gpio.c:1.8	Tue Mar 10 07:07:39 2020
+++ src/sys/arch/mips/ralink/ralink_gpio.c	Fri Oct 30 18:20:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ralink_gpio.c,v 1.8 2020/03/10 11:07:39 martin Exp $	*/
+/*	$NetBSD: ralink_gpio.c,v 1.9 2020/10/30 22:20:38 christos Exp $	*/
 /*-
  * Copyright (c) 2011 CradlePoint Technology, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
 /* ra_gpio.c -- Ralink 3052 gpio driver */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ralink_gpio.c,v 1.8 2020/03/10 11:07:39 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ralink_gpio.c,v 1.9 2020/10/30 22:20:38 christos Exp $");
 
 #include 
 #include 
@@ -495,10 +495,10 @@ static int  gpio_event_app_user_event(st
 static struct klist knotes;
 static int app_filter_id;
 static struct filterops app_fops = {
-	0,
-	gpio_event_app_user_attach,
-	gpio_event_app_user_detach,
-	gpio_event_app_user_event
+	.f_isfd = 0,
+	.f_attach = gpio_event_app_user_attach,
+	.f_detach = gpio_event_app_user_detach,
+	.f_event = gpio_event_app_user_event,
 };
 static struct callout led_tick_callout;
 static int gpio_driver_blink_leds = 1;



CVS commit: src/sys/net

2020-10-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Oct 30 22:51:08 UTC 2020

Modified Files:
src/sys/net: if_tap.c

Log Message:
use c99 initializers


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/sys/net/if_tap.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/net/if_tap.c
diff -u src/sys/net/if_tap.c:1.119 src/sys/net/if_tap.c:1.120
--- src/sys/net/if_tap.c:1.119	Sun Sep 27 09:44:47 2020
+++ src/sys/net/if_tap.c	Fri Oct 30 18:51:08 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_tap.c,v 1.119 2020/09/27 13:44:47 roy Exp $	*/
+/*	$NetBSD: if_tap.c,v 1.120 2020/10/30 22:51:08 christos Exp $	*/
 
 /*
  *  Copyright (c) 2003, 2004, 2008, 2009 The NetBSD Foundation.
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.119 2020/09/27 13:44:47 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.120 2020/10/30 22:51:08 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 
@@ -1176,10 +1176,19 @@ tap_dev_poll(int unit, int events, struc
 	return revents;
 }
 
-static struct filterops tap_read_filterops = { 1, NULL, tap_kqdetach,
-	tap_kqread };
-static struct filterops tap_seltrue_filterops = { 1, NULL, tap_kqdetach,
-	filt_seltrue };
+static struct filterops tap_read_filterops = {
+	.f_isfd = 1,
+	.f_attach = NULL,
+	.f_detach = tap_kqdetach,
+	.f_event = tap_kqread,
+};
+
+static struct filterops tap_seltrue_filterops = {
+	.f_isfd = 1,
+	.f_attach = NULL,
+	.f_detach = tap_kqdetach,
+	.f_event = filt_seltrue,
+};
 
 static int
 tap_cdev_kqfilter(dev_t dev, struct knote *kn)



CVS commit: src

2020-10-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 31 01:08:32 UTC 2020

Modified Files:
src/lib/libc/sys: kqueue.2
src/sys/kern: kern_event.c
src/sys/sys: event.h
src/tests/lib/libc/sys: t_kevent.c

Log Message:
PR/55663: Ruslan Nikolaev: Add support for EVFILT_USER in kqueue(2)


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/lib/libc/sys/kqueue.2
cvs rdiff -u -r1.107 -r1.108 src/sys/kern/kern_event.c
cvs rdiff -u -r1.38 -r1.39 src/sys/sys/event.h
cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libc/sys/t_kevent.c

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

Modified files:

Index: src/lib/libc/sys/kqueue.2
diff -u src/lib/libc/sys/kqueue.2:1.50 src/lib/libc/sys/kqueue.2:1.51
--- src/lib/libc/sys/kqueue.2:1.50	Sun Dec 22 20:46:09 2019
+++ src/lib/libc/sys/kqueue.2	Fri Oct 30 21:08:31 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: kqueue.2,v 1.50 2019/12/23 01:46:09 kamil Exp $
+.\"	$NetBSD: kqueue.2,v 1.51 2020/10/31 01:08:31 christos Exp $
 .\"
 .\" Copyright (c) 2000 Jonathan Lemon
 .\" All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\" $FreeBSD: src/lib/libc/sys/kqueue.2,v 1.22 2001/06/27 19:55:57 dd Exp $
 .\"
-.Dd December 22, 2019
+.Dd October 30, 2020
 .Dt KQUEUE 2
 .Os
 .Sh NAME
@@ -54,7 +54,9 @@
 .Fn kevent "int kq" "const struct kevent *changelist" "size_t nchanges" "struct kevent *eventlist" "size_t nevents" "const struct timespec *timeout"
 .Fn EV_SET "&kev" ident filter flags fflags data udata
 .Sh DESCRIPTION
+The
 .Fn kqueue
+system call
 provides a generic method of notifying the user when an event
 happens or a condition holds, based on the results of small
 pieces of kernel code termed filters.
@@ -80,12 +82,14 @@ Calling
 .Xr close 2
 on a file descriptor will remove any kevents that reference the descriptor.
 .Pp
+The
 .Fn kqueue
+system call
 creates a new kernel event queue and returns a descriptor.
 .Pp
 The
 .Fn kqueue1
-function also allows to set the following
+system call also allows to set the following
 .Fa flags
 on the returned file descriptor:
 .Bl -column O_NONBLOCK -offset indent
@@ -109,10 +113,14 @@ The queue is not inherited by a child cr
 .\" flag, then the descriptor table is shared,
 .\" which will allow sharing of the kqueue between two processes.
 .Pp
+The
 .Fn kevent
+system call
 is used to register events with the queue, and return any pending
 events to the user.
+The
 .Fa changelist
+argument
 is a pointer to an array of
 .Va kevent
 structures, as defined in
@@ -120,14 +128,28 @@ structures, as defined in
 All changes contained in the
 .Fa changelist
 are applied before any pending events are read from the queue.
+The
 .Fa nchanges
+argument
 gives the size of
 .Fa changelist .
+The
 .Fa eventlist
+argument
 is a pointer to an array of kevent structures.
+The 
 .Fa nevents
+argument
 determines the size of
 .Fa eventlist .
+When
+.Fa nevents
+is zero,
+.Fn kevent
+will return immediately even if there is a
+.Fa timeout
+specified unlike
+.Xr select 2 .
 If
 .Fa timeout
 is a
@@ -154,8 +176,9 @@ The same array may be used for the
 and
 .Fa eventlist .
 .Pp
+The
 .Fn EV_SET
-is a macro which is provided for ease of initializing a kevent structure.
+macro is provided for ease of initializing a kevent structure.
 This macro does not evaluate its parameters multiple times.
 .Pp
 The
@@ -175,22 +198,22 @@ struct kevent {
 The fields of
 .Fa struct kevent
 are:
-.Bl -tag -width XXXfilter -offset indent
+.Bl -tag -width "Fa filter" -offset indent
 .It ident
 Value used to identify this event.
 The exact interpretation is determined by the attached filter,
 but often is a file descriptor.
-.It filter
+.It Fa filter
 Identifies the kernel filter used to process this event.
 There are pre-defined system filters (which are described below), and
 other filters may be added by kernel subsystems as necessary.
-.It flags
+.It Fa flags
 Actions to perform on the event.
-.It fflags
+.It Fa fflags
 Filter-specific flags.
-.It data
+.It Fa data
 Filter-specific data value.
-.It udata
+.It Fa udata
 Opaque user-defined value passed through the kernel unchanged.
 .El
 .Pp
@@ -231,6 +254,11 @@ to always be returned.
 When a filter is successfully added the
 .Va data
 field will be zero.
+Note that if this flag is encountered and there is no remaining space in
+.Fa eventlist
+to hold the
+.Dv EV_ERROR
+event, then subsequent changes will not get processed.
 .It Dv EV_ONESHOT
 Causes the event to return only the first occurrence of the filter
 being triggered.
@@ -289,6 +317,7 @@ struct kfilter_mapping {
 };
 .Ed
 .Pp
+The predefined system filters are listed below.
 Arguments may be passed to and from the filter via the
 .Va fflags
 and
@@ -339,6 +368,14 @@ Returns when the file pointer is not at 
 .Va data
 contains the offset from current position to end of file,
 and may be negative.
+.\" .Pp
+.\" This behavior is different from
+.\" .Xr poll 2 ,
+.\" where read eve

CVS commit: src/lib/libc/sys

2020-10-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 31 14:35:28 UTC 2020

Modified Files:
src/lib/libc/sys: kqueue.2

Log Message:
add missing sentence.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/lib/libc/sys/kqueue.2

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/sys/kqueue.2
diff -u src/lib/libc/sys/kqueue.2:1.52 src/lib/libc/sys/kqueue.2:1.53
--- src/lib/libc/sys/kqueue.2:1.52	Sat Oct 31 06:51:59 2020
+++ src/lib/libc/sys/kqueue.2	Sat Oct 31 10:35:28 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: kqueue.2,v 1.52 2020/10/31 10:51:59 wiz Exp $
+.\"	$NetBSD: kqueue.2,v 1.53 2020/10/31 14:35:28 christos Exp $
 .\"
 .\" Copyright (c) 2000 Jonathan Lemon
 .\" All rights reserved.
@@ -392,6 +392,7 @@ when the BPF has
 .Dq immediate mode
 enabled and there is any data to read;
 .Va data
+contains the number of bytes available.
 .El
 .It Dv EVFILT_WRITE
 Takes a descriptor as the identifier, and returns whenever



CVS commit: src/sys/sys

2020-10-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 31 14:55:53 UTC 2020

Modified Files:
src/sys/sys: event.h

Log Message:
Add an array of filter names.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/sys/event.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/sys/event.h
diff -u src/sys/sys/event.h:1.39 src/sys/sys/event.h:1.40
--- src/sys/sys/event.h:1.39	Fri Oct 30 21:08:32 2020
+++ src/sys/sys/event.h	Sat Oct 31 10:55:52 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: event.h,v 1.39 2020/10/31 01:08:32 christos Exp $	*/
+/*	$NetBSD: event.h,v 1.40 2020/10/31 14:55:52 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999,2000,2001 Jonathan Lemon 
@@ -47,6 +47,20 @@
 #define	EVFILT_USER		8U	/* user events */
 #define	EVFILT_SYSCOUNT		9U	/* number of filters */
 
+#ifdef EVFILT_NAMES
+static const char *evfiltnames[] = {
+	"EVFILT_READ",
+	"EVFILT_WRITE",
+	"EVFILT_AIO",
+	"EVFILT_VNODE",
+	"EVFILT_PROC",
+	"EVFILT_SIGNAL",
+	"EVFILT_TIMER",
+	"EVFILT_FS",
+	"EVFILT_USER",
+};
+#endif
+
 struct kevent {
 	uintptr_t	ident;		/* identifier for this event */
 	uint32_t	filter;		/* filter for event */



CVS commit: src/tests/kernel/kqueue

2020-10-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 31 14:57:02 UTC 2020

Modified Files:
src/tests/kernel/kqueue: t_ioctl.c

Log Message:
Avoid hard-coding names and limits so this will not break again.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/kernel/kqueue/t_ioctl.c

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

Modified files:

Index: src/tests/kernel/kqueue/t_ioctl.c
diff -u src/tests/kernel/kqueue/t_ioctl.c:1.4 src/tests/kernel/kqueue/t_ioctl.c:1.5
--- src/tests/kernel/kqueue/t_ioctl.c:1.4	Tue Jan  9 12:35:29 2018
+++ src/tests/kernel/kqueue/t_ioctl.c	Sat Oct 31 10:57:02 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ioctl.c,v 1.4 2018/01/09 17:35:29 martin Exp $ */
+/* $NetBSD: t_ioctl.c,v 1.5 2020/10/31 14:57:02 christos Exp $ */
 
 /*-
  * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -32,8 +32,9 @@
 #include 
 __COPYRIGHT("@(#) Copyright (c) 2008\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_ioctl.c,v 1.4 2018/01/09 17:35:29 martin Exp $");
+__RCSID("$NetBSD: t_ioctl.c,v 1.5 2020/10/31 14:57:02 christos Exp $");
 
+#define EVFILT_NAMES
 #include 
 #include 
 
@@ -61,13 +62,13 @@ ATF_TC_BODY(kfilter_byfilter, tc)
 	km.name = buf;
 	km.len = sizeof(buf) - 1;
 
-	for (i = 0; i < 8; ++i) {
+	for (i = 0; i < EVFILT_SYSCOUNT; ++i) {
 		km.filter = i;
 		RL(ioctl(kq, KFILTER_BYFILTER, &km));
 		(void)printf("  map %d -> %s\n", km.filter, km.name);
 	}
 
-	km.filter = 8;
+	km.filter = EVFILT_SYSCOUNT;
 	ATF_REQUIRE_EQ(ioctl(kq, KFILTER_BYFILTER, &km), -1);
 }
 
@@ -78,28 +79,16 @@ ATF_TC_HEAD(kfilter_byname, tc)
 }
 ATF_TC_BODY(kfilter_byname, tc)
 {
-	const char *tests[] = {
-		"EVFILT_READ",
-		"EVFILT_WRITE",
-		"EVFILT_AIO",
-		"EVFILT_VNODE",
-		"EVFILT_PROC",
-		"EVFILT_SIGNAL",
-		"EVFILT_TIMER",
-		"EVFILT_FS",
-		NULL
-	};
 	char buf[32];
 	struct kfilter_mapping km;
-	const char **test;
 	int kq;
 
 	RL(kq = kqueue());
 
 	km.name = buf;
 
-	for (test = &tests[0]; *test != NULL; ++test) {
-		(void)strlcpy(buf, *test, sizeof(buf));
+	for (size_t i = 0; i < EVFILT_SYSCOUNT; i++) {
+		(void)strlcpy(buf, evfiltnames[i], sizeof(buf));
 		RL(ioctl(kq, KFILTER_BYNAME, &km));
 		(void)printf("  map %s -> %d\n", km.name, km.filter);
 	}



CVS commit: src/share/man/man9

2020-10-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 31 16:03:01 UTC 2020

Modified Files:
src/share/man/man9: kfilter_register.9

Log Message:
document f_touch


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man9/kfilter_register.9

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/man9/kfilter_register.9
diff -u src/share/man/man9/kfilter_register.9:1.10 src/share/man/man9/kfilter_register.9:1.11
--- src/share/man/man9/kfilter_register.9:1.10	Wed Apr 30 09:10:58 2008
+++ src/share/man/man9/kfilter_register.9	Sat Oct 31 12:03:01 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: kfilter_register.9,v 1.10 2008/04/30 13:10:58 martin Exp $
+.\"	$NetBSD: kfilter_register.9,v 1.11 2020/10/31 16:03:01 christos Exp $
 .\"
 .\" Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 23, 2002
+.Dd October 31, 2020
 .Dt KFILTER_REGISTER 9
 .Os
 .Sh NAME
@@ -97,6 +97,11 @@ struct filterops {
 /* called when knote is DELETEd */
 	int	(*f_event)(struct knote *kn, long hint);
 /* called when event is triggered */
+	void	(*f_touch)(struct knote *kn, struct kevent *kev, long hint);
+/* called during registration and event 
+ * processing to provide custom handling 
+ * of event fflags and data
+ */
 };
 .Ed
 .Pp



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

2020-11-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov  1 14:52:03 UTC 2020

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

Log Message:
CHANGED FROM 3.1b TO 3.1c

* Do not write after the end of the array and overwrite the stack when
  colon-separated SGR sequences contain empty arguments.

CHANGES FROM 3.1a TO 3.1b

* Fix build on systems without sys/queue.h.

* Fix crash when allow-rename is on and an empty name is set.

CHANGES FROM 3.1 TO 3.1a

* Do not close stdout prematurely in control mode since it is needed to print
  exit messages. Prevents hanging when detaching with iTerm2.

CHANGES FROM 3.0a TO 3.1

* Only search the visible part of the history when marking (highlighting)
  search terms. This is much faster than searching the whole history and solves
  problems with large histories. The count of matches shown is now the visible
  matches rather than all matches.

* Search using regular expressions in copy mode. search-forward and
  search-backward use regular expressions by default; the incremental versions
  do not.

* Turn off mouse mode 1003 as well as the rest when exiting.

* Add selection_active format for when the selection is present but not moving
  with the cursor.

* Fix dragging with modifier keys, so binding keys such as C-MouseDrag1Pane and
  C-MouseDragEnd1Pane now work.

* Add -a to list-keys to also list keys without notes with -N.

* Do not jump to next word end if already on a word end when selecting a word;
  fixes select-word with single character words and vi(1) keys.

* Fix top and bottom pane calculation with pane border status enabled.

* Add support for adding a note to a key binding (with bind-key -N) and use
  this to add descriptions to the default key bindings. A new -N flag to
  list-keys shows key bindings with notes. Change the default ? binding to use
  this to show a readable summary of keys. Also extend command-prompt to return
  the name of the key pressed and add a default binding (/) to show the note
  for the next key pressed.

* Add support for the iTerm2 DSR 1337 sequence to get the terminal version.

* Treat plausible but invalid keys (like C-BSpace) as literal like any other
  unrecognised string passed to send-keys.

* Detect iTerm2 and enable use of DECSLRM (much faster with horizontally split
  windows).

* Add -Z to default switch-client command in tree mode.

* Add ~ to quoted characters for %%%.

* Document client exit messages in the manual page.

* Do not let read-only clients limit the size, unless all clients are
  read-only.

* Add a number of new formats to inspect what sessions and clients a window is
  present or active in.

* Change file reading and writing to go through the client if necessary. This
  fixes commands like "tmux loadb /dev/fd/X". Also modify source-file to
  support "-" for standard input, like load-buffer and save-buffer.

* Add ~/.config/tmux/tmux.conf to the default search path for configuration
  files.

* Bump the escape sequence timeout to five seconds to allow for longer
  legitimate sequences.

* Make a best effort to set xpixel and ypixel for each pane and add formats for
  them.

* Add push-default to status-left and status-right in status-format[0].

* Do not clear search marks on cursor movement with vi(1) keys.

* Add p format modifier for padding to width and allow multiple substitutions
  in a single format.

* Add -f for full size to join-pane (like split-window).

* Do not use bright when emulating 256 colours on an 8 colour terminal because
  it is also bold on some terminals.

* Make select-pane -P set window-active-style also to match previous behaviour.

* Do not truncate list-keys output.

* Turn automatic-rename back on if the \033k rename escape sequence is used
  with an empty name.

* Add support for percentage sizes for resize-pane ("-x 10%"). Also change
  split-window and join-pane -l to accept similar percentages and deprecate the
  -p flag.

* Add -F flag to send-keys to expand formats in search-backward and forward
  copy mode commands and copy_cursor_word and copy_cursor_line formats for word
  and line at cursor in copy mode. Use for default # and * binding with vi(1)
  keys.

* Add formats for word and line at cursor position in copy mode.

* Add formats for cursor and selection position in copy mode.

* Support all the forms of RGB colour strings in OSC sequences rather than
  requiring two digits.

* Limit lazy resize to panes in attached sessions only.

* Add an option to set the key sent by backspace for those whose system uses ^H
  rather than ^?.

* Change new-session -A without a session name (that is, no -s option also) to
  attach to the best existing session like attach-session rather than a new
  one.

* Add a "latest" window-size option which tries to size windows based on the
  most recently used client. This is now the default.

* Add simple support for OSC 7 (result is available in the pane_path format).

*

CVS commit: src/doc

2020-11-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov  1 17:54:46 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new tmux


To generate a diff of this commit:
cvs rdiff -u -r1.1758 -r1.1759 src/doc/3RDPARTY
cvs rdiff -u -r1.2751 -r1.2752 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.1758 src/doc/3RDPARTY:1.1759
--- src/doc/3RDPARTY:1.1758	Sun Nov  1 09:25:48 2020
+++ src/doc/3RDPARTY	Sun Nov  1 12:54:46 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1758 2020/11/01 14:25:48 roy Exp $
+#	$NetBSD: 3RDPARTY,v 1.1759 2020/11/01 17:54:46 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1369,7 +1369,7 @@ perhaps this implementation should be ke
 purposes.
 
 Package:	tmux
-Version:	3.0a
+Version:	3.1c
 Current Vers:	3.1c
 Maintainer:	Nicholas Marriott 
 Archive site:	https://github.com/tmux/tmux

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2751 src/doc/CHANGES:1.2752
--- src/doc/CHANGES:1.2751	Sun Nov  1 09:25:48 2020
+++ src/doc/CHANGES	Sun Nov  1 12:54:46 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2751 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2752 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -298,3 +298,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	ossaudio(3): Added support for the OSSv4 Mixer API [nia 20201017]
 	tzdata updated to 2020d  [kre 20201022]
 	dhcpcd: Update to version 9.3.1 [roy 20201101]
+	tmux(1): Imported 3.1c. [christos 20201101]



CVS commit: src/sys

2020-11-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov  1 20:55:16 UTC 2020

Modified Files:
src/sys/kern: kern_condvar.c
src/sys/sys: sleepq.h
Added Files:
src/sys/sys: sleeptab.h

Log Message:
PR/55664: Ruslan Nikolaev: Split out sleepq guts and turnstiles not used
in rump into a separate header file. Add a sleepq_destroy() empty hook.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/kern/kern_condvar.c
cvs rdiff -u -r1.32 -r1.33 src/sys/sys/sleepq.h
cvs rdiff -u -r0 -r1.1 src/sys/sys/sleeptab.h

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

Modified files:

Index: src/sys/kern/kern_condvar.c
diff -u src/sys/kern/kern_condvar.c:1.52 src/sys/kern/kern_condvar.c:1.53
--- src/sys/kern/kern_condvar.c:1.52	Sun May 10 23:59:33 2020
+++ src/sys/kern/kern_condvar.c	Sun Nov  1 15:55:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_condvar.c,v 1.52 2020/05/11 03:59:33 riastradh Exp $	*/
+/*	$NetBSD: kern_condvar.c,v 1.53 2020/11/01 20:55:15 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008, 2019, 2020 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_condvar.c,v 1.52 2020/05/11 03:59:33 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_condvar.c,v 1.53 2020/11/01 20:55:15 christos Exp $");
 
 #include 
 #include 
@@ -102,6 +102,7 @@ void
 cv_destroy(kcondvar_t *cv)
 {
 
+	sleepq_destroy(CV_SLEEPQ(cv));
 #ifdef DIAGNOSTIC
 	KASSERT(cv_is_valid(cv));
 	KASSERT(!cv_has_waiters(cv));

Index: src/sys/sys/sleepq.h
diff -u src/sys/sys/sleepq.h:1.32 src/sys/sys/sleepq.h:1.33
--- src/sys/sys/sleepq.h:1.32	Thu Oct 22 20:25:45 2020
+++ src/sys/sys/sleepq.h	Sun Nov  1 15:55:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sleepq.h,v 1.32 2020/10/23 00:25:45 thorpej Exp $	*/
+/*	$NetBSD: sleepq.h,v 1.33 2020/11/01 20:55:15 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2009, 2019, 2020
@@ -45,20 +45,10 @@
  * Generic sleep queues.
  */
 
-#define	SLEEPTAB_HASH_SHIFT	7
-#define	SLEEPTAB_HASH_SIZE	(1 << SLEEPTAB_HASH_SHIFT)
-#define	SLEEPTAB_HASH_MASK	(SLEEPTAB_HASH_SIZE - 1)
-#define	SLEEPTAB_HASH(wchan)	(((uintptr_t)(wchan) >> 8) & SLEEPTAB_HASH_MASK)
-
-LIST_HEAD(sleepq, lwp);
-
 typedef struct sleepq sleepq_t;
 
-typedef struct sleeptab {
-	sleepq_t	st_queue[SLEEPTAB_HASH_SIZE];
-} sleeptab_t;
-
 void	sleepq_init(sleepq_t *);
+void	sleepq_destroy(sleepq_t *);
 void	sleepq_remove(sleepq_t *, lwp_t *);
 void	sleepq_enqueue(sleepq_t *, wchan_t, const char *, struct syncobj *,
 	bool);
@@ -73,10 +63,6 @@ void	sleepq_changepri(lwp_t *, pri_t);
 void	sleepq_lendpri(lwp_t *, pri_t);
 int	sleepq_block(int, bool);
 
-void	sleeptab_init(sleeptab_t *);
-
-extern sleeptab_t	sleeptab;
-
 #ifdef _KERNEL
 typedef union {
 	kmutex_t	lock;
@@ -97,35 +83,6 @@ sleepq_dontsleep(lwp_t *l)
 }
 
 /*
- * Find the correct sleep queue for the specified wait channel.  This
- * acquires and holds the per-queue interlock.
- */
-static __inline sleepq_t *
-sleeptab_lookup(sleeptab_t *st, wchan_t wchan, kmutex_t **mp)
-{
-	extern sleepqlock_t sleepq_locks[SLEEPTAB_HASH_SIZE];
-	sleepq_t *sq;
-	u_int hash;
-
-	hash = SLEEPTAB_HASH(wchan);
-	sq = &st->st_queue[hash];
-	*mp = &sleepq_locks[hash].lock;
-	mutex_spin_enter(*mp);
-	return sq;
-}
-
-static __inline kmutex_t *
-sleepq_hashlock(wchan_t wchan)
-{
-	extern sleepqlock_t sleepq_locks[SLEEPTAB_HASH_SIZE];
-	kmutex_t *mp;
-
-	mp = &sleepq_locks[SLEEPTAB_HASH(wchan)].lock;
-	mutex_spin_enter(mp);
-	return mp;
-}
-
-/*
  * Prepare to block on a sleep queue, after which any interlock can be
  * safely released.
  */
@@ -143,55 +100,6 @@ sleepq_enter(sleepq_t *sq, lwp_t *l, kmu
 }
 #endif
 
-/*
- * Turnstiles, specialized sleep queues for use by kernel locks.
- */
-
-typedef struct turnstile {
-	LIST_ENTRY(turnstile)	ts_chain;	/* link on hash chain */
-	struct turnstile	*ts_free;	/* turnstile free list */
-	wchan_t			ts_obj;		/* lock object */
-	sleepq_t		ts_sleepq[2];	/* sleep queues */
-	u_int			ts_waiters[2];	/* count of waiters */
-
-	/* priority inheritance */
-	pri_t			ts_eprio;
-	lwp_t			*ts_inheritor;
-	SLIST_ENTRY(turnstile)	ts_pichain;
-} turnstile_t;
-
-LIST_HEAD(tschain, turnstile);
-
-typedef struct tschain tschain_t;
-
-#define	TS_READER_Q	0		/* reader sleep queue */
-#define	TS_WRITER_Q	1		/* writer sleep queue */
-
-#define	TS_WAITERS(ts, q)		\
-	(ts)->ts_waiters[(q)]
-
-#define	TS_ALL_WAITERS(ts)		\
-	((ts)->ts_waiters[TS_READER_Q] +\
-	 (ts)->ts_waiters[TS_WRITER_Q])
-
-#define	TS_FIRST(ts, q)	(LIST_FIRST(&(ts)->ts_sleepq[(q)]))
-
-#ifdef	_KERNEL
-
-void	turnstile_init(void);
-turnstile_t	*turnstile_lookup(wchan_t);
-void	turnstile_ctor(turnstile_t *);
-void	turnstile_exit(wchan_t);
-void	turnstile_block(turnstile_t *, int, wchan_t, syncobj_t *);
-void	turnstile_wakeup(turnstile_t *, int, int, lwp_t *);
-void	turnstile_print(volatile void *, void (*)(const char *, ...)
-__printflike(1,

CVS commit: src/sys/sys

2020-11-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov  1 20:56:13 UTC 2020

Modified Files:
src/sys/sys: sleepq.h

Log Message:
turned sleepq_destroy this into a macro


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/sys/sleepq.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/sys/sleepq.h
diff -u src/sys/sys/sleepq.h:1.33 src/sys/sys/sleepq.h:1.34
--- src/sys/sys/sleepq.h:1.33	Sun Nov  1 15:55:15 2020
+++ src/sys/sys/sleepq.h	Sun Nov  1 15:56:13 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sleepq.h,v 1.33 2020/11/01 20:55:15 christos Exp $	*/
+/*	$NetBSD: sleepq.h,v 1.34 2020/11/01 20:56:13 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2009, 2019, 2020
@@ -48,7 +48,6 @@
 typedef struct sleepq sleepq_t;
 
 void	sleepq_init(sleepq_t *);
-void	sleepq_destroy(sleepq_t *);
 void	sleepq_remove(sleepq_t *, lwp_t *);
 void	sleepq_enqueue(sleepq_t *, wchan_t, const char *, struct syncobj *,
 	bool);



CVS commit: src/sys/rump

2020-11-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov  1 20:58:38 UTC 2020

Modified Files:
src/sys/rump/include/rump-sys: kern.h
src/sys/rump/librump/rumpkern: intr.c scheduler.c sleepq.c
Added Files:
src/sys/rump/include/sys: sleeptab.h

Log Message:
PR/55664: Ruslan Nikolaev: Fix:

1. A race condition (bug) in sys/rump/librump/rumpkern/intr.c since
   rumpuser_cv_signal() is called without holding a mutex
2. sleepq is implemented using a single (global) conditional
   variable; that should be done per each sleepq separately


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/include/rump-sys/kern.h
cvs rdiff -u -r0 -r1.1 src/sys/rump/include/sys/sleeptab.h
cvs rdiff -u -r1.55 -r1.56 src/sys/rump/librump/rumpkern/intr.c
cvs rdiff -u -r1.51 -r1.52 src/sys/rump/librump/rumpkern/scheduler.c
cvs rdiff -u -r1.20 -r1.21 src/sys/rump/librump/rumpkern/sleepq.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/rump/include/rump-sys/kern.h
diff -u src/sys/rump/include/rump-sys/kern.h:1.4 src/sys/rump/include/rump-sys/kern.h:1.5
--- src/sys/rump/include/rump-sys/kern.h:1.4	Fri Aug 10 17:44:59 2018
+++ src/sys/rump/include/rump-sys/kern.h	Sun Nov  1 15:58:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern.h,v 1.4 2018/08/10 21:44:59 pgoyette Exp $	*/
+/*	$NetBSD: kern.h,v 1.5 2020/11/01 20:58:38 christos Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -174,6 +174,7 @@ void	rump_syscall_boot_establish(const s
 void	rump_schedlock_cv_wait(struct rumpuser_cv *);
 int	rump_schedlock_cv_timedwait(struct rumpuser_cv *,
 const struct timespec *);
+void	rump_schedlock_cv_signal(struct cpu_info *, struct rumpuser_cv *);
 
 void	rump_user_schedule(int, void *);
 void	rump_user_unschedule(int, int *, void *);

Index: src/sys/rump/librump/rumpkern/intr.c
diff -u src/sys/rump/librump/rumpkern/intr.c:1.55 src/sys/rump/librump/rumpkern/intr.c:1.56
--- src/sys/rump/librump/rumpkern/intr.c:1.55	Mon Dec 16 17:47:55 2019
+++ src/sys/rump/librump/rumpkern/intr.c	Sun Nov  1 15:58:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.55 2019/12/16 22:47:55 ad Exp $	*/
+/*	$NetBSD: intr.c,v 1.56 2020/11/01 20:58:38 christos Exp $	*/
 
 /*
  * Copyright (c) 2008-2010, 2015 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.55 2019/12/16 22:47:55 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.56 2020/11/01 20:58:38 christos Exp $");
 
 #include 
 #include 
@@ -464,7 +464,7 @@ rump_softint_run(struct cpu_info *ci)
 
 	for (i = 0; i < SOFTINT_COUNT; i++) {
 		if (!TAILQ_EMPTY(&si_lvl[i].si_pending))
-			rumpuser_cv_signal(si_lvl[i].si_cv);
+			rump_schedlock_cv_signal(ci, si_lvl[i].si_cv);
 	}
 }
 

Index: src/sys/rump/librump/rumpkern/scheduler.c
diff -u src/sys/rump/librump/rumpkern/scheduler.c:1.51 src/sys/rump/librump/rumpkern/scheduler.c:1.52
--- src/sys/rump/librump/rumpkern/scheduler.c:1.51	Sat Mar 14 14:08:39 2020
+++ src/sys/rump/librump/rumpkern/scheduler.c	Sun Nov  1 15:58:38 2020
@@ -1,4 +1,4 @@
-/*  $NetBSD: scheduler.c,v 1.51 2020/03/14 18:08:39 ad Exp $	*/
+/*  $NetBSD: scheduler.c,v 1.52 2020/11/01 20:58:38 christos Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.51 2020/03/14 18:08:39 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.52 2020/11/01 20:58:38 christos Exp $");
 
 #include 
 #include 
@@ -179,6 +179,16 @@ rump_scheduler_init(int numcpu)
 	mutex_init(&unruntime_lock, MUTEX_DEFAULT, IPL_SCHED);
 }
 
+void
+rump_schedlock_cv_signal(struct cpu_info *ci, struct rumpuser_cv *cv)
+{
+	struct rumpcpu *rcpu = cpuinfo_to_rumpcpu(ci);
+
+	rumpuser_mutex_enter_nowrap(rcpu->rcpu_mtx);
+	rumpuser_cv_signal(cv);
+	rumpuser_mutex_exit(rcpu->rcpu_mtx);
+}
+
 /*
  * condvar ops using scheduler lock as the rumpuser interlock.
  */

Index: src/sys/rump/librump/rumpkern/sleepq.c
diff -u src/sys/rump/librump/rumpkern/sleepq.c:1.20 src/sys/rump/librump/rumpkern/sleepq.c:1.21
--- src/sys/rump/librump/rumpkern/sleepq.c:1.20	Sat Apr 25 11:42:15 2020
+++ src/sys/rump/librump/rumpkern/sleepq.c	Sun Nov  1 15:58:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sleepq.c,v 1.20 2020/04/25 15:42:15 bouyer Exp $	*/
+/*	$NetBSD: sleepq.c,v 1.21 2020/11/01 20:58:38 christos Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.20 2020/04/25 15:42:15 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.21 2020/11/01 20:58:38 christos Exp $");
 
 #include 
 #include 
@@ -40,25 +40,20 @@ __KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1
 #include 
 
 syncobj_t sleep_syncobj;
-static kcondvar_t sq_cv;
 
-static int
-sqinit1(void)
+void
+sleepq_init(sleepq_t *sq)
 {
 
-	cv_init(&sq_cv, "sleepq");
-
-	r

CVS commit: src/sys/sys

2020-11-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov  1 21:00:20 UTC 2020

Modified Files:
src/sys/sys: sleeptab.h

Log Message:
Use __nothing for empty macro


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/sys/sleeptab.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/sys/sleeptab.h
diff -u src/sys/sys/sleeptab.h:1.1 src/sys/sys/sleeptab.h:1.2
--- src/sys/sys/sleeptab.h:1.1	Sun Nov  1 15:55:15 2020
+++ src/sys/sys/sleeptab.h	Sun Nov  1 16:00:20 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sleeptab.h,v 1.1 2020/11/01 20:55:15 christos Exp $	*/
+/*	$NetBSD: sleeptab.h,v 1.2 2020/11/01 21:00:20 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2009, 2019, 2020
@@ -78,7 +78,7 @@ sleepq_hashlock(wchan_t wchan)
 	return mp;
 }
 
-#define sleepq_destroy(a)
+#define sleepq_destroy(a) __nothing
 
 #endif
 



CVS commit: src/usr.bin/col

2020-11-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov  1 22:27:15 UTC 2020

Modified Files:
src/usr.bin/col: Makefile col.1 col.c

Log Message:
Replace col with the FreeBSD version that adds wide char support


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/col/Makefile
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/col/col.1
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/col/col.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/col/Makefile
diff -u src/usr.bin/col/Makefile:1.5 src/usr.bin/col/Makefile:1.6
--- src/usr.bin/col/Makefile:1.5	Tue Apr 14 18:15:18 2009
+++ src/usr.bin/col/Makefile	Sun Nov  1 17:27:15 2020
@@ -1,6 +1,7 @@
-#	$NetBSD: Makefile,v 1.5 2009/04/14 22:15:18 lukem Exp $
+#	$NetBSD: Makefile,v 1.6 2020/11/01 22:27:15 christos Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/6/93
 
+WARNS=6
 PROG=	col
 
 .include 

Index: src/usr.bin/col/col.1
diff -u src/usr.bin/col/col.1:1.10 src/usr.bin/col/col.1:1.11
--- src/usr.bin/col/col.1:1.10	Thu Mar 22 03:58:18 2012
+++ src/usr.bin/col/col.1	Sun Nov  1 17:27:15 2020
@@ -1,5 +1,4 @@
-.\"	$NetBSD: col.1,v 1.10 2012/03/22 07:58:18 wiz Exp $
-.\"
+.\" $NetBSD: col.1,v 1.11 2020/11/01 22:27:15 christos Exp $
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
 .\"
@@ -31,8 +30,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\" @(#)col.1	8.1 (Berkeley) 6/29/93
+.\" $FreeBSD: head/usr.bin/col/col.1 366913 2020-10-21 16:30:34Z fernape $
 .\"
-.Dd February 22, 1999
+.Dd November 1, 2020
 .Dt COL 1
 .Os
 .Sh NAME
@@ -40,23 +40,21 @@
 .Nd filter reverse line feeds from input
 .Sh SYNOPSIS
 .Nm
-.Op Fl bfpx
+.Op Fl bfhpx
 .Op Fl l Ar num
 .Sh DESCRIPTION
+The
 .Nm
-filters out reverse (and half reverse) line feeds so that the output is
+utility filters out reverse (and half reverse) line feeds so that the output is
 in the correct order with only forward and half forward line
 feeds, and replaces white-space characters with tabs where possible.
-This can be useful in processing the output of
-.Xr nroff 1
-and
-.Xr tbl 1 .
 .Pp
+The
 .Nm
-reads from the standard input and writes to the standard output.
+utility reads from the standard input and writes to the standard output.
 .Pp
 The options are as follows:
-.Bl -tag -width "-l num  "
+.Bl -tag -width indent
 .It Fl b
 Do not output any backspaces, printing only the last character
 written to each column position.
@@ -64,6 +62,13 @@ written to each column position.
 Forward half line feeds are permitted (``fine'' mode).
 Normally characters printed on a half line boundary are printed
 on the following line.
+.It Fl h
+Do not output multiple spaces instead of tabs (default).
+.It Fl l Ar num
+Buffer at least
+.Ar num
+lines in memory.
+By default, 128 lines are buffered.
 .It Fl p
 Force unknown control sequences to be passed through unchanged.
 Normally,
@@ -72,25 +77,35 @@ will filter out any control sequences fr
 recognized and interpreted by itself, which are listed below.
 .It Fl x
 Output multiple spaces instead of tabs.
-.It Fl l Ar num
-Buffer at least
-.Ar num
-lines in memory.
-By default, 128 lines are buffered.
 .El
 .Pp
-The control sequences for carriage motion that
+In the input stream,
 .Nm
-understands and their decimal values are listed in the following
-table:
+understands both the escape sequences of the form escape-digit
+mandated by
+.St -susv2
+and the traditional
+.Bx
+format escape-control-character.
+The control sequences for carriage motion and their ASCII values
+are as follows:
 .Pp
 .Bl -tag -width "carriage return" -compact
+.It ESC\-BELL
+reverse line feed (escape then bell).
 .It ESC\-7
-reverse line feed (escape then 7)
+reverse line feed (escape then 7).
+.It ESC\-BACKSPACE
+half reverse line feed (escape then backspace).
 .It ESC\-8
-half reverse line feed (escape then 8)
+half reverse line feed (escape then 8).
+.It ESC\-TAB
+half forward line feed (escape than tab).
 .It ESC\-9
-half forward line feed (escape then 9)
+half forward line feed (escape then 9).
+In
+.Fl f
+mode, this sequence may also occur in the output stream.
 .It backspace
 moves back one column (8); ignored in the first column
 .It carriage return
@@ -100,7 +115,7 @@ forward line feed (10); also does carria
 .It shift in
 shift to normal character set (15)
 .It shift out
-shift to alternative character set (14)
+shift to alternate character set (14)
 .It space
 moves forward one column (32)
 .It tab
@@ -112,27 +127,46 @@ reverse line feed (11)
 All unrecognized control characters and escape sequences are
 discarded.
 .Pp
+The
 .Nm
-keeps track of the character set as characters are read and makes
+utility keeps track of the character set as characters are read and makes
 sure the character set is correct when they are output.
 .Pp
 If the input attempts to back up to the last flushed line,
 .Nm
 will display a warning message.
+.Sh ENVIRONMENT
+Th

CVS commit: src/tests/usr.bin

2020-11-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov  1 22:28:33 UTC 2020

Modified Files:
src/tests/usr.bin: Makefile
Added Files:
src/tests/usr.bin/col: Makefile hlf.in hlf2.in nl.in nl2.in nl3.in
rlf.in rlf2.in rlf3.in t_col.sh

Log Message:
Add unit-tests for col from FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/tests/usr.bin/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/col/Makefile \
src/tests/usr.bin/col/hlf.in src/tests/usr.bin/col/hlf2.in \
src/tests/usr.bin/col/nl.in src/tests/usr.bin/col/nl2.in \
src/tests/usr.bin/col/nl3.in src/tests/usr.bin/col/rlf.in \
src/tests/usr.bin/col/rlf2.in src/tests/usr.bin/col/rlf3.in \
src/tests/usr.bin/col/t_col.sh

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

Modified files:

Index: src/tests/usr.bin/Makefile
diff -u src/tests/usr.bin/Makefile:1.33 src/tests/usr.bin/Makefile:1.34
--- src/tests/usr.bin/Makefile:1.33	Fri Jul  3 00:25:28 2020
+++ src/tests/usr.bin/Makefile	Sun Nov  1 17:28:32 2020
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.33 2020/07/03 04:25:28 jruoho Exp $
+#	$NetBSD: Makefile,v 1.34 2020/11/01 22:28:32 christos Exp $
 #
 
 .include 
 
 TESTSDIR=   ${TESTSBASE}/usr.bin
 
-TESTS_SUBDIRS=	awk basename bzip2 cc cmp config cpio cut \
+TESTS_SUBDIRS=	awk basename bzip2 cc cmp config cpio col cut \
 		diff dirname find fstat gdb grep gzip id indent \
 		infocmp jot ld locale m4 make mixerctl mkdep nbperf \
 		netpgpverify patch pkill pr printf pwhash rump_server \

Added files:

Index: src/tests/usr.bin/col/Makefile
diff -u /dev/null src/tests/usr.bin/col/Makefile:1.1
--- /dev/null	Sun Nov  1 17:28:33 2020
+++ src/tests/usr.bin/col/Makefile	Sun Nov  1 17:28:32 2020
@@ -0,0 +1,19 @@
+# $FreeBSD: head/usr.bin/col/tests/Makefile 366577 2020-10-09 15:27:37Z markj $
+
+PACKAGE=	tests
+
+TESTSDIR=	${TESTSBASE}/usr.bin/col
+TESTS_SH=	t_col
+
+FILESDIR=   ${TESTSDIR}
+FILES+=		\
+		hlf.in \
+		hlf2.in \
+		nl.in \
+		nl2.in \
+		nl3.in \
+		rlf.in \
+		rlf2.in \
+		rlf3.in
+
+.include 
Index: src/tests/usr.bin/col/hlf.in
diff -u /dev/null src/tests/usr.bin/col/hlf.in:1.1
--- /dev/null	Sun Nov  1 17:28:33 2020
+++ src/tests/usr.bin/col/hlf.in	Sun Nov  1 17:28:32 2020
@@ -0,0 +1,2 @@
+a
+a8f8f
Index: src/tests/usr.bin/col/hlf2.in
diff -u /dev/null src/tests/usr.bin/col/hlf2.in:1.1
--- /dev/null	Sun Nov  1 17:28:33 2020
+++ src/tests/usr.bin/col/hlf2.in	Sun Nov  1 17:28:32 2020
@@ -0,0 +1 @@
+a9f
Index: src/tests/usr.bin/col/nl.in
diff -u /dev/null src/tests/usr.bin/col/nl.in:1.1
--- /dev/null	Sun Nov  1 17:28:33 2020
+++ src/tests/usr.bin/col/nl.in	Sun Nov  1 17:28:32 2020
@@ -0,0 +1,2 @@
+a
+b
Index: src/tests/usr.bin/col/nl2.in
diff -u /dev/null src/tests/usr.bin/col/nl2.in:1.1
--- /dev/null	Sun Nov  1 17:28:33 2020
+++ src/tests/usr.bin/col/nl2.in	Sun Nov  1 17:28:32 2020
@@ -0,0 +1,2 @@
+a
+b
\ No newline at end of file
Index: src/tests/usr.bin/col/nl3.in
diff -u /dev/null src/tests/usr.bin/col/nl3.in:1.1
--- /dev/null	Sun Nov  1 17:28:33 2020
+++ src/tests/usr.bin/col/nl3.in	Sun Nov  1 17:28:32 2020
@@ -0,0 +1,4 @@
+a
+
+b
+
Index: src/tests/usr.bin/col/rlf.in
diff -u /dev/null src/tests/usr.bin/col/rlf.in:1.1
--- /dev/null	Sun Nov  1 17:28:33 2020
+++ src/tests/usr.bin/col/rlf.in	Sun Nov  1 17:28:32 2020
@@ -0,0 +1,2 @@
+a
+  7b
Index: src/tests/usr.bin/col/rlf2.in
diff -u /dev/null src/tests/usr.bin/col/rlf2.in:1.1
--- /dev/null	Sun Nov  1 17:28:33 2020
+++ src/tests/usr.bin/col/rlf2.in	Sun Nov  1 17:28:32 2020
@@ -0,0 +1,2 @@
+a
+	7b
Index: src/tests/usr.bin/col/rlf3.in
diff -u /dev/null src/tests/usr.bin/col/rlf3.in:1.1
--- /dev/null	Sun Nov  1 17:28:33 2020
+++ src/tests/usr.bin/col/rlf3.in	Sun Nov  1 17:28:32 2020
@@ -0,0 +1 @@
+ab
Index: src/tests/usr.bin/col/t_col.sh
diff -u /dev/null src/tests/usr.bin/col/t_col.sh:1.1
--- /dev/null	Sun Nov  1 17:28:33 2020
+++ src/tests/usr.bin/col/t_col.sh	Sun Nov  1 17:28:32 2020
@@ -0,0 +1,114 @@
+#!/usr/bin/atf-sh
+# $FreeBSD: head/usr.bin/col/tests/col_test.sh 366577 2020-10-09 15:27:37Z markj $
+
+atf_test_case nl
+
+nl_head()
+{
+	atf_set "descr" "testing just newlines"
+}
+nl_body()
+{
+	atf_check \
+		-o inline:"a\nb\n" \
+		-e empty \
+		-s exit:0 \
+		col < $(atf_get_srcdir)/nl.in
+
+	atf_check \
+		-o inline:"a\nb\n" \
+		-e empty \
+		-s exit:0 \
+		col -f < $(atf_get_srcdir)/nl.in
+
+	atf_check \
+		-o inline:"a\nb\n" \
+		-e empty \
+		-s exit:0 \
+		col < $(atf_get_srcdir)/nl2.in
+
+	atf_check \
+		-o inline:"a\nb\n" \
+		-e empty \
+		-s exit:0 \
+		col -f < $(atf_get_srcdir)/nl2.in
+
+	atf_check \
+		-o inline:"a\n\nb\n\n" \
+		-e empty \
+		-s exit:0 \
+		col < $(atf_get_srcdir)/nl3.in
+}
+
+atf_test_case rlf
+
+rlf_head()
+{
+	atf_set "descr" "testing reverse line feed"
+}
+rlf_body()
+{
+	atf_check \
+		-o inline:"a b\n" \
+		-e empty \
+		-s exit:0 \
+		col < $(atf_get_srcdir)/rlf.in
+
+	atf_check \
+		-o inline:"a	b\

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

2020-11-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov  1 22:31:28 UTC 2020

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

Log Message:
Add tests for col


To generate a diff of this commit:
cvs rdiff -u -r1.954 -r1.955 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.954 src/distrib/sets/lists/tests/mi:1.955
--- src/distrib/sets/lists/tests/mi:1.954	Sat Oct 31 07:30:56 2020
+++ src/distrib/sets/lists/tests/mi	Sun Nov  1 17:31:28 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.954 2020/10/31 11:30:56 rillig Exp $
+# $NetBSD: mi,v 1.955 2020/11/01 22:31:28 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -4578,8 +4578,19 @@
 ./usr/tests/usr.bin/config/support/conf			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/config/support/conf/Makefile.kern.inc	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/config/support/conf/files			tests-usr.bin-tests	compattestfile,atf
-./usr/tests/usr.bin/config/t_config			tests-usr.bin-tests	compattestfile,atf
-./usr/tests/usr.bin/cpiotests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/config/t_confi	g			tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/col		tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/col/Atffile	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/col/hlf.in	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/col/hlf2.in	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/col/nl.in	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/col/nl2.in	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/col/nl3.in	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/col/rlf.in	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/col/rlf2.in	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/col/rlf3.in	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/col/t_col	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/cpio	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/cpio/Atffiletests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/cpio/Kyuafiletests-usr.bin-tests	compattestfile,atf,kyua
 ./usr/tests/usr.bin/cpio/h_cpio	tests-usr.bin-tests	compattestfile,atf



CVS commit: src/etc/mtree

2020-11-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov  1 22:29:14 UTC 2020

Modified Files:
src/etc/mtree: NetBSD.dist.tests

Log Message:
Add col tests


To generate a diff of this commit:
cvs rdiff -u -r1.181 -r1.182 src/etc/mtree/NetBSD.dist.tests

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

Modified files:

Index: src/etc/mtree/NetBSD.dist.tests
diff -u src/etc/mtree/NetBSD.dist.tests:1.181 src/etc/mtree/NetBSD.dist.tests:1.182
--- src/etc/mtree/NetBSD.dist.tests:1.181	Thu Oct 15 13:44:44 2020
+++ src/etc/mtree/NetBSD.dist.tests	Sun Nov  1 17:29:13 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.tests,v 1.181 2020/10/15 17:44:44 mgorny Exp $
+#	$NetBSD: NetBSD.dist.tests,v 1.182 2020/11/01 22:29:13 christos Exp $
 
 ./usr/libdata/debug/usr/tests
 ./usr/libdata/debug/usr/tests/atf
@@ -417,6 +417,7 @@
 ./usr/tests/usr.bin/config/support/arch/regress
 ./usr/tests/usr.bin/config/support/arch/regress/conf
 ./usr/tests/usr.bin/config/support/conf
+./usr/tests/usr.bin/col
 ./usr/tests/usr.bin/cpio
 ./usr/tests/usr.bin/cut
 ./usr/tests/usr.bin/diff



CVS commit: src/sys/kern

2020-11-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov  2 18:55:12 UTC 2020

Modified Files:
src/sys/kern: syscalls.master

Log Message:
PR/55777: Ruslan Nikolaev: Make clock_getcpuclockid2 accessible from rump


To generate a diff of this commit:
cvs rdiff -u -r1.306 -r1.307 src/sys/kern/syscalls.master

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/syscalls.master
diff -u src/sys/kern/syscalls.master:1.306 src/sys/kern/syscalls.master:1.307
--- src/sys/kern/syscalls.master:1.306	Thu Aug 13 20:53:16 2020
+++ src/sys/kern/syscalls.master	Mon Nov  2 13:55:12 2020
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.306 2020/08/14 00:53:16 riastradh Exp $
+	$NetBSD: syscalls.master,v 1.307 2020/11/02 18:55:12 christos Exp $
 
 ;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
 
@@ -1011,7 +1011,7 @@
 481	STD		{ int|sys||wait6(idtype_t idtype, id_t id, \
 			int *status, int options, struct wrusage *wru, \
 			siginfo_t *info); }
-482	STD		{ int|sys||clock_getcpuclockid2(idtype_t idtype, \
+482	STD	RUMP	{ int|sys||clock_getcpuclockid2(idtype_t idtype, \
 			id_t id, clockid_t *clock_id); }
 483	STD	RUMP	{ int|sys|90|getvfsstat(struct statvfs *buf, \
 			size_t bufsize, int flags); }



CVS commit: src/sys

2020-11-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov  2 18:56:16 UTC 2020

Modified Files:
src/sys/kern: init_sysent.c syscalls.c syscalls_autoload.c
systrace_args.c
src/sys/rump: rump.sysmap
src/sys/rump/include/rump: rump_syscalls.h
src/sys/rump/librump/rumpkern: rump_syscalls.c
src/sys/sys: syscall.h syscallargs.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.336 -r1.337 src/sys/kern/init_sysent.c
cvs rdiff -u -r1.324 -r1.325 src/sys/kern/syscalls.c
cvs rdiff -u -r1.40 -r1.41 src/sys/kern/syscalls_autoload.c
cvs rdiff -u -r1.43 -r1.44 src/sys/kern/systrace_args.c
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/rump.sysmap
cvs rdiff -u -r1.123 -r1.124 src/sys/rump/include/rump/rump_syscalls.h
cvs rdiff -u -r1.154 -r1.155 src/sys/rump/librump/rumpkern/rump_syscalls.c
cvs rdiff -u -r1.318 -r1.319 src/sys/sys/syscall.h
cvs rdiff -u -r1.302 -r1.303 src/sys/sys/syscallargs.h

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

Modified files:

Index: src/sys/kern/init_sysent.c
diff -u src/sys/kern/init_sysent.c:1.336 src/sys/kern/init_sysent.c:1.337
--- src/sys/kern/init_sysent.c:1.336	Thu Aug 13 20:55:02 2020
+++ src/sys/kern/init_sysent.c	Mon Nov  2 13:56:16 2020
@@ -1,14 +1,14 @@
-/* $NetBSD: init_sysent.c,v 1.336 2020/08/14 00:55:02 riastradh Exp $ */
+/* $NetBSD: init_sysent.c,v 1.337 2020/11/02 18:56:16 christos Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.306 2020/08/14 00:53:16 riastradh Exp
+ * created from	NetBSD: syscalls.master,v 1.307 2020/11/02 18:55:12 christos Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: init_sysent.c,v 1.336 2020/08/14 00:55:02 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_sysent.c,v 1.337 2020/11/02 18:56:16 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_modular.h"

Index: src/sys/kern/syscalls.c
diff -u src/sys/kern/syscalls.c:1.324 src/sys/kern/syscalls.c:1.325
--- src/sys/kern/syscalls.c:1.324	Thu Aug 13 20:55:02 2020
+++ src/sys/kern/syscalls.c	Mon Nov  2 13:56:16 2020
@@ -1,14 +1,14 @@
-/* $NetBSD: syscalls.c,v 1.324 2020/08/14 00:55:02 riastradh Exp $ */
+/* $NetBSD: syscalls.c,v 1.325 2020/11/02 18:56:16 christos Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.306 2020/08/14 00:53:16 riastradh Exp
+ * created from	NetBSD: syscalls.master,v 1.307 2020/11/02 18:55:12 christos Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: syscalls.c,v 1.324 2020/08/14 00:55:02 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscalls.c,v 1.325 2020/11/02 18:56:16 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #ifdef _KERNEL_OPT

Index: src/sys/kern/syscalls_autoload.c
diff -u src/sys/kern/syscalls_autoload.c:1.40 src/sys/kern/syscalls_autoload.c:1.41
--- src/sys/kern/syscalls_autoload.c:1.40	Wed Jun 10 23:45:30 2020
+++ src/sys/kern/syscalls_autoload.c	Mon Nov  2 13:56:16 2020
@@ -1,14 +1,14 @@
-/* $NetBSD: syscalls_autoload.c,v 1.40 2020/06/11 03:45:30 dholland Exp $ */
+/* $NetBSD: syscalls_autoload.c,v 1.41 2020/11/02 18:56:16 christos Exp $ */
 
 /*
  * System call autoload table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.305 2020/05/16 18:31:50 christos Exp
+ * created from	NetBSD: syscalls.master,v 1.307 2020/11/02 18:55:12 christos Exp
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: syscalls_autoload.c,v 1.40 2020/06/11 03:45:30 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscalls_autoload.c,v 1.41 2020/11/02 18:56:16 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_modular.h"

Index: src/sys/kern/systrace_args.c
diff -u src/sys/kern/systrace_args.c:1.43 src/sys/kern/systrace_args.c:1.44
--- src/sys/kern/systrace_args.c:1.43	Thu Aug 13 20:55:02 2020
+++ src/sys/kern/systrace_args.c	Mon Nov  2 13:56:16 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: systrace_args.c,v 1.43 2020/08/14 00:55:02 riastradh Exp $ */
+/* $NetBSD: systrace_args.c,v 1.44 2020/11/02 18:56:16 christos Exp $ */
 
 /*
  * System call argument to DTrace register array converstion.

Index: src/sys/rump/rump.sysmap
diff -u src/sys/rump/rump.sysmap:1.8 src/sys/rump/rump.sysmap:1.9
--- src/sys/rump/rump.sysmap:1.8	Thu Aug 13 20:55:03 2020
+++ src/sys/rump/rump.sysmap	Mon Nov  2 13:56:16 2020
@@ -214,6 +214,7 @@
 477  sys_clock_nanosleepclock_nanosleeprump___sysimpl_clock_nanosleep
 479  sys_posix_fallocateposix_fallocaterump___sysimpl_posix_fallocate
 480  sys_fdiscard   fdiscard   rump___sysimpl_fdiscard
+482  sys_clock_getcpuclockid2 clock_getcpuclockid2 rump___sysimpl_clock_getcpuclockid2
 483  sys___getvfsstat90 __getvfsstat90 rump___sysimpl_getvfsstat90
 484  sys___statvfs190   __statvfs190   rump___sysimpl_statvfs190
 485  sys___fstatvfs190   

CVS commit: src/sys/rump/dev/lib/libpci

2020-11-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov  2 18:58:06 UTC 2020

Modified Files:
src/sys/rump/dev/lib/libpci: rumpdev_bus_dma.c

Log Message:
PR/55777: Ruslan Nikolaev: use MIN() from  instead of min()


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/rump/dev/lib/libpci/rumpdev_bus_dma.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/rump/dev/lib/libpci/rumpdev_bus_dma.c
diff -u src/sys/rump/dev/lib/libpci/rumpdev_bus_dma.c:1.9 src/sys/rump/dev/lib/libpci/rumpdev_bus_dma.c:1.10
--- src/sys/rump/dev/lib/libpci/rumpdev_bus_dma.c:1.9	Sat Sep  5 12:30:12 2020
+++ src/sys/rump/dev/lib/libpci/rumpdev_bus_dma.c	Mon Nov  2 13:58:06 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpdev_bus_dma.c,v 1.9 2020/09/05 16:30:12 riastradh Exp $	*/
+/*	$NetBSD: rumpdev_bus_dma.c,v 1.10 2020/11/02 18:58:06 christos Exp $	*/
 
 /*-
  * Copyright (c) 2013 Antti Kantee
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rumpdev_bus_dma.c,v 1.9 2020/09/05 16:30:12 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpdev_bus_dma.c,v 1.10 2020/11/02 18:58:06 christos Exp $");
 
 #include 
 #include 
@@ -192,7 +192,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t t,
 		sgsize = PAGE_SIZE - ((u_long)vaddr & PGOFSET);
 		if (buflen < sgsize)
 			sgsize = buflen;
-		sgsize = min(sgsize, map->dm_maxsegsz);
+		sgsize = MIN(sgsize, map->dm_maxsegsz);
 
 		/*
 		 * Make sure we don't cross any boundaries.



CVS commit: src/external/historical/nawk/dist

2020-11-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov  2 22:58:51 UTC 2020

Modified Files:
src/external/historical/nawk/dist: tran.c

Log Message:
>From wajap at github:
- eat whitespace in infnan checks
- set fval to 0 if we are not a floating point number


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/historical/nawk/dist/tran.c

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

Modified files:

Index: src/external/historical/nawk/dist/tran.c
diff -u src/external/historical/nawk/dist/tran.c:1.14 src/external/historical/nawk/dist/tran.c:1.15
--- src/external/historical/nawk/dist/tran.c:1.14	Mon Aug 31 20:35:29 2020
+++ src/external/historical/nawk/dist/tran.c	Mon Nov  2 17:58:51 2020
@@ -399,11 +399,15 @@ static int checkstr(const char *s, const
 {
 	while (*s && tolower((unsigned char)*s) == *v)
 		s++, v++;
+	while (isspace((unsigned char)*s))
+		s++;
 	return !(*s || *v);
 }
 
 static int checkinfnan(const char *s)
 {
+	while (isspace((unsigned char)*s))
+		s++;
 	if (*s == '+' || *s == '-')
 		s++;
 	switch (tolower((unsigned char)*s)) {
@@ -427,6 +431,8 @@ Awkfloat getfval(Cell *vp)	/* get float 
 	if (!isnum(vp)) {	/* not a number */
 		if (checkinfnan(vp->sval))
 			vp->fval = atof(vp->sval);	/* best guess */
+		else
+			vp->fval = 0.0;
 		if (is_number(vp->sval) && !(vp->tval&CON)) {
 			vp->tval |= NUM;	/* make NUM only sparingly */
 		}



CVS commit: src/sys/compat/linux/common

2020-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Nov  3 22:08:44 UTC 2020

Modified Files:
src/sys/compat/linux/common: linux_socket.c

Log Message:
PR/55780: Bernd Sieker: setsockopt in Linux emulation misses some options


To generate a diff of this commit:
cvs rdiff -u -r1.151 -r1.152 src/sys/compat/linux/common/linux_socket.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/compat/linux/common/linux_socket.c
diff -u src/sys/compat/linux/common/linux_socket.c:1.151 src/sys/compat/linux/common/linux_socket.c:1.152
--- src/sys/compat/linux/common/linux_socket.c:1.151	Sat Oct 24 05:01:56 2020
+++ src/sys/compat/linux/common/linux_socket.c	Tue Nov  3 17:08:44 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_socket.c,v 1.151 2020/10/24 09:01:56 mgorny Exp $	*/
+/*	$NetBSD: linux_socket.c,v 1.152 2020/11/03 22:08:44 christos Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.151 2020/10/24 09:01:56 mgorny Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.152 2020/11/03 22:08:44 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -861,11 +861,11 @@ linux_to_bsd_so_sockopt(int lopt)
 		return SO_DEBUG;
 	case LINUX_SO_REUSEADDR:
 		/*
-		 * Linux does not implement SO_REUSEPORT, but allows reuse of a
-		 * host:port pair through SO_REUSEADDR even if the address is not a
-		 * multicast-address.  Effectively, this means that we should use
-		 * SO_REUSEPORT to allow Linux applications to not exit with
-		 * EADDRINUSE
+		 * Linux does not implement SO_REUSEPORT, but allows reuse of
+		 * a host:port pair through SO_REUSEADDR even if the address
+		 * is not a multicast-address. Effectively, this means that we
+		 * should use SO_REUSEPORT to allow Linux applications to not
+		 * exit with EADDRINUSE
 		 */
 		return SO_REUSEPORT;
 	case LINUX_SO_TYPE:
@@ -880,20 +880,51 @@ linux_to_bsd_so_sockopt(int lopt)
 		return SO_SNDBUF;
 	case LINUX_SO_RCVBUF:
 		return SO_RCVBUF;
-	case LINUX_SO_SNDLOWAT:
-		return SO_SNDLOWAT;
-	case LINUX_SO_RCVLOWAT:
-		return SO_RCVLOWAT;
 	case LINUX_SO_KEEPALIVE:
 		return SO_KEEPALIVE;
 	case LINUX_SO_OOBINLINE:
 		return SO_OOBINLINE;
+	case LINUX_SO_NO_CHECK:
+	case LINUX_SO_PRIORITY:
+		return -1;
 	case LINUX_SO_LINGER:
 		return SO_LINGER;
+	case LINUX_SO_BSDCOMPAT:
+	case LINUX_SO_PASSCRED:
+	case LINUX_SO_PEERCRED:
+		return -1;
+	case LINUX_SO_RCVLOWAT:
+		return SO_RCVLOWAT;
+	case LINUX_SO_SNDLOWAT:
+		return SO_SNDLOWAT;
+	case LINUX_SO_RCVTIMEO:
+		return SO_RCVTIMEO;
+	case LINUX_SO_SNDTIMEO:
+		return SO_SNDTIMEO;
+	case LINUX_SO_SECURITY_AUTHENTICATION:
+	case LINUX_SO_SECURITY_ENCRYPTION_TRANSPORT:
+	case LINUX_SO_SECURITY_ENCRYPTION_NETWORK:
+	case LINUX_SO_BINDTODEVICE:
+	case LINUX_SO_ATTACH_FILTER:
+	case LINUX_SO_DETACH_FILTER:
+	case LINUX_SO_PEERNAME:
+		return -1;
+	case LINUX_SO_TIMESTAMP:
+		return SO_TIMESTAMP;
 	case LINUX_SO_ACCEPTCONN:
-		return SO_ACCEPTCONN;
-	case LINUX_SO_PRIORITY:
-	case LINUX_SO_NO_CHECK:
+	case LINUX_SO_PEERSEC:
+	case LINUX_SO_SNDBUFFORCE:
+	case LINUX_SO_RCVBUFFORCE:
+	case LINUX_SO_PASSSEC:
+	case LINUX_SO_TIMESTAMPNS:
+	case LINUX_SO_MARK:
+	case LINUX_SO_TIMESTAMPING:
+	case LINUX_SO_PROTOCOL:
+	case LINUX_SO_DOMAIN:
+	case LINUX_SO_RXQ_OVFL:
+	case LINUX_SO_WIFI_STATUS:
+	case LINUX_SO_PEEK_OFF:
+	case LINUX_SO_NOFCS:
 	default:
 		return -1;
 	}



CVS commit: src/usr.bin/cvslatest

2020-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Nov  3 22:21:44 UTC 2020

Modified Files:
src/usr.bin/cvslatest: cvslatest.c

Log Message:
Handle dummy timestamp better and check for I/O errors. From khorben@


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/cvslatest/cvslatest.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/cvslatest/cvslatest.c
diff -u src/usr.bin/cvslatest/cvslatest.c:1.8 src/usr.bin/cvslatest/cvslatest.c:1.9
--- src/usr.bin/cvslatest/cvslatest.c:1.8	Sat Mar  9 11:18:22 2019
+++ src/usr.bin/cvslatest/cvslatest.c	Tue Nov  3 17:21:43 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cvslatest.c,v 1.8 2019/03/09 16:18:22 christos Exp $	*/
+/*	$NetBSD: cvslatest.c,v 1.9 2020/11/03 22:21:43 christos Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: cvslatest.c,v 1.8 2019/03/09 16:18:22 christos Exp $");
+__RCSID("$NetBSD: cvslatest.c,v 1.9 2020/11/03 22:21:43 christos Exp $");
 
 /*
  * Find the latest timestamp in a set of CVS trees, by examining the
@@ -115,10 +115,18 @@ getlatest(const FTSENT *e, const char *r
 			goto mal;
 		if ((dt = strtok(NULL, "/")) == NULL)
 			goto mal;
+		if (strcmp(dt, "dummy timestamp") == 0) {
+			warnx("Can't get timestamp from uncommitted file `%s'",
+			ename);
+			if (!ignore)
+exit(EXIT_FAILURE);
+			continue;
+		}
 		if ((p = strptime(dt, fmt, &tm)) == NULL || *p) {
 			warnx("Malformed time `%s' in `%s'", dt, ename);
 			if (!ignore)
 exit(EXIT_FAILURE);
+			continue;
 		}
 		tm.tm_isdst = 0;	// We are in GMT anyway
 		if ((t = mktime(&tm)) == (time_t)-1)
@@ -132,6 +140,8 @@ getlatest(const FTSENT *e, const char *r
 printlat(lat);
 		}
 	}
+	if (ferror(fp))
+		err(EXIT_FAILURE, "Can't read `%s'", ename);
 
 	fclose(fp);
 	return;



CVS commit: src/sys/rump

2020-11-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov  4 22:06:39 UTC 2020

Modified Files:
src/sys/rump/include/rump: rump.h
src/sys/rump/librump/rumpkern: rump.c

Log Message:
PR/55781: Ruslan Nikolaev: rump_init() does differentiate when all CPUs are
initialized


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/rump/include/rump/rump.h
cvs rdiff -u -r1.349 -r1.350 src/sys/rump/librump/rumpkern/rump.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/rump/include/rump/rump.h
diff -u src/sys/rump/include/rump/rump.h:1.72 src/sys/rump/include/rump/rump.h:1.73
--- src/sys/rump/include/rump/rump.h:1.72	Sun Jun 14 19:38:25 2020
+++ src/sys/rump/include/rump/rump.h	Wed Nov  4 17:06:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.h,v 1.72 2020/06/14 23:38:25 kamil Exp $	*/
+/*	$NetBSD: rump.h,v 1.73 2020/11/04 22:06:38 christos Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -118,6 +118,7 @@ void	rump_unschedule(void);
 void	rump_printevcnts(void);
 
 int	rump_daemonize_begin(void);
+int	rump_init_callback(void (*)(void));
 int	rump_init(void);
 int	rump_init_server(const char *);
 int	rump_daemonize_done(int);

Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.349 src/sys/rump/librump/rumpkern/rump.c:1.350
--- src/sys/rump/librump/rumpkern/rump.c:1.349	Wed Jun 10 20:33:30 2020
+++ src/sys/rump/librump/rumpkern/rump.c	Wed Nov  4 17:06:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.349 2020/06/11 00:33:30 kamil Exp $	*/
+/*	$NetBSD: rump.c,v 1.350 2020/11/04 22:06:39 christos Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.349 2020/06/11 00:33:30 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.350 2020/11/04 22:06:39 christos Exp $");
 
 #include 
 #define ELFSIZE ARCH_ELFSIZE
@@ -218,7 +218,7 @@ RUMP_COMPONENT(RUMP_COMPONENT_POSTINIT)
 #endif /* RUMP_USE_CTOR */
 
 int
-rump_init(void)
+rump_init_callback(void (*cpuinit_callback) (void))
 {
 	char buf[256];
 	struct timespec bts;
@@ -231,7 +231,7 @@ rump_init(void)
 	if (rump_inited)
 		return 0;
 	else if (rump_inited == -1)
-		panic("rump_init: host process restart required");
+		panic("%s: host process restart required", __func__);
 	else
 		rump_inited = 1;
 
@@ -257,11 +257,12 @@ rump_init(void)
 	}
 
 	if (rumpuser_getparam(RUMPUSER_PARAM_NCPU, buf, sizeof(buf)) != 0)
-		panic("mandatory hypervisor configuration (NCPU) missing");
+		panic("%s: mandatory hypervisor configuration (NCPU) missing",
+		__func__);
 	numcpu = strtoll(buf, NULL, 10);
 	if (numcpu < 1) {
-		panic("rump kernels are not lightweight enough for \"%d\" CPUs",
-		numcpu);
+		panic("%s: rump kernels are not lightweight enough for %d CPUs",
+		__func__, numcpu);
 	}
 
 	rump_thread_init();
@@ -393,6 +394,9 @@ rump_init(void)
 
 	mp_online = true;
 
+	if (cpuinit_callback)
+		(*cpuinit_callback)();
+
 	/* CPUs are up.  allow kernel threads to run */
 	rump_thread_allow(NULL);
 
@@ -415,7 +419,7 @@ rump_init(void)
 	if (rump_threads) {
 		if (kthread_create(PRI_PGDAEMON, KTHREAD_MPSAFE, NULL,
 		uvm_pageout, NULL, &uvm.pagedaemon_lwp, "pdaemon") != 0)
-			panic("pagedaemon create failed");
+			panic("%s: pagedaemon create failed", __func__);
 	} else
 		uvm.pagedaemon_lwp = NULL; /* doesn't match curlwp */
 
@@ -456,7 +460,9 @@ rump_init(void)
 
 	if (rumpuser_getparam(RUMPUSER_PARAM_HOSTNAME,
 	hostname, MAXHOSTNAMELEN) != 0) {
-		panic("mandatory hypervisor configuration (HOSTNAME) missing");
+		panic(
+		"%s: mandatory hypervisor configuration (HOSTNAME) missing",
+		__func__);
 	}
 	hostnamelen = strlen(hostname);
 
@@ -474,7 +480,7 @@ rump_init(void)
 	initproc = proc_find_raw(1);
 	mutex_exit(&proc_lock);
 	if (initproc == NULL)
-		panic("where in the world is initproc?");
+		panic("%s: where in the world is initproc?", __func__);
 	strlcpy(initproc->p_comm, "rumplocal", sizeof(initproc->p_comm));
 
 	rump_component_init(RUMP_COMPONENT_POSTINIT);
@@ -496,6 +502,13 @@ rump_init(void)
 
 	return 0;
 }
+
+int
+rump_init(void)
+{
+	return rump_init_callback(NULL);
+}
+
 /* historic compat */
 __strong_alias(rump__init,rump_init);
 



CVS commit: xsrc/external/mit/libepoxy/src

2020-11-04 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Wed Nov  4 22:46:20 UTC 2020

Modified Files:
xsrc/external/mit/libepoxy/src: egl_generated_dispatch.c
gl_generated_dispatch.c glx_generated_dispatch.c

Log Message:
fix lint build


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
xsrc/external/mit/libepoxy/src/egl_generated_dispatch.c
cvs rdiff -u -r1.6 -r1.7 \
xsrc/external/mit/libepoxy/src/gl_generated_dispatch.c \
xsrc/external/mit/libepoxy/src/glx_generated_dispatch.c

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/libepoxy/src/egl_generated_dispatch.c
diff -u xsrc/external/mit/libepoxy/src/egl_generated_dispatch.c:1.5 xsrc/external/mit/libepoxy/src/egl_generated_dispatch.c:1.6
--- xsrc/external/mit/libepoxy/src/egl_generated_dispatch.c:1.5	Sun Nov  1 23:47:22 2020
+++ xsrc/external/mit/libepoxy/src/egl_generated_dispatch.c	Wed Nov  4 17:46:20 2020
@@ -11,7 +11,7 @@
 #include "dispatch_common.h"
 #include "epoxy/egl.h"
 
-#ifdef __GNUC__
+#if defined(__GNUC__) || defined(__lint__)
 #define EPOXY_NOINLINE __attribute__((noinline))
 #elif defined (_MSC_VER)
 #define EPOXY_NOINLINE __declspec(noinline)

Index: xsrc/external/mit/libepoxy/src/gl_generated_dispatch.c
diff -u xsrc/external/mit/libepoxy/src/gl_generated_dispatch.c:1.6 xsrc/external/mit/libepoxy/src/gl_generated_dispatch.c:1.7
--- xsrc/external/mit/libepoxy/src/gl_generated_dispatch.c:1.6	Sun Nov  1 23:47:22 2020
+++ xsrc/external/mit/libepoxy/src/gl_generated_dispatch.c	Wed Nov  4 17:46:20 2020
@@ -26,7 +26,7 @@
 #include "dispatch_common.h"
 #include "epoxy/gl.h"
 
-#ifdef __GNUC__
+#if defined(__GNUC__) || defined(__lint__)
 #define EPOXY_NOINLINE __attribute__((noinline))
 #elif defined (_MSC_VER)
 #define EPOXY_NOINLINE __declspec(noinline)
Index: xsrc/external/mit/libepoxy/src/glx_generated_dispatch.c
diff -u xsrc/external/mit/libepoxy/src/glx_generated_dispatch.c:1.6 xsrc/external/mit/libepoxy/src/glx_generated_dispatch.c:1.7
--- xsrc/external/mit/libepoxy/src/glx_generated_dispatch.c:1.6	Sun Nov  1 23:47:22 2020
+++ xsrc/external/mit/libepoxy/src/glx_generated_dispatch.c	Wed Nov  4 17:46:20 2020
@@ -26,7 +26,7 @@
 #include "dispatch_common.h"
 #include "epoxy/glx.h"
 
-#ifdef __GNUC__
+#if defined(__GNUC__) || defined(__lint__)
 #define EPOXY_NOINLINE __attribute__((noinline))
 #elif defined (_MSC_VER)
 #define EPOXY_NOINLINE __declspec(noinline)



CVS commit: src/usr.sbin/sysinst

2020-11-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov  5 19:13:21 UTC 2020

Modified Files:
src/usr.sbin/sysinst: msg_xlat.sh

Log Message:
Print the program name in error messages.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/msg_xlat.sh

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/msg_xlat.sh
diff -u src/usr.sbin/sysinst/msg_xlat.sh:1.1 src/usr.sbin/sysinst/msg_xlat.sh:1.2
--- src/usr.sbin/sysinst/msg_xlat.sh:1.1	Sat Jul 26 15:30:44 2014
+++ src/usr.sbin/sysinst/msg_xlat.sh	Thu Nov  5 14:13:21 2020
@@ -1,5 +1,5 @@
 #! /bin/sh
-#	$NetBSD: msg_xlat.sh,v 1.1 2014/07/26 19:30:44 dholland Exp $
+#	$NetBSD: msg_xlat.sh,v 1.2 2020/11/05 19:13:21 christos Exp $
 
 #-
 # Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,12 +30,17 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #
 
+PROG=$(basename "$0")
 usage()
 {
-	echo "usage: msg_xlat.sh [-ci] [-d msg_defs.h] [-f fmt_count]" >&2
+	echo "Usage: $PROG [-ci] [-d msg_defs.h] [-f fmt_count]" >&2
 	exit 1
 }
 
+error() {
+	echo "$PROG: ERROR $@" >&2
+}
+
 count_fmtargs=
 msg_defs=msg_defs.h
 while getopts cd:f:i f
@@ -112,7 +117,7 @@ do
 		name="$2"
 		eval number=\$MSG_$name
 		[ -z "$number" ] && {
-			echo "ERROR: unknown message \"$name\"" >&2
+			error "unknown message \"$name\""
 			[ -n "$IGNORE_MISSING_TRANSLATIONS" ] || rval=1
 			number=unknown
 		}
@@ -137,7 +142,7 @@ do
 	msg="${msg%z}"
 	eval old=\"\$MSGTEXT_$number\"
 	[ -n "$old" -a "$number" != unknown ] && {
-		echo "ERROR: Two translations for message \"$name\"" >&2
+		error "Two translations for message \"$name\""
 		[ -n "$IGNORE_MISSING_TRANSLATIONS" ] || rval=1
 	}
 	eval MSGTEXT_$number=\"\${msg}\"
@@ -156,7 +161,7 @@ do
 	}
 	eval count=\${count_$number:-unknown}
 	[ "$count" = $# ] || {
-		echo "ERROR: Wrong number of format specifiers in \"$sv_name\", got $#, expected $count" >&2
+		error "Wrong number of format specifiers in \"$sv_name\", got $#, expected $count"
 		[ -n "$IGNORE_MISSING_TRANSLATIONS" ] || rval=1
 	}
 done
@@ -177,7 +182,7 @@ while
 do
 	eval msg=\${MSGTEXT_$msgnum}
 	[ -z "$msg" ] && {
-		eval echo "ERROR: No translation for message \$MSGNUM_$msgnum" >&2
+		eval error "No translation for message \$MSGNUM_$msgnum"
 		printf '%-7d\0' 0
 		[ -n "$IGNORE_MISSING_TRANSLATIONS" ] || rval=1
 		continue



CVS commit: src/sys

2020-11-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov  6 14:50:13 UTC 2020

Modified Files:
src/sys/kern: uipc_domain.c uipc_usrreq.c
src/sys/rump/librump/rumpnet: net_stub.c
src/sys/sys: un.h

Log Message:
PR/55777: Ruslan Nikolaev: Move the unp_sysctl_create to uipc_usrreq.c to
facilitate splitting rump modules and does not require a dummy function.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/kern/uipc_domain.c
cvs rdiff -u -r1.199 -r1.200 src/sys/kern/uipc_usrreq.c
cvs rdiff -u -r1.40 -r1.41 src/sys/rump/librump/rumpnet/net_stub.c
cvs rdiff -u -r1.58 -r1.59 src/sys/sys/un.h

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

Modified files:

Index: src/sys/kern/uipc_domain.c
diff -u src/sys/kern/uipc_domain.c:1.107 src/sys/kern/uipc_domain.c:1.108
--- src/sys/kern/uipc_domain.c:1.107	Sat Oct 17 05:45:20 2020
+++ src/sys/kern/uipc_domain.c	Fri Nov  6 09:50:13 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_domain.c,v 1.107 2020/10/17 09:45:20 mlelstv Exp $	*/
+/*	$NetBSD: uipc_domain.c,v 1.108 2020/11/06 14:50:13 christos Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_domain.c,v 1.107 2020/10/17 09:45:20 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_domain.c,v 1.108 2020/11/06 14:50:13 christos Exp $");
 
 #include 
 #include 
@@ -692,7 +692,6 @@ sysctl_net_setup(void)
 		   SYSCTL_DESCR("SOCK_DGRAM protocol control block list"),
 		   sysctl_unpcblist, 0, NULL, 0,
 		   CTL_NET, PF_LOCAL, SOCK_DGRAM, CTL_CREATE, CTL_EOL);
-	unp_sysctl_create(&domain_sysctllog);
 }
 
 void

Index: src/sys/kern/uipc_usrreq.c
diff -u src/sys/kern/uipc_usrreq.c:1.199 src/sys/kern/uipc_usrreq.c:1.200
--- src/sys/kern/uipc_usrreq.c:1.199	Wed Aug 26 18:54:30 2020
+++ src/sys/kern/uipc_usrreq.c	Fri Nov  6 09:50:13 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_usrreq.c,v 1.199 2020/08/26 22:54:30 christos Exp $	*/
+/*	$NetBSD: uipc_usrreq.c,v 1.200 2020/11/06 14:50:13 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2004, 2008, 2009, 2020 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.199 2020/08/26 22:54:30 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.200 2020/11/06 14:50:13 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -196,6 +196,8 @@ static kcondvar_t unp_thread_cv;
 static lwp_t *unp_thread_lwp;
 static SLIST_HEAD(,file) unp_thread_discard;
 static int unp_defer;
+static struct sysctllog *usrreq_sysctllog;
+static void unp_sysctl_create(void);
 
 /* Compat interface */
 
@@ -219,6 +221,8 @@ uipc_init(void)
 {
 	int error;
 
+	unp_sysctl_create();
+
 	uipc_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NONE);
 	cv_init(&unp_thread_cv, "unpgc");
 
@@ -1988,40 +1992,42 @@ unp_discard_later(file_t *fp)
 	mutex_exit(&filelist_lock);
 }
 
-void
-unp_sysctl_create(struct sysctllog **clog)
+static void
+unp_sysctl_create(void)
 {
-	sysctl_createv(clog, 0, NULL, NULL,
+
+	KASSERT(usrreq_sysctllog == NULL);
+	sysctl_createv(&usrreq_sysctllog, 0, NULL, NULL,
 		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
 		   CTLTYPE_LONG, "sendspace",
 		   SYSCTL_DESCR("Default stream send space"),
 		   NULL, 0, &unpst_sendspace, 0,
 		   CTL_NET, PF_LOCAL, SOCK_STREAM, CTL_CREATE, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
+	sysctl_createv(&usrreq_sysctllog, 0, NULL, NULL,
 		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
 		   CTLTYPE_LONG, "recvspace",
 		   SYSCTL_DESCR("Default stream recv space"),
 		   NULL, 0, &unpst_recvspace, 0,
 		   CTL_NET, PF_LOCAL, SOCK_STREAM, CTL_CREATE, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
+	sysctl_createv(&usrreq_sysctllog, 0, NULL, NULL,
 		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
 		   CTLTYPE_LONG, "sendspace",
 		   SYSCTL_DESCR("Default datagram send space"),
 		   NULL, 0, &unpdg_sendspace, 0,
 		   CTL_NET, PF_LOCAL, SOCK_DGRAM, CTL_CREATE, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
+	sysctl_createv(&usrreq_sysctllog, 0, NULL, NULL,
 		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
 		   CTLTYPE_LONG, "recvspace",
 		   SYSCTL_DESCR("Default datagram recv space"),
 		   NULL, 0, &unpdg_recvspace, 0,
 		   CTL_NET, PF_LOCAL, SOCK_DGRAM, CTL_CREATE, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
+	sysctl_createv(&usrreq_sysctllog, 0, NULL, NULL,
 		   CTLFLAG_PERMANENT|CTLFLAG_READONLY,
 		   CTLTYPE_INT, "inflight",
 		   SYSCTL_DESCR("File descriptors in flight"),
 		   NULL, 0, &unp_rights, 0,
 		   CTL_NET, PF_LOCAL, CTL_CREATE, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
+	sysctl_createv(&usrreq_sysctllog, 0, NULL, NULL,
 		   CTLFLAG_PERMANENT|CTLFLAG_READONLY,
 		   CTLTYPE_INT, "deferred",
 		   SYSCTL_DESCR("File descriptors deferred for close"),

Index: src/sys/rump/li

CVS commit: src/sys/rump/dev/lib

2020-11-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov  6 15:35:33 UTC 2020

Modified Files:
src/sys/rump/dev/lib/libpci_usbhc: Makefile PCI_USBHC.ioconf
src/sys/rump/dev/lib/libusb: USB.ioconf

Log Message:
PR/55789: Ruslan Nikolaev: New rump drivers


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/rump/dev/lib/libpci_usbhc/Makefile
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/libpci_usbhc/PCI_USBHC.ioconf
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/dev/lib/libusb/USB.ioconf

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

Modified files:

Index: src/sys/rump/dev/lib/libpci_usbhc/Makefile
diff -u src/sys/rump/dev/lib/libpci_usbhc/Makefile:1.5 src/sys/rump/dev/lib/libpci_usbhc/Makefile:1.6
--- src/sys/rump/dev/lib/libpci_usbhc/Makefile:1.5	Mon Nov 16 18:27:08 2015
+++ src/sys/rump/dev/lib/libpci_usbhc/Makefile	Fri Nov  6 10:35:33 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2015/11/16 23:27:08 pooka Exp $
+#	$NetBSD: Makefile,v 1.6 2020/11/06 15:35:33 christos Exp $
 #
 
 RUMPTOP=${TOPRUMP}
@@ -14,6 +14,7 @@ RUMP_COMPONENT=ioconf
 SRCS+=	ohci_pci.c ohci.c
 SRCS+=	uhci_pci.c uhci.c
 SRCS+=	ehci_pci.c ehci.c
+SRCS+=	xhci_pci.c xhci.c
 SRCS+=	usb_pci.c
 
 CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/../dev

Index: src/sys/rump/dev/lib/libpci_usbhc/PCI_USBHC.ioconf
diff -u src/sys/rump/dev/lib/libpci_usbhc/PCI_USBHC.ioconf:1.1 src/sys/rump/dev/lib/libpci_usbhc/PCI_USBHC.ioconf:1.2
--- src/sys/rump/dev/lib/libpci_usbhc/PCI_USBHC.ioconf:1.1	Wed May 20 08:21:38 2015
+++ src/sys/rump/dev/lib/libpci_usbhc/PCI_USBHC.ioconf	Fri Nov  6 10:35:33 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: PCI_USBHC.ioconf,v 1.1 2015/05/20 12:21:38 pooka Exp $
+#	$NetBSD: PCI_USBHC.ioconf,v 1.2 2020/11/06 15:35:33 christos Exp $
 #
 
 ioconf pci_usbhc
@@ -11,3 +11,4 @@ pseudo-root pci*
 ohci* at pci?
 uhci* at pci?
 ehci* at pci?
+xhci* at pci?

Index: src/sys/rump/dev/lib/libusb/USB.ioconf
diff -u src/sys/rump/dev/lib/libusb/USB.ioconf:1.2 src/sys/rump/dev/lib/libusb/USB.ioconf:1.3
--- src/sys/rump/dev/lib/libusb/USB.ioconf:1.2	Wed May 20 07:51:32 2015
+++ src/sys/rump/dev/lib/libusb/USB.ioconf	Fri Nov  6 10:35:33 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: USB.ioconf,v 1.2 2015/05/20 11:51:32 pooka Exp $
+#	$NetBSD: USB.ioconf,v 1.3 2020/11/06 15:35:33 christos Exp $
 #
 
 ioconf usb
@@ -15,6 +15,7 @@ pseudo-root ugenhc*
 pseudo-root ehci*
 pseudo-root ohci*
 pseudo-root uhci*
+pseudo-root xhci*
 
 
 #
@@ -25,6 +26,7 @@ usb*at ugenhc?
 usb*	at ehci?
 usb*	at ohci?
 usb*	at uhci?
+usb*	at xhci?
 
 
 # USB ROOT Hub



CVS commit: src/usr.sbin/syslogd

2020-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  7 16:16:33 UTC 2020

Modified Files:
src/usr.sbin/syslogd: syslogd.c

Log Message:
PR/55794: Jan Schaumann: Eliminate unchecked malloc


To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 src/usr.sbin/syslogd/syslogd.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.sbin/syslogd/syslogd.c
diff -u src/usr.sbin/syslogd/syslogd.c:1.133 src/usr.sbin/syslogd/syslogd.c:1.134
--- src/usr.sbin/syslogd/syslogd.c:1.133	Tue Sep 29 10:08:43 2020
+++ src/usr.sbin/syslogd/syslogd.c	Sat Nov  7 11:16:33 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: syslogd.c,v 1.133 2020/09/29 14:08:43 gson Exp $	*/
+/*	$NetBSD: syslogd.c,v 1.134 2020/11/07 16:16:33 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = "@(#)syslogd.c	8.3 (Berkeley) 4/4/94";
 #else
-__RCSID("$NetBSD: syslogd.c,v 1.133 2020/09/29 14:08:43 gson Exp $");
+__RCSID("$NetBSD: syslogd.c,v 1.134 2020/11/07 16:16:33 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -206,7 +206,8 @@ bool	BSDOutputFormat = true;	/* if true 
  * configurations (e.g. with SG="0").
  */
 char	appname[]   = "syslogd";/* the APPNAME for own messages */
-char   *include_pid = NULL;	/* include PID in own messages */
+char   *include_pid;		/* include PID in own messages */
+char	include_pid_buf[6];
 
 
 /* init and setup */
@@ -573,9 +574,8 @@ getgroup:
 #endif /* __NetBSD_Version__ */
 	}
 
-#define MAX_PID_LEN 5
-	include_pid = malloc(MAX_PID_LEN+1);
-	snprintf(include_pid, MAX_PID_LEN+1, "%d", getpid());
+	include_pid = include_pid_buf;
+	snprintf(include_pid_buf, sizeof(include_pid_buf), "%d", getpid());
 
 	/*
 	 * Create the global kernel event descriptor.



CVS commit: src/usr.sbin/syslogd

2020-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  7 17:46:57 UTC 2020

Modified Files:
src/usr.sbin/syslogd: syslogd.c

Log Message:
make the buffer fit any 32 bit number.


To generate a diff of this commit:
cvs rdiff -u -r1.134 -r1.135 src/usr.sbin/syslogd/syslogd.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.sbin/syslogd/syslogd.c
diff -u src/usr.sbin/syslogd/syslogd.c:1.134 src/usr.sbin/syslogd/syslogd.c:1.135
--- src/usr.sbin/syslogd/syslogd.c:1.134	Sat Nov  7 11:16:33 2020
+++ src/usr.sbin/syslogd/syslogd.c	Sat Nov  7 12:46:56 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: syslogd.c,v 1.134 2020/11/07 16:16:33 christos Exp $	*/
+/*	$NetBSD: syslogd.c,v 1.135 2020/11/07 17:46:56 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = "@(#)syslogd.c	8.3 (Berkeley) 4/4/94";
 #else
-__RCSID("$NetBSD: syslogd.c,v 1.134 2020/11/07 16:16:33 christos Exp $");
+__RCSID("$NetBSD: syslogd.c,v 1.135 2020/11/07 17:46:56 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -207,7 +207,7 @@ bool	BSDOutputFormat = true;	/* if true 
  */
 char	appname[]   = "syslogd";/* the APPNAME for own messages */
 char   *include_pid;		/* include PID in own messages */
-char	include_pid_buf[6];
+char	include_pid_buf[11];
 
 
 /* init and setup */



CVS commit: src/sys/modules/compat_netbsd32

2020-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  7 21:42:32 UTC 2020

Modified Files:
src/sys/modules/compat_netbsd32: Makefile

Log Message:
fix arm test


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/modules/compat_netbsd32/Makefile

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

Modified files:

Index: src/sys/modules/compat_netbsd32/Makefile
diff -u src/sys/modules/compat_netbsd32/Makefile:1.36 src/sys/modules/compat_netbsd32/Makefile:1.37
--- src/sys/modules/compat_netbsd32/Makefile:1.36	Sun Nov  1 13:51:03 2020
+++ src/sys/modules/compat_netbsd32/Makefile	Sat Nov  7 16:42:32 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.36 2020/11/01 18:51:03 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.37 2020/11/07 21:42:32 christos Exp $
 
 .include "../Makefile.inc"
 .include "../Makefile.assym"
@@ -62,7 +62,7 @@ SRCS+=	netbsd32_sigcode.S
 SRCS+=	netbsd32_machdep.c
 .endif
 
-.if ${MACHINE_ARCH} == "arm"
+.if !empty(MACHINE_ARCH:M*arm*)
 .PATH:	${S}/arch/arm/arm32
 SRCS+=	netbsd32_machdep.c
 .endif



CVS commit: src/share/mk

2020-11-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov  9 16:15:05 UTC 2020

Modified Files:
src/share/mk: bsd.lib.mk bsd.prog.mk bsd.sys.mk sys.mk

Log Message:
- make the CTFCONVERT command lines consistent and concise by putting all
  the implementation stuff in a variable CTFCONVERT_RUN
- introduce an OBJECT_TARGET variable that contains the output object file
- when we need to run ctfconvert, go through an intermediate ${.TARGET}.o
  file, instead of writing directly to ${.TARGET} and then overwriting
  ${.TARGET} with ctfconvert. This avoids build failures after a build
  got interrupted (the "partially built from C" scourge).


To generate a diff of this commit:
cvs rdiff -u -r1.383 -r1.384 src/share/mk/bsd.lib.mk
cvs rdiff -u -r1.334 -r1.335 src/share/mk/bsd.prog.mk
cvs rdiff -u -r1.303 -r1.304 src/share/mk/bsd.sys.mk
cvs rdiff -u -r1.143 -r1.144 src/share/mk/sys.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.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.383 src/share/mk/bsd.lib.mk:1.384
--- src/share/mk/bsd.lib.mk:1.383	Mon Jun  1 10:39:14 2020
+++ src/share/mk/bsd.lib.mk	Mon Nov  9 11:15:05 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.383 2020/06/01 14:39:14 christos Exp $
+#	$NetBSD: bsd.lib.mk,v 1.384 2020/11/09 16:15:05 christos Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include 
@@ -221,20 +221,16 @@ LIBSTRIPSHLIBOBJS=	yes
 
 .c.o:
 	${_MKTARGET_COMPILE}
-	${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
-.if defined(CTFCONVERT)
-	${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
-.endif
+	${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} ${OBJECT_TARGET}
+	${CTFCONVERT_RUN}
 .if defined(LIBSTRIPCOBJS)
 	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
 
 .c.po:
 	${_MKTARGET_COMPILE}
-	${COMPILE.c} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${PGFLAGS} ${.IMPSRC} -o ${.TARGET}
-.if defined(CTFCONVERT)
-	${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
-.endif
+	${COMPILE.c} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${PGFLAGS} ${.IMPSRC} ${OBJECT_TARGET}
+	${CTFCONVERT_RUN}
 .if defined(LIBSTRIPCOBJS)
 	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
@@ -277,20 +273,16 @@ LIBSTRIPSHLIBOBJS=	yes
 
 .f.o:
 	${_MKTARGET_COMPILE}
-	${COMPILE.f} ${.IMPSRC} -o ${.TARGET}
-.if defined(CTFCONVERT)
-	${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
-.endif
+	${COMPILE.f} ${.IMPSRC} ${OBJECT_TARGET}
+	${CTFCONVERT_RUN}
 .if defined(LIBSTRIPFOBJS)
 	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
 
 .f.po:
 	${_MKTARGET_COMPILE}
-	${COMPILE.f} ${PROFFLAGS} ${PGFLAGS} ${.IMPSRC} -o ${.TARGET}
-.if defined(CTFCONVERT)
-	${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
-.endif
+	${COMPILE.f} ${PROFFLAGS} ${PGFLAGS} ${.IMPSRC} ${OBJECT_TARGET}
+	${CTFCONVERT_RUN}
 .if defined(LIBSTRIPFOBJS)
 	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
@@ -312,20 +304,16 @@ LIBSTRIPSHLIBOBJS=	yes
 
 .m.o:
 	${_MKTARGET_COMPILE}
-	${COMPILE.m} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
-.if defined(CTFCONVERT)
-	${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
-.endif
+	${COMPILE.m} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} ${OBJECT_TARGET}
+	${CTFCONVERT_RUN}
 .if defined(LIBSTRIPOBJCOBJS)
 	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
 
 .m.po:
 	${_MKTARGET_COMPILE}
-	${COMPILE.m} ${PROFFLAGS} ${PGFLAGS} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
-.if defined(CTFCONVERT)
-	${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
-.endif
+	${COMPILE.m} ${PROFFLAGS} ${PGFLAGS} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} ${OBJECT_TARGET}
+	${CTFCONVERT_RUN}
 .if defined(LIBSTRIPOBJCOBJS)
 	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
@@ -346,40 +334,32 @@ LIBSTRIPSHLIBOBJS=	yes
 
 .s.o:
 	${_MKTARGET_COMPILE}
-	${COMPILE.s} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
-.if defined(CTFCONVERT)
-	${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
-.endif
+	${COMPILE.s} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} ${OBJECT_TARGET}
+	${CTFCONVERT_RUN}
 .if defined(LIBSTRIPAOBJS)
 	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
 
 .S.o:
 	${_MKTARGET_COMPILE}
-	${COMPILE.S} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
-.if defined(CTFCONVERT)
-	${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
-.endif
+	${COMPILE.S} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} ${OBJECT_TARGET}
+	${CTFCONVERT_RUN}
 .if defined(LIBSTRIPAOBJS)
 	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
 
 .s.po:
 	${_MKTARGET_COMPILE}
-	${COMPILE.s} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
-.if defined(CTFCONVERT)
-	${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
-.endif
+	${COMPILE.s} ${PRO

CVS commit: src/games/warp

2020-11-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Nov 10 22:42:19 UTC 2020

Modified Files:
src/games/warp: bang.c bang.h config.H config.h config.h.SH init.c
init.h intrp.c intrp.h move.c move.h object.c object.h play.c
play.h score.c score.h sig.c sig.h sm.c term.c term.h them.c them.h
us.c us.h util.c util.h version.c version.h warp.c warp.h weapon.c
weapon.h

Log Message:
Time warp forward 34 years so that it compiles (but not work)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/games/warp/bang.c src/games/warp/bang.h \
src/games/warp/config.h src/games/warp/init.c src/games/warp/init.h \
src/games/warp/intrp.h src/games/warp/move.c src/games/warp/move.h \
src/games/warp/object.c src/games/warp/object.h src/games/warp/play.c \
src/games/warp/play.h src/games/warp/score.h src/games/warp/them.c \
src/games/warp/them.h src/games/warp/us.c src/games/warp/us.h \
src/games/warp/version.h src/games/warp/weapon.c src/games/warp/weapon.h
cvs rdiff -u -r1.1 -r1.2 src/games/warp/config.H src/games/warp/config.h.SH
cvs rdiff -u -r1.3 -r1.4 src/games/warp/intrp.c src/games/warp/score.c \
src/games/warp/sig.c src/games/warp/sig.h src/games/warp/sm.c \
src/games/warp/term.c src/games/warp/term.h src/games/warp/util.c \
src/games/warp/util.h src/games/warp/version.c src/games/warp/warp.c \
src/games/warp/warp.h

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

Modified files:

Index: src/games/warp/bang.c
diff -u src/games/warp/bang.c:1.2 src/games/warp/bang.c:1.3
--- src/games/warp/bang.c:1.2	Mon Nov  9 19:02:11 2020
+++ src/games/warp/bang.c	Tue Nov 10 17:42:19 2020
@@ -26,17 +26,15 @@
 #include "bang.h"
 
 void
-bang_init()
+bang_init(void)
 {
 ;
 }
 
 void
-make_plink(y,x)
-Reg1 int x;
-Reg2 int y;
+make_plink(int x, int y)
 {
-Reg3 OBJECT *obj;
+OBJECT *obj;
 
 move(y+1,x*2,0);
 beg_qwrite();
@@ -57,11 +55,7 @@ Reg2 int y;
 }
 
 void
-make_blast(y,x,mass,size)
-Reg1 int x;
-Reg2 int y;
-int size;
-long mass;
+make_blast(int x, int y, int size, long mass)
 {
 bangy[nxtbang] = y;
 bangx[nxtbang] = x;
@@ -77,7 +71,7 @@ long mass;
 	return;
 }
 else if (mass >= 0) {
-	Reg3 OBJECT *obj;
+	OBJECT *obj;
 
 	move(y+1,x*2,0);
 	beg_qwrite();
@@ -107,15 +101,15 @@ long mass;
 }
 
 void
-do_bangs()
+do_bangs(void)
 {
-Reg1 int x;
-Reg2 int y;
-Reg3 int i;
-Reg4 int j;
-Reg7 int k;
-Reg5 int lastxy;
-Reg6 OBJECT *obj;
+int x;
+int y;
+int i;
+int j;
+int k;
+int lastxy;
+OBJECT *obj;
 
 /* read blast list and update blast array */
 assert(nxtbang >= 0 && nxtbang <= XSIZE * YSIZE);
@@ -131,7 +125,7 @@ do_bangs()
 	yblasted[yy[j] = (y+YSIZE00) % YSIZE] |= 1;
 	xblasted[xx[j] = (x+XSIZE00) % XSIZE] |= 1;
 	}
-	blasted = TRUE;
+	blasted = true;
 	for (y=lastxy;y>=0;--y) {
 	for (x=lastxy;x>=0;--x) {
 		if (lastxy > 2) {
Index: src/games/warp/bang.h
diff -u src/games/warp/bang.h:1.2 src/games/warp/bang.h:1.3
--- src/games/warp/bang.h:1.2	Mon Nov  9 19:02:11 2020
+++ src/games/warp/bang.h	Tue Nov 10 17:42:19 2020
@@ -24,7 +24,7 @@ EXT int yy[MAXBDIST];
 EXT int nxtbang;
 EXT bool banging;
 
-void make_plink();
-void make_blast();
-void do_bangs();
-void bang_init();
+void bang_init(void);
+void make_plink(int, int);
+void make_blast(int, int, int, long);
+void do_bangs(void);
Index: src/games/warp/config.h
diff -u src/games/warp/config.h:1.2 src/games/warp/config.h:1.3
--- src/games/warp/config.h:1.2	Tue Nov 10 03:49:08 2020
+++ src/games/warp/config.h	Tue Nov 10 17:42:19 2020
@@ -3,7 +3,7 @@
  *	to find out if there is input pending on an IO channel.  Generally
  *	the routine is used only if FIONREAD and O_NDELAY aren't available.
  */
-#/*undef	RDCHK		/**/
+#undef	RDCHK		/**/
 
 /* SCOREFULL:
  *	This symbol, if defined, indicates that any scoreboard kept by the
@@ -11,7 +11,7 @@
  *	to the user's login name.  If the user can change his full name he
  *	can enter multiple scores if this is defined.
  */
-#/*undef	SCOREFULL	/**/
+#undef	SCOREFULL	/**/
 
 /* SIGNEDCHAR:
  *	This symbol, if defined, indicates that characters are a signed type.
@@ -25,7 +25,7 @@
  *	termio.h rather than sgtty.h.  There are also differences in the
  *	ioctl() calls that depend on the value of this symbol.
  */
-#/*undef	TERMIO		/**/
+#undef	TERMIO		/**/
 
 /* USENDIR:
  *	This symbol, if defined, indicates that the program should compile
@@ -35,15 +35,15 @@
  *	This symbol, if defined, indicates that the program should include the
  *	system's version of ndir.h, rather than the one with this package.
  */
-#/*undef	USENDIR		/**/
-#/*undef	LIBNDIR		/**/
+#undef	USENDIR		/**/
+#undef	LIBNDIR		/**/
 #define LIBNDIR
 
 /* WHOAMI:
  *	This symbol, if defined, indicates that the program may include
  *	whoami.h.
  */
-#/*undef	WHOAMI		/**/
+#undef	WHOAMI		

CVS commit: src/games/warp

2020-11-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Nov 10 22:52:32 UTC 2020

Modified Files:
src/games/warp: warp.c

Log Message:
pray-tell where are you trying to write?


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/games/warp/warp.c

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

Modified files:

Index: src/games/warp/warp.c
diff -u src/games/warp/warp.c:1.4 src/games/warp/warp.c:1.5
--- src/games/warp/warp.c:1.4	Tue Nov 10 17:42:19 2020
+++ src/games/warp/warp.c	Tue Nov 10 17:52:32 2020
@@ -325,7 +325,7 @@ main(int argc, char *argv[])
 	if (!experimenting) {
 		if ((savfil = fopen(savefilename,"w")) == NULL) {
 		resetty();
-		printf("Can't open savefile\r\n");
+		printf("Can't open savefile `%s'\r\n", savefilename);
 		finalize(1);
 		}
 		fprintf(savfil,



CVS commit: src/games/warp

2020-11-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Nov 10 22:52:46 UTC 2020

Modified Files:
src/games/warp: term.c

Log Message:
don't segv if the terminal is too big.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/games/warp/term.c

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

Modified files:

Index: src/games/warp/term.c
diff -u src/games/warp/term.c:1.4 src/games/warp/term.c:1.5
--- src/games/warp/term.c:1.4	Tue Nov 10 17:42:19 2020
+++ src/games/warp/term.c	Tue Nov 10 17:52:45 2020
@@ -286,6 +286,8 @@ term_set(char *tcbuf) /* temp area for "
 	no_can_do("dumb");
 if (!scorespec && (LINES < 24 || COLS < 80))
 	no_can_do("puny");
+if (LINES > 25)
+	no_can_do("humongus");
 
 crmode();
 raw();



CVS commit: src/games/warp

2020-11-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Nov 10 22:56:49 UTC 2020

Removed Files:
src/games/warp: config.H

Log Message:
can't have config.h and config.H in case-preserving but case-folding 
file-systems.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r0 src/games/warp/config.H

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



CVS commit: src/games/warp

2020-11-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Nov 10 23:03:22 UTC 2020

Modified Files:
src/games/warp: util.c

Log Message:
Antivaxer support.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/games/warp/util.c

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

Modified files:

Index: src/games/warp/util.c
diff -u src/games/warp/util.c:1.4 src/games/warp/util.c:1.5
--- src/games/warp/util.c:1.4	Tue Nov 10 17:42:19 2020
+++ src/games/warp/util.c	Tue Nov 10 18:03:22 2020
@@ -29,11 +29,6 @@ util_init(void)
 
 void
 movc3(int len, char *src, char *dest)
-#ifdef vax
-{
-asm("movc3 4(ap),*8(ap),*12(ap)");
-}
-#else
 {
 if (dest <= src) {
 	for (; len; len--) {
@@ -48,7 +43,6 @@ movc3(int len, char *src, char *dest)
 	}
 }
 }
-#endif
 
 void
 no_can_do(const char *what)



CVS commit: src/games/warp

2020-11-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Nov 10 23:32:33 UTC 2020

Modified Files:
src/games/warp: play.c

Log Message:
remove error(1) comments


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/games/warp/play.c

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

Modified files:

Index: src/games/warp/play.c
diff -u src/games/warp/play.c:1.3 src/games/warp/play.c:1.4
--- src/games/warp/play.c:1.3	Tue Nov 10 17:42:19 2020
+++ src/games/warp/play.c	Tue Nov 10 18:32:33 2020
@@ -138,8 +138,6 @@ play(void)
 			possiblescore += 5000;
 		}
 		if (apolloflag & 2) {
-/*###141 [cc] warning: array subscript has type 'char' [-Wchar-subscripts]%%%*/
-/*###141 [cc] warning: array subscript has type 'char' [-Wchar-subscripts]%%%*/
 			if (blast[realapollo->posy][realapollo->posx] <= 32000)
 			bvely = bvelx = 0;
 			realapollo->energy = 32000;



CVS commit: src/games/warp

2020-11-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 11 17:11:19 UTC 2020

Modified Files:
src/games/warp: Makefile config.h intrp.c score.c term.c term.h warp.h

Log Message:
- use termios
- enable setgid games
- enable savedir


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/games/warp/Makefile
cvs rdiff -u -r1.3 -r1.4 src/games/warp/config.h
cvs rdiff -u -r1.4 -r1.5 src/games/warp/intrp.c src/games/warp/score.c \
src/games/warp/term.h src/games/warp/warp.h
cvs rdiff -u -r1.5 -r1.6 src/games/warp/term.c

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

Modified files:

Index: src/games/warp/Makefile
diff -u src/games/warp/Makefile:1.2 src/games/warp/Makefile:1.3
--- src/games/warp/Makefile:1.2	Tue Nov 10 03:49:08 2020
+++ src/games/warp/Makefile	Wed Nov 11 12:11:19 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2020/11/10 08:49:08 kamil Exp $
+#	$NetBSD: Makefile,v 1.3 2020/11/11 17:11:19 christos Exp $
 
 .include 
 
@@ -18,6 +18,9 @@ HIDEGAME=hidegame
 SETGIDGAME=yes
 MAN=	warp.6
 
+BINGRP= games
+BINMODE=2555
+
 warp.6:
 	${_MKTARGET_CREATE}
 	cat ${.CURDIR}/warp.man > ${.TARGET}

Index: src/games/warp/config.h
diff -u src/games/warp/config.h:1.3 src/games/warp/config.h:1.4
--- src/games/warp/config.h:1.3	Tue Nov 10 17:42:19 2020
+++ src/games/warp/config.h	Wed Nov 11 12:11:19 2020
@@ -20,12 +20,12 @@
  */
 #define	SIGNEDCHAR	/**/
 
-/* TERMIO:
+/* TERMIOS:
  *	This symbol, if defined, indicates that the program should include
  *	termio.h rather than sgtty.h.  There are also differences in the
  *	ioctl() calls that depend on the value of this symbol.
  */
-#undef	TERMIO		/**/
+#define	TERMIOS		/**/
 
 /* USENDIR:
  *	This symbol, if defined, indicates that the program should compile

Index: src/games/warp/intrp.c
diff -u src/games/warp/intrp.c:1.4 src/games/warp/intrp.c:1.5
--- src/games/warp/intrp.c:1.4	Tue Nov 10 17:42:19 2020
+++ src/games/warp/intrp.c	Wed Nov 11 12:11:19 2020
@@ -568,7 +568,7 @@ getrealname(uid_t uid)
 	if (fork())
 	wait(0);
 	else {
-	setuid(getuid());
+	setgid(getgid());
 	if ((tmpfp = fopen(filexp(FULLNAMEFILE),"w")) == NULL)
 		exit(1);
 	fprintf(tmpfp, "%s\n", buf);
Index: src/games/warp/score.c
diff -u src/games/warp/score.c:1.4 src/games/warp/score.c:1.5
--- src/games/warp/score.c:1.4	Tue Nov 10 17:42:19 2020
+++ src/games/warp/score.c	Wed Nov 11 12:11:19 2020
@@ -35,20 +35,18 @@ score_init(void)
 int i;
 FILE *savfil;
 
-#if 0
 if (stat(SAVEDIR,&filestat)) {
 	printf("Cannot access %s\r\n",SAVEDIR);
 	finalize(1);
 }
-if (filestat.st_uid != geteuid()) {
-	printf("Warp will not run right without being setuid.\r\n");
+if (filestat.st_gid != getegid()) {
+	printf("Warp will not run right without being setgid.\r\n");
 	finalize(1);
 }
 if ((filestat.st_mode & 0605) != 0605) {
 	printf("%s is not protected correctly (must be u+rw o+rx).\r\n",SAVEDIR);
 	finalize(1);
 }
-#endif
 
 #ifdef SCOREFULL
 interp(longlognam, sizeof longlognam, "%N");
@@ -241,9 +239,7 @@ wscore(void)
 printf("WHO   SCORE  DF   CDF  E  B  WV  FLAGS\r\n");
 resetty();
 snprintf(spbuf, sizeof(spbuf), "/bin/cat %ssave.*",SAVEDIR);
-#ifndef lint
 execl("/bin/sh", "sh", "-c", spbuf, NULL);
-#endif
 finalize(1);
 }
 
@@ -421,10 +417,8 @@ wavescore(void)
 snprintf(spbuf, sizeof(spbuf), "Star save ratio: %1.8f (%d/%d)",
 	starscore, numstars, inumstars);
 mvaddstr( 6,5, spbuf);
-#ifndef lint
 bonuses += tmp = (long) (((double)curscore / possiblescore) *
 	(starscore*starscore) * smarts * 20);
-#endif
 snprintf(spbuf, sizeof(spbuf), "%6ld", tmp);
 mvaddstr( 6, 68, spbuf);
 row = 7;
Index: src/games/warp/term.h
diff -u src/games/warp/term.h:1.4 src/games/warp/term.h:1.5
--- src/games/warp/term.h:1.4	Tue Nov 10 17:42:19 2020
+++ src/games/warp/term.h	Wed Nov 11 12:11:19 2020
@@ -181,9 +181,16 @@ EXT char INTRCH INIT('\03');
 
 /* stuff wanted by terminal mode diddling routines */
 
-#ifdef TERMIO
+#ifdef TERMIOS
+EXT struct termios _tty, _oldtty;
+#elif defined(TERMIO)
+typedef int speed_t;
 EXT struct termio _tty, _oldtty;
+#define tcsetattr(fd, how, ti) ioctl(fd, how, ti)
+#define tcgetattr(fd, ti) ioctl(fd, TCGETA, ti)
+#define cfgetospeed(ti) ((ti)->c_cflag & CBAUD)
 #else
+typedef int speed_t;
 EXT struct sgttyb _tty;
 EXT int _res_flg INIT(0);
 #endif
@@ -193,18 +200,18 @@ EXT bool bizarre INIT(false);			/* do we
 
 /* terminal mode diddling routines */
 
-#ifdef TERMIO
+#if defined(TERMIO) || defined(TERMIOS)
   
-#define raw() ((bizarre=1),_tty.c_lflag &=~ISIG,_tty.c_cc[VMIN] = 1,ioctl(_tty_ch,TCSETAF,&_tty))
-#define noraw() ((bizarre=1),_tty.c_lflag |= ISIG,_tty.c_cc[VEOF] = CEOF,ioctl(_tty_ch,TCSETAF,&_tty))
-#define crmode() ((bizarre=1),_tty.c_lflag &=~ICANON,_tty.c_cc[VMIN] = 1,ioctl(_tty_ch,TCSETAF,&_tty))
-#define nocrmode() ((bizarre=1),_tty.c_lflag |= ICANON,_tty.c_c

CVS commit: src/games/warp

2020-11-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 11 19:54:54 UTC 2020

Modified Files:
src/games/warp: Makefile

Log Message:
no need for -lcompat


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

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

Modified files:

Index: src/games/warp/Makefile
diff -u src/games/warp/Makefile:1.3 src/games/warp/Makefile:1.4
--- src/games/warp/Makefile:1.3	Wed Nov 11 12:11:19 2020
+++ src/games/warp/Makefile	Wed Nov 11 14:54:53 2020
@@ -1,14 +1,15 @@
-#	$NetBSD: Makefile,v 1.3 2020/11/11 17:11:19 christos Exp $
+#	$NetBSD: Makefile,v 1.4 2020/11/11 19:54:53 christos Exp $
 
 .include 
 
 PROG=	warp
+DBG=-g
 
 SRCS=	bang.c init.c intrp.c move.c object.c play.c score.c sig.c term.c \
 	them.c us.c util.c version.c warp.c weapon.c
 
-DPADD=	${LIBTERMLIB} ${LIBM} ${LIBCOMPAT}
-LDADD=	-ltermlib -lm -lcompat
+DPADD=	${LIBTERMLIB} ${LIBM}
+LDADD=	-ltermlib -lm
 
 CPPFLAGS+=-DHAVETERMLIB
 
@@ -18,9 +19,6 @@ HIDEGAME=hidegame
 SETGIDGAME=yes
 MAN=	warp.6
 
-BINGRP= games
-BINMODE=2555
-
 warp.6:
 	${_MKTARGET_CREATE}
 	cat ${.CURDIR}/warp.man > ${.TARGET}
@@ -69,14 +67,4 @@ FILES+=warp.doc warp.news README
 FILESDIR=/usr/share/games/warp
 .endif
 
-CFLAGS+= -Wno-error=old-style-definition -Wno-error=strict-prototypes
-CFLAGS+= -Wno-error=comment -Wno-error=maybe-uninitialized
-CFLAGS+= -Wno-error=discarded-qualifiers -Wno-error=dangling-else
-CFLAGS+= -Wno-error=char-subscripts -Wno-error=parentheses
-CFLAGS+= -Wno-error=unused-value -Wno-error=format-extra-args
-CFLAGS+= -Wno-error=format-overflow= -Wno-error=builtin-declaration-mismatch
-CFLAGS+= -Wno-error=format= -Wno-error=sign-compare -Wno-error=return-type
-CFLAGS+= -Wno-error=unused-label -Wno-error=unused-variable
-CFLAGS+= -Wno-error=format-nonliteral -Wno-error=implicit-fallthrough=
-
 .include 



CVS commit: src/games/warp

2020-11-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 11 19:55:33 UTC 2020

Modified Files:
src/games/warp: config.h config.h.SH config.sh init.c intrp.c score.c
score.h sig.c term.c util.h warp.c

Log Message:
use strchr, strrchr, random, more lint removal, savefile in /var/games/warp
not /usr/share/games/warp...


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/games/warp/config.h src/games/warp/sig.c \
src/games/warp/util.h
cvs rdiff -u -r1.2 -r1.3 src/games/warp/config.h.SH
cvs rdiff -u -r1.1 -r1.2 src/games/warp/config.sh
cvs rdiff -u -r1.3 -r1.4 src/games/warp/init.c src/games/warp/score.h
cvs rdiff -u -r1.5 -r1.6 src/games/warp/intrp.c src/games/warp/score.c
cvs rdiff -u -r1.6 -r1.7 src/games/warp/term.c src/games/warp/warp.c

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

Modified files:

Index: src/games/warp/config.h
diff -u src/games/warp/config.h:1.4 src/games/warp/config.h:1.5
--- src/games/warp/config.h:1.4	Wed Nov 11 12:11:19 2020
+++ src/games/warp/config.h	Wed Nov 11 14:55:33 2020
@@ -85,12 +85,6 @@
  */
 #define PREFSHELL "/bin/csh"		/**/
 
-/* RANDBITS:
- *	This symbol contains the number of bits of random number the rand()
- *	function produces.  Usual values are 15, 16, and 31.
- */
-#define RANDBITS 15		/**/
-
 /* ROOTID:
  *	This symbol contains the uid of root, normally 0.
  */
Index: src/games/warp/sig.c
diff -u src/games/warp/sig.c:1.4 src/games/warp/sig.c:1.5
--- src/games/warp/sig.c:1.4	Tue Nov 10 17:42:19 2020
+++ src/games/warp/sig.c	Wed Nov 11 14:55:33 2020
@@ -25,9 +25,6 @@
 void
 sig_init(void)
 {
-#ifdef lint
-;
-#else
 sigignore(SIGINT);  /* for inquiry of existence via kill call */
 #ifdef SIGTTOU
 sigignore(SIGTTOU);
@@ -38,8 +35,10 @@ sig_init(void)
 	sigset(SIGQUIT, sig_catcher);
 	sigset(SIGILL, sig_catcher);
 	sigset(SIGFPE, sig_catcher);
+#if 0
 	sigset(SIGBUS, sig_catcher);
 	sigset(SIGSEGV, sig_catcher);
+#endif
 	sigset(SIGSYS, sig_catcher);
 	sigset(SIGTERM, sig_catcher);
 }
@@ -53,7 +52,6 @@ sig_init(void)
 sigset(SIGTSTP, stop_catcher);
 sigset(SIGSTOP, stop_catcher);
 #endif
-#endif /* lint */
 }
 
 #ifdef SIGTSTP
Index: src/games/warp/util.h
diff -u src/games/warp/util.h:1.4 src/games/warp/util.h:1.5
--- src/games/warp/util.h:1.4	Tue Nov 10 17:42:19 2020
+++ src/games/warp/util.h	Wed Nov 11 14:55:33 2020
@@ -6,49 +6,19 @@
  * 
  */
 
-#if RANDBITS < 15 || defined(lint)
-#define rand_mod(m) getpid()
-#define RANDRAND 0.0
-#define HALFRAND 0
-#define myrand() getpid()
-#else
-#if RANDBITS == 15	/* 15 bits of rand()? */
-#define RANDRAND 268435456.0 /* that's 2**28 */
-#define HALFRAND 0x4000 /* that's 2**14 */
-int rand(void);
-#define myrand() (rand()&32767)
-#define rand_mod(m) ((int)((double)myrand() / 32768.0 * ((double)(m
-/* pick number in 0..m-1 */
-
-#else
-
-#if RANDBITS < 31	/* 16 bits of rand()? */
-#define RANDRAND 1073741824.0 /* that's 2**30 */
-#define HALFRAND 0x8000 /* that's 2**15 */
-unsigned rand();
-#define myrand() (rand()&65535)
-#define rand_mod(m) ((int)((double)myrand() / 65536.0 * ((double)(m
-/* pick number in 0..m-1 */
-
-#else		/* assume 31 bits */
 #define RANDRAND 1152921504606846976.0 /* that's 2**60 */
 #define HALFRAND 0x4000 /* that's 2**30 */
-long rand();
-#define myrand() rand()
+#define myrand() (int)random()
 #define rand_mod(m) ((myrand() / 37) % (m)) /* pick number in 0..m-1 */
 /*
  * The reason for the /37 above is that our random number generator yields
  * successive evens and odds, for some reason.  This makes strange star maps.
  */
-#endif
-#endif
-#endif
-
 
 /* we get fractions of seconds from calling ftime on timebuf */
 
-EXT struct timeb timebuf;
-#define roundsleep(x) (ftime(&timebuf),sleep(timebuf.millitm > 500?x+1:x))
+EXT struct timespec timebuf;
+#define roundsleep(x) (clock_gettime(CLOCK_REALTIME, &timebuf),sleep(timebuf.tv_nsec > 50 ?x+1:x))
 
 #define waiting 0
 

Index: src/games/warp/config.h.SH
diff -u src/games/warp/config.h.SH:1.2 src/games/warp/config.h.SH:1.3
--- src/games/warp/config.h.SH:1.2	Tue Nov 10 17:42:19 2020
+++ src/games/warp/config.h.SH	Wed Nov 11 14:55:33 2020
@@ -87,16 +87,16 @@ cat 

CVS commit: src/etc/mtree

2020-11-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 11 19:56:09 UTC 2020

Modified Files:
src/etc/mtree: NetBSD.dist.base

Log Message:
Add /var/games/warp


To generate a diff of this commit:
cvs rdiff -u -r1.228 -r1.229 src/etc/mtree/NetBSD.dist.base

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

Modified files:

Index: src/etc/mtree/NetBSD.dist.base
diff -u src/etc/mtree/NetBSD.dist.base:1.228 src/etc/mtree/NetBSD.dist.base:1.229
--- src/etc/mtree/NetBSD.dist.base:1.228	Tue Nov 10 16:47:49 2020
+++ src/etc/mtree/NetBSD.dist.base	Wed Nov 11 14:56:09 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.228 2020/11/10 21:47:49 kamil Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.229 2020/11/11 19:56:09 christos Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -1338,6 +1338,7 @@
 ./var/games/larn		uname=games gname=games mode=0775
 ./var/games/phantasia		uname=games gname=games mode=0775
 ./var/games/sail		uname=games gname=games mode=0775
+./var/games/warp		uname=games gname=games mode=0775
 ./var/heimdal
 ./var/log
 ./var/log/rdist



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

2020-11-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 11 19:56:59 UTC 2020

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

Log Message:
Add /var/games/warp


To generate a diff of this commit:
cvs rdiff -u -r1.1270 -r1.1271 src/distrib/sets/lists/base/mi

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1270 src/distrib/sets/lists/base/mi:1.1271
--- src/distrib/sets/lists/base/mi:1.1270	Tue Nov 10 16:47:40 2020
+++ src/distrib/sets/lists/base/mi	Wed Nov 11 14:56:59 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1270 2020/11/10 21:47:40 kamil Exp $
+# $NetBSD: mi,v 1.1271 2020/11/11 19:56:59 christos Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -6146,6 +6146,7 @@
 ./var/games/larnbase-games-root
 ./var/games/phantasiabase-games-root
 ./var/games/sailbase-games-root
+./var/games/warpbase-games-root
 ./var/games/savebase-obsolete		obsolete
 ./var/heimdal	base-krb5-root
 ./var/lock	base-obsolete		obsolete



CVS commit: src/games/warp

2020-11-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 11 20:04:02 UTC 2020

Modified Files:
src/games/warp: Makefile

Log Message:
Comment out debugging build (it still randomly crashes though) pointed out
by wiz


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/games/warp/Makefile

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

Modified files:

Index: src/games/warp/Makefile
diff -u src/games/warp/Makefile:1.4 src/games/warp/Makefile:1.5
--- src/games/warp/Makefile:1.4	Wed Nov 11 14:54:53 2020
+++ src/games/warp/Makefile	Wed Nov 11 15:04:02 2020
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile,v 1.4 2020/11/11 19:54:53 christos Exp $
+#	$NetBSD: Makefile,v 1.5 2020/11/11 20:04:02 christos Exp $
 
 .include 
 
 PROG=	warp
-DBG=-g
+#DBG=-g
 
 SRCS=	bang.c init.c intrp.c move.c object.c play.c score.c sig.c term.c \
 	them.c us.c util.c version.c warp.c weapon.c



CVS commit: src/crypto/external/bsd/openssh/dist

2020-11-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 12 19:43:19 UTC 2020

Modified Files:
src/crypto/external/bsd/openssh/dist: getrrsetbyname.c

Log Message:
eliminate direct use of _res for threaded programs.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssh/dist/getrrsetbyname.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/openssh/dist/getrrsetbyname.c
diff -u src/crypto/external/bsd/openssh/dist/getrrsetbyname.c:1.5 src/crypto/external/bsd/openssh/dist/getrrsetbyname.c:1.6
--- src/crypto/external/bsd/openssh/dist/getrrsetbyname.c:1.5	Tue Apr 18 14:41:46 2017
+++ src/crypto/external/bsd/openssh/dist/getrrsetbyname.c	Thu Nov 12 14:43:18 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: getrrsetbyname.c,v 1.5 2017/04/18 18:41:46 christos Exp $	*/
+/*	$NetBSD: getrrsetbyname.c,v 1.6 2020/11/12 19:43:18 christos Exp $	*/
 /* $OpenBSD: getrrsetbyname.c,v 1.10 2005/03/30 02:58:28 tedu Exp $ */
 
 /*
@@ -47,7 +47,7 @@
 /* OPENBSD ORIGINAL: lib/libc/net/getrrsetbyname.c */
 
 #include "includes.h"
-__RCSID("$NetBSD: getrrsetbyname.c,v 1.5 2017/04/18 18:41:46 christos Exp $");
+__RCSID("$NetBSD: getrrsetbyname.c,v 1.6 2020/11/12 19:43:18 christos Exp $");
 
 #ifndef HAVE_GETRRSETBYNAME
 
@@ -189,8 +189,9 @@ getrrsetbyname(const char *hostname, uns
 unsigned int rdtype, unsigned int flags,
 struct rrsetinfo **res)
 {
-	struct __res_state *_resp = _THREAD_PRIVATE(_res, _res, &_res);
+	struct __res_state *_resp;
 	int result;
+	unsigned long options;
 	struct rrsetinfo *rrset = NULL;
 	struct dns_response *response = NULL;
 	struct dns_rr *rr;
@@ -201,27 +202,33 @@ getrrsetbyname(const char *hostname, uns
 
 	/* check for invalid class and type */
 	if (rdclass > 0x || rdtype > 0x) {
-		result = ERRSET_INVAL;
-		goto fail;
+		return ERRSET_INVAL;
 	}
 
 	/* don't allow queries of class or type ANY */
 	if (rdclass == 0xff || rdtype == 0xff) {
-		result = ERRSET_INVAL;
-		goto fail;
+		return ERRSET_INVAL;
 	}
 
 	/* don't allow flags yet, unimplemented */
 	if (flags) {
-		result = ERRSET_INVAL;
-		goto fail;
+		return ERRSET_INVAL;
 	}
 
+#ifndef __NetBSD__
+	_resp = _THREAD_PRIVATE(_res, _res, &_res);
 	/* initialize resolver */
 	if ((_resp->options & RES_INIT) == 0 && res_init() == -1) {
 		result = ERRSET_FAIL;
 		goto fail;
 	}
+#else
+	_resp = __res_get_state();
+	if (_resp == NULL) {
+		return ERRSET_FAIL;
+	}
+#endif
+	options = _resp->options;
 
 #ifdef DEBUG
 	_resp->options |= RES_DEBUG;
@@ -234,8 +241,8 @@ getrrsetbyname(const char *hostname, uns
 #endif /* RES_USE_DNSEC */
 
 	/* make query */
-	length = res_query(hostname, (signed int) rdclass, (signed int) rdtype,
-	answer, sizeof(answer));
+	length = res_nquery(_resp, hostname, (signed int) rdclass,
+	(signed int) rdtype, answer, sizeof(answer));
 	if (length < 0) {
 		switch(h_errno) {
 		case HOST_NOT_FOUND:
@@ -335,9 +342,17 @@ getrrsetbyname(const char *hostname, uns
 	free_dns_response(response);
 
 	*res = rrset;
+	_resp->options = options;
+#ifdef __NetBSD__
+	__res_put_state(_resp);
+#endif
 	return (ERRSET_SUCCESS);
 
 fail:
+	_resp->options = options;
+#ifdef __NetBSD__
+	__res_put_state(_resp);
+#endif
 	if (rrset != NULL)
 		freerrset(rrset);
 	if (response != NULL)
@@ -466,7 +481,7 @@ parse_dns_qsection(const u_char *answer,
 
 		/* name */
 		length = dn_expand(answer, answer + size, *cp, name,
-		sizeof(name));
+		(int)sizeof(name));
 		if (length < 0) {
 			free_dns_query(head);
 			return (NULL);
@@ -513,7 +528,7 @@ parse_dns_rrsection(const u_char *answer
 
 		/* name */
 		length = dn_expand(answer, answer + size, *cp, name,
-		sizeof(name));
+		(int)sizeof(name));
 		if (length < 0) {
 			free_dns_rr(head);
 			return (NULL);



CVS commit: src/external/mpl/dhcp/dist/omapip

2020-11-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 12 22:11:03 UTC 2020

Modified Files:
src/external/mpl/dhcp/dist/omapip: errwarn.c

Log Message:
Don't use static buffers to store format strings; this is a multi-threaded
program and if we print from multiple threads we can end up overwriting the
formats while printf is formating and that can end up in tears.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/mpl/dhcp/dist/omapip/errwarn.c

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

Modified files:

Index: src/external/mpl/dhcp/dist/omapip/errwarn.c
diff -u src/external/mpl/dhcp/dist/omapip/errwarn.c:1.3 src/external/mpl/dhcp/dist/omapip/errwarn.c:1.4
--- src/external/mpl/dhcp/dist/omapip/errwarn.c:1.3	Mon Aug  3 17:10:57 2020
+++ src/external/mpl/dhcp/dist/omapip/errwarn.c	Thu Nov 12 17:11:03 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: errwarn.c,v 1.3 2020/08/03 21:10:57 christos Exp $	*/
+/*	$NetBSD: errwarn.c,v 1.4 2020/11/12 22:11:03 christos Exp $	*/
 
 /* errwarn.c
 
@@ -34,7 +34,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: errwarn.c,v 1.3 2020/08/03 21:10:57 christos Exp $");
+__RCSID("$NetBSD: errwarn.c,v 1.4 2020/11/12 22:11:03 christos Exp $");
 
 #include "dhcpd.h"
 
@@ -50,14 +50,14 @@ int log_perror = 1;
 void (*log_cleanup) (void);
 
 #define CVT_BUF_MAX 1023
-static char mbuf [CVT_BUF_MAX + 1];
-static char fbuf [CVT_BUF_MAX + 1];
 
 /* Log an error message, then exit... */
 
 void log_fatal (const char * fmt, ... )
 {
   va_list list;
+  char mbuf [CVT_BUF_MAX + 1];
+  char fbuf [CVT_BUF_MAX + 1];
 
   do_percentm (fbuf, sizeof fbuf, fmt);
 
@@ -96,6 +96,8 @@ void log_fatal (const char * fmt, ... )
 
 int log_error (const char * fmt, ...)
 {
+  char mbuf [CVT_BUF_MAX + 1];
+  char fbuf [CVT_BUF_MAX + 1];
   va_list list;
 
   do_percentm (fbuf, sizeof fbuf, fmt);
@@ -123,6 +125,8 @@ int log_error (const char * fmt, ...)
 
 int log_info (const char *fmt, ...)
 {
+  char mbuf [CVT_BUF_MAX + 1];
+  char fbuf [CVT_BUF_MAX + 1];
   va_list list;
 
   do_percentm (fbuf, sizeof fbuf, fmt);
@@ -150,6 +154,8 @@ int log_info (const char *fmt, ...)
 
 int log_debug (const char *fmt, ...)
 {
+  char mbuf [CVT_BUF_MAX + 1];
+  char fbuf [CVT_BUF_MAX + 1];
   va_list list;
 
   do_percentm (fbuf, sizeof fbuf, fmt);



CVS commit: src/external/gpl3/gcc/dist/gcc

2020-11-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov 14 21:24:03 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/gcc: file-prefix-map.c

Log Message:
PR/55802: Andreas Gustafsson: Unbreak reproducible builds.

For reproducible builds to work we need to have a consistent command
line (because the command line gets recorded in dwarf). So we can't
do:

-ffile-prefix-map=/joe/random/src=/usr/src

because then /joe/random/src gets recorded. We do instead:

-ffile-prefix-map=\$NETBSDSRCDIR=/usr/src

The patch restores the environment variable parsing that got lost
in the last 2 gcc upgrades.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/dist/gcc/file-prefix-map.c

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

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/file-prefix-map.c
diff -u src/external/gpl3/gcc/dist/gcc/file-prefix-map.c:1.4 src/external/gpl3/gcc/dist/gcc/file-prefix-map.c:1.5
--- src/external/gpl3/gcc/dist/gcc/file-prefix-map.c:1.4	Sat Sep  5 05:12:23 2020
+++ src/external/gpl3/gcc/dist/gcc/file-prefix-map.c	Sat Nov 14 16:24:03 2020
@@ -40,7 +40,8 @@ static void
 add_prefix_map (file_prefix_map *&maps, const char *arg, const char *opt)
 {
   file_prefix_map *map;
-  const char *p;
+  const char *p, *old;
+  size_t oldlen;
 
   /* Note: looking for the last '='. The thinking is we can control the paths
  inside our projects but not where the users build them.  */
@@ -50,9 +51,28 @@ add_prefix_map (file_prefix_map *&maps, 
   error ("invalid argument %qs to %qs", arg, opt);
   return;
 }
+  if (*arg == '$')
+{
+  char *env = xstrndup (arg + 1, p - (arg + 1));
+  old = getenv(env);
+  if (!old)
+	{
+	  warning (0, "environment variable %qs not set in argument to "
+		   "%s", env, opt);
+	  free(env);
+	  return;
+	}
+  oldlen = strlen(old);
+  free(env);
+}
+  else
+{
+  old = xstrndup (arg, p - arg);
+  oldlen = p - arg;
+}
   map = XNEW (file_prefix_map);
-  map->old_prefix = xstrndup (arg, p - arg);
-  map->old_len = p - arg;
+  map->old_prefix = old;
+  map->old_len = oldlen;
   p++;
   map->new_prefix = xstrdup (p);
   map->new_len = strlen (p);



CVS commit: src/sys/sys

2020-11-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Nov 24 16:17:04 UTC 2020

Modified Files:
src/sys/sys: device.h param.h

Log Message:
PR/55816: Martin Husemann: widen cfunit to 24 bits so that it fits the
largest minor number which is 20 bits. Welcome to 2x2x19.


To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.159 src/sys/sys/device.h
cvs rdiff -u -r1.679 -r1.680 src/sys/sys/param.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/sys/device.h
diff -u src/sys/sys/device.h:1.158 src/sys/sys/device.h:1.159
--- src/sys/sys/device.h:1.158	Sat Oct  3 18:32:50 2020
+++ src/sys/sys/device.h	Tue Nov 24 11:17:04 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: device.h,v 1.158 2020/10/03 22:32:50 riastradh Exp $ */
+/* $NetBSD: device.h,v 1.159 2020/11/24 16:17:04 christos Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -279,8 +279,8 @@ struct cfparent {
 struct cfdata {
 	const char *cf_name;		/* driver name */
 	const char *cf_atname;		/* attachment name */
-	short	cf_unit;		/* unit number */
-	short	cf_fstate;		/* finding state (below) */
+	unsigned int cf_unit:24;	/* unit number */
+	unsigned char cf_fstate;	/* finding state (below) */
 	int	*cf_loc;		/* locators (machine dependent) */
 	int	cf_flags;		/* flags from config */
 	const struct cfparent *cf_pspec;/* parent specification */

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.679 src/sys/sys/param.h:1.680
--- src/sys/sys/param.h:1.679	Thu Nov 12 02:44:01 2020
+++ src/sys/sys/param.h	Tue Nov 24 11:17:04 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.679 2020/11/12 07:44:01 simonb Exp $	*/
+/*	$NetBSD: param.h,v 1.680 2020/11/24 16:17:04 christos Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	999007500	/* NetBSD 9.99.75 */
+#define	__NetBSD_Version__	999007600	/* NetBSD 9.99.76 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: src/sys/fs/ptyfs

2020-11-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Nov 24 16:38:31 UTC 2020

Modified Files:
src/sys/fs/ptyfs: ptyfs_vnops.c

Log Message:
PR/55821: tar can not extract base.tgz anymore (./dev/pts and mounted ptyfs)
Allow chown/chmod at the root of ptyfs.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/fs/ptyfs/ptyfs_vnops.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/fs/ptyfs/ptyfs_vnops.c
diff -u src/sys/fs/ptyfs/ptyfs_vnops.c:1.60 src/sys/fs/ptyfs/ptyfs_vnops.c:1.61
--- src/sys/fs/ptyfs/ptyfs_vnops.c:1.60	Sat Jun 27 13:29:18 2020
+++ src/sys/fs/ptyfs/ptyfs_vnops.c	Tue Nov 24 11:38:31 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptyfs_vnops.c,v 1.60 2020/06/27 17:29:18 christos Exp $	*/
+/*	$NetBSD: ptyfs_vnops.c,v 1.61 2020/11/24 16:38:31 christos Exp $	*/
 
 /*
  * Copyright (c) 1993, 1995
@@ -76,7 +76,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.60 2020/06/27 17:29:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.61 2020/11/24 16:38:31 christos Exp $");
 
 #include 
 #include 
@@ -456,8 +456,6 @@ ptyfs_setattr(void *v)
 	if (vap->va_uid != (uid_t)VNOVAL || vap->va_gid != (gid_t)VNOVAL) {
 		if (vp->v_mount->mnt_flag & MNT_RDONLY)
 			return EROFS;
-		if (ptyfs->ptyfs_type == PTYFSroot)
-			return EPERM;
 		error = ptyfs_chown(vp, vap->va_uid, vap->va_gid, cred, l);
 		if (error)
 			return error;
@@ -492,8 +490,6 @@ ptyfs_setattr(void *v)
 	if (vap->va_mode != (mode_t)VNOVAL) {
 		if (vp->v_mount->mnt_flag & MNT_RDONLY)
 			return EROFS;
-		if (ptyfs->ptyfs_type == PTYFSroot)
-			return EPERM;
 		if ((ptyfs->ptyfs_flags & SF_SNAPSHOT) != 0 &&
 		(vap->va_mode &
 		(S_IXUSR|S_IWUSR|S_IXGRP|S_IWGRP|S_IXOTH|S_IWOTH)))



CVS commit: src/crypto/dist/ipsec-tools/src/racoon

2020-11-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 25 14:15:41 UTC 2020

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon: grabmyaddr.c

Log Message:
Reduce previous


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 \
src/crypto/dist/ipsec-tools/src/racoon/grabmyaddr.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/dist/ipsec-tools/src/racoon/grabmyaddr.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c:1.38 src/crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c:1.39
--- src/crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c:1.38	Wed Nov 25 05:57:11 2020
+++ src/crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c	Wed Nov 25 09:15:41 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: grabmyaddr.c,v 1.38 2020/11/25 10:57:11 kardel Exp $	*/
+/*	$NetBSD: grabmyaddr.c,v 1.39 2020/11/25 14:15:41 christos Exp $	*/
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
  * Copyright (C) 2008 Timo Teras .
@@ -683,13 +683,11 @@ kernel_sync()
 
 #elif defined(USE_ROUTE)
 
-#ifdef RT_ROUNDUP
-#define SAROUNDUP(X)   RT_ROUNDUP(((struct sockaddr *)(X))->sa_len)
-#else
-#define ROUNDUP(a) \
+#ifndef RT_ROUNDUP
+#define RT_ROUNDUP(a) \
   ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
-#define SAROUNDUP(X)   ROUNDUP(((struct sockaddr *)(X))->sa_len)
 #endif
+#define SAROUNDUP(X)   RT_ROUNDUP(((struct sockaddr *)(X))->sa_len)
 
 
 static size_t



CVS commit: src/sys/arch/amd64/include

2020-11-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 26 20:50:45 UTC 2020

Modified Files:
src/sys/arch/amd64/include: vmparam.h

Log Message:
make the max text size the same as the max data size


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/amd64/include/vmparam.h

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

Modified files:

Index: src/sys/arch/amd64/include/vmparam.h
diff -u src/sys/arch/amd64/include/vmparam.h:1.53 src/sys/arch/amd64/include/vmparam.h:1.54
--- src/sys/arch/amd64/include/vmparam.h:1.53	Tue Oct  6 09:42:03 2020
+++ src/sys/arch/amd64/include/vmparam.h	Thu Nov 26 15:50:45 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.53 2020/10/06 13:42:03 christos Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.54 2020/11/26 20:50:45 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -88,7 +88,7 @@
 /*
  * Virtual memory related constants, all in bytes
  */
-#define	MAXTSIZ		(256*1024*1024)		/* max text size */
+#define	MAXTSIZ		(8L*1024*1024*1024)	/* max text size */
 #ifndef DFLDSIZ
 #define	DFLDSIZ		(256*1024*1024)		/* initial data size limit */
 #endif



CVS commit: src/sys/fs/ptyfs

2020-11-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov 27 14:43:57 UTC 2020

Modified Files:
src/sys/fs/ptyfs: ptyfs.h ptyfs_subr.c ptyfs_vnops.c

Log Message:
make the order of the arguments in the PTYFS_FILENO macro consistent with
the order in the function calls. One of them was incorrect. Noticed by martin@


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/fs/ptyfs/ptyfs.h
cvs rdiff -u -r1.33 -r1.34 src/sys/fs/ptyfs/ptyfs_subr.c
cvs rdiff -u -r1.61 -r1.62 src/sys/fs/ptyfs/ptyfs_vnops.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/fs/ptyfs/ptyfs.h
diff -u src/sys/fs/ptyfs/ptyfs.h:1.15 src/sys/fs/ptyfs/ptyfs.h:1.16
--- src/sys/fs/ptyfs/ptyfs.h:1.15	Fri Jan 17 15:08:08 2020
+++ src/sys/fs/ptyfs/ptyfs.h	Fri Nov 27 09:43:57 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptyfs.h,v 1.15 2020/01/17 20:08:08 ad Exp $	*/
+/*	$NetBSD: ptyfs.h,v 1.16 2020/11/27 14:43:57 christos Exp $	*/
 
 /*
  * Copyright (c) 1993
@@ -140,7 +140,7 @@ struct ptyfs_args {
 
 #define UIO_MX 32
 
-#define PTYFS_FILENO(pty, type) \
+#define PTYFS_FILENO(type, pty) \
 ((type == PTYFSroot) ? 2 : \
  pty) + 1) * 2 + (((type) == PTYFSpts) ? 1 : 2
 

Index: src/sys/fs/ptyfs/ptyfs_subr.c
diff -u src/sys/fs/ptyfs/ptyfs_subr.c:1.33 src/sys/fs/ptyfs/ptyfs_subr.c:1.34
--- src/sys/fs/ptyfs/ptyfs_subr.c:1.33	Wed Oct 15 11:00:03 2014
+++ src/sys/fs/ptyfs/ptyfs_subr.c	Fri Nov 27 09:43:57 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptyfs_subr.c,v 1.33 2014/10/15 15:00:03 christos Exp $	*/
+/*	$NetBSD: ptyfs_subr.c,v 1.34 2020/11/27 14:43:57 christos Exp $	*/
 
 /*
  * Copyright (c) 1993
@@ -73,7 +73,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ptyfs_subr.c,v 1.33 2014/10/15 15:00:03 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ptyfs_subr.c,v 1.34 2020/11/27 14:43:57 christos Exp $");
 
 #include 
 #include 
@@ -162,7 +162,7 @@ ptyfs_get_node(ptyfstype type, int pty)
 	pp = malloc(sizeof(struct ptyfsnode), M_TEMP, M_WAITOK);
 	pp->ptyfs_pty = pty;
 	pp->ptyfs_type = type;
-	pp->ptyfs_fileno = PTYFS_FILENO(pty, type);
+	pp->ptyfs_fileno = PTYFS_FILENO(type, pty);
 	if (pp->ptyfs_type == PTYFSroot)
 		pp->ptyfs_mode = S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|
 		S_IROTH|S_IXOTH;

Index: src/sys/fs/ptyfs/ptyfs_vnops.c
diff -u src/sys/fs/ptyfs/ptyfs_vnops.c:1.61 src/sys/fs/ptyfs/ptyfs_vnops.c:1.62
--- src/sys/fs/ptyfs/ptyfs_vnops.c:1.61	Tue Nov 24 11:38:31 2020
+++ src/sys/fs/ptyfs/ptyfs_vnops.c	Fri Nov 27 09:43:57 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptyfs_vnops.c,v 1.61 2020/11/24 16:38:31 christos Exp $	*/
+/*	$NetBSD: ptyfs_vnops.c,v 1.62 2020/11/27 14:43:57 christos Exp $	*/
 
 /*
  * Copyright (c) 1993, 1995
@@ -76,7 +76,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.61 2020/11/24 16:38:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.62 2020/11/27 14:43:57 christos Exp $");
 
 #include 
 #include 
@@ -715,7 +715,7 @@ ptyfs_readdir(void *v)
 
 	for (; i < 2; i++) {
 		/* `.' and/or `..' */
-		dp->d_fileno = PTYFS_FILENO(0, PTYFSroot);
+		dp->d_fileno = PTYFS_FILENO(PTYFSroot, 0);
 		dp->d_namlen = i + 1;
 		(void)memcpy(dp->d_name, "..", dp->d_namlen);
 		dp->d_name[i + 1] = '\0';
@@ -731,7 +731,7 @@ ptyfs_readdir(void *v)
 		n = ptyfs_next_active(vp->v_mount, i - 2);
 		if (n < 0)
 			break;
-		dp->d_fileno = PTYFS_FILENO(n, PTYFSpts);
+		dp->d_fileno = PTYFS_FILENO(PTYFSpts, n);
 		dp->d_namlen = snprintf(dp->d_name, sizeof(dp->d_name),
 		"%lld", (long long)(n));
 		dp->d_type = DT_CHR;



CVS commit: src/tests/lib/libc/string

2020-11-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov 27 16:50:02 UTC 2020

Modified Files:
src/tests/lib/libc/string: t_memmem.c

Log Message:
map enough space for both the page we write and the guard so that we make
sure we own the guard page before we set its protection to none. This fixes
random SEGVs where the page we set protection to none probably belonged to
the dynamic linker. Reported by gson@


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/string/t_memmem.c

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

Modified files:

Index: src/tests/lib/libc/string/t_memmem.c
diff -u src/tests/lib/libc/string/t_memmem.c:1.5 src/tests/lib/libc/string/t_memmem.c:1.6
--- src/tests/lib/libc/string/t_memmem.c:1.5	Fri Nov 27 10:37:06 2020
+++ src/tests/lib/libc/string/t_memmem.c	Fri Nov 27 11:50:02 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_memmem.c,v 1.5 2020/11/27 15:37:06 gson Exp $ */
+/*	$NetBSD: t_memmem.c,v 1.6 2020/11/27 16:50:02 christos Exp $ */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -105,11 +105,12 @@ ATF_TC_BODY(memmem_oob, tc)
 {
 	static const char str[] = "abcde";
 	size_t pg = getpagesize();
-	char *src = mmap(NULL, pg, PROT_READ|PROT_WRITE,
+	char *src = mmap(NULL, 2 * pg, PROT_READ|PROT_WRITE,
 	MAP_ANON|MAP_PRIVATE, -1, (off_t)0);
 	ATF_CHECK(src != MAP_FAILED);
 	char *guard = mmap(src + pg, pg,
 	PROT_NONE, MAP_ANON|MAP_PRIVATE|MAP_FIXED, -1, (off_t)0);
+printf("%p\n", guard);
 	for (size_t i = 2; i < 5; i++) {
 		char *search = src + pg - i;
 		char match[sizeof(str)];



CVS import: src/sys/external/bsd/acpica/dist

2020-11-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov 27 16:56:59 UTC 2020

Update of /cvsroot/src/sys/external/bsd/acpica/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv28901

Log Message:
13 November 2020. Summary of changes for version 20201113:

This release is available at https://acpica.org/downloads

1) ACPICA kernel-resident subsystem:

Interpreter: fixed a memory leak by using use existing buffer in
_HID repair. There was a memory leak that occurred when a _CID
object is defined as a package containing string objects. When _CID
is checked for any possible repairs, it calls a helper function to
repair _HID (because _CID basically contains multiple _HID entries).
The _HID repair function assumes that string objects are standalone
objects that are not contained inside of any packages. The _HID
repair function replaced the string object with a brand new object
and attempted to delete the old object by decrementing the reference
count of the old object. Strings inside of packages have a reference
count of 2 so the _HID repair function leaves this object in a
dangling state and causes a memory leak. Instead of allocating a
brand new object and removing the old object, use the existing
object when repairing the _HID object.

Added function trace macros to improve namespace debugging. The
namespace repair mechanism does not have function tracing macros.
Add several trace macros to improve debuggability.

Handle "orphan" _REG methods for GPIO OpRegions. Before this change
AcpiEvExecuteRegMethods() had special handling to handle "orphan"
(no matching OpRegion declared) _REG methods for EC nodes. On Intel
Cherry Trail devices there are 2 possible ACPI OpRegions for
accessing GPIOs. The standard GeneralPurposeIo OpRegion and the
Cherry Trail - specific UserDefined 0x9X OpRegions. Having 2
different types of OpRegions leads to potential issues with checks
for OpRegion availability, or in other words checks if _REG has
been called for the OpRegion which the ACPI code wants to use.
Except for the "orphan" EC handling, ACPICA core does not call _REG
on an ACPI node which does not define an OpRegion matching the type
being registered; and the reference design DSDT, from which most
Cherry Trail DSDTs are derived, does not define GeneralPurposeIo,
nor UserDefined(0x93) OpRegions for the GPO2 (UID 3) device, because
no pins were assigned ACPI controlled functions in the reference
design. Together this leads to the perfect storm, at least on the
Cherry Trail based Medion Akayo E1239T. This design does use a GPO2
pin from its ACPI code and has added the Cherry Trail specific
UserDefined(0x93) opregion to its GPO2 ACPI node to access this
pin. But it uses a "has _REG been called" availability check for
the standard GeneralPurposeIo OpRegion. This clearly is a bug in
the DSDT, but this does work under Windows. This issue leads to
the intel vbtn driver reporting the device always being in tablet-mode
at boot, even if it is in laptop mode. Which in turn causes userspace
to ignore touchpad events. So in other words, this issue causes
the touchpad to not work at boot. This change fixes this by extending
the "orphan" _REG method handling to also apply to GPIO address-space
handlers.

2) iASL Compiler/Disassembler and ACPICA tools:

iASL: Added more info to namespace dump file (-ln option). In a
separate section of the dump file (after the main namespace dump),
emit the full pathname for each namespace node, its type, and the
ASL filename and line number where it is declared.

AcpiHelp: Added an option to display/decode iASL exceptions. Option
is: -x [Hex Value] where "Hex Value" is the iASL exception code.
If Hex Value is omitted, all iASL exceptions are displayed.

iASL: Use StringLiteral instead of StringData for some ASL macros.
The use of the stringData rule allows for some "string" oriented
opcodes (Such as ToString, ToHexString, etc.) None of which make
sense with the macros in question. This change modifies the StringData
part of the rule for these macros to a simple string literal - thus
disallowing the use of ToString, ToHexString, etc.  The following
ASL operators (macros) are affected:  EisaId Fprintf Printf ToUuid
Unicode Note: The MS compiler requires the use of string literals
for these operators also.

iASL: Added a remark for an unknown UUID: ASL_MSG_UUID_NOT_FOUND.
Search the list of "known" UUIDs for the input to the ToUUID macro.

Added 5 new UUIDs to the known UUID table. All related to NVDIMM
and the NFIT table.

Status:

Vendor Tag: intel
Release Tags:   acpica-20201113

U src/sys/external/bsd/acpica/dist/changes.txt
U src/sys/external/bsd/acpica/dist/Makefile
U src/sys/external/bsd/acpica/dist/generate/lint/files.lnt
U src/sys/external/bsd/acpica/dist/generate/lint/lint.bat
U src/sys/external/bsd/acpica/dist/generate/lint/lset.bat
U src/sys/external/bsd/acpica/dist/generate/lint/options.lnt
U src/sys/external/bsd/acpica/dist/generate/lint/readme.txt
U src/sys/extern

CVS commit: src/sys/external/bsd/acpica/dist

2020-11-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov 27 16:58:33 UTC 2020

Modified Files:
src/sys/external/bsd/acpica/dist/compiler: aslcompiler.l aslload.c
aslopcodes.c aslprepkg.c aslutils.c aslxref.c
src/sys/external/bsd/acpica/dist/debugger: dbexec.c dbinput.c
dbmethod.c
src/sys/external/bsd/acpica/dist/disassembler: dmbuffer.c dmcstyle.c
src/sys/external/bsd/acpica/dist/events: evregion.c evrgnini.c
src/sys/external/bsd/acpica/dist/include: acdebug.h acexcep.h acpixf.h
actbl1.h actypes.h
src/sys/external/bsd/acpica/dist/namespace: nsrepair2.c
src/sys/external/bsd/acpica/dist/os_specific/service_layers:
oslinuxtbl.c

Log Message:
merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 \
src/sys/external/bsd/acpica/dist/compiler/aslcompiler.l
cvs rdiff -u -r1.19 -r1.20 \
src/sys/external/bsd/acpica/dist/compiler/aslload.c \
src/sys/external/bsd/acpica/dist/compiler/aslxref.c
cvs rdiff -u -r1.12 -r1.13 \
src/sys/external/bsd/acpica/dist/compiler/aslopcodes.c
cvs rdiff -u -r1.13 -r1.14 \
src/sys/external/bsd/acpica/dist/compiler/aslprepkg.c
cvs rdiff -u -r1.26 -r1.27 \
src/sys/external/bsd/acpica/dist/compiler/aslutils.c
cvs rdiff -u -r1.17 -r1.18 src/sys/external/bsd/acpica/dist/debugger/dbexec.c
cvs rdiff -u -r1.22 -r1.23 \
src/sys/external/bsd/acpica/dist/debugger/dbinput.c
cvs rdiff -u -r1.15 -r1.16 \
src/sys/external/bsd/acpica/dist/debugger/dbmethod.c
cvs rdiff -u -r1.12 -r1.13 \
src/sys/external/bsd/acpica/dist/disassembler/dmbuffer.c
cvs rdiff -u -r1.11 -r1.12 \
src/sys/external/bsd/acpica/dist/disassembler/dmcstyle.c
cvs rdiff -u -r1.11 -r1.12 src/sys/external/bsd/acpica/dist/events/evregion.c
cvs rdiff -u -r1.16 -r1.17 src/sys/external/bsd/acpica/dist/events/evrgnini.c
cvs rdiff -u -r1.17 -r1.18 src/sys/external/bsd/acpica/dist/include/acdebug.h
cvs rdiff -u -r1.13 -r1.14 src/sys/external/bsd/acpica/dist/include/acexcep.h
cvs rdiff -u -r1.27 -r1.28 src/sys/external/bsd/acpica/dist/include/acpixf.h
cvs rdiff -u -r1.15 -r1.16 src/sys/external/bsd/acpica/dist/include/actbl1.h
cvs rdiff -u -r1.22 -r1.23 src/sys/external/bsd/acpica/dist/include/actypes.h
cvs rdiff -u -r1.15 -r1.16 \
src/sys/external/bsd/acpica/dist/namespace/nsrepair2.c
cvs rdiff -u -r1.12 -r1.13 \
src/sys/external/bsd/acpica/dist/os_specific/service_layers/oslinuxtbl.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/acpica/dist/compiler/aslcompiler.l
diff -u src/sys/external/bsd/acpica/dist/compiler/aslcompiler.l:1.17 src/sys/external/bsd/acpica/dist/compiler/aslcompiler.l:1.18
--- src/sys/external/bsd/acpica/dist/compiler/aslcompiler.l:1.17	Sun Aug  2 16:25:54 2020
+++ src/sys/external/bsd/acpica/dist/compiler/aslcompiler.l	Fri Nov 27 11:58:32 2020
@@ -171,8 +171,8 @@ NamePathTail[.]{NameSeg}
 /*
  * Begin standard ASL grammar
  */
-[0-9][a-zA-Z0-9]*{ AslCompilerlval.i = UtDoConstant ((char *) AslCompilertext);
-count (1); return (PARSEOP_INTEGER); }
+[0-9][a-zA-Z0-9]*{ count (1); AslCompilerlval.i = UtDoConstant ((char *) AslCompilertext);
+ return (PARSEOP_INTEGER); }
 
 "Include"   { count (1); return (PARSEOP_INCLUDE); }
 "External"  { count (1); return (PARSEOP_EXTERNAL); }
@@ -733,7 +733,6 @@ NamePathTail[.]{NameSeg}
  * the required length.
  */
 strcpy (s, "");
-AcpiUtStrupr (AslCompilertext);
 }
 memcpy (s, AslCompilertext, strlen (AslCompilertext));
 AslCompilerlval.s = s;
@@ -743,7 +742,6 @@ NamePathTail[.]{NameSeg}
 {NameString}{ char *s;
 count (0);
 s=UtLocalCacheCalloc (strlen (AslCompilertext)+1);
-AcpiUtStrupr (AslCompilertext);
 strcpy (s, AslCompilertext);
 AslCompilerlval.s = s;
 DbgPrint (ASL_PARSE_OUTPUT, "NameString: %s\n", s);

Index: src/sys/external/bsd/acpica/dist/compiler/aslload.c
diff -u src/sys/external/bsd/acpica/dist/compiler/aslload.c:1.19 src/sys/external/bsd/acpica/dist/compiler/aslload.c:1.20
--- src/sys/external/bsd/acpica/dist/compiler/aslload.c:1.19	Sun Aug  2 16:25:54 2020
+++ src/sys/external/bsd/acpica/dist/compiler/aslload.c	Fri Nov 27 11:58:32 2020
@@ -1296,9 +1296,16 @@ LdNamespace2Begin (
 return (AE_OK);
 }
 
-/* Save the target node within

CVS commit: src/doc

2020-11-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov 27 17:01:18 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new acpica


To generate a diff of this commit:
cvs rdiff -u -r1.1761 -r1.1762 src/doc/3RDPARTY
cvs rdiff -u -r1.2754 -r1.2755 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.1761 src/doc/3RDPARTY:1.1762
--- src/doc/3RDPARTY:1.1761	Fri Nov 20 08:33:07 2020
+++ src/doc/3RDPARTY	Fri Nov 27 12:01:18 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1761 2020/11/20 13:33:07 roy Exp $
+#	$NetBSD: 3RDPARTY,v 1.1762 2020/11/27 17:01:18 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -41,12 +41,12 @@
 #
 
 Package:	acpica
-Version:	20200717
-Current Vers:	20200717
+Version:	20201113
+Current Vers:	20201113
 Maintainer:	Intel
 Archive Site:	http://www.acpica.org/downloads/
 Home Page:	http://www.acpica.org/
-Date:		2020-08-02
+Date:		2020-11-27
 Mailing List:	de...@acpica.org
 License:	BSD-like
 Responsible:	jruoho

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2754 src/doc/CHANGES:1.2755
--- src/doc/CHANGES:1.2754	Fri Nov 20 08:33:07 2020
+++ src/doc/CHANGES	Fri Nov 27 12:01:18 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2754 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2755 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -302,3 +302,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	kernel: Better default for kern.maxfiles for systems with
 		larger RAM [simonb 20201112]
 	dhcpcd: Update to version 9.3.3 [roy 20201120]
+	acpi(4): Updated ACPICA to 20201113. [christos 20201127]



CVS commit: src/usr.bin/xlint/lint1

2020-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  4 17:56:04 UTC 2020

Modified Files:
src/usr.bin/xlint/lint1: cgram.y

Log Message:
__sentinel__ = __sentinel__(0)


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/usr.bin/xlint/lint1/cgram.y

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/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.105 src/usr.bin/xlint/lint1/cgram.y:1.106
--- src/usr.bin/xlint/lint1/cgram.y:1.105	Fri Sep 18 10:19:08 2020
+++ src/usr.bin/xlint/lint1/cgram.y	Fri Dec  4 12:56:04 2020
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.105 2020/09/18 14:19:08 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.106 2020/12/04 17:56:04 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.y,v 1.105 2020/09/18 14:19:08 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.106 2020/12/04 17:56:04 christos Exp $");
 #endif
 
 #include 
@@ -543,6 +543,7 @@ type_attribute_spec:
 	| T_AT_BOUNDED T_LPARN type_attribute_bounded_type
 	  T_COMMA constant T_COMMA constant T_RPARN
 	| T_AT_SENTINEL T_LPARN constant T_RPARN
+	| T_AT_SENTINEL
 	| T_AT_FORMAT_ARG T_LPARN constant T_RPARN
 	| T_AT_NONNULL T_LPARN constant T_RPARN
 	| T_AT_MODE T_LPARN T_NAME T_RPARN



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

2020-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  4 18:09:14 UTC 2020

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

Log Message:
Version 1.5.0 (2020-09-01)
hid_linux: return FIDO_OK if no devices are found.
hid_osx:
repair communication with U2F tokens, gh#166;
reliability fixes.
fido2-{assert,cred}: new options to explicitly toggle UP, UV.
Support for configurable report lengths.
New API calls:
fido_cbor_info_maxcredcntlst;
fido_cbor_info_maxcredidlen;
fido_cred_aaguid_len;
fido_cred_aaguid_ptr;
fido_dev_get_touch_begin;
fido_dev_get_touch_status.
Use COSE_ECDH_ES256 with CTAP_CBOR_CLIENT_PIN; gh#154.
Allow CTAP messages up to 2048 bytes; gh#171.
Ensure we only list USB devices by default.
Version 1.4.0 (2020-04-15)
hid_hidapi: hidapi backend; enable with -DUSE_HIDAPI=1.
Fall back to U2F if the key claims to, but does not support FIDO2.
FIDO2 credential protection (credprot) support.
New API calls:
fido_cbor_info_fwversion;
fido_cred_prot;
fido_cred_set_prot;
fido_dev_set_transport_functions;
fido_set_log_handler.
Support for FreeBSD.
Support for C++.
Support for MSYS.
Fixed EdDSA and RSA self-attestation.
Version 1.3.1 (2020-02-19)
fix zero-ing of le1 and le2 when talking to a U2F device.
dropping sk-libfido2 middleware, please find it in the openssh tree.

Status:

Vendor Tag: YUBICO
Release Tags:   libfido2-1-5-0

U src/external/bsd/libfido2/dist/CMakeLists.txt
U src/external/bsd/libfido2/dist/LICENSE
U src/external/bsd/libfido2/dist/NEWS
U src/external/bsd/libfido2/dist/README.adoc
N src/external/bsd/libfido2/dist/x
N src/external/bsd/libfido2/dist/xx
U src/external/bsd/libfido2/dist/examples/CMakeLists.txt
U src/external/bsd/libfido2/dist/examples/README.adoc
U src/external/bsd/libfido2/dist/examples/assert.c
U src/external/bsd/libfido2/dist/examples/cred.c
U src/external/bsd/libfido2/dist/examples/extern.h
U src/external/bsd/libfido2/dist/examples/info.c
U src/external/bsd/libfido2/dist/examples/manifest.c
U src/external/bsd/libfido2/dist/examples/reset.c
U src/external/bsd/libfido2/dist/examples/retries.c
N src/external/bsd/libfido2/dist/examples/select.c
U src/external/bsd/libfido2/dist/examples/setpin.c
U src/external/bsd/libfido2/dist/examples/util.c
U src/external/bsd/libfido2/dist/fuzz/CMakeLists.txt
U src/external/bsd/libfido2/dist/fuzz/Dockerfile
U src/external/bsd/libfido2/dist/fuzz/Makefile
U src/external/bsd/libfido2/dist/fuzz/README
U src/external/bsd/libfido2/dist/fuzz/build-coverage
U src/external/bsd/libfido2/dist/fuzz/dummy.h
U src/external/bsd/libfido2/dist/fuzz/export.gnu
U src/external/bsd/libfido2/dist/fuzz/functions.txt
U src/external/bsd/libfido2/dist/fuzz/fuzz_assert.c
U src/external/bsd/libfido2/dist/fuzz/fuzz_bio.c
U src/external/bsd/libfido2/dist/fuzz/fuzz_cred.c
U src/external/bsd/libfido2/dist/fuzz/fuzz_credman.c
U src/external/bsd/libfido2/dist/fuzz/fuzz_mgmt.c
N src/external/bsd/libfido2/dist/fuzz/libfuzzer.c
U src/external/bsd/libfido2/dist/fuzz/mutator_aux.c
U src/external/bsd/libfido2/dist/fuzz/mutator_aux.h
U src/external/bsd/libfido2/dist/fuzz/preload-fuzz.c
U src/external/bsd/libfido2/dist/fuzz/preload-snoop.c
U src/external/bsd/libfido2/dist/fuzz/prng.c
U src/external/bsd/libfido2/dist/fuzz/report.tgz
U src/external/bsd/libfido2/dist/fuzz/summary.txt
U src/external/bsd/libfido2/dist/fuzz/uniform_random.c
U src/external/bsd/libfido2/dist/fuzz/wrap.c
U src/external/bsd/libfido2/dist/fuzz/wiredata_fido2.h
U src/external/bsd/libfido2/dist/fuzz/wiredata_u2f.h
U src/external/bsd/libfido2/dist/fuzz/wrapped.sym
U src/external/bsd/libfido2/dist/man/CMakeLists.txt
U src/external/bsd/libfido2/dist/man/NOTES
U src/external/bsd/libfido2/dist/man/dyc.css
U src/external/bsd/libfido2/dist/man/eddsa_pk_new.3
U src/external/bsd/libfido2/dist/man/es256_pk_new.3
U src/external/bsd/libfido2/dist/man/fido2-assert.1
U src/external/bsd/libfido2/dist/man/fido2-cred.1
U src/external/bsd/libfido2/dist/man/fido2-token.1
U src/external/bsd/libfido2/dist/man/fido_assert_allow_cred.3
U src/external/bsd/libfido2/dist/man/fido_assert_new.3
U src/external/bsd/libfido2/dist/man/fido_assert_set_authdata.3
U src/external/bsd/libfido2/dist/man/fido_assert_verify.3
U src/external/bsd/libfido2/dist/man/fido_bio_dev_get_info.3
U src/external/bsd/libfido2/dist/man/fido_bio_enroll_new.3
U src/external/bsd/libfido2/dist/man/fido_bio_info_new.3
U src/external/bsd/libfido2/dist/man/fido_bio_template.3
U src/external/bsd/libfido2/dist/man/fido_cbor_info_new.3
U src/external/bsd/libfido2/dist/man/fido_cred_exclude.3
U src/external/bsd/libfido2/dist/man/fido_cred_new.3
U src/external/bsd/libfido2/dist/man/fido_cred_set_authdata.3
U src/external/bsd/libfido2/dist/man/fido_cred_verify.3
U src/external/bsd/libfido2/dist/man/fido_credman_metadata_

CVS commit: src/external/bsd/libfido2

2020-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  4 18:27:44 UTC 2020

Modified Files:
src/external/bsd/libfido2: Makefile.inc
src/external/bsd/libfido2/lib: Makefile fido2.map

Log Message:
merge changes


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/libfido2/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/libfido2/lib/Makefile \
src/external/bsd/libfido2/lib/fido2.map

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

Modified files:

Index: src/external/bsd/libfido2/Makefile.inc
diff -u src/external/bsd/libfido2/Makefile.inc:1.1 src/external/bsd/libfido2/Makefile.inc:1.2
--- src/external/bsd/libfido2/Makefile.inc:1.1	Mon Mar  2 19:14:17 2020
+++ src/external/bsd/libfido2/Makefile.inc	Fri Dec  4 13:27:44 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.1 2020/03/03 00:14:17 christos Exp $
+# $NetBSD: Makefile.inc,v 1.2 2020/12/04 18:27:44 christos Exp $
 
 DIST:=${.PARSEDIR}/dist
 
@@ -12,4 +12,4 @@ FIDO_VERSION=${FIDO_MAJOR}.${FIDO_MINOR}
 
 CPPFLAGS+=-D_FIDO_MAJOR=${FIDO_MAJOR} -D_FIDO_MINOR=${FIDO_MINOR}
 CPPFLAGS+=-D_FIDO_PATCH=${FIDO_PATCH}
-CPPFLAGS+=-DHAVE_UNISTD_H
+CPPFLAGS+=-DHAVE_UNISTD_H -DHAVE_ARC4RANDOM_BUF -DHAVE_TIMESPECSUB

Index: src/external/bsd/libfido2/lib/Makefile
diff -u src/external/bsd/libfido2/lib/Makefile:1.1 src/external/bsd/libfido2/lib/Makefile:1.2
--- src/external/bsd/libfido2/lib/Makefile:1.1	Mon Mar  2 19:14:17 2020
+++ src/external/bsd/libfido2/lib/Makefile	Fri Dec  4 13:27:44 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2020/03/03 00:14:17 christos Exp $
+# $NetBSD: Makefile,v 1.2 2020/12/04 18:27:44 christos Exp $
 
 NOLINT=
 .include 
@@ -6,7 +6,7 @@ NOLINT=
 
 .PATH: ${DIST}/src ${DIST}/man ${DIST}/openbsd-compat
 
-CPPFLAGS+= -DHAVE_ARC4RANDOM_BUF -D_FIDO_INTERNAL -I${DIST}/src
+CPPFLAGS+= -D_FIDO_INTERNAL -I${DIST}/src
 
 LDADD+=-lusbhid -lcbor
 DPADD+=${LIBUSBHID} ${LIBCBOR}
@@ -77,6 +77,7 @@ fido_cred_set_authdata.3 \
 fido_cred_verify.3 \
 fido_credman_metadata_new.3 \
 fido_dev_get_assert.3 \
+fido_dev_get_touch_begin.3 \
 fido_dev_info_manifest.3 \
 fido_dev_make_cred.3 \
 fido_dev_open.3 \
@@ -87,7 +88,7 @@ fido_strerr.3 \
 rs256_pk_new.3
 
 SHLIB_MAJOR=2
-SHLIB_MINOR=0
+SHLIB_MINOR=1
 
 .SUFFIXES: .in
 .in:
Index: src/external/bsd/libfido2/lib/fido2.map
diff -u src/external/bsd/libfido2/lib/fido2.map:1.1 src/external/bsd/libfido2/lib/fido2.map:1.2
--- src/external/bsd/libfido2/lib/fido2.map:1.1	Mon Mar  2 19:14:17 2020
+++ src/external/bsd/libfido2/lib/fido2.map	Fri Dec  4 13:27:44 2020
@@ -35,9 +35,9 @@ FIDO_2_0 {
 	fido_assert_set_sig;
 	fido_assert_set_up;
 	fido_assert_set_uv;
-	fido_assert_sigcount;
 	fido_assert_sig_len;
 	fido_assert_sig_ptr;
+	fido_assert_sigcount;
 	fido_assert_user_display_name;
 	fido_assert_user_icon;
 	fido_assert_user_id_len;
@@ -75,6 +75,9 @@ FIDO_2_0 {
 	fido_cbor_info_extensions_len;
 	fido_cbor_info_extensions_ptr;
 	fido_cbor_info_free;
+	fido_cbor_info_fwversion;
+	fido_cbor_info_maxcredcntlst;
+	fido_cbor_info_maxcredidlen;
 	fido_cbor_info_maxmsgsiz;
 	fido_cbor_info_new;
 	fido_cbor_info_options_len;
@@ -84,6 +87,8 @@ FIDO_2_0 {
 	fido_cbor_info_protocols_ptr;
 	fido_cbor_info_versions_len;
 	fido_cbor_info_versions_ptr;
+	fido_cred_aaguid_len;
+	fido_cred_aaguid_ptr;
 	fido_cred_authdata_len;
 	fido_cred_authdata_ptr;
 	fido_cred_clientdata_hash_len;
@@ -95,25 +100,6 @@ FIDO_2_0 {
 	fido_cred_free;
 	fido_cred_id_len;
 	fido_cred_id_ptr;
-	fido_credman_del_dev_rk;
-	fido_credman_get_dev_metadata;
-	fido_credman_get_dev_rk;
-	fido_credman_get_dev_rp;
-	fido_credman_metadata_free;
-	fido_credman_metadata_new;
-	fido_credman_rk;
-	fido_credman_rk_count;
-	fido_credman_rk_existing;
-	fido_credman_rk_free;
-	fido_credman_rk_new;
-	fido_credman_rk_remaining;
-	fido_credman_rp_count;
-	fido_credman_rp_free;
-	fido_credman_rp_id;
-	fido_credman_rp_id_hash_len;
-	fido_credman_rp_id_hash_ptr;
-	fido_credman_rp_name;
-	fido_credman_rp_new;
 	fido_cred_new;
 	fido_cred_prot;
 	fido_cred_pubkey_len;
@@ -144,6 +130,25 @@ FIDO_2_0 {
 	fido_cred_verify_self;
 	fido_cred_x5c_len;
 	fido_cred_x5c_ptr;
+	fido_credman_del_dev_rk;
+	fido_credman_get_dev_metadata;
+	fido_credman_get_dev_rk;
+	fido_credman_get_dev_rp;
+	fido_credman_metadata_free;
+	fido_credman_metadata_new;
+	fido_credman_rk;
+	fido_credman_rk_count;
+	fido_credman_rk_existing;
+	fido_credman_rk_free;
+	fido_credman_rk_new;
+	fido_credman_rk_remaining;
+	fido_credman_rp_count;
+	fido_credman_rp_free;
+	fido_credman_rp_id;
+	fido_credman_rp_id_hash_len;
+	fido_credman_rp_id_hash_ptr;
+	fido_credman_rp_name;
+	fido_credman_rp_new;
 	fido_dev_build;
 	fido_dev_cancel;
 	fido_dev_close;
@@ -154,6 +159,8 @@ FIDO_2_0 {
 	fido_dev_get_assert;
 	fido_dev_get_cbor_info;
 	fido_dev_get_retry_count;
+	fido_dev_get_touch_begin;
+	fido_dev_get_touch_status;
 	fido_dev_info_free;
 	fido_dev_info_manifest;
 	fido_dev_info_manufacturer_string;
@@

CVS commit: src/distrib/sets/lists

2020-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  4 18:27:18 UTC 2020

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

Log Message:
new libfido2


To generate a diff of this commit:
cvs rdiff -u -r1.908 -r1.909 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.2366 -r1.2367 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.267 -r1.268 src/distrib/sets/lists/debug/shl.mi

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

Modified files:

Index: src/distrib/sets/lists/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.908 src/distrib/sets/lists/base/shl.mi:1.909
--- src/distrib/sets/lists/base/shl.mi:1.908	Sat Oct  3 14:35:21 2020
+++ src/distrib/sets/lists/base/shl.mi	Fri Dec  4 13:27:18 2020
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.908 2020/10/03 18:35:21 christos Exp $
+# $NetBSD: shl.mi,v 1.909 2020/12/04 18:27:18 christos Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -335,7 +335,7 @@
 ./usr/lib/libfetch.so.3.0			base-sys-shlib		compatfile
 ./usr/lib/libfido2.sobase-sys-shlib		compatfile
 ./usr/lib/libfido2.so.2base-sys-shlib		compatfile
-./usr/lib/libfido2.so.2.0			base-sys-shlib		compatfile
+./usr/lib/libfido2.so.2.1			base-sys-shlib		compatfile
 ./usr/lib/libform.sobase-sys-shlib		compatfile
 ./usr/lib/libform.so.8base-sys-shlib		compatfile
 ./usr/lib/libform.so.8.0			base-sys-shlib		compatfile

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2366 src/distrib/sets/lists/comp/mi:1.2367
--- src/distrib/sets/lists/comp/mi:1.2366	Tue Nov 10 16:47:40 2020
+++ src/distrib/sets/lists/comp/mi	Fri Dec  4 13:27:18 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2366 2020/11/10 21:47:40 kamil Exp $
+#	$NetBSD: mi,v 1.2367 2020/12/04 18:27:18 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -7185,6 +7185,7 @@
 ./usr/share/man/cat3/fido_cred_verify.0			man-util-catman	.cat
 ./usr/share/man/cat3/fido_credman_metadata_new.0	man-util-catman	.cat
 ./usr/share/man/cat3/fido_dev_get_assert.0		man-util-catman	.cat
+./usr/share/man/cat3/fido_dev_get_touch_begin.0		man-util-catman	.cat
 ./usr/share/man/cat3/fido_dev_info_manifest.0		man-util-catman	.cat
 ./usr/share/man/cat3/fido_dev_make_cred.0		man-util-catman	.cat
 ./usr/share/man/cat3/fido_dev_open.0			man-util-catman	.cat
@@ -15439,6 +15440,7 @@
 ./usr/share/man/html3/fido_cred_verify.html		man-util-htmlman	html
 ./usr/share/man/html3/fido_credman_metadata_new.html	man-util-htmlman	html
 ./usr/share/man/html3/fido_dev_get_assert.html		man-util-htmlman	html
+./usr/share/man/html3/fido_dev_get_touch_begin.html	man-util-htmlman	html
 ./usr/share/man/html3/fido_dev_info_manifest.html	man-util-htmlman	html
 ./usr/share/man/html3/fido_dev_make_cred.html		man-util-htmlman	html
 ./usr/share/man/html3/fido_dev_open.html		man-util-htmlman	html
@@ -23630,6 +23632,7 @@
 ./usr/share/man/man3/fido_cred_verify.3			man-util-man	.man
 ./usr/share/man/man3/fido_credman_metadata_new.3	man-util-man	.man
 ./usr/share/man/man3/fido_dev_get_assert.3		man-util-man	.man
+./usr/share/man/man3/fido_dev_get_touch_begin.3		man-util-man	.man
 ./usr/share/man/man3/fido_dev_info_manifest.3		man-util-man	.man
 ./usr/share/man/man3/fido_dev_make_cred.3		man-util-man	.man
 ./usr/share/man/man3/fido_dev_open.3			man-util-man	.man

Index: src/distrib/sets/lists/debug/shl.mi
diff -u src/distrib/sets/lists/debug/shl.mi:1.267 src/distrib/sets/lists/debug/shl.mi:1.268
--- src/distrib/sets/lists/debug/shl.mi:1.267	Sat Oct  3 14:35:21 2020
+++ src/distrib/sets/lists/debug/shl.mi	Fri Dec  4 13:27:18 2020
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.267 2020/10/03 18:35:21 christos Exp $
+# $NetBSD: shl.mi,v 1.268 2020/12/04 18:27:18 christos Exp $
 ./usr/lib/libbfd_g.a		comp-c-debuglib	debuglib,compatfile,binutils
 ./usr/libdata/debug/lib		base-sys-usr	debug,dynamicroot,compatdir
 ./usr/libdata/debug/lib/libavl.so.0.0.debug			comp-zfs-debug	debug,dynamicroot,zfs
@@ -116,7 +116,7 @@
 ./usr/libdata/debug/usr/lib/libexecinfo.so.0.0.debug		comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libexpat.so.2.3.debug		comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libfetch.so.3.0.debug		comp-sys-debug	debug,compatfile
-./usr/libdata/debug/usr/lib/libfido2.so.2.0.debug		comp-sys-debug	debug,compatfile
+./usr/libdata/debug/usr/lib/libfido2.so.2.1.debug		comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libform.so.6.0.debug		comp-sys-debug	debug,obsolete,compatfile
 ./usr/libdata/debug/usr/lib/libform.so.7.0.debug		comp-sys-debug	debug,obsolete,compatfile
 ./usr/libdata/debug/usr/lib/libform.so.8.0.debug		comp-sys-debug	debug,compatfile



CVS commit: src/doc

2020-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  4 18:28:55 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new libfido2new libfido2new libfido2new libfido2new libfido2new libfido2new 
libfido2new libfido2new libfido2


To generate a diff of this commit:
cvs rdiff -u -r1.1764 -r1.1765 src/doc/3RDPARTY
cvs rdiff -u -r1.2760 -r1.2761 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.1764 src/doc/3RDPARTY:1.1765
--- src/doc/3RDPARTY:1.1764	Wed Dec  2 09:09:18 2020
+++ src/doc/3RDPARTY	Fri Dec  4 13:28:55 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1764 2020/12/02 14:09:18 wiz Exp $
+#	$NetBSD: 3RDPARTY,v 1.1765 2020/12/04 18:28:55 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -2235,12 +2235,12 @@ Location:	external/bsd/pam-u2f
 Notes:
 
 Package:	libfido2
-Version:	1.3.0-155-gf6ab2ce (f6ab2ce65745f7f3b1bee7481623de5eaac28bb0)
-Current Vers:	1.4.0
+Version:	1.5.0
+Current Vers:	1.5.0
 Maintainer:	Yubico
 Archive Site:	https://github.com/Yubico/libfido2
 Home Page:	https://developers.yubico.com/libfido2/
-Date:		2020-06-13
+Date:		2020-12-04
 Mailing List:
 Responsible:	christos
 License:	bsd

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2760 src/doc/CHANGES:1.2761
--- src/doc/CHANGES:1.2760	Wed Dec  2 09:09:18 2020
+++ src/doc/CHANGES	Fri Dec  4 13:28:55 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2760 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2761 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -310,3 +310,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 		[rin 20201201]
 	pkg_install(8): Updated to 20201202. This changes the default database
 		location from /var/db/pkg to /usr/pkg/pkgdb. [wiz 20201202]
+	libfido2: Update for OpenSSH 8.4 support [christos 20201204]



CVS import: src/crypto/external/bsd/openssh/dist

2020-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  4 18:40:10 UTC 2020

Update of /cvsroot/src/crypto/external/bsd/openssh/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv3789

Log Message:
OpenSSH 8.4 was released on 2020-09-27. It is available from the
mirrors listed at https://www.openssh.com/.

OpenSSH is a 100% complete SSH protocol 2.0 implementation and
includes sftp client and server support.

Once again, we would like to thank the OpenSSH community for their
continued support of the project, especially those who contributed
code or patches, reported bugs, tested snapshots or donated to the
project. More information on donations may be found at:
https://www.openssh.com/donations.html

Future deprecation notice
=

It is now possible[1] to perform chosen-prefix attacks against the
SHA-1 algorithm for less than USD$50K. For this reason, we will be
disabling the "ssh-rsa" public key signature algorithm by default in a
near-future release.

This algorithm is unfortunately still used widely despite the
existence of better alternatives, being the only remaining public key
signature algorithm specified by the original SSH RFCs.

The better alternatives include:

 * The RFC8332 RSA SHA-2 signature algorithms rsa-sha2-256/512. These
   algorithms have the advantage of using the same key type as
   "ssh-rsa" but use the safe SHA-2 hash algorithms. These have been
   supported since OpenSSH 7.2 and are already used by default if the
   client and server support them.

 * The ssh-ed25519 signature algorithm. It has been supported in
   OpenSSH since release 6.5.

 * The RFC5656 ECDSA algorithms: ecdsa-sha2-nistp256/384/521. These
   have been supported by OpenSSH since release 5.7.

To check whether a server is using the weak ssh-rsa public key
algorithm, for host authentication, try to connect to it after
removing the ssh-rsa algorithm from ssh(1)'s allowed list:

ssh -oHostKeyAlgorithms=-ssh-rsa user@host

If the host key verification fails and no other supported host key
types are available, the server software on that host should be
upgraded.

We intend to enable UpdateHostKeys by default in the next OpenSSH
release. This will assist the client by automatically migrating to
better algorithms. Users may consider enabling this option manually.

[1] "SHA-1 is a Shambles: First Chosen-Prefix Collision on SHA-1 and
Application to the PGP Web of Trust" Leurent, G and Peyrin, T
(2020) https://eprint.iacr.org/2020/014.pdf

Security


 * ssh-agent(1): restrict ssh-agent from signing web challenges for
   FIDO/U2F keys.

   When signing messages in ssh-agent using a FIDO key that has an
   application string that does not start with "ssh:", ensure that the
   message being signed is one of the forms expected for the SSH protocol
   (currently public key authentication and sshsig signatures).

   This prevents ssh-agent forwarding on a host that has FIDO keys
   attached granting the ability for the remote side to sign challenges
   for web authentication using those keys too.

   Note that the converse case of web browsers signing SSH challenges is
   already precluded because no web RP can have the "ssh:" prefix in the
   application string that we require.

 * ssh-keygen(1): Enable FIDO 2.1 credProtect extension when generating
   a FIDO resident key.

   The recent FIDO 2.1 Client to Authenticator Protocol introduced a
   "credProtect" feature to better protect resident keys. We use this
   option to require a PIN prior to all operations that may retrieve
   a resident key from a FIDO token.

Potentially-incompatible changes


This release includes a number of changes that may affect existing
configurations:

 * For FIDO/U2F support, OpenSSH recommends the use of libfido2 1.5.0
   or greater. Older libraries have limited support at the expense of
   disabling particular features. These include resident keys, PIN-
   required keys and multiple attached tokens.

 * ssh-keygen(1): the format of the attestation information optionally
   recorded when a FIDO key is generated has changed. It now includes
   the authenticator data needed to validate attestation signatures. 

 * The API between OpenSSH and the FIDO token middleware has changed
   and the SSH_SK_VERSION_MAJOR version has been incremented as a
   result. Third-party middleware libraries must support the current
   API version (7) to work with OpenSSH 8.4.

 * The portable OpenSSH distribution now requires automake to rebuild
   the configure script and supporting files. This is not required when
   simply building portable OpenSSH from a release tar file.

Changes since OpenSSH 8.3
=

New features


 * ssh(1), ssh-keygen(1): support for FIDO keys that require a PIN for
   each use. These keys may be generated using ssh-keygen using a new
   "verify-required" option. When a PIN-required key is used, the user
   will be prompted

CVS commit: src/crypto/external/bsd/openssh

2020-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  4 18:42:50 UTC 2020

Modified Files:
src/crypto/external/bsd/openssh: openssh2netbsd
src/crypto/external/bsd/openssh/dist: PROTOCOL PROTOCOL.agent
auth-options.c auth-options.h auth.c auth2-pubkey.c authfd.c
authfd.h authfile.c channels.c channels.h clientloop.c compat.c
compat.h hostfile.c hostfile.h kex.c kexdh.c krl.c log.c match.c
match.h misc.c misc.h monitor.c monitor_wrap.c monitor_wrap.h msg.c
mux.c packet.c readconf.c readconf.h readpass.c scp.1 scp.c
servconf.c servconf.h serverloop.c session.c sftp-client.c
sftp-server.8 sftp-server.c sftp.1 sftp.c sk-usbhid.c ssh-add.1
ssh-add.c ssh-agent.1 ssh-agent.c ssh-ecdsa-sk.c ssh-keygen.1
ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-pkcs11.c
ssh-sk-helper.c ssh-sk.c ssh.1 ssh.c ssh.h ssh_api.c ssh_config
ssh_config.5 sshbuf-getput-basic.c sshbuf-misc.c sshbuf.h
sshconnect.c sshconnect2.c sshd.8 sshd.c sshd_config.5 sshkey.c
sshkey.h sshsig.c version.h
src/crypto/external/bsd/openssh/dist/moduli-gen: moduli.2048
moduli.3072 moduli.4096 moduli.6144 moduli.7680 moduli.8192
src/crypto/external/bsd/openssh/lib: shlib_version
Removed Files:
src/crypto/external/bsd/openssh/dist/ssh-sk-helper: Makefile

Log Message:
Merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/crypto/external/bsd/openssh/openssh2netbsd
cvs rdiff -u -r1.14 -r1.15 src/crypto/external/bsd/openssh/dist/PROTOCOL \
src/crypto/external/bsd/openssh/dist/authfd.h \
src/crypto/external/bsd/openssh/dist/readpass.c \
src/crypto/external/bsd/openssh/dist/ssh_config \
src/crypto/external/bsd/openssh/dist/sshbuf.h
cvs rdiff -u -r1.9 -r1.10 src/crypto/external/bsd/openssh/dist/PROTOCOL.agent \
src/crypto/external/bsd/openssh/dist/hostfile.h \
src/crypto/external/bsd/openssh/dist/msg.c
cvs rdiff -u -r1.23 -r1.24 \
src/crypto/external/bsd/openssh/dist/auth-options.c \
src/crypto/external/bsd/openssh/dist/misc.c \
src/crypto/external/bsd/openssh/dist/sshkey.c
cvs rdiff -u -r1.13 -r1.14 \
src/crypto/external/bsd/openssh/dist/auth-options.h \
src/crypto/external/bsd/openssh/dist/match.c
cvs rdiff -u -r1.27 -r1.28 src/crypto/external/bsd/openssh/dist/auth.c \
src/crypto/external/bsd/openssh/dist/channels.c \
src/crypto/external/bsd/openssh/dist/kex.c \
src/crypto/external/bsd/openssh/dist/monitor_wrap.c \
src/crypto/external/bsd/openssh/dist/scp.c \
src/crypto/external/bsd/openssh/dist/serverloop.c \
src/crypto/external/bsd/openssh/dist/ssh.1 \
src/crypto/external/bsd/openssh/dist/ssh_config.5 \
src/crypto/external/bsd/openssh/dist/sshconnect.c
cvs rdiff -u -r1.25 -r1.26 \
src/crypto/external/bsd/openssh/dist/auth2-pubkey.c
cvs rdiff -u -r1.21 -r1.22 src/crypto/external/bsd/openssh/dist/authfd.c \
src/crypto/external/bsd/openssh/dist/scp.1 \
src/crypto/external/bsd/openssh/dist/sftp-server.c
cvs rdiff -u -r1.24 -r1.25 src/crypto/external/bsd/openssh/dist/authfile.c \
src/crypto/external/bsd/openssh/dist/readconf.h \
src/crypto/external/bsd/openssh/dist/sftp-client.c
cvs rdiff -u -r1.17 -r1.18 src/crypto/external/bsd/openssh/dist/channels.h \
src/crypto/external/bsd/openssh/dist/hostfile.c \
src/crypto/external/bsd/openssh/dist/krl.c
cvs rdiff -u -r1.29 -r1.30 src/crypto/external/bsd/openssh/dist/clientloop.c \
src/crypto/external/bsd/openssh/dist/sftp.c \
src/crypto/external/bsd/openssh/dist/ssh-agent.c
cvs rdiff -u -r1.20 -r1.21 src/crypto/external/bsd/openssh/dist/compat.c \
src/crypto/external/bsd/openssh/dist/log.c \
src/crypto/external/bsd/openssh/dist/ssh-pkcs11.c
cvs rdiff -u -r1.12 -r1.13 src/crypto/external/bsd/openssh/dist/compat.h \
src/crypto/external/bsd/openssh/dist/sftp-server.8 \
src/crypto/external/bsd/openssh/dist/ssh.h \
src/crypto/external/bsd/openssh/dist/sshkey.h
cvs rdiff -u -r1.8 -r1.9 src/crypto/external/bsd/openssh/dist/kexdh.c
cvs rdiff -u -r1.10 -r1.11 src/crypto/external/bsd/openssh/dist/match.h \
src/crypto/external/bsd/openssh/dist/ssh_api.c \
src/crypto/external/bsd/openssh/dist/sshbuf-getput-basic.c
cvs rdiff -u -r1.18 -r1.19 src/crypto/external/bsd/openssh/dist/misc.h
cvs rdiff -u -r1.34 -r1.35 src/crypto/external/bsd/openssh/dist/monitor.c
cvs rdiff -u -r1.19 -r1.20 \
src/crypto/external/bsd/openssh/dist/monitor_wrap.h \
src/crypto/external/bsd/openssh/dist/ssh-keysign.c
cvs rdiff -u -r1.26 -r1.27 src/crypto/external/bsd/openssh/dist/mux.c \
src/crypto/external/bsd/openssh/dist/ssh-keygen.1 \
src/crypto/external/bsd/openssh/dist/ssh-keyscan.c
cvs rdiff -u -r1.41 -r1.42 src/crypto/external/bsd/openssh/dist/packet.c
cvs rdiff -u -r1.31 -r1.32 src/crypto/external/bsd/openssh/dist/readconf.c \
src/crypto/external/bsd/op

CVS commit: src/distrib/sets/lists

2020-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  4 18:43:48 UTC 2020

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

Log Message:
bump libssh


To generate a diff of this commit:
cvs rdiff -u -r1.909 -r1.910 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.268 -r1.269 src/distrib/sets/lists/debug/shl.mi

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

Modified files:

Index: src/distrib/sets/lists/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.909 src/distrib/sets/lists/base/shl.mi:1.910
--- src/distrib/sets/lists/base/shl.mi:1.909	Fri Dec  4 13:27:18 2020
+++ src/distrib/sets/lists/base/shl.mi	Fri Dec  4 13:43:47 2020
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.909 2020/12/04 18:27:18 christos Exp $
+# $NetBSD: shl.mi,v 1.910 2020/12/04 18:43:47 christos Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -876,8 +876,8 @@
 ./usr/lib/libsqlite3.so.1.4			base-sys-shlib		compatfile
 ./usr/lib/libss.sobase-obsolete		obsolete
 ./usr/lib/libssh.sobase-secsh-shlib	compatfile
-./usr/lib/libssh.so.37base-secsh-shlib	compatfile
-./usr/lib/libssh.so.37.0			base-secsh-shlib	compatfile
+./usr/lib/libssh.so.38base-secsh-shlib	compatfile
+./usr/lib/libssh.so.38.0			base-secsh-shlib	compatfile
 ./usr/lib/libssl.sobase-crypto-shlib	compatfile
 ./usr/lib/libssl.so.12base-crypto-shlib	compatfile,openssl=10
 ./usr/lib/libssl.so.12.0			base-crypto-shlib	compatfile,openssl=10

Index: src/distrib/sets/lists/debug/shl.mi
diff -u src/distrib/sets/lists/debug/shl.mi:1.268 src/distrib/sets/lists/debug/shl.mi:1.269
--- src/distrib/sets/lists/debug/shl.mi:1.268	Fri Dec  4 13:27:18 2020
+++ src/distrib/sets/lists/debug/shl.mi	Fri Dec  4 13:43:47 2020
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.268 2020/12/04 18:27:18 christos Exp $
+# $NetBSD: shl.mi,v 1.269 2020/12/04 18:43:47 christos Exp $
 ./usr/lib/libbfd_g.a		comp-c-debuglib	debuglib,compatfile,binutils
 ./usr/libdata/debug/lib		base-sys-usr	debug,dynamicroot,compatdir
 ./usr/libdata/debug/lib/libavl.so.0.0.debug			comp-zfs-debug	debug,dynamicroot,zfs
@@ -308,7 +308,7 @@
 ./usr/libdata/debug/usr/lib/libskey.so.2.0.debug		comp-sys-debug	debug,compatfile,skey
 ./usr/libdata/debug/usr/lib/libsl.so.6.0.debug			comp-krb5-debug	debug,compatfile,kerberos
 ./usr/libdata/debug/usr/lib/libsqlite3.so.1.4.debug		comp-sys-debug	debug,compatfile
-./usr/libdata/debug/usr/lib/libssh.so.37.0.debug		comp-secsh-debug	debug,compatfile
+./usr/libdata/debug/usr/lib/libssh.so.38.0.debug		comp-secsh-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libssl.so.12.0.debug		comp-crypto-debug	debug,compatfile,openssl=10
 ./usr/libdata/debug/usr/lib/libssl.so.14.0.debug		comp-crypto-debug	debug,compatfile,openssl=11
 ./usr/libdata/debug/usr/lib/libstdc++.so.9.0.debug		comp-sys-debug	debug,compatfile,gcc=7,cxx,libstdcxx



CVS commit: src/doc

2020-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  4 18:44:49 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new OpenSSH


To generate a diff of this commit:
cvs rdiff -u -r1.1765 -r1.1766 src/doc/3RDPARTY
cvs rdiff -u -r1.2761 -r1.2762 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.1765 src/doc/3RDPARTY:1.1766
--- src/doc/3RDPARTY:1.1765	Fri Dec  4 13:28:55 2020
+++ src/doc/3RDPARTY	Fri Dec  4 13:44:49 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1765 2020/12/04 18:28:55 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1766 2020/12/04 18:44:49 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1070,12 +1070,12 @@ Notes:
 Patch applied after OpenSSH import.
 
 Package:	OpenSSH
-Version:	8.3
-Current Vers:	8.3 / portable 8.3p1
+Version:	8.4
+Current Vers:	8.4 / portable 8.4p1
 Maintainer:	OpenSSH
 Archive Site:	http://www.openssh.com/ftp.html
 Home Page:	http://www.openssh.com/portable.html
-Date:		2020-06-13
+Date:		2020-12-04
 Mailing List:	openssh-unix-annou...@mindrot.org
 Responsible:	thorpej, christos, elric
 License:	BSD. See src/crypto/external/bsd/openssh/dist/LICENSE

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2761 src/doc/CHANGES:1.2762
--- src/doc/CHANGES:1.2761	Fri Dec  4 13:28:55 2020
+++ src/doc/CHANGES	Fri Dec  4 13:44:49 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2761 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2762 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -310,4 +310,5 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 		[rin 20201201]
 	pkg_install(8): Updated to 20201202. This changes the default database
 		location from /var/db/pkg to /usr/pkg/pkgdb. [wiz 20201202]
-	libfido2: Update for OpenSSH 8.4 support [christos 20201204]
+	libfido2: Update to 1.5.0 for OpenSSH 8.4 support [christos 20201204]
+	OpenSSH: Import 8.4. [christos 20201204]



CVS commit: src/include

2020-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  4 20:39:10 UTC 2020

Modified Files:
src/include: unistd.h

Log Message:
Add __null_sentinel


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/include/unistd.h

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

Modified files:

Index: src/include/unistd.h
diff -u src/include/unistd.h:1.159 src/include/unistd.h:1.160
--- src/include/unistd.h:1.159	Tue Sep 22 17:37:47 2020
+++ src/include/unistd.h	Fri Dec  4 15:39:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: unistd.h,v 1.159 2020/09/22 21:37:47 nia Exp $	*/
+/*	$NetBSD: unistd.h,v 1.160 2020/12/04 20:39:10 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -102,9 +102,9 @@ char	*cuserid(char *);	/* obsolete */
 #endif /* __CUSERID_DECLARED */
 int	 dup(int);
 int	 dup2(int, int);
-int	 execl(const char *, const char *, ...);
+int	 execl(const char *, const char *, ...) __null__sentinel;
 int	 execle(const char *, const char *, ...);
-int	 execlp(const char *, const char *, ...);
+int	 execlp(const char *, const char *, ...) __null_sentinel;
 int	 execv(const char *, char * const *);
 int	 execve(const char *, char * const *, char * const *);
 int	 execvp(const char *, char * const *);



CVS commit: src/sys/sys

2020-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  4 20:38:44 UTC 2020

Modified Files:
src/sys/sys: cdefs.h

Log Message:
add __null_sentinel (from FreeBSD)


To generate a diff of this commit:
cvs rdiff -u -r1.154 -r1.155 src/sys/sys/cdefs.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/sys/cdefs.h
diff -u src/sys/sys/cdefs.h:1.154 src/sys/sys/cdefs.h:1.155
--- src/sys/sys/cdefs.h:1.154	Wed Apr 22 05:23:21 2020
+++ src/sys/sys/cdefs.h	Fri Dec  4 15:38:44 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdefs.h,v 1.154 2020/04/22 09:23:21 rin Exp $	*/
+/*	$NetBSD: cdefs.h,v 1.155 2020/12/04 20:38:44 christos Exp $	*/
 
 /* * Copyright (c) 1991, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -270,6 +270,12 @@
 #define	__always_inline	/* nothing */
 #endif
 
+#if __GNUC_PREREQ__(4, 0) || defined(__lint__)
+#define	__null_sentinel	__attribute__((__sentinel__))
+#else
+#define	__null_sentinel	/* nothing */
+#endif
+
 #if __GNUC_PREREQ__(4, 1) || defined(__lint__)
 #define	__returns_twice	__attribute__((__returns_twice__))
 #else



CVS commit: src/external/gpl3/gdb/dist

2020-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  5 21:26:43 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gas: configure.tgt
src/external/gpl3/gdb/dist/ld: configure.tgt
Added Files:
src/external/gpl3/gdb/dist/ld/emulparams: aarch64nbsd.sh
aarch64nbsdb.sh armelf_nbsd_eabi.sh armelf_nbsd_eabihf.sh
armelfb_nbsd_eabi.sh armelfb_nbsd_eabihf.sh elf32_x86_64_nacl.sh
elf32or1k_nbsd.sh elf32ppc_nbsd.sh elf_i386_nacl.sh
elf_x86_64_nacl.sh ppclynx.sh ppcpe.sh tic30aout.sh

Log Message:
add aarch64 bits


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gdb/dist/gas/configure.tgt
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gdb/dist/ld/configure.tgt
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gdb/dist/ld/emulparams/aarch64nbsd.sh \
src/external/gpl3/gdb/dist/ld/emulparams/aarch64nbsdb.sh \
src/external/gpl3/gdb/dist/ld/emulparams/armelf_nbsd_eabi.sh \
src/external/gpl3/gdb/dist/ld/emulparams/armelf_nbsd_eabihf.sh \
src/external/gpl3/gdb/dist/ld/emulparams/armelfb_nbsd_eabi.sh \
src/external/gpl3/gdb/dist/ld/emulparams/armelfb_nbsd_eabihf.sh \
src/external/gpl3/gdb/dist/ld/emulparams/elf32_x86_64_nacl.sh \
src/external/gpl3/gdb/dist/ld/emulparams/elf32or1k_nbsd.sh \
src/external/gpl3/gdb/dist/ld/emulparams/elf32ppc_nbsd.sh \
src/external/gpl3/gdb/dist/ld/emulparams/elf_i386_nacl.sh \
src/external/gpl3/gdb/dist/ld/emulparams/elf_x86_64_nacl.sh \
src/external/gpl3/gdb/dist/ld/emulparams/ppclynx.sh \
src/external/gpl3/gdb/dist/ld/emulparams/ppcpe.sh \
src/external/gpl3/gdb/dist/ld/emulparams/tic30aout.sh

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

Modified files:

Index: src/external/gpl3/gdb/dist/gas/configure.tgt
diff -u src/external/gpl3/gdb/dist/gas/configure.tgt:1.1.1.1 src/external/gpl3/gdb/dist/gas/configure.tgt:1.2
--- src/external/gpl3/gdb/dist/gas/configure.tgt:1.1.1.1	Mon Sep 14 21:42:20 2020
+++ src/external/gpl3/gdb/dist/gas/configure.tgt	Sat Dec  5 16:26:43 2020
@@ -123,6 +123,7 @@ generic_target=${cpu_type}-$vendor-$os
 case ${generic_target} in
   aarch64*-*-elf*)			fmt=elf;;
   aarch64*-*-fuchsia*)			fmt=elf;;
+  aarch64*-*-netbsd*)   fmt=elf em=nbsd ;;
   aarch64*-*-linux*)			fmt=elf em=linux
 case ${cpu}-${os} in
   aarch64*-linux-gnu_ilp32)		arch=aarch64:32 ;;

Index: src/external/gpl3/gdb/dist/ld/configure.tgt
diff -u src/external/gpl3/gdb/dist/ld/configure.tgt:1.1.1.1 src/external/gpl3/gdb/dist/ld/configure.tgt:1.2
--- src/external/gpl3/gdb/dist/ld/configure.tgt:1.1.1.1	Mon Sep 14 21:43:59 2020
+++ src/external/gpl3/gdb/dist/ld/configure.tgt	Sat Dec  5 16:26:43 2020
@@ -77,6 +77,12 @@ aarch64-*-linux*)	targ_emul=aarch64linux
 			targ_extra_libpath="aarch64linuxb aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi"
 			targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb $targ_extra_libpath"
 			;;
+aarch64_be-*-netbsd*)	targ_emul=aarch64nbsdb
+			targ_extra_emuls="aarch64nbsd aarch64elfb aarch64elf armelfb_nbsd_eabihf armelf_nbsd_eabihf armelfb_nbsd_eabi armelf_nbsd_eabi armelfb_nbsd armelf_nbsd armelf armelfb"
+			;;
+aarch64-*-netbsd*)	targ_emul=aarch64nbsd
+			targ_extra_emuls="aarch64nbsdb aarch64elf aarch64elfb armelf_nbsd_eabihf armelfb_nbsd_eabihf armelf_nbsd_eabi armelfb_nbsd_eabi armelf_nbsd armelfb_nbsd armelf armelfb"
+			;;
 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
 			targ_emul=elf64alpha_fbsd
 			targ_extra_emuls="elf64alpha alpha"

Added files:

Index: src/external/gpl3/gdb/dist/ld/emulparams/aarch64nbsd.sh
diff -u /dev/null src/external/gpl3/gdb/dist/ld/emulparams/aarch64nbsd.sh:1.1
--- /dev/null	Sat Dec  5 16:26:43 2020
+++ src/external/gpl3/gdb/dist/ld/emulparams/aarch64nbsd.sh	Sat Dec  5 16:26:43 2020
@@ -0,0 +1,37 @@
+ARCH=aarch64
+MACHINE=
+NOP=0
+
+SCRIPT_NAME=elf
+ELFSIZE=64
+OUTPUT_FORMAT="elf64-littleaarch64"
+BIG_OUTPUT_FORMAT="elf64-bigaarch64"
+LITTLE_OUTPUT_FORMAT="elf64-littleaarch64"
+NO_REL_RELOCS=yes
+
+TEMPLATE_NAME=elf
+EXTRA_EM_FILE=aarch64elf
+
+GENERATE_SHLIB_SCRIPT=yes
+GENERATE_PIE_SCRIPT=yes
+
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
+SEPARATE_GOTPLT=24
+IREL_IN_PLT=
+
+TEXT_START_ADDR=0x20010
+
+DATA_START_SYMBOLS='PROVIDE (__data_start = .);';
+
+# AArch64 does not support .s* sections.
+NO_SMALL_DATA=yes
+
+OTHER_BSS_SYMBOLS='__bss_start__ = .;'
+OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
+OTHER_END_SYMBOLS='__end__ = . ;'
+
+OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
+ATTRS_SECTIONS='.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }'
+# Ensure each PLT entry is aligned to a cache line.
+PLT=".plt  ${RELOCATING-0} : ALIGN(16) { *(.plt)${IREL_IN_PLT+ *(.iplt)} }"
Index: src/external/gpl3/gdb/dist/ld/emulpar

CVS commit: src/tools/gdb

2020-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  5 21:27:31 UTC 2020

Modified Files:
src/tools/gdb: mknative-gdb

Log Message:
Don't bother with gdbserver for archs that don't build it.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tools/gdb/mknative-gdb

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

Modified files:

Index: src/tools/gdb/mknative-gdb
diff -u src/tools/gdb/mknative-gdb:1.14 src/tools/gdb/mknative-gdb:1.15
--- src/tools/gdb/mknative-gdb:1.14	Thu Sep 24 10:53:17 2020
+++ src/tools/gdb/mknative-gdb	Sat Dec  5 16:27:31 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gdb,v 1.14 2020/09/24 14:53:17 christos Exp $
+#	$NetBSD: mknative-gdb,v 1.15 2020/12/05 21:27:31 christos Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/external/gpl3/gdb
@@ -218,6 +218,10 @@ get_gdb_libgdb () {
 
 get_gdb_bingdbserver () {
 	local _CTF=$_GDB/bin/gdbserver
+
+	if [ ! -f $_CTF/arch/$_MACHINE_SUBDIR/config.h ]; then
+		return
+	fi
 	mkdir -p $_TOP/$_CTF/arch/$_MACHINE_SUBDIR
 
 	write_c $_CTF/arch/$_MACHINE_SUBDIR/config.h \



CVS commit: src/external/gpl3/gdb

2020-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  5 22:14:45 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: alpha-bsd-nat.c alpha-nbsd-tdep.c
arm-nbsd-tdep.c nbsd-nat.c
src/external/gpl3/gdb/lib/libbfd/arch/alpha: bfd_stdint.h targmatch.h
src/external/gpl3/gdb/lib/libbfd/arch/armeb: bfd_stdint.h targmatch.h
src/external/gpl3/gdb/lib/libdecnumber/arch/alpha: gstdint.h
src/external/gpl3/gdb/lib/libdecnumber/arch/armeb: gstdint.h
src/external/gpl3/gdb/lib/libgdb/arch/alpha: defs.mk
src/external/gpl3/gdb/lib/libgdb/arch/armeb: defs.mk version.c
src/external/gpl3/gdb/lib/libgnulib/arch/alpha: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/alpha/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/alpha/gnulib/import: unistd.h
src/external/gpl3/gdb/lib/libgnulib/arch/armeb: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/armeb/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/armeb/gnulib/import: unistd.h

Log Message:
fix alpha build.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/dist/gdb/alpha-nbsd-tdep.c
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/arm-nbsd-tdep.c
cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gdb/lib/libbfd/arch/alpha/bfd_stdint.h
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gdb/lib/libbfd/arch/alpha/targmatch.h
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gdb/lib/libbfd/arch/armeb/bfd_stdint.h \
src/external/gpl3/gdb/lib/libbfd/arch/armeb/targmatch.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gdb/lib/libdecnumber/arch/alpha/gstdint.h
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gdb/lib/libdecnumber/arch/armeb/gstdint.h
cvs rdiff -u -r1.14 -r1.15 \
src/external/gpl3/gdb/lib/libgdb/arch/alpha/defs.mk
cvs rdiff -u -r1.15 -r1.16 \
src/external/gpl3/gdb/lib/libgdb/arch/armeb/defs.mk
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gdb/lib/libgdb/arch/armeb/version.c
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgnulib/arch/alpha/defs.mk
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgnulib/arch/alpha/gnulib/config.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgnulib/arch/alpha/gnulib/import/unistd.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgnulib/arch/armeb/defs.mk
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgnulib/arch/armeb/gnulib/config.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgnulib/arch/armeb/gnulib/import/unistd.h

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c:1.10 src/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c:1.11
--- src/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c:1.10	Mon Sep 14 22:05:18 2020
+++ src/external/gpl3/gdb/dist/gdb/alpha-bsd-nat.c	Sat Dec  5 17:14:44 2020
@@ -18,7 +18,6 @@
along with this program.  If not, see .  */
 
 /* We define this to get types like register_t.  */
-#define _KERNTYPES
 #include "defs.h"
 #include "inferior.h"
 #include "regcache.h"

Index: src/external/gpl3/gdb/dist/gdb/alpha-nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/alpha-nbsd-tdep.c:1.8 src/external/gpl3/gdb/dist/gdb/alpha-nbsd-tdep.c:1.9
--- src/external/gpl3/gdb/dist/gdb/alpha-nbsd-tdep.c:1.8	Mon Sep 14 22:05:18 2020
+++ src/external/gpl3/gdb/dist/gdb/alpha-nbsd-tdep.c	Sat Dec  5 17:14:44 2020
@@ -22,6 +22,7 @@
 #include "defs.h"
 #include "frame.h"
 #include "gdbcore.h"
+#include "gdbarch.h"
 #include "osabi.h"
 #include "regcache.h"
 #include "regset.h"
@@ -336,7 +337,6 @@ alphanbsd_init_abi (struct gdbarch_info 
   /* NetBSD/alpha has SVR4-style shared libraries.  */
   set_solib_svr4_fetch_link_map_offsets
 (gdbarch, svr4_lp64_fetch_link_map_offsets);
-  set_gdbarch_skip_solib_resolver (gdbarch, nbsd_skip_solib_resolver);
 
 #ifdef notyet
   tdep->dynamic_sigtramp_offset = alphanbsd_sigtramp_offset;

Index: src/external/gpl3/gdb/dist/gdb/arm-nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/arm-nbsd-tdep.c:1.6 src/external/gpl3/gdb/dist/gdb/arm-nbsd-tdep.c:1.7
--- src/external/gpl3/gdb/dist/gdb/arm-nbsd-tdep.c:1.6	Mon Sep 14 22:05:18 2020
+++ src/external/gpl3/gdb/dist/gdb/arm-nbsd-tdep.c	Sat Dec  5 17:14:44 2020
@@ -166,9 +166,6 @@ arm_netbsd_elf_init_abi (struct gdbarch_
   /* NetBSD ELF uses SVR4-style shared libraries.  */
   set_solib_svr4_fetch_link_map_offsets
 (gdbarch, svr4_ilp32_fetch_link_map_offsets);
-
-  /* for single stepping; see PR/50773 */
-  set_gdbarch_skip_solib_resolver (gdbarch, nbsd_skip_solib_resolver);
 }
 
 void _initialize_arm_netbsd_tdep ();

CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  5 22:24:26 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: arm-nbsd-nat.c

Log Message:
fix arm build


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c:1.14 src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c:1.15
--- src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c:1.14	Mon Sep 14 22:05:18 2020
+++ src/external/gpl3/gdb/dist/gdb/arm-nbsd-nat.c	Sat Dec  5 17:24:26 2020
@@ -18,7 +18,6 @@
along with this program.  If not, see .  */
 
 /* We define this to get types like register_t.  */
-#define _KERNTYPES
 #include "defs.h"
 #include "gdbcore.h"
 #include "inferior.h"
@@ -52,7 +51,7 @@ public:
   const struct target_desc *read_description () override;
 };
 
-static arm_nbsd_nat_target the_arm_nbsd_nat_target;
+static arm_netbsd_nat_target the_arm_netbsd_nat_target;
 
 /* Determine if PT_GETREGS fetches REGNUM.  */
 
@@ -72,8 +71,6 @@ getfpregs_supplies (int regnum)
 	  || regnum == ARM_FPSCR_REGNUM);
 }
 
-extern int arm_apcs_32;
-
 static int
 armnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
 {
@@ -142,18 +139,16 @@ fetch_register (struct regcache *regcach
   pid_t pid = ptid.pid ();
   int lwp = ptid.lwp ();
   int ret;
-  int lwp = regcache->ptid ().lwp ();
 
   ret = ptrace (PT_GETREGS, regcache->ptid ().pid (),
-		(PTRACE_TYPE_ARG3) &inferior_registers, lwp);
+		(PTRACE_TYPE_ARG3) ®s, lwp);
 
   if (ret < 0)
 {
   warning (_("unable to fetch general register"));
   return;
 }
-  arm_nbsd_supply_gregset (nullptr, regcache, regno, &inferior_registers,
-			   sizeof (inferior_registers));
+  arm_nbsd_supply_gregset (nullptr, regcache, regno, ®s, sizeof (regs));
 }
 
 static void
@@ -229,15 +224,14 @@ static void
 store_register (const struct regcache *regcache, int regno)
 {
   struct gdbarch *gdbarch = regcache->arch ();
-  struct reg inferior_registers;
-  int lwp = regcache->ptid ().lwp ();
+  struct reg regs;
   int ret;
   ptid_t ptid = regcache->ptid ();
   pid_t pid = ptid.pid ();
   int lwp = ptid.lwp ();
 
   ret = ptrace (PT_GETREGS, regcache->ptid ().pid (),
-		(PTRACE_TYPE_ARG3) &inferior_registers, lwp);
+		(PTRACE_TYPE_ARG3) ®s, lwp);
 
   if (ret < 0)
 {
@@ -291,7 +285,7 @@ store_register (const struct regcache *r
 }
 
   ret = ptrace (PT_SETREGS, regcache->ptid ().pid (),
-		(PTRACE_TYPE_ARG3) &inferior_registers, lwp);
+		(PTRACE_TYPE_ARG3) ®s, lwp);
 
   if (ret < 0)
 warning (_("unable to write register %d to inferior"), regno);
@@ -301,7 +295,7 @@ static void
 store_regs (const struct regcache *regcache)
 {
   struct gdbarch *gdbarch = regcache->arch ();
-  struct reg inferior_registers;
+  struct reg regs;
   int lwp = regcache->ptid ().lwp ();
   int ret;
   int regno;
@@ -333,7 +327,7 @@ store_regs (const struct regcache *regca
 }
 
   ret = ptrace (PT_SETREGS, regcache->ptid ().pid (),
-		(PTRACE_TYPE_ARG3) &inferior_registers, lwp);
+		(PTRACE_TYPE_ARG3) ®s, lwp);
 
   if (ret < 0)
 warning (_("unable to store general registers"));
@@ -438,5 +432,6 @@ _initialize_arm_netbsd_nat ()
   /* Support debugging kernel virtual memory images.  */
   bsd_kvm_add_target (armnbsd_supply_pcb);
 
+/*###436 [cc] note: suggested alternative: 'the_arm_nbsd_nat_target'%%%*/
   add_inf_child_target (&the_arm_netbsd_nat_target);
 }



CVS commit: src/sys/arch/hppa/include

2020-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  5 22:49:50 UTC 2020

Modified Files:
src/sys/arch/hppa/include: proc.h types.h

Log Message:
Use __vaddr_t since we don't expose vaddr_t by default to userland.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hppa/include/proc.h
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/hppa/include/types.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/hppa/include/proc.h
diff -u src/sys/arch/hppa/include/proc.h:1.12 src/sys/arch/hppa/include/proc.h:1.13
--- src/sys/arch/hppa/include/proc.h:1.12	Thu Mar  6 14:02:58 2014
+++ src/sys/arch/hppa/include/proc.h	Sat Dec  5 17:49:50 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: proc.h,v 1.12 2014/03/06 19:02:58 skrll Exp $	*/
+/*	$NetBSD: proc.h,v 1.13 2020/12/05 22:49:50 christos Exp $	*/
 
 /*	$OpenBSD: proc.h,v 1.4 2009/12/29 13:11:40 jsing Exp $ */
 
@@ -44,7 +44,7 @@ struct mdlwp {
 	volatile int	md_astpending;		/* AST pending for this LWP */
 	int		md_flags;		/* machine-dependent flags */
 
-	vaddr_t		md_bpva;
+	__vaddr_t	md_bpva;
 	unsigned int	md_bpsave[2];
 };
 

Index: src/sys/arch/hppa/include/types.h
diff -u src/sys/arch/hppa/include/types.h:1.28 src/sys/arch/hppa/include/types.h:1.29
--- src/sys/arch/hppa/include/types.h:1.28	Thu Apr 16 05:51:57 2020
+++ src/sys/arch/hppa/include/types.h	Sat Dec  5 17:49:50 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.28 2020/04/16 09:51:57 skrll Exp $	*/
+/*	$NetBSD: types.h,v 1.29 2020/12/05 22:49:50 christos Exp $	*/
 
 /*	$OpenBSD: types.h,v 1.6 2001/08/11 01:58:34 art Exp $	*/
 
@@ -49,11 +49,13 @@ typedef struct label_t {
 } label_t;
 #endif
 
+typedef	unsigned long		__vaddr_t;
+
 #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || defined(_STANDALONE)
 typedef	unsigned long		hppa_hpa_t;
 typedef	unsigned long		hppa_spa_t;
 typedef	unsigned int		pa_space_t;
-typedef	unsigned long		vaddr_t;
+typedef	__vaddr_t		vaddr_t;
 typedef	unsigned long		vsize_t;
 typedef	unsigned long		paddr_t;
 typedef	unsigned long		psize_t;



CVS commit: src/external/gpl3/gdb/lib

2020-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  5 23:02:26 UTC 2020

Modified Files:
src/external/gpl3/gdb/lib/libbfd/arch/hppa: targmatch.h
src/external/gpl3/gdb/lib/libgdb/arch/hppa: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/hppa/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/hppa/gnulib/import: unistd.h

Log Message:
fix hppa


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gdb/lib/libbfd/arch/hppa/targmatch.h
cvs rdiff -u -r1.12 -r1.13 \
src/external/gpl3/gdb/lib/libgdb/arch/hppa/config.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgnulib/arch/hppa/gnulib/config.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgnulib/arch/hppa/gnulib/import/unistd.h

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

Modified files:

Index: src/external/gpl3/gdb/lib/libbfd/arch/hppa/targmatch.h
diff -u src/external/gpl3/gdb/lib/libbfd/arch/hppa/targmatch.h:1.11 src/external/gpl3/gdb/lib/libbfd/arch/hppa/targmatch.h:1.12
--- src/external/gpl3/gdb/lib/libbfd/arch/hppa/targmatch.h:1.11	Sun Sep 20 12:54:16 2020
+++ src/external/gpl3/gdb/lib/libbfd/arch/hppa/targmatch.h	Sat Dec  5 18:02:25 2020
@@ -1,5 +1,5 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-gdb,v 1.12 2020/09/17 16:54:31 christos Exp  */
+/* Generated from: NetBSD: mknative-gdb,v 1.15 2020/12/05 21:27:31 christos Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
 
 #ifdef BFD64
@@ -42,15 +42,6 @@
 
 #if !defined (SELECT_VECS) || defined (HAVE_aarch64_elf64_le_vec)
 
-{ "aarch64-*-netbsd*",
-&aarch64_elf64_le_vec },
-#endif
-
-
-
-
-#if !defined (SELECT_VECS) || defined (HAVE_aarch64_elf64_le_vec)
-
 { "aarch64-*-fuchsia*",
 &aarch64_elf64_le_vec },
 #endif
@@ -69,25 +60,7 @@
 
 #if !defined (SELECT_VECS) || defined (HAVE_aarch64_elf64_le_vec)
 
-{ "aarch64-*-linux*",
-&aarch64_elf64_le_vec },
-#endif
-
-
-
-
-#if !defined (SELECT_VECS) || defined (HAVE_aarch64_elf64_be_vec)
-
-{ "aarch64_be-*-linux*",
-&aarch64_elf64_be_vec },
-#endif
-
-
-
-
-#if !defined (SELECT_VECS) || defined (HAVE_aarch64_elf64_le_vec)
-
-{ "aarch64-*-netbsd*",
+{ "aarch64-*-linux*", NULL },{ "aarch64-*-netbsd*",
 &aarch64_elf64_le_vec },
 #endif
 
@@ -96,7 +69,7 @@
 
 #if !defined (SELECT_VECS) || defined (HAVE_aarch64_elf64_be_vec)
 
-{ "aarch64_be-*-netbsd*",
+{ "aarch64_be-*-linux*", NULL },{ "aarch64_be-*-netbsd*",
 &aarch64_elf64_be_vec },
 #endif
 

Index: src/external/gpl3/gdb/lib/libgdb/arch/hppa/config.h
diff -u src/external/gpl3/gdb/lib/libgdb/arch/hppa/config.h:1.12 src/external/gpl3/gdb/lib/libgdb/arch/hppa/config.h:1.13
--- src/external/gpl3/gdb/lib/libgdb/arch/hppa/config.h:1.12	Sun Sep 20 12:54:21 2020
+++ src/external/gpl3/gdb/lib/libgdb/arch/hppa/config.h	Sat Dec  5 18:02:25 2020
@@ -1,5 +1,5 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-gdb,v 1.12 2020/09/17 16:54:31 christos Exp  */
+/* Generated from: NetBSD: mknative-gdb,v 1.15 2020/12/05 21:27:31 christos Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
 
 /* config.h.  Generated from config.in by configure.  */
@@ -445,7 +445,7 @@
 #define HAVE_STRING_H 1
 
 /* Define to 1 if your system has struct lwp. */
-/* #undef HAVE_STRUCT_LWP */
+#define HAVE_STRUCT_LWP 1
 
 /* Define to 1 if `pl_syscall_code' is a member of `struct ptrace_lwpinfo'. */
 /* #undef HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE */

Index: src/external/gpl3/gdb/lib/libgnulib/arch/hppa/gnulib/config.h
diff -u src/external/gpl3/gdb/lib/libgnulib/arch/hppa/gnulib/config.h:1.1 src/external/gpl3/gdb/lib/libgnulib/arch/hppa/gnulib/config.h:1.2
--- src/external/gpl3/gdb/lib/libgnulib/arch/hppa/gnulib/config.h:1.1	Sun Sep 20 12:54:25 2020
+++ src/external/gpl3/gdb/lib/libgnulib/arch/hppa/gnulib/config.h	Sat Dec  5 18:02:25 2020
@@ -1,5 +1,5 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-gdb,v 1.12 2020/09/17 16:54:31 christos Exp  */
+/* Generated from: NetBSD: mknative-gdb,v 1.15 2020/12/05 21:27:31 christos Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
 
 /* config.h.  Generated from config.in by configure.  */
@@ -796,7 +796,7 @@
 #define HAVE_SYS_PARAM_H 1
 
 /* Define to 1 if you have the  header file. */
-/* #undef HAVE_SYS_RANDOM_H */
+#define HAVE_SYS_RANDOM_H 1
 
 /* Define to 1 if you have the  header file. */
 #define HAVE_SYS_SOCKET_H 1

Index: src/external/gpl3/gdb/lib/libgnulib/arch/hppa/gnulib/import/unistd.h
diff -u src/external/gpl3/gdb/lib/libgnulib/arch/hppa/gnulib/import/unistd.h:1.1 src/external/gpl3/gdb/lib/libgnulib/arch/hppa/gnulib/import/unistd.h:1.2
--- src/external/gpl3/gdb/lib/libgnulib/arch/hppa/gnulib/impor

CVS commit: src/sys/arch

2020-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  6 02:23:12 UTC 2020

Modified Files:
src/sys/arch/sparc/include: proc.h types.h
src/sys/arch/sparc64/include: proc.h

Log Message:
don't expose register_t


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sparc/include/proc.h
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/sparc/include/types.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sparc64/include/proc.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/sparc/include/proc.h
diff -u src/sys/arch/sparc/include/proc.h:1.19 src/sys/arch/sparc/include/proc.h:1.20
--- src/sys/arch/sparc/include/proc.h:1.19	Thu Jan 13 21:06:31 2011
+++ src/sys/arch/sparc/include/proc.h	Sat Dec  5 21:23:12 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: proc.h,v 1.19 2011/01/14 02:06:31 rmind Exp $ */
+/*	$NetBSD: proc.h,v 1.20 2020/12/06 02:23:12 christos Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -53,7 +53,7 @@ struct mdlwp {
 };
 
 struct mdproc {
-	void	(*md_syscall)(register_t, struct trapframe *, register_t);
+	void	(*md_syscall)(__register_t, struct trapframe *, __register_t);
 	u_long	md_flags;
 };
 

Index: src/sys/arch/sparc/include/types.h
diff -u src/sys/arch/sparc/include/types.h:1.68 src/sys/arch/sparc/include/types.h:1.69
--- src/sys/arch/sparc/include/types.h:1.68	Sun May 17 02:30:44 2020
+++ src/sys/arch/sparc/include/types.h	Sat Dec  5 21:23:12 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.68 2020/05/17 06:30:44 martin Exp $ */
+/*	$NetBSD: types.h,v 1.69 2020/12/06 02:23:12 christos Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -57,9 +57,10 @@
 #include 
 #include 
 
+typedef unsigned long int	__register_t;
 /* The following are unsigned to prevent annoying sign extended pointers. */
 #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || defined(_STANDALONE)
-typedef unsigned long int	register_t;
+typedef __register_t		register_t;
 #define	PRIxREGISTER		"lx"
 typedef unsigned int		register32_t;
 #define	PRIxREGISTER32		"x"

Index: src/sys/arch/sparc64/include/proc.h
diff -u src/sys/arch/sparc64/include/proc.h:1.16 src/sys/arch/sparc64/include/proc.h:1.17
--- src/sys/arch/sparc64/include/proc.h:1.16	Sat May 21 21:09:09 2016
+++ src/sys/arch/sparc64/include/proc.h	Sat Dec  5 21:23:12 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: proc.h,v 1.16 2016/05/22 01:09:09 christos Exp $ */
+/*	$NetBSD: proc.h,v 1.17 2020/12/06 02:23:12 christos Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -51,7 +51,7 @@ struct mdlwp {
  * Machine-dependent part of the proc structure for SPARC.
  */
 struct mdproc {
-	void	(*md_syscall)(struct trapframe64 *, register_t, register_t);
+	void	(*md_syscall)(struct trapframe64 *, __register_t, __register_t);
 	u_long	md_flags;
 };
 



CVS commit: src/sys/arch/m68k/include

2020-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  6 02:26:33 UTC 2020

Modified Files:
src/sys/arch/m68k/include: proc.h

Log Message:
Don't expose register_t


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/m68k/include/proc.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/m68k/include/proc.h
diff -u src/sys/arch/m68k/include/proc.h:1.7 src/sys/arch/m68k/include/proc.h:1.8
--- src/sys/arch/m68k/include/proc.h:1.7	Thu Jan 13 21:06:27 2011
+++ src/sys/arch/m68k/include/proc.h	Sat Dec  5 21:26:33 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: proc.h,v 1.7 2011/01/14 02:06:27 rmind Exp $	*/
+/*	$NetBSD: proc.h,v 1.8 2020/12/06 02:26:33 christos Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
@@ -57,7 +57,7 @@ struct lwp;
  */
 struct mdproc {
 	int	mdp_flags;		/* machine-dependent flags */
-	void	(*md_syscall)(register_t, struct lwp *, struct frame *);
+	void	(*md_syscall)(__register_t, struct lwp *, struct frame *);
 };
 
 /*



CVS commit: src/sys/arch/sparc/include

2020-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  6 03:19:15 UTC 2020

Modified Files:
src/sys/arch/sparc/include: types.h

Log Message:
undo previous; __register_t is already defined


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/sparc/include/types.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/sparc/include/types.h
diff -u src/sys/arch/sparc/include/types.h:1.69 src/sys/arch/sparc/include/types.h:1.70
--- src/sys/arch/sparc/include/types.h:1.69	Sat Dec  5 21:23:12 2020
+++ src/sys/arch/sparc/include/types.h	Sat Dec  5 22:19:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.69 2020/12/06 02:23:12 christos Exp $ */
+/*	$NetBSD: types.h,v 1.70 2020/12/06 03:19:14 christos Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -57,10 +57,9 @@
 #include 
 #include 
 
-typedef unsigned long int	__register_t;
 /* The following are unsigned to prevent annoying sign extended pointers. */
 #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || defined(_STANDALONE)
-typedef __register_t		register_t;
+typedef unsigned long int	register_t;
 #define	PRIxREGISTER		"lx"
 typedef unsigned int		register32_t;
 #define	PRIxREGISTER32		"x"



CVS commit: src/external/gpl3/gdb/bin

2020-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  6 03:28:26 UTC 2020

Modified Files:
src/external/gpl3/gdb/bin/gdb: Makefile
src/external/gpl3/gdb/bin/gdbtui: Makefile

Log Message:
need -lpthread for sun2


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/external/gpl3/gdb/bin/gdb/Makefile
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gdb/bin/gdbtui/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/gpl3/gdb/bin/gdb/Makefile
diff -u src/external/gpl3/gdb/bin/gdb/Makefile:1.19 src/external/gpl3/gdb/bin/gdb/Makefile:1.20
--- src/external/gpl3/gdb/bin/gdb/Makefile:1.19	Sat Oct 24 01:01:57 2020
+++ src/external/gpl3/gdb/bin/gdb/Makefile	Sat Dec  5 22:28:25 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.19 2020/10/24 05:01:57 kamil Exp $
+#	$NetBSD: Makefile,v 1.20 2020/12/06 03:28:25 christos Exp $
 
 NOCTF=
 .include 
@@ -100,8 +100,8 @@ DPADD+=	${LIBOPCODESDIR}/libopcodes.a \
 	${LIBTERMINFO} \
 	${LIBIBERTYDIR}/libiberty.a
 
-LDADD+=		-lexpat -llzma -lz -lcurses -lintl -lm -lkvm -lutil
-DPADD+=		${LIBEXPAT} ${LIBLZMA} ${LIBZ} ${LIBCURSES} ${LIBINTL} ${LIBM} ${LIBKVM} ${LIBUTIL}
+LDADD+=		-lexpat -llzma -lz -lcurses -lintl -lm -lkvm -lutil -lpthread
+DPADD+=		${LIBEXPAT} ${LIBLZMA} ${LIBZ} ${LIBCURSES} ${LIBINTL} ${LIBM} ${LIBKVM} ${LIBUTIL} ${LIBPTHREAD}
 
 .include 
 

Index: src/external/gpl3/gdb/bin/gdbtui/Makefile
diff -u src/external/gpl3/gdb/bin/gdbtui/Makefile:1.13 src/external/gpl3/gdb/bin/gdbtui/Makefile:1.14
--- src/external/gpl3/gdb/bin/gdbtui/Makefile:1.13	Thu Sep 17 16:26:22 2020
+++ src/external/gpl3/gdb/bin/gdbtui/Makefile	Sat Dec  5 22:28:26 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.13 2020/09/17 20:26:22 christos Exp $
+#	$NetBSD: Makefile,v 1.14 2020/12/06 03:28:26 christos Exp $
 NOCTF=
 .include "../Makefile.inc"
 
@@ -84,8 +84,8 @@ DPADD+=	${LIBOPCODESDIR}/libopcodes.a \
 	${LIBTERMINFO} \
 	${LIBIBERTYDIR}/libiberty.a
 
-LDADD+=		-lexpat -llzma -lz -lcurses -lintl -lm -lkvm -lutil
-DPADD+=		${LIBEXPAT} ${LIBLZMA} ${LIBZ} ${LIBCURSES} ${LIBINTL} ${LIBM} ${LIBKVM} ${LIBUTIL}
+LDADD+=		-lexpat -llzma -lz -lcurses -lintl -lm -lkvm -lutil -lpthread
+DPADD+=		${LIBEXPAT} ${LIBLZMA} ${LIBZ} ${LIBCURSES} ${LIBINTL} ${LIBM} ${LIBKVM} ${LIBUTIL} ${LIBPTHREAD}
 
 .PATH: ${DIST}/gdb ${DIST}/gdb/mi ${DIST}/gdb/cli ${DIST}/gdb/tui \
 ${DIST}/gdb/signals ${DIST}/gdb/doc ${.CURDIR}/../arch/${GDB_MACHINE_ARCH}



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  6 03:29:03 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: m68k-bsd-nat.c ppc-nbsd-nat.c
sparc-tdep.h vax-bsd-nat.c

Log Message:
fix m68k, ppc, sparc, vax


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/dist/gdb/m68k-bsd-nat.c \
src/external/gpl3/gdb/dist/gdb/vax-bsd-nat.c
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gdb/dist/gdb/ppc-nbsd-nat.c
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/sparc-tdep.h

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/m68k-bsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/m68k-bsd-nat.c:1.8 src/external/gpl3/gdb/dist/gdb/m68k-bsd-nat.c:1.9
--- src/external/gpl3/gdb/dist/gdb/m68k-bsd-nat.c:1.8	Mon Sep 14 22:05:18 2020
+++ src/external/gpl3/gdb/dist/gdb/m68k-bsd-nat.c	Sat Dec  5 22:29:03 2020
@@ -18,7 +18,6 @@
along with this program.  If not, see .  */
 
 /* We define this to get types like register_t.  */
-#define _KERNTYPES
 #include "defs.h"
 #include "gdbcore.h"
 #include "inferior.h"
Index: src/external/gpl3/gdb/dist/gdb/vax-bsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/vax-bsd-nat.c:1.8 src/external/gpl3/gdb/dist/gdb/vax-bsd-nat.c:1.9
--- src/external/gpl3/gdb/dist/gdb/vax-bsd-nat.c:1.8	Mon Sep 14 22:05:19 2020
+++ src/external/gpl3/gdb/dist/gdb/vax-bsd-nat.c	Sat Dec  5 22:29:03 2020
@@ -18,7 +18,6 @@
along with this program.  If not, see .  */
 
 /* We define this to get types like register_t.  */
-#define _KERNTYPES
 #include "defs.h"
 #include "inferior.h"
 #include "regcache.h"
@@ -59,7 +58,7 @@ static void
 vaxbsd_collect_gregset (const struct regcache *regcache,
 			void *gregs, int regnum)
 {
-  gdb_byte *regs = (void *)gregs;
+  gdb_byte *regs = (gdb_byte *)gregs;
   int i;
 
   for (i = 0; i <= VAX_NUM_REGS; i++)

Index: src/external/gpl3/gdb/dist/gdb/ppc-nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/ppc-nbsd-nat.c:1.10 src/external/gpl3/gdb/dist/gdb/ppc-nbsd-nat.c:1.11
--- src/external/gpl3/gdb/dist/gdb/ppc-nbsd-nat.c:1.10	Mon Sep 14 22:05:18 2020
+++ src/external/gpl3/gdb/dist/gdb/ppc-nbsd-nat.c	Sat Dec  5 22:29:03 2020
@@ -20,7 +20,6 @@
along with this program.  If not, see .  */
 
 /* We define this to get types like register_t.  */
-#define _KERNTYPES
 #include "defs.h"
 
 #include 
@@ -33,8 +32,6 @@
 #include "inferior.h"
 #include "regcache.h"
 
-#include "common/gdb_assert.h"
-
 #include "nbsd-nat.h"
 #include "ppc-tdep.h"
 #include "ppc-nbsd-tdep.h"

Index: src/external/gpl3/gdb/dist/gdb/sparc-tdep.h
diff -u src/external/gpl3/gdb/dist/gdb/sparc-tdep.h:1.4 src/external/gpl3/gdb/dist/gdb/sparc-tdep.h:1.5
--- src/external/gpl3/gdb/dist/gdb/sparc-tdep.h:1.4	Mon Sep 14 22:05:19 2020
+++ src/external/gpl3/gdb/dist/gdb/sparc-tdep.h	Sat Dec  5 22:29:03 2020
@@ -255,9 +255,6 @@ extern const struct sparc_gregmap sparc3
 extern CORE_ADDR sparcnbsd_step_trap (struct frame_info *frame,
   unsigned long insn);
 
-extern void sparc32nbsd_init_abi (struct gdbarch_info info,
-  struct gdbarch *gdbarch);
-
 extern struct trad_frame_saved_reg *
   sparc32nbsd_sigcontext_saved_regs (struct frame_info *next_frame);
 



CVS commit: src/sys/arch/mips/include

2020-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  6 03:46:23 UTC 2020

Modified Files:
src/sys/arch/mips/include: proc.h types.h

Log Message:
don't expose vaddr_t to userland.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/mips/include/proc.h
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/mips/include/types.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/mips/include/proc.h
diff -u src/sys/arch/mips/include/proc.h:1.32 src/sys/arch/mips/include/proc.h:1.33
--- src/sys/arch/mips/include/proc.h:1.32	Fri Sep  4 04:17:53 2020
+++ src/sys/arch/mips/include/proc.h	Sat Dec  5 22:46:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: proc.h,v 1.32 2020/09/04 08:17:53 mrg Exp $	*/
+/*	$NetBSD: proc.h,v 1.33 2020/12/06 03:46:23 christos Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -49,7 +49,7 @@ struct trapframe;
 
 struct mdlwp {
 	struct trapframe *md_utf;	/* trapframe from userspace */
-	vaddr_t	md_ss_addr;		/* single step address for ptrace */
+	__vaddr_t md_ss_addr;		/* single step address for ptrace */
 	int	md_ss_instr;		/* single step instruction for ptrace */
 	volatile int md_astpending;	/* AST pending on return to userland */
 	int	md_upte[UPAGES_MAX];	/* ptes for mapping u page */
@@ -57,7 +57,7 @@ struct mdlwp {
 
 struct mdproc {
 	/* syscall entry for this process */
-	void	(*md_syscall)(struct lwp *, u_int, u_int, vaddr_t);
+	void	(*md_syscall)(struct lwp *, u_int, u_int, __vaddr_t);
 	int	md_abi;			/* which ABI is this process using? */
 };
 

Index: src/sys/arch/mips/include/types.h
diff -u src/sys/arch/mips/include/types.h:1.72 src/sys/arch/mips/include/types.h:1.73
--- src/sys/arch/mips/include/types.h:1.72	Sun Aug 16 23:19:35 2020
+++ src/sys/arch/mips/include/types.h	Sat Dec  5 22:46:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.72 2020/08/17 03:19:35 mrg Exp $	*/
+/*	$NetBSD: types.h,v 1.73 2020/12/06 03:46:23 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -64,6 +64,11 @@ typedef	__fpregister64_t	__fpregister_t;
  * the rest of the operating system as possible.
  */
 
+#ifdef _LP64
+typedef __uint64_t	__vaddr_t;
+#else
+typedef __uint32_t	__vaddr_t;
+#endif
 
 #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || defined(_STANDALONE)
 #if defined(_MIPS_PADDR_T_64BIT) || defined(_LP64)



CVS commit: src/external/gpl3/gdb

2020-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  6 04:08:55 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: sh-nbsd-nat.c sh-nbsd-tdep.c
src/external/gpl3/gdb/lib/libbfd/arch/m68000: targmatch.h
src/external/gpl3/gdb/lib/libbfd/arch/m68k: targmatch.h
src/external/gpl3/gdb/lib/libbfd/arch/mips64eb: bfd_stdint.h
targmatch.h
src/external/gpl3/gdb/lib/libbfd/arch/mips64el: targmatch.h
src/external/gpl3/gdb/lib/libbfd/arch/mipsel: targmatch.h
src/external/gpl3/gdb/lib/libbfd/arch/sh3eb: targmatch.h
src/external/gpl3/gdb/lib/libbfd/arch/sparc: targmatch.h
src/external/gpl3/gdb/lib/libbfd/arch/sparc64: bfd_stdint.h targmatch.h
src/external/gpl3/gdb/lib/libbfd/arch/vax: targmatch.h
src/external/gpl3/gdb/lib/libdecnumber/arch/mips64eb: gstdint.h
src/external/gpl3/gdb/lib/libdecnumber/arch/sparc64: gstdint.h
src/external/gpl3/gdb/lib/libgdb: Makefile
src/external/gpl3/gdb/lib/libgdb/arch/m68000: config.h
src/external/gpl3/gdb/lib/libgdb/arch/m68k: config.h
src/external/gpl3/gdb/lib/libgdb/arch/mips64eb: config.h
src/external/gpl3/gdb/lib/libgdb/arch/mipsel: config.h
src/external/gpl3/gdb/lib/libgdb/arch/sparc: config.h
src/external/gpl3/gdb/lib/libgdb/arch/sparc64: config.h defs.mk init.c
src/external/gpl3/gdb/lib/libgdbsupport/arch/sparc64/gdbsupport:
config.h
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import: unistd.h
src/external/gpl3/gdb/lib/libgnulib/arch/m68k/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/m68k/gnulib/import: unistd.h
src/external/gpl3/gdb/lib/libgnulib/arch/mips64eb/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/mips64eb/gnulib/import:
unistd.h
src/external/gpl3/gdb/lib/libgnulib/arch/mipsel/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/mipsel/gnulib/import: unistd.h
src/external/gpl3/gdb/lib/libgnulib/arch/sparc/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/sparc/gnulib/import: unistd.h
src/external/gpl3/gdb/lib/libgnulib/arch/sparc64: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/sparc64/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/sparc64/gnulib/import:
unistd.h

Log Message:
fix sh3, regen some more


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gdb/dist/gdb/sh-nbsd-nat.c \
src/external/gpl3/gdb/dist/gdb/sh-nbsd-tdep.c
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gdb/lib/libbfd/arch/m68000/targmatch.h
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gdb/lib/libbfd/arch/m68k/targmatch.h
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gdb/lib/libbfd/arch/mips64eb/bfd_stdint.h
cvs rdiff -u -r1.14 -r1.15 \
src/external/gpl3/gdb/lib/libbfd/arch/mips64eb/targmatch.h
cvs rdiff -u -r1.13 -r1.14 \
src/external/gpl3/gdb/lib/libbfd/arch/mips64el/targmatch.h
cvs rdiff -u -r1.13 -r1.14 \
src/external/gpl3/gdb/lib/libbfd/arch/mipsel/targmatch.h
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gdb/lib/libbfd/arch/sh3eb/targmatch.h
cvs rdiff -u -r1.12 -r1.13 \
src/external/gpl3/gdb/lib/libbfd/arch/sparc/targmatch.h
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gdb/lib/libbfd/arch/sparc64/bfd_stdint.h
cvs rdiff -u -r1.12 -r1.13 \
src/external/gpl3/gdb/lib/libbfd/arch/sparc64/targmatch.h
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gdb/lib/libbfd/arch/vax/targmatch.h
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gdb/lib/libdecnumber/arch/mips64eb/gstdint.h
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gdb/lib/libdecnumber/arch/sparc64/gstdint.h
cvs rdiff -u -r1.28 -r1.29 src/external/gpl3/gdb/lib/libgdb/Makefile
cvs rdiff -u -r1.12 -r1.13 \
src/external/gpl3/gdb/lib/libgdb/arch/m68000/config.h
cvs rdiff -u -r1.13 -r1.14 \
src/external/gpl3/gdb/lib/libgdb/arch/m68k/config.h
cvs rdiff -u -r1.18 -r1.19 \
src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/config.h
cvs rdiff -u -r1.15 -r1.16 \
src/external/gpl3/gdb/lib/libgdb/arch/mipsel/config.h
cvs rdiff -u -r1.13 -r1.14 \
src/external/gpl3/gdb/lib/libgdb/arch/sparc/config.h
cvs rdiff -u -r1.13 -r1.14 \
src/external/gpl3/gdb/lib/libgdb/arch/sparc64/config.h
cvs rdiff -u -r1.12 -r1.13 \
src/external/gpl3/gdb/lib/libgdb/arch/sparc64/defs.mk
cvs rdiff -u -r1.14 -r1.15 \
src/external/gpl3/gdb/lib/libgdb/arch/sparc64/init.c
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgdbsupport/arch/sparc64/gdbsupport/config.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/config.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgnulib/arch/m68000/gnulib/import/unistd.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgnul

CVS commit: src/external/gpl3/gdb

2020-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  6 05:23:07 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: mips-nbsd-nat.c
src/external/gpl3/gdb/lib/libbfd/arch/mips64el: bfd_stdint.h
src/external/gpl3/gdb/lib/libbfd/arch/mipseb: bfd-in3.h bfd.h
bfd_stdint.h bfdver.h config.h defs.mk targmatch.h
src/external/gpl3/gdb/lib/libdecnumber/arch/mips64el: gstdint.h
src/external/gpl3/gdb/lib/libdecnumber/arch/mipseb: config.h gstdint.h
src/external/gpl3/gdb/lib/libgdb/arch/mips64el: config.h defs.mk init.c
src/external/gpl3/gdb/lib/libgdb/arch/mipseb: config.h defs.mk init.c
jit-reader.h version.c xml-builtin.c
src/external/gpl3/gdb/lib/libgdb/arch/powerpc: config.h defs.mk init.c
jit-reader.h version.c xml-builtin.c
src/external/gpl3/gdb/lib/libgdbsupport/arch/mips64el/gdbsupport:
config.h
src/external/gpl3/gdb/lib/libgdbsupport/arch/powerpc: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/mips64el: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/mips64el/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/mips64el/gnulib/import:
unistd.h
src/external/gpl3/gdb/lib/libiberty/arch/mipseb: defs.mk
src/external/gpl3/gdb/lib/libopcodes/arch/mipseb: config.h
src/external/gpl3/gdb/lib/libreadline/arch/mipseb: config.h defs.mk
Added Files:
src/external/gpl3/gdb/lib/libctf/arch/aarch64: config.h defs.mk
src/external/gpl3/gdb/lib/libctf/arch/mipseb: config.h defs.mk
src/external/gpl3/gdb/lib/libgdbsupport/arch/aarch64: defs.mk
src/external/gpl3/gdb/lib/libgdbsupport/arch/aarch64/gdbsupport:
config.h
src/external/gpl3/gdb/lib/libgdbsupport/arch/mipseb: defs.mk
src/external/gpl3/gdb/lib/libgdbsupport/arch/mipseb/gdbsupport:
config.h
src/external/gpl3/gdb/lib/libgnulib/arch/aarch64: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib/import:
alloca.h ctype.h dirent.h fcntl.h fnmatch.h glob.h inttypes.h
limits.h locale.h math.h signal.h stdint.h stdio.h stdlib.h
string.h time.h unistd.h wchar.h wctype.h
src/external/gpl3/gdb/lib/libgnulib/arch/mipseb: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/mipseb/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/mipseb/gnulib/import: alloca.h
ctype.h dirent.h fcntl.h fnmatch.h glob.h inttypes.h limits.h
locale.h math.h signal.h stdint.h stdio.h stdlib.h string.h time.h
unistd.h wchar.h wctype.h

Log Message:
regen more mips and aarch64


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gdb/dist/gdb/mips-nbsd-nat.c
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/gdb/lib/libbfd/arch/mips64el/bfd_stdint.h
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gdb/lib/libbfd/arch/mipseb/bfd-in3.h \
src/external/gpl3/gdb/lib/libbfd/arch/mipseb/bfd.h \
src/external/gpl3/gdb/lib/libbfd/arch/mipseb/bfdver.h \
src/external/gpl3/gdb/lib/libbfd/arch/mipseb/defs.mk
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/gdb/lib/libbfd/arch/mipseb/bfd_stdint.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gdb/lib/libbfd/arch/mipseb/config.h
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gdb/lib/libbfd/arch/mipseb/targmatch.h
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gdb/lib/libctf/arch/aarch64/config.h \
src/external/gpl3/gdb/lib/libctf/arch/aarch64/defs.mk
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gdb/lib/libctf/arch/mipseb/config.h \
src/external/gpl3/gdb/lib/libctf/arch/mipseb/defs.mk
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/gdb/lib/libdecnumber/arch/mips64el/gstdint.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gdb/lib/libdecnumber/arch/mipseb/config.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/gdb/lib/libdecnumber/arch/mipseb/gstdint.h
cvs rdiff -u -r1.17 -r1.18 \
src/external/gpl3/gdb/lib/libgdb/arch/mips64el/config.h
cvs rdiff -u -r1.15 -r1.16 \
src/external/gpl3/gdb/lib/libgdb/arch/mips64el/defs.mk \
src/external/gpl3/gdb/lib/libgdb/arch/mips64el/init.c
cvs rdiff -u -r1.14 -r1.15 \
src/external/gpl3/gdb/lib/libgdb/arch/mipseb/config.h \
src/external/gpl3/gdb/lib/libgdb/arch/mipseb/defs.mk
cvs rdiff -u -r1.13 -r1.14 \
src/external/gpl3/gdb/lib/libgdb/arch/mipseb/init.c
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/gdb/lib/libgdb/arch/mipseb/jit-reader.h
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gdb/lib/libgdb/arch/mipseb/version.c \
src/external/gpl3/gdb/lib/libgdb/arch/mipseb/xml-builtin.c
cvs rdiff -u -r1.12 -r1.13 \
src/external/gpl3/gdb/lib/libgdb/arch/powerpc/config.h \
src/external/gpl3/gdb/lib/libgdb/arch/powerpc/defs.mk
cvs rdiff -u -r1.14 -r1.15 \
src/external/gpl3/gdb/lib

CVS commit: src/external/gpl3/gdb

2020-12-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  6 14:26:41 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: ppc-nbsd-tdep.c
src/external/gpl3/gdb/lib/libbfd/arch/powerpc: bfd_stdint.h targmatch.h
src/external/gpl3/gdb/lib/libdecnumber/arch/powerpc: gstdint.h
src/external/gpl3/gdb/lib/libgdb/arch/powerpc: config.h defs.mk init.c
jit-reader.h version.c xml-builtin.c
src/external/gpl3/gdb/lib/libgdbsupport/arch/powerpc: defs.mk
src/external/gpl3/gdb/lib/libgdbsupport/arch/powerpc/gdbsupport:
config.h
src/external/gpl3/gdb/lib/libgnulib/arch/powerpc: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/powerpc/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/powerpc/gnulib/import:
unistd.h

Log Message:
fix powerpc


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/ppc-nbsd-tdep.c
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gdb/lib/libbfd/arch/powerpc/bfd_stdint.h
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gdb/lib/libbfd/arch/powerpc/targmatch.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gdb/lib/libdecnumber/arch/powerpc/gstdint.h
cvs rdiff -u -r1.13 -r1.14 \
src/external/gpl3/gdb/lib/libgdb/arch/powerpc/config.h \
src/external/gpl3/gdb/lib/libgdb/arch/powerpc/defs.mk
cvs rdiff -u -r1.15 -r1.16 \
src/external/gpl3/gdb/lib/libgdb/arch/powerpc/init.c
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gdb/lib/libgdb/arch/powerpc/jit-reader.h
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gdb/lib/libgdb/arch/powerpc/version.c \
src/external/gpl3/gdb/lib/libgdb/arch/powerpc/xml-builtin.c
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/lib/libgdbsupport/arch/powerpc/defs.mk
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgdbsupport/arch/powerpc/gdbsupport/config.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgnulib/arch/powerpc/defs.mk
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgnulib/arch/powerpc/gnulib/config.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgnulib/arch/powerpc/gnulib/import/unistd.h

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/ppc-nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/ppc-nbsd-tdep.c:1.6 src/external/gpl3/gdb/dist/gdb/ppc-nbsd-tdep.c:1.7
--- src/external/gpl3/gdb/dist/gdb/ppc-nbsd-tdep.c:1.6	Tue Oct  6 18:14:41 2020
+++ src/external/gpl3/gdb/dist/gdb/ppc-nbsd-tdep.c	Sun Dec  6 09:26:40 2020
@@ -29,6 +29,7 @@
 
 #include "ppc-tdep.h"
 #include "nbsd-tdep.h"
+#include "ppc-nbsd-tdep.h"
 #include "ppc-tdep.h"
 #include "solib-svr4.h"
 

Index: src/external/gpl3/gdb/lib/libbfd/arch/powerpc/bfd_stdint.h
diff -u src/external/gpl3/gdb/lib/libbfd/arch/powerpc/bfd_stdint.h:1.9 src/external/gpl3/gdb/lib/libbfd/arch/powerpc/bfd_stdint.h:1.10
--- src/external/gpl3/gdb/lib/libbfd/arch/powerpc/bfd_stdint.h:1.9	Sun Sep 20 12:54:17 2020
+++ src/external/gpl3/gdb/lib/libbfd/arch/powerpc/bfd_stdint.h	Sun Dec  6 09:26:40 2020
@@ -1,8 +1,8 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-gdb,v 1.12 2020/09/17 16:54:31 christos Exp  */
+/* Generated from: NetBSD: mknative-gdb,v 1.15 2020/12/05 21:27:31 christos Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
 
-/* generated for  powerpc--netbsd-gcc (NetBSD nb1 20200311) 8.4.0 */
+/* generated for  powerpc--netbsd-gcc (NetBSD nb1 20200907) 9.3.0 */
 
 #ifndef GCC_GENERATED_STDINT_H
 #define GCC_GENERATED_STDINT_H 1

Index: src/external/gpl3/gdb/lib/libbfd/arch/powerpc/targmatch.h
diff -u src/external/gpl3/gdb/lib/libbfd/arch/powerpc/targmatch.h:1.11 src/external/gpl3/gdb/lib/libbfd/arch/powerpc/targmatch.h:1.12
--- src/external/gpl3/gdb/lib/libbfd/arch/powerpc/targmatch.h:1.11	Sun Sep 20 12:54:17 2020
+++ src/external/gpl3/gdb/lib/libbfd/arch/powerpc/targmatch.h	Sun Dec  6 09:26:40 2020
@@ -1,5 +1,5 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-gdb,v 1.12 2020/09/17 16:54:31 christos Exp  */
+/* Generated from: NetBSD: mknative-gdb,v 1.15 2020/12/05 21:27:31 christos Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
 
 #ifdef BFD64
@@ -42,15 +42,6 @@
 
 #if !defined (SELECT_VECS) || defined (HAVE_aarch64_elf64_le_vec)
 
-{ "aarch64-*-netbsd*",
-&aarch64_elf64_le_vec },
-#endif
-
-
-
-
-#if !defined (SELECT_VECS) || defined (HAVE_aarch64_elf64_le_vec)
-
 { "aarch64-*-fuchsia*",
 &aarch64_elf64_le_vec },
 #endif
@@ -69,25 +60,7 @@
 
 #if !defined (SELECT_VECS) || defined (HAVE_aarch64_elf64_le_vec)
 
-{ "aarch64-*-linux*",
-&aarch64_elf64_le_vec },
-#endif
-
-
-
-
-#if !defined (SELECT_VECS) || defined (HAVE_aarch64_elf64_be_vec)
-
-{ "aarch64_be-

CVS commit: src/share/mk

2020-12-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  6 14:28:34 UTC 2020

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

Log Message:
Move everyone to gdb-11


To generate a diff of this commit:
cvs rdiff -u -r1.1234 -r1.1235 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.1234 src/share/mk/bsd.own.mk:1.1235
--- src/share/mk/bsd.own.mk:1.1234	Tue Nov 17 05:49:41 2020
+++ src/share/mk/bsd.own.mk	Sun Dec  6 09:28:34 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1234 2020/11/17 10:49:41 rin Exp $
+#	$NetBSD: bsd.own.mk,v 1.1235 2020/12/06 14:28:34 christos Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -102,11 +102,7 @@ EXTERNAL_BINUTILS_SUBDIR=	/does/not/exis
 #
 # What GDB is used?
 #
-.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386"
 HAVE_GDB?=	1100
-.else
-HAVE_GDB?=	830
-.endif
 
 .if ${HAVE_GDB} == 1100
 EXTERNAL_GDB_SUBDIR=		gdb



CVS commit: src/external/gpl3/gdb/bin

2020-12-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  6 15:00:25 UTC 2020

Modified Files:
src/external/gpl3/gdb/bin: Makefile

Log Message:
Don't descend to gdbserver for now


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/bin/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/gpl3/gdb/bin/Makefile
diff -u src/external/gpl3/gdb/bin/Makefile:1.3 src/external/gpl3/gdb/bin/Makefile:1.4
--- src/external/gpl3/gdb/bin/Makefile:1.3	Sat Dec  5 16:27:06 2020
+++ src/external/gpl3/gdb/bin/Makefile	Sun Dec  6 10:00:25 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2020/12/05 21:27:06 christos Exp $
+#	$NetBSD: Makefile,v 1.4 2020/12/06 15:00:25 christos Exp $
 
 .include "../Makefile.inc"
 
@@ -9,9 +9,9 @@ SUBDIR+=  gdb
 SUBDIR+= gdbtui
 .endif
 
-.if ${MACHINE} == "amd64"
-SUBDIR+= gdbserver
-.endif
+#.if ${MACHINE} == "amd64"
+#SUBDIR+= gdbserver
+#.endif
 
 .if ${MACHINE_ARCH} == powerpc || ${MACHINE_ARCH} == powerpcle || \
 ${MACHINE_ARCH} == powerpc64



CVS commit: src/sys/kern

2020-12-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec  7 03:01:15 UTC 2020

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

Log Message:
fix the build; gcc does not always see that it can't happen.


To generate a diff of this commit:
cvs rdiff -u -r1.208 -r1.209 src/sys/kern/kern_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/sys/kern/kern_time.c
diff -u src/sys/kern/kern_time.c:1.208 src/sys/kern/kern_time.c:1.209
--- src/sys/kern/kern_time.c:1.208	Sun Dec  6 08:45:58 2020
+++ src/sys/kern/kern_time.c	Sun Dec  6 22:01:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_time.c,v 1.208 2020/12/06 13:45:58 thorpej Exp $	*/
+/*	$NetBSD: kern_time.c,v 1.209 2020/12/07 03:01:15 christos Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009, 2020
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.208 2020/12/06 13:45:58 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.209 2020/12/07 03:01:15 christos Exp $");
 
 #include 
 #include 
@@ -1649,6 +1649,8 @@ dosetitimer(struct proc *p, int which, s
 			itl = &pts->pts_prof;
 			pt->pt_ev.sigev_signo = SIGPROF;
 			break;
+		default:
+			panic("%s: can't happen %d", __func__, which);
 		}
 		itimer_init(it, &ptimer_itimer_ops, which, itl);
 		pt->pt_proc = p;



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec  7 20:28:53 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: sparc-nbsd-tdep.c

Log Message:
make function static (fixes crossgdb build, reported by martin@)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/sparc-nbsd-tdep.c

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/sparc-nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/sparc-nbsd-tdep.c:1.6 src/external/gpl3/gdb/dist/gdb/sparc-nbsd-tdep.c:1.7
--- src/external/gpl3/gdb/dist/gdb/sparc-nbsd-tdep.c:1.6	Mon Sep 14 22:05:19 2020
+++ src/external/gpl3/gdb/dist/gdb/sparc-nbsd-tdep.c	Mon Dec  7 15:28:53 2020
@@ -315,7 +315,7 @@ sparc32nbsd_init_abi (struct gdbarch_inf
   frame_unwind_append_unwinder (gdbarch, &sparc32nbsd_sigcontext_frame_unwind);
 }
 
-void
+static void
 sparc32nbsd_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
   sparc32nbsd_init_abi (info, gdbarch);



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Dec  8 13:56:38 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: sparc64-nbsd-nat.c

Log Message:
include gdbarch.h


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/dist/gdb/sparc64-nbsd-nat.c

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/sparc64-nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/sparc64-nbsd-nat.c:1.8 src/external/gpl3/gdb/dist/gdb/sparc64-nbsd-nat.c:1.9
--- src/external/gpl3/gdb/dist/gdb/sparc64-nbsd-nat.c:1.8	Mon Sep 14 22:05:19 2020
+++ src/external/gpl3/gdb/dist/gdb/sparc64-nbsd-nat.c	Tue Dec  8 08:56:38 2020
@@ -18,6 +18,7 @@
along with this program.  If not, see .  */
 
 #include "defs.h"
+#include "gdbarch.h"
 #include "gdbcore.h"
 #include "regcache.h"
 #include "inferior.h"



CVS commit: src/crypto/external/bsd/openssl

2020-12-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Dec 10 00:33:14 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist: CHANGES Configure NEWS README
e_os.h
src/crypto/external/bsd/openssl/dist/apps: ca.c s_client.c
src/crypto/external/bsd/openssl/dist/crypto/aes/asm:
aesni-sha1-x86_64.pl
src/crypto/external/bsd/openssl/dist/crypto/asn1: tasn_dec.c tasn_enc.c
src/crypto/external/bsd/openssl/dist/crypto/bn: bn_lib.c
src/crypto/external/bsd/openssl/dist/crypto/conf: conf_def.c
src/crypto/external/bsd/openssl/dist/crypto/ec: ec_ameth.c ec_asn1.c
ec_key.c ec_lib.c
src/crypto/external/bsd/openssl/dist/crypto/engine: eng_lib.c
src/crypto/external/bsd/openssl/dist/crypto/evp: e_aes.c
src/crypto/external/bsd/openssl/dist/crypto/modes: gcm128.c
src/crypto/external/bsd/openssl/dist/crypto/rand: rand_unix.c
randfile.c
src/crypto/external/bsd/openssl/dist/crypto/sha/asm: sha1-x86_64.pl
src/crypto/external/bsd/openssl/dist/crypto/ui: ui_openssl.c
src/crypto/external/bsd/openssl/dist/crypto/x509: x509_vfy.c
src/crypto/external/bsd/openssl/dist/include/openssl: bn.h
src/crypto/external/bsd/openssl/dist/ssl: s3_lib.c ssl_lib.c ssl_sess.c
t1_lib.c
src/crypto/external/bsd/openssl/dist/test: ectest.c rsa_test.c
src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64:
aesv8-armx.S chacha-armv8.S poly1305-armv8.S sha1-armv8.S
sha512-armv8.S
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: aesv8-armx.S
chacha-armv8.S ecp_nistz256-armv4.S poly1305-armv8.S sha1-armv8.S
sha512-armv8.S
src/crypto/external/bsd/openssl/lib/libcrypto/man: ADMISSIONS.3
ASN1_INTEGER_get_int64.3 ASN1_ITEM_lookup.3 ASN1_OBJECT_new.3
ASN1_STRING_TABLE_add.3 ASN1_STRING_length.3 ASN1_STRING_new.3
ASN1_STRING_print_ex.3 ASN1_TIME_set.3 ASN1_TYPE_get.3
ASN1_generate_nconf.3 ASYNC_WAIT_CTX_new.3 ASYNC_start_job.3
BF_encrypt.3 BIO_ADDR.3 BIO_ADDRINFO.3 BIO_connect.3 BIO_ctrl.3
BIO_f_base64.3 BIO_f_buffer.3 BIO_f_cipher.3 BIO_f_md.3
BIO_f_null.3 BIO_f_ssl.3 BIO_find_type.3 BIO_get_data.3
BIO_get_ex_new_index.3 BIO_meth_new.3 BIO_new.3 BIO_new_CMS.3
BIO_parse_hostserv.3 BIO_printf.3 BIO_push.3 BIO_read.3
BIO_s_accept.3 BIO_s_bio.3 BIO_s_connect.3 BIO_s_fd.3 BIO_s_file.3
BIO_s_mem.3 BIO_s_null.3 BIO_s_socket.3 BIO_set_callback.3
BIO_should_retry.3 BN_BLINDING_new.3 BN_CTX_new.3 BN_CTX_start.3
BN_add.3 BN_add_word.3 BN_bn2bin.3 BN_cmp.3 BN_copy.3
BN_generate_prime.3 BN_mod_inverse.3 BN_mod_mul_montgomery.3
BN_mod_mul_reciprocal.3 BN_new.3 BN_num_bytes.3 BN_rand.3
BN_security_bits.3 BN_set_bit.3 BN_swap.3 BN_zero.3 BUF_MEM_new.3
CMS_add0_cert.3 CMS_add1_recipient_cert.3 CMS_add1_signer.3
CMS_compress.3 CMS_decrypt.3 CMS_encrypt.3 CMS_final.3
CMS_get0_RecipientInfos.3 CMS_get0_SignerInfos.3 CMS_get0_type.3
CMS_get1_ReceiptRequest.3 CMS_sign.3 CMS_sign_receipt.3
CMS_uncompress.3 CMS_verify.3 CMS_verify_receipt.3
CONF_modules_free.3 CONF_modules_load_file.3
CRYPTO_THREAD_run_once.3 CRYPTO_get_ex_new_index.3
CTLOG_STORE_get0_log_by_id.3 CTLOG_STORE_new.3 CTLOG_new.3
CT_POLICY_EVAL_CTX_new.3 DEFINE_STACK_OF.3 DES_random_key.3
DH_generate_key.3 DH_generate_parameters.3 DH_get0_pqg.3
DH_get_1024_160.3 DH_meth_new.3 DH_new.3 DH_new_by_nid.3
DH_set_method.3 DH_size.3 DSA_SIG_new.3 DSA_do_sign.3 DSA_dup_DH.3
DSA_generate_key.3 DSA_generate_parameters.3 DSA_get0_pqg.3
DSA_meth_new.3 DSA_new.3 DSA_set_method.3 DSA_sign.3 DSA_size.3
DTLS_get_data_mtu.3 DTLS_set_timer_cb.3 DTLSv1_listen.3
ECDSA_SIG_new.3 ECPKParameters_print.3 EC_GFp_simple_method.3
EC_GROUP_copy.3 EC_GROUP_new.3 EC_KEY_get_enc_flags.3 EC_KEY_new.3
EC_POINT_add.3 EC_POINT_new.3 ENGINE_add.3 ERR_GET_LIB.3
ERR_clear_error.3 ERR_error_string.3 ERR_get_error.3
ERR_load_crypto_strings.3 ERR_load_strings.3 ERR_print_errors.3
ERR_put_error.3 ERR_remove_state.3 ERR_set_mark.3 EVP_BytesToKey.3
EVP_CIPHER_CTX_get_cipher_data.3 EVP_CIPHER_meth_new.3
EVP_DigestInit.3 EVP_DigestSignInit.3 EVP_DigestVerifyInit.3
EVP_EncodeInit.3 EVP_EncryptInit.3 EVP_MD_meth_new.3 EVP_OpenInit.3
EVP_PKEY_ASN1_METHOD.3 EVP_PKEY_CTX_ctrl.3 EVP_PKEY_CTX_new.3
EVP_PKEY_CTX_set1_pbe_pass.3 EVP_PKEY_CTX_set_hkdf_md.3
EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 EVP_PKEY_CTX_set_scrypt_N.3
EVP_PKEY_CTX_set_tls1_prf_md.3 EVP_PKEY_asn1_get_count

CVS commit: src/doc

2020-12-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Dec 10 00:36:23 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
New OpenSSL


To generate a diff of this commit:
cvs rdiff -u -r1.1767 -r1.1768 src/doc/3RDPARTY
cvs rdiff -u -r1.2764 -r1.2765 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.1767 src/doc/3RDPARTY:1.1768
--- src/doc/3RDPARTY:1.1767	Sat Dec  5 11:23:08 2020
+++ src/doc/3RDPARTY	Wed Dec  9 19:36:22 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1767 2020/12/05 16:23:08 wiz Exp $
+#	$NetBSD: 3RDPARTY,v 1.1768 2020/12/10 00:36:22 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1113,8 +1113,8 @@ markus is very cooperative about it):
 - adjust the DEFAULT_PKCS11_WHITELIST for ssh-agent
 
 Package:	OpenSSL
-Version:	1.0.2o/1.1.1g
-Current Vers:	1.0.2t/1.1.1g
+Version:	1.0.2o/1.1.1i
+Current Vers:	1.0.2t/1.1.1i
 Maintainer:	The OpenSSL Project
 Archive Site:	ftp://ftp.openssl.org/source/
 Home Page:	http://www.openssl.org/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2764 src/doc/CHANGES:1.2765
--- src/doc/CHANGES:1.2764	Mon Dec  7 05:59:26 2020
+++ src/doc/CHANGES	Wed Dec  9 19:36:23 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2764 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2765 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -314,3 +314,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	OpenSSH: Import 8.4. [christos 20201204]
 	pkg_install: Updated to 20201205. [wiz 20201205]
 	acpicpu(4): Add support for Arm CPUs. [jmcneill 20201207]
+	OpenSSL: Imported 1.1.1i. [christos 20201209]



CVS commit: src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib

2020-12-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec 11 18:22:11 UTC 2020

Modified Files:
src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib/import:
unistd.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib/config.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib/import/unistd.h

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

Modified files:

Index: src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib/config.h
diff -u src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib/config.h:1.1 src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib/config.h:1.2
--- src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib/config.h:1.1	Sun Dec  6 00:23:05 2020
+++ src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib/config.h	Fri Dec 11 13:22:11 2020
@@ -1,5 +1,5 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-gdb,v 1.14 2020/09/24 14:53:17 christos Exp  */
+/* Generated from: NetBSD: mknative-gdb,v 1.15 2020/12/05 21:27:31 christos Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
 
 /* config.h.  Generated from config.in by configure.  */
@@ -796,7 +796,7 @@
 #define HAVE_SYS_PARAM_H 1
 
 /* Define to 1 if you have the  header file. */
-/* #undef HAVE_SYS_RANDOM_H */
+#define HAVE_SYS_RANDOM_H 1
 
 /* Define to 1 if you have the  header file. */
 #define HAVE_SYS_SOCKET_H 1

Index: src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib/import/unistd.h
diff -u src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib/import/unistd.h:1.1 src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib/import/unistd.h:1.2
--- src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib/import/unistd.h:1.1	Sun Dec  6 00:23:05 2020
+++ src/external/gpl3/gdb/lib/libgnulib/arch/aarch64/gnulib/import/unistd.h	Fri Dec 11 13:22:11 2020
@@ -1,5 +1,5 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-gdb,v 1.14 2020/09/24 14:53:17 christos Exp  */
+/* Generated from: NetBSD: mknative-gdb,v 1.15 2020/12/05 21:27:31 christos Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
 
 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
@@ -129,7 +129,7 @@
 #if (0 || defined GNULIB_POSIXCHECK) \
 && ((defined __APPLE__ && defined __MACH__) || defined __sun \
 || defined __ANDROID__) \
-&& 0 \
+&& 1 \
 && !defined __GLIBC__
 # include 
 #endif



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec 11 18:23:25 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: Makefile.in aarch64-nbsd-tdep.c

Log Message:
fix aarch64 crossgdb


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/Makefile.in
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/Makefile.in
diff -u src/external/gpl3/gdb/dist/gdb/Makefile.in:1.4 src/external/gpl3/gdb/dist/gdb/Makefile.in:1.5
--- src/external/gpl3/gdb/dist/gdb/Makefile.in:1.4	Mon Sep 14 22:05:18 2020
+++ src/external/gpl3/gdb/dist/gdb/Makefile.in	Fri Dec 11 13:23:25 2020
@@ -667,6 +667,7 @@ TARGET_OBS = @TARGET_OBS@
 ALL_64_TARGET_OBS = \
 	aarch64-fbsd-tdep.o \
 	aarch64-linux-tdep.o \
+	aarch64-nbsd-tdep.o \
 	aarch64-newlib-tdep.o \
 	aarch64-ravenscar-thread.o \
 	aarch64-tdep.o \

Index: src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.6 src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.7
--- src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.6	Sat Jul 13 17:55:52 2019
+++ src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c	Fri Dec 11 13:23:25 2020
@@ -194,6 +194,7 @@ aarch64_nbsd_init_abi (struct gdbarch_in
 (gdbarch, aarch64_nbsd_iterate_over_regset_sections);
 }
 
+void _initialize_aarch64_nbsd_tdep (void);
 void
 _initialize_aarch64_nbsd_tdep (void)
 {



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec 11 18:25:45 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: c-exp.y

Log Message:
PR/55851: Martin Husemann: recognize .part. names
This is gross; perhaps we should hide them completely (not print them
in stack traces etc.)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.9 -r1.2 src/external/gpl3/gdb/dist/gdb/c-exp.y

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/c-exp.y
diff -u src/external/gpl3/gdb/dist/gdb/c-exp.y:1.1.1.9 src/external/gpl3/gdb/dist/gdb/c-exp.y:1.2
--- src/external/gpl3/gdb/dist/gdb/c-exp.y:1.1.1.9	Mon Sep 14 21:43:28 2020
+++ src/external/gpl3/gdb/dist/gdb/c-exp.y	Fri Dec 11 13:25:45 2020
@@ -2608,6 +2608,8 @@ static bool last_was_structop;
 /* Depth of parentheses.  */
 static int paren_depth;
 
+static const char PART[] = ".part.";
+
 /* Read one token, getting characters through lexptr.  */
 
 static int
@@ -2723,6 +2725,13 @@ lex_one_token (struct parser_state *par_
   return c;
 
 case '.':
+  /* Gross! recognize .part.N */
+  if (strncmp(pstate->lexptr, PART, sizeof(PART) - 1) == 0 &&
+	ISDIGIT(pstate->lexptr[sizeof(PART) - 1]) &&
+	pstate->lexptr[sizeof(PART)] == '\0')
+	{
+	  break;
+	}
   /* Might be a floating point number.  */
   if (pstate->lexptr[1] < '0' || pstate->lexptr[1] > '9')
 	{
@@ -2888,7 +2897,7 @@ lex_one_token (struct parser_state *par_
   /* It's a name.  See how long it is.  */
   namelen = 0;
   for (c = tokstart[namelen];
-   (c == '_' || c == '$' || c_ident_is_alnum (c) || c == '<');)
+   (c == '_' || c == '$' || c == '.' || c_ident_is_alnum (c) || c == '<');)
 {
   /* Template parameter lists are part of the name.
 	 FIXME: This mishandles `print $a<4&&$a>3'.  */



CVS commit: src/external/bsd/pkg_install/dist/lib

2020-12-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec 12 18:19:34 UTC 2020

Modified Files:
src/external/bsd/pkg_install/dist/lib: plist.c

Log Message:
Don't try to memcpy (size_t)-1 bytes!


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/pkg_install/dist/lib/plist.c

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

Modified files:

Index: src/external/bsd/pkg_install/dist/lib/plist.c
diff -u src/external/bsd/pkg_install/dist/lib/plist.c:1.4 src/external/bsd/pkg_install/dist/lib/plist.c:1.5
--- src/external/bsd/pkg_install/dist/lib/plist.c:1.4	Wed Dec  2 08:53:50 2020
+++ src/external/bsd/pkg_install/dist/lib/plist.c	Sat Dec 12 13:19:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: plist.c,v 1.4 2020/12/02 13:53:50 wiz Exp $	*/
+/*	$NetBSD: plist.c,v 1.5 2020/12/12 18:19:34 christos Exp $	*/
 
 #if HAVE_CONFIG_H
 #include "config.h"
@@ -7,7 +7,7 @@
 #if HAVE_SYS_CDEFS_H
 #include 
 #endif
-__RCSID("$NetBSD: plist.c,v 1.4 2020/12/02 13:53:50 wiz Exp $");
+__RCSID("$NetBSD: plist.c,v 1.5 2020/12/12 18:19:34 christos Exp $");
 
 /*
  * FreeBSD install - a package for the installation and maintainance
@@ -637,15 +637,16 @@ delete_package(Boolean ign_err, package_
 	fail = FAIL;
 	goto pkgdb_cleanup;
 }
-			}
-			memcpy(&buf[SymlinkHeaderLen], tmp2, cc);
-			buf[SymlinkHeaderLen + cc] = 0x0;
-			if (strcmp(buf, p->next->name) != 0) {
-printf("symlink %s is not same as recorded value, %s: %s\n",
-buf, Force ? "deleting anyway" : "not deleting", tmp);
-if (!Force) {
-	fail = FAIL;
-	goto pkgdb_cleanup;
+			} else {
+memcpy(&buf[SymlinkHeaderLen], tmp2, cc);
+buf[SymlinkHeaderLen + cc] = 0x0;
+if (strcmp(buf, p->next->name) != 0) {
+	printf("symlink %s is not same as recorded value, %s: %s\n",
+	buf, Force ? "deleting anyway" : "not deleting", tmp);
+	if (!Force) {
+		fail = FAIL;
+		goto pkgdb_cleanup;
+	}
 }
 			}
 		}



CVS commit: src/sys/kern

2020-12-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec 12 18:41:13 UTC 2020

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

Log Message:
Be more clear and don't rely on cur being the first member.


To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.149 src/sys/kern/vfs_cache.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/vfs_cache.c
diff -u src/sys/kern/vfs_cache.c:1.148 src/sys/kern/vfs_cache.c:1.149
--- src/sys/kern/vfs_cache.c:1.148	Sat Dec 12 13:35:59 2020
+++ src/sys/kern/vfs_cache.c	Sat Dec 12 13:41:13 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_cache.c,v 1.148 2020/12/12 18:35:59 uwe Exp $	*/
+/*	$NetBSD: vfs_cache.c,v 1.149 2020/12/12 18:41:13 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2019, 2020 The NetBSD Foundation, Inc.
@@ -172,7 +172,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_cache.c,v 1.148 2020/12/12 18:35:59 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_cache.c,v 1.149 2020/12/12 18:41:13 christos Exp $");
 
 #define __NAMECACHE_PRIVATE
 #ifdef _KERNEL_OPT
@@ -244,7 +244,8 @@ static kmutex_t cache_stat_lock __cachel
 #define	COUNT(f) do { \
 	lwp_t *l = curlwp; \
 	KPREEMPT_DISABLE(l); \
-	((struct nchstats_percpu *)curcpu()->ci_data.cpu_nch)->f++; \
+	struct nchcpu *nchcpu = curcpu()->ci_data.cpu_nch; \
+	nchcpu->cur.f++; \
 	KPREEMPT_ENABLE(l); \
 } while (/* CONSTCOND */ 0);
 



CVS commit: src/external/bsd/libfido2/dist/src

2020-12-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec 12 18:44:38 UTC 2020

Added Files:
src/external/bsd/libfido2/dist/src: hid_netbsd.c

Log Message:
Add a NetBSD-specific back-end. (riastradh@)


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/libfido2/dist/src/hid_netbsd.c

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

Added files:

Index: src/external/bsd/libfido2/dist/src/hid_netbsd.c
diff -u /dev/null src/external/bsd/libfido2/dist/src/hid_netbsd.c:1.1
--- /dev/null	Sat Dec 12 13:44:38 2020
+++ src/external/bsd/libfido2/dist/src/hid_netbsd.c	Sat Dec 12 13:44:38 2020
@@ -0,0 +1,423 @@
+/*
+ * Copyright (c) 2020 Yubico AB. All rights reserved.
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file.
+ */
+
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "fido.h"
+
+#define MAX_UHID	64
+
+struct hid_netbsd {
+	int	fd;
+	size_t	report_in_len;
+	size_t	report_out_len;
+};
+
+/* Hack to make this work with newer kernels even if /usr/include is old.  */
+#if __NetBSD_Version__ < 90100	/* 9.1 */
+#define	USB_HID_GET_RAW	_IOR('h', 1, int)
+#define	USB_HID_SET_RAW	_IOW('h', 2, int)
+#endif
+
+static bool
+is_fido(int fd)
+{
+	report_desc_t			rdesc;
+	hid_data_t			hdata;
+	hid_item_t			hitem;
+	boolisfido;
+	intraw = 1;
+
+	if ((rdesc = hid_get_report_desc(fd)) == NULL) {
+		fido_log_debug("%s: failed to get report descriptor",
+		__func__);
+		return (false);
+	}
+	if ((hdata = hid_start_parse(rdesc, 1 << hid_collection, -1))
+	== NULL) {
+		fido_log_debug("%s: failed to parse report descriptor",
+		__func__);
+		hid_dispose_report_desc(rdesc);
+		return (false);
+	}
+	isfido = false;
+	while ((hid_get_item(hdata, &hitem)) > 0) {
+		if (HID_PAGE(hitem.usage) == 0xf1d0) {
+			isfido = true;
+			break;
+		}
+	}
+	hid_end_parse(hdata);
+	hid_dispose_report_desc(rdesc);
+	if (!isfido)
+		return (false);
+
+/*
+	 * This step is not strictly necessary -- NetBSD puts fido
+ * devices into raw mode automatically by default, but in
+ * principle that might change, and this serves as a test to
+ * verify that we're running on a kernel with support for raw
+ * mode at all so we don't get confused issuing writes that try
+ * to set the report descriptor rather than transfer data on
+ * the output interrupt pipe as we need.
+	 */
+	if (ioctl(fd, USB_HID_SET_RAW, &raw) == -1) {
+		fido_log_debug("%s: unable to set raw", __func__);
+		return (false);
+	}
+
+	return (true);
+}
+
+static int
+copy_info(fido_dev_info_t *di, const char *path)
+{
+	int			fd = -1;
+	int			ok = -1;
+	struct usb_device_info	udi;
+
+	memset(di, 0, sizeof(*di));
+	memset(&udi, 0, sizeof(udi));
+
+	if ((fd = open(path, O_RDWR)) == -1) {
+		if (errno != EBUSY && errno != ENOENT)
+			fido_log_debug("%s: open %s: %s", __func__, path,
+			strerror(errno));
+		goto fail;
+	}
+	if (!is_fido(fd))
+		goto fail;
+
+	if (ioctl(fd, USB_GET_DEVICEINFO, &udi) == -1)
+		goto fail;
+
+	if ((di->path = strdup(path)) == NULL ||
+	(di->manufacturer = strdup(udi.udi_vendor)) == NULL ||
+	(di->product = strdup(udi.udi_product)) == NULL)
+		goto fail;
+
+	di->vendor_id = (int16_t)udi.udi_vendorNo;
+	di->product_id = (int16_t)udi.udi_productNo;
+
+	ok = 0;
+fail:
+	if (fd != -1)
+		close(fd);
+
+	if (ok < 0) {
+		free(di->path);
+		free(di->manufacturer);
+		free(di->product);
+		explicit_bzero(di, sizeof(*di));
+	}
+
+	return (ok);
+}
+
+int
+fido_hid_manifest(fido_dev_info_t *devlist, size_t ilen, size_t *olen)
+{
+	char	path[64];
+	size_t	i;
+
+	*olen = 0;
+
+	if (ilen == 0)
+		return (FIDO_OK); /* nothing to do */
+
+	if (devlist == NULL || olen == NULL)
+		return (FIDO_ERR_INVALID_ARGUMENT);
+
+	for (i = *olen = 0; i < MAX_UHID && *olen < ilen; i++) {
+		snprintf(path, sizeof(path), "/dev/uhid%zu", i);
+		if (copy_info(&devlist[*olen], path) == 0) {
+			devlist[*olen].io = (fido_dev_io_t) {
+fido_hid_open,
+fido_hid_close,
+fido_hid_read,
+fido_hid_write,
+			};
+			++(*olen);
+		}
+	}
+
+	return (FIDO_OK);
+}
+
+/*
+ * Workaround for NetBSD (as of 201910) bug that loses
+ * sync of DATA0/DATA1 sequence bit across uhid open/close.
+ * Send pings until we get a response - early pings with incorrect
+ * sequence bits will be ignored as duplicate packets by the device.
+ */
+static int
+terrible_ping_kludge(struct hid_netbsd *ctx)
+{
+	u_char data[256];
+	int i, n;
+	struct pollfd pfd;
+
+	if (sizeof(data) < ctx->report_out_len + 1)
+		return -1;
+	for (i = 0; i < 4; i++) {
+		memset(data, 0, sizeof(data));
+		/* broadcast channel ID */
+		data[1] = 0xff;
+		data[2] = 0xff;
+		data[3] = 0xff;
+		data[4] = 0xff;
+		/* Ping command */
+		data[5] = 0x81;
+		/* One byte ping only, Vasili */
+		data

CVS commit: src/external/bsd/libfido2/lib

2020-12-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec 12 18:45:12 UTC 2020

Modified Files:
src/external/bsd/libfido2/lib: Makefile

Log Message:
Use the NetBSD-specific back-end.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libfido2/lib/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/bsd/libfido2/lib/Makefile
diff -u src/external/bsd/libfido2/lib/Makefile:1.2 src/external/bsd/libfido2/lib/Makefile:1.3
--- src/external/bsd/libfido2/lib/Makefile:1.2	Fri Dec  4 13:27:44 2020
+++ src/external/bsd/libfido2/lib/Makefile	Sat Dec 12 13:45:11 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2020/12/04 18:27:44 christos Exp $
+# $NetBSD: Makefile,v 1.3 2020/12/12 18:45:11 christos Exp $
 
 NOLINT=
 .include 
@@ -31,7 +31,7 @@ eddsa.c \
 err.c \
 es256.c \
 hid.c \
-hid_openbsd.c \
+hid_netbsd.c \
 info.c \
 io.c \
 iso7816.c \



CVS commit: src/external/gpl3/gdb/dist/gdb

2020-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 13 16:50:47 UTC 2020

Modified Files:
src/external/gpl3/gdb/dist/gdb: c-exp.y

Log Message:
Improve previous: generated names end with .[[:digits:]] so look for that
instead.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/c-exp.y

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/c-exp.y
diff -u src/external/gpl3/gdb/dist/gdb/c-exp.y:1.2 src/external/gpl3/gdb/dist/gdb/c-exp.y:1.3
--- src/external/gpl3/gdb/dist/gdb/c-exp.y:1.2	Fri Dec 11 13:25:45 2020
+++ src/external/gpl3/gdb/dist/gdb/c-exp.y	Sun Dec 13 11:50:47 2020
@@ -2608,7 +2608,63 @@ static bool last_was_structop;
 /* Depth of parentheses.  */
 static int paren_depth;
 
-static const char PART[] = ".part.";
+static int
+get_namelen (const char *tokstart, bool dot)
+{
+  int c;
+  int namelen;
+
+  for (c = tokstart[namelen];
+   (c == '_' || c == '$' || (dot && c == '.') || c_ident_is_alnum (c) || c == '<');)
+{
+  /* Template parameter lists are part of the name.
+	 FIXME: This mishandles `print $a<4&&$a>3'.  */
+
+  if (c == '<')
+	{
+	  if (! is_cast_operator (tokstart, namelen))
+	{
+	  /* Scan ahead to get rest of the template specification.  Note
+		 that we look ahead only when the '<' adjoins non-whitespace
+		 characters; for comparison expressions, e.g. "a < b > c",
+		 there must be spaces before the '<', etc. */
+	  const char *p = find_template_name_end (tokstart + namelen);
+
+	  if (p)
+		namelen = p - tokstart;
+	}
+	  break;
+	}
+  c = tokstart[++namelen];
+}
+  return namelen;
+}
+
+static bool is_generated_symbol (const char *symbol)
+{
+  /* generated symbol are of the form:
+
+ .
+ .isra.
+ .part.
+
+So we see if the symbol ends with .
+   */
+
+  int len = get_namelen (symbol, true);
+  int ndigits;
+
+  if (len-- == 0)
+return false;
+
+  for (ndigits = 0; ndigits <= len && ISDIGIT(symbol[len - ndigits]); ndigits++)
+continue;
+
+  if (ndigits == 0)
+return false;
+
+  return symbol[len - ndigits] == '.';
+}
 
 /* Read one token, getting characters through lexptr.  */
 
@@ -2725,13 +2781,6 @@ lex_one_token (struct parser_state *par_
   return c;
 
 case '.':
-  /* Gross! recognize .part.N */
-  if (strncmp(pstate->lexptr, PART, sizeof(PART) - 1) == 0 &&
-	ISDIGIT(pstate->lexptr[sizeof(PART) - 1]) &&
-	pstate->lexptr[sizeof(PART)] == '\0')
-	{
-	  break;
-	}
   /* Might be a floating point number.  */
   if (pstate->lexptr[1] < '0' || pstate->lexptr[1] > '9')
 	{
@@ -2895,30 +2944,7 @@ lex_one_token (struct parser_state *par_
 error (_("Invalid character '%c' in expression."), c);
 
   /* It's a name.  See how long it is.  */
-  namelen = 0;
-  for (c = tokstart[namelen];
-   (c == '_' || c == '$' || c == '.' || c_ident_is_alnum (c) || c == '<');)
-{
-  /* Template parameter lists are part of the name.
-	 FIXME: This mishandles `print $a<4&&$a>3'.  */
-
-  if (c == '<')
-	{
-	  if (! is_cast_operator (tokstart, namelen))
-	{
-	  /* Scan ahead to get rest of the template specification.  Note
-		 that we look ahead only when the '<' adjoins non-whitespace
-		 characters; for comparison expressions, e.g. "a < b > c",
-		 there must be spaces before the '<', etc. */
-	  const char *p = find_template_name_end (tokstart + namelen);
-
-	  if (p)
-		namelen = p - tokstart;
-	}
-	  break;
-	}
-  c = tokstart[++namelen];
-}
+  namelen = get_namelen (tokstart, is_generated_symbol (tokstart));
 
   /* The token "if" terminates the expression and is NOT removed from
  the input stream.  It doesn't count if it appears in the



CVS commit: src/usr.bin/make

2020-12-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 13 18:12:29 UTC 2020

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

Log Message:
fix comment


To generate a diff of this commit:
cvs rdiff -u -r1.212 -r1.213 src/usr.bin/make/compat.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/compat.c
diff -u src/usr.bin/make/compat.c:1.212 src/usr.bin/make/compat.c:1.213
--- src/usr.bin/make/compat.c:1.212	Sun Dec 13 11:47:19 2020
+++ src/usr.bin/make/compat.c	Sun Dec 13 13:12:29 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat.c,v 1.212 2020/12/13 16:47:19 rillig Exp $	*/
+/*	$NetBSD: compat.c,v 1.213 2020/12/13 18:12:29 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -96,7 +96,7 @@
 #include "pathnames.h"
 
 /*	"@(#)compat.c	8.2 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: compat.c,v 1.212 2020/12/13 16:47:19 rillig Exp $");
+MAKE_RCSID("$NetBSD: compat.c,v 1.213 2020/12/13 18:12:29 christos Exp $");
 
 static GNode *curTarg = NULL;
 static pid_t compatChild;
@@ -532,7 +532,7 @@ MakeUnmade(GNode *gn, GNode *pgn)
 
 	/*
 	 * Alter our type to tell if errors should be ignored or things
-	 * should not be printed so CompatRunCommand knows what to do.
+	 * should not be printed so Compat_RunCommand knows what to do.
 	 */
 	if (opts.ignoreErrors)
 		gn->type |= OP_IGNORE;



  1   2   3   4   5   6   7   8   9   10   >