CVS commit: src/sys/external/bsd/ipf/netinet

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 07:59:01 UTC 2019

Modified Files:
src/sys/external/bsd/ipf/netinet: fil.c ip_nat.c

Log Message:
add fallthru comments.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/external/bsd/ipf/netinet/fil.c
cvs rdiff -u -r1.20 -r1.21 src/sys/external/bsd/ipf/netinet/ip_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/sys/external/bsd/ipf/netinet/fil.c
diff -u src/sys/external/bsd/ipf/netinet/fil.c:1.24 src/sys/external/bsd/ipf/netinet/fil.c:1.25
--- src/sys/external/bsd/ipf/netinet/fil.c:1.24	Wed Jul 11 05:25:46 2018
+++ src/sys/external/bsd/ipf/netinet/fil.c	Mon Feb  4 07:59:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: fil.c,v 1.24 2018/07/11 05:25:46 maxv Exp $	*/
+/*	$NetBSD: fil.c,v 1.25 2019/02/04 07:59:01 mrg Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -141,7 +141,7 @@ extern struct timeout ipf_slowtimer_ch;
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.24 2018/07/11 05:25:46 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.25 2019/02/04 07:59:01 mrg Exp $");
 #else
 static const char sccsid[] = "@(#)fil.c	1.36 6/5/96 (C) 1993-2000 Darren Reed";
 static const char rcsid[] = "@(#)Id: fil.c,v 1.1.1.2 2012/07/22 13:45:07 darrenr Exp $";
@@ -1267,6 +1267,7 @@ ipf_pr_icmp(fr_info_t *fin)
 			}
 		}
 #endif
+		/* FALLTHROUGH */
 	case ICMP_SOURCEQUENCH :
 	case ICMP_REDIRECT :
 	case ICMP_TIMXCEED :

Index: src/sys/external/bsd/ipf/netinet/ip_nat.c
diff -u src/sys/external/bsd/ipf/netinet/ip_nat.c:1.20 src/sys/external/bsd/ipf/netinet/ip_nat.c:1.21
--- src/sys/external/bsd/ipf/netinet/ip_nat.c:1.20	Sun Jun  3 10:37:23 2018
+++ src/sys/external/bsd/ipf/netinet/ip_nat.c	Mon Feb  4 07:59:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_nat.c,v 1.20 2018/06/03 10:37:23 maxv Exp $	*/
+/*	$NetBSD: ip_nat.c,v 1.21 2019/02/04 07:59:01 mrg Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -112,7 +112,7 @@ extern struct ifnet vpnif;
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ip_nat.c,v 1.20 2018/06/03 10:37:23 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_nat.c,v 1.21 2019/02/04 07:59:01 mrg Exp $");
 #else
 static const char sccsid[] = "@(#)ip_nat.c	1.11 6/5/96 (C) 1995 Darren Reed";
 static const char rcsid[] = "@(#)Id: ip_nat.c,v 1.1.1.2 2012/07/22 13:45:27 darrenr Exp";
@@ -4083,6 +4083,7 @@ ipf_nat_inlookup(fr_info_t *fin, u_int f
 		case NAT_DIVERTOUT :
 			if (nat->nat_dlocal)
 continue;
+			/* FALLTHROUGH */
 		case NAT_OUTBOUND :
 			if (nat->nat_v[1] != 4)
 continue;



CVS commit: src/sys/external/bsd/ipf/netinet

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 07:59:01 UTC 2019

Modified Files:
src/sys/external/bsd/ipf/netinet: fil.c ip_nat.c

Log Message:
add fallthru comments.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/external/bsd/ipf/netinet/fil.c
cvs rdiff -u -r1.20 -r1.21 src/sys/external/bsd/ipf/netinet/ip_nat.c

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



CVS commit: src/tests

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 05:24:18 UTC 2019

Modified Files:
src/tests/kernel: Makefile
src/tests/lib/libc/ssp: Makefile

Log Message:
- tests explicitly check failure modes, ignore those warnings


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/tests/kernel/Makefile
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libc/ssp/Makefile

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/Makefile
diff -u src/tests/kernel/Makefile:1.57 src/tests/kernel/Makefile:1.58
--- src/tests/kernel/Makefile:1.57	Sun Feb  3 03:20:24 2019
+++ src/tests/kernel/Makefile	Mon Feb  4 05:24:18 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.57 2019/02/03 03:20:24 thorpej Exp $
+# $NetBSD: Makefile,v 1.58 2019/02/04 05:24:18 mrg Exp $
 
 NOMAN=		# defined
 
@@ -66,6 +66,11 @@ t_subr_prf.c: gen_t_subr_prf ${NETBSDSRC
 	${HOST_SH} ${.ALLSRC} ${.TARGET}
 CPPFLAGS.t_subr_prf.c=	-Wno-pointer-sign	# XXX platform vs kernel SHA2
 
+.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
+# Test explicitly tests failure modes.
+CPPFLAGS.t_subr_prf.c+=	-Wno-error=format-truncation
+.endif
+
 CLEANFILES+=	t_subr_prf.c
 
 LDADD.h_segv+=	-lm

Index: src/tests/lib/libc/ssp/Makefile
diff -u src/tests/lib/libc/ssp/Makefile:1.7 src/tests/lib/libc/ssp/Makefile:1.8
--- src/tests/lib/libc/ssp/Makefile:1.7	Sun Apr  6 19:28:59 2014
+++ src/tests/lib/libc/ssp/Makefile	Mon Feb  4 05:24:18 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2014/04/06 19:28:59 christos Exp $
+# $NetBSD: Makefile,v 1.8 2019/02/04 05:24:18 mrg Exp $
 
 NOMAN=		# defined
 
@@ -48,4 +48,9 @@ PROGS+=		h_strncpy
 PROGS+=		h_vsnprintf
 PROGS+=		h_vsprintf
 
+.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
+# Test exercises truncation
+COPTS.h_snprintf.c+=	-Wno-error=format-truncation
+.endif
+
 .include 



CVS commit: src/tests

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 05:24:18 UTC 2019

Modified Files:
src/tests/kernel: Makefile
src/tests/lib/libc/ssp: Makefile

Log Message:
- tests explicitly check failure modes, ignore those warnings


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/tests/kernel/Makefile
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libc/ssp/Makefile

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



CVS commit: src/usr.sbin/sdpd

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 04:56:35 UTC 2019

Modified Files:
src/usr.sbin/sdpd: main.c

Log Message:
- convert 'done' to an unsigned, since it is used as one.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/sdpd/main.c

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

Modified files:

Index: src/usr.sbin/sdpd/main.c
diff -u src/usr.sbin/sdpd/main.c:1.9 src/usr.sbin/sdpd/main.c:1.10
--- src/usr.sbin/sdpd/main.c:1.9	Wed Aug 31 13:32:41 2011
+++ src/usr.sbin/sdpd/main.c	Mon Feb  4 04:56:35 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.9 2011/08/31 13:32:41 joerg Exp $	*/
+/*	$NetBSD: main.c,v 1.10 2019/02/04 04:56:35 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@ __COPYRIGHT("@(#) Copyright (c) 2009 The
   Copyright (c) 2006 Itronix, Inc.\
   Copyright (c) 2004 Maksim Yevmenkin m_evmen...@yahoo.com.\
   All rights reserved.");
-__RCSID("$NetBSD: main.c,v 1.9 2011/08/31 13:32:41 joerg Exp $");
+__RCSID("$NetBSD: main.c,v 1.10 2019/02/04 04:56:35 mrg Exp $");
 
 #include 
 #include 
@@ -53,7 +53,7 @@ static bool	drop_root	(char const *user,
 static void	sighandler	(int s);
 __dead static void	usage		(void);
 
-static bool	done;
+static unsigned	done;
 
 /*
  * Bluetooth Service Discovery Procotol (SDP) daemon



CVS commit: src/usr.sbin/sdpd

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 04:56:35 UTC 2019

Modified Files:
src/usr.sbin/sdpd: main.c

Log Message:
- convert 'done' to an unsigned, since it is used as one.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/sdpd/main.c

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



CVS commit: src/etc/mtree

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 04:45:48 UTC 2019

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

Log Message:
add missing ./usr/include/dev/hdaudio (base) and ./usr/include/dev/nvmm,
./usr/include/dev/nvmm/x86 (amd64).

(perhaps we should stop 'make includes' from creating the target directory
for normal builds as this leads to mtree inconsistencies.)


To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.188 src/etc/mtree/NetBSD.dist.base
cvs rdiff -u -r1.10 -r1.11 src/etc/mtree/NetBSD.dist.x86_64

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



CVS commit: src/external/gpl3/gcc/usr.bin/common

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 04:49:20 UTC 2019

Modified Files:
src/external/gpl3/gcc/usr.bin/common: Makefile

Log Message:
it's memory-block.cc in this case, not memory-block.c.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gcc/usr.bin/common/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/gcc/usr.bin/common/Makefile
diff -u src/external/gpl3/gcc/usr.bin/common/Makefile:1.8 src/external/gpl3/gcc/usr.bin/common/Makefile:1.9
--- src/external/gpl3/gcc/usr.bin/common/Makefile:1.8	Mon Feb  4 03:01:52 2019
+++ src/external/gpl3/gcc/usr.bin/common/Makefile	Mon Feb  4 04:49:20 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2019/02/04 03:01:52 mrg Exp $
+#	$NetBSD: Makefile,v 1.9 2019/02/04 04:49:20 mrg Exp $
 
 LIBISPRIVATE=	yes
 
@@ -8,7 +8,7 @@ LIBISPRIVATE=	yes
 LIB=		common
 
 .include "${.CURDIR}/defs.mk"
-SRCS=	${G_OBJS-libcommon:.o=.c}
+SRCS=	${G_OBJS-libcommon:S/memory-block.o/memory-block.cc/:.o=.c}
 
 # XXX make sure this doesn't have more than it needs
 CPPFLAGS+=	-I${GCCARCH} -I${BACKENDOBJ} -I. \



CVS commit: src/external/gpl3/gcc/usr.bin/common

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 04:49:20 UTC 2019

Modified Files:
src/external/gpl3/gcc/usr.bin/common: Makefile

Log Message:
it's memory-block.cc in this case, not memory-block.c.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gcc/usr.bin/common/Makefile

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



CVS commit: src/etc/mtree

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 04:45:48 UTC 2019

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

Log Message:
add missing ./usr/include/dev/hdaudio (base) and ./usr/include/dev/nvmm,
./usr/include/dev/nvmm/x86 (amd64).

(perhaps we should stop 'make includes' from creating the target directory
for normal builds as this leads to mtree inconsistencies.)


To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.188 src/etc/mtree/NetBSD.dist.base
cvs rdiff -u -r1.10 -r1.11 src/etc/mtree/NetBSD.dist.x86_64

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.187 src/etc/mtree/NetBSD.dist.base:1.188
--- src/etc/mtree/NetBSD.dist.base:1.187	Mon Feb  4 03:26:53 2019
+++ src/etc/mtree/NetBSD.dist.base	Mon Feb  4 04:45:48 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.187 2019/02/04 03:26:53 mrg Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.188 2019/02/04 04:45:48 mrg Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -118,6 +118,7 @@
 ./usr/include/dev/dmover
 ./usr/include/dev/dtv
 ./usr/include/dev/filemon
+./usr/include/dev/hdaudio
 ./usr/include/dev/hid
 ./usr/include/dev/hpc
 ./usr/include/dev/i2c

Index: src/etc/mtree/NetBSD.dist.x86_64
diff -u src/etc/mtree/NetBSD.dist.x86_64:1.10 src/etc/mtree/NetBSD.dist.x86_64:1.11
--- src/etc/mtree/NetBSD.dist.x86_64:1.10	Fri Jun 19 18:16:06 2015
+++ src/etc/mtree/NetBSD.dist.x86_64	Mon Feb  4 04:45:48 2019
@@ -1,6 +1,8 @@
-#	$NetBSD: NetBSD.dist.x86_64,v 1.10 2015/06/19 18:16:06 matt Exp $
+#	$NetBSD: NetBSD.dist.x86_64,v 1.11 2019/02/04 04:45:48 mrg Exp $
 
 ./usr/include/amd64
+./usr/include/dev/nvmm
+./usr/include/dev/nvmm/x86
 ./usr/include/g++/bits/i386
 ./usr/include/g++/bits/x86_64
 ./usr/include/i386



CVS commit: src

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 04:37:50 UTC 2019

Modified Files:
src/external/mpl/dhcp/dist/server: mdb6.c
src/lib/libm/src: s_copysignl.c
src/sys/compat/linux/common: linux_socket.c

Log Message:
- avoid uninitialised memory usage


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/mpl/dhcp/dist/server/mdb6.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libm/src/s_copysignl.c
cvs rdiff -u -r1.143 -r1.144 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/external/mpl/dhcp/dist/server/mdb6.c
diff -u src/external/mpl/dhcp/dist/server/mdb6.c:1.3 src/external/mpl/dhcp/dist/server/mdb6.c:1.4
--- src/external/mpl/dhcp/dist/server/mdb6.c:1.3	Thu Jan 10 17:41:47 2019
+++ src/external/mpl/dhcp/dist/server/mdb6.c	Mon Feb  4 04:37:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mdb6.c,v 1.3 2019/01/10 17:41:47 christos Exp $	*/
+/*	$NetBSD: mdb6.c,v 1.4 2019/02/04 04:37:50 mrg Exp $	*/
 
 /*
  * Copyright (C) 2007-2017 by Internet Systems Consortium, Inc. ("ISC")
@@ -17,7 +17,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: mdb6.c,v 1.3 2019/01/10 17:41:47 christos Exp $");
+__RCSID("$NetBSD: mdb6.c,v 1.4 2019/02/04 04:37:50 mrg Exp $");
 
 
 /*!
@@ -939,7 +939,7 @@ build_temporary6(struct in6_addr *addr, 
 		 const struct data_string *input) {
 	static u_int32_t history[2];
 	static u_int32_t counter = 0;
-	unsigned char md[16];
+	unsigned char md[16] = {0};
 	unsigned int len;
 
 	/*

Index: src/lib/libm/src/s_copysignl.c
diff -u src/lib/libm/src/s_copysignl.c:1.5 src/lib/libm/src/s_copysignl.c:1.6
--- src/lib/libm/src/s_copysignl.c:1.5	Thu May 14 19:26:12 2015
+++ src/lib/libm/src/s_copysignl.c	Mon Feb  4 04:37:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: s_copysignl.c,v 1.5 2015/05/14 19:26:12 joerg Exp $	*/
+/*	$NetBSD: s_copysignl.c,v 1.6 2019/02/04 04:37:50 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -26,11 +26,12 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: s_copysignl.c,v 1.5 2015/05/14 19:26:12 joerg Exp $");
+__RCSID("$NetBSD: s_copysignl.c,v 1.6 2019/02/04 04:37:50 mrg Exp $");
 #include "namespace.h"
 
 #include 
 #include 
+#include 
 
 #if defined(__HAVE_LONG_DOUBLE) || defined(__HAVE_IBM_LONGDOUBLE)
 
@@ -61,6 +62,8 @@ copysignl(long double x, long double y)
 {
 	union ldbl_u ux, uy;
 
+	memset(, 0, sizeof ux);
+	memset(, 0, sizeof uy);
 	ux.ldblu_ld = x;
 	uy.ldblu_ld = y;
 	ux.ldblu_d[0] = copysign(ux.ldblu_d[0], uy.ldblu_d[0]);

Index: src/sys/compat/linux/common/linux_socket.c
diff -u src/sys/compat/linux/common/linux_socket.c:1.143 src/sys/compat/linux/common/linux_socket.c:1.144
--- src/sys/compat/linux/common/linux_socket.c:1.143	Wed Nov 14 17:51:37 2018
+++ src/sys/compat/linux/common/linux_socket.c	Mon Feb  4 04:37:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_socket.c,v 1.143 2018/11/14 17:51:37 hannken Exp $	*/
+/*	$NetBSD: linux_socket.c,v 1.144 2019/02/04 04:37:50 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.143 2018/11/14 17:51:37 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.144 2019/02/04 04:37:50 mrg Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -1829,7 +1829,7 @@ linux_sys_recvmmsg(struct lwp *l, const 
 	struct msghdr *msg = _hdr;
 	int error, s;
 	struct mbuf *from, *control;
-	struct timespec ts, now;
+	struct timespec ts = {0}, now;
 	struct linux_timespec lts;
 	unsigned int vlen, flags, dg;
 



CVS commit: src

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 04:37:50 UTC 2019

Modified Files:
src/external/mpl/dhcp/dist/server: mdb6.c
src/lib/libm/src: s_copysignl.c
src/sys/compat/linux/common: linux_socket.c

Log Message:
- avoid uninitialised memory usage


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/mpl/dhcp/dist/server/mdb6.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libm/src/s_copysignl.c
cvs rdiff -u -r1.143 -r1.144 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.



CVS commit: src

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 04:36:41 UTC 2019

Modified Files:
src/bin/pax: ar_io.c
src/crypto/external/bsd/openssh/dist: fmt_scaled.h scp.c
src/libexec/telnetd: utility.c
src/sbin/bioctl: bioctl.c

Log Message:
- bump buffer sizes to avoid potential truncation issues


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/bin/pax/ar_io.c
cvs rdiff -u -r1.7 -r1.8 src/crypto/external/bsd/openssh/dist/fmt_scaled.h
cvs rdiff -u -r1.21 -r1.22 src/crypto/external/bsd/openssh/dist/scp.c
cvs rdiff -u -r1.32 -r1.33 src/libexec/telnetd/utility.c
cvs rdiff -u -r1.17 -r1.18 src/sbin/bioctl/bioctl.c

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

Modified files:

Index: src/bin/pax/ar_io.c
diff -u src/bin/pax/ar_io.c:1.58 src/bin/pax/ar_io.c:1.59
--- src/bin/pax/ar_io.c:1.58	Mon Oct  2 21:57:59 2017
+++ src/bin/pax/ar_io.c	Mon Feb  4 04:36:41 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ar_io.c,v 1.58 2017/10/02 21:57:59 joerg Exp $	*/
+/*	$NetBSD: ar_io.c,v 1.59 2019/02/04 04:36:41 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)ar_io.c	8.2 (Berkeley) 4/18/94";
 #else
-__RCSID("$NetBSD: ar_io.c,v 1.58 2017/10/02 21:57:59 joerg Exp $");
+__RCSID("$NetBSD: ar_io.c,v 1.59 2019/02/04 04:36:41 mrg Exp $");
 #endif
 #endif /* not lint */
 
@@ -1631,7 +1631,7 @@ void
 ar_summary(int n)
 {
 	time_t secs;
-	char buf[BUFSIZ];
+	char buf[4096];
 	char tbuf[MAXPATHLEN/4];	/* XXX silly size! */
 	char s1buf[MAXPATHLEN/8];	/* XXX very silly size! */
 	char s2buf[MAXPATHLEN/8];	/* XXX very silly size! */

Index: src/crypto/external/bsd/openssh/dist/fmt_scaled.h
diff -u src/crypto/external/bsd/openssh/dist/fmt_scaled.h:1.7 src/crypto/external/bsd/openssh/dist/fmt_scaled.h:1.8
--- src/crypto/external/bsd/openssh/dist/fmt_scaled.h:1.7	Tue Apr 18 18:41:46 2017
+++ src/crypto/external/bsd/openssh/dist/fmt_scaled.h	Mon Feb  4 04:36:41 2019
@@ -1,6 +1,6 @@
-/*	$NetBSD: fmt_scaled.h,v 1.7 2017/04/18 18:41:46 christos Exp $	*/
+/*	$NetBSD: fmt_scaled.h,v 1.8 2019/02/04 04:36:41 mrg Exp $	*/
 #ifndef FMT_SCALED_STRSIZE
-#define FMT_SCALED_STRSIZE	7
+#define FMT_SCALED_STRSIZE	40
 #endif
 int   fmt_scaled(long long, char *);
 int   scan_scaled(const char *, long long *);

Index: src/crypto/external/bsd/openssh/dist/scp.c
diff -u src/crypto/external/bsd/openssh/dist/scp.c:1.21 src/crypto/external/bsd/openssh/dist/scp.c:1.22
--- src/crypto/external/bsd/openssh/dist/scp.c:1.21	Sun Jan 27 02:08:33 2019
+++ src/crypto/external/bsd/openssh/dist/scp.c	Mon Feb  4 04:36:41 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: scp.c,v 1.21 2019/01/27 02:08:33 pgoyette Exp $	*/
+/*	$NetBSD: scp.c,v 1.22 2019/02/04 04:36:41 mrg Exp $	*/
 /* $OpenBSD: scp.c,v 1.197 2018/06/01 04:31:48 dtucker Exp $ */
 
 /*
@@ -74,7 +74,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: scp.c,v 1.21 2019/01/27 02:08:33 pgoyette Exp $");
+__RCSID("$NetBSD: scp.c,v 1.22 2019/02/04 04:36:41 mrg Exp $");
 
 #include 	/* roundup MAX */
 #include 
@@ -911,7 +911,7 @@ rsource(char *name, struct stat *statp)
 {
 	DIR *dirp;
 	struct dirent *dp;
-	char *last, *vect[1], path[PATH_MAX];
+	char *last, *vect[1], path[PATH_MAX + 20];
 
 	if (!(dirp = opendir(name))) {
 		run_err("%s: %s", name, strerror(errno));

Index: src/libexec/telnetd/utility.c
diff -u src/libexec/telnetd/utility.c:1.32 src/libexec/telnetd/utility.c:1.33
--- src/libexec/telnetd/utility.c:1.32	Mon Jan  9 16:36:48 2012
+++ src/libexec/telnetd/utility.c	Mon Feb  4 04:36:41 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: utility.c,v 1.32 2012/01/09 16:36:48 christos Exp $	*/
+/*	$NetBSD: utility.c,v 1.33 2019/02/04 04:36:41 mrg Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)utility.c	8.4 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: utility.c,v 1.32 2012/01/09 16:36:48 christos Exp $");
+__RCSID("$NetBSD: utility.c,v 1.33 2019/02/04 04:36:41 mrg Exp $");
 #endif
 #endif /* not lint */
 
@@ -717,7 +717,7 @@ printsub(
 		break;
 		}
 		{
-		char tbuf[32];
+		char tbuf[40];
 
 		(void)snprintf(tbuf, sizeof tbuf, "%s%s%s%s%s",
 			pointer[2]_EDIT ? "|EDIT" : "",

Index: src/sbin/bioctl/bioctl.c
diff -u src/sbin/bioctl/bioctl.c:1.17 src/sbin/bioctl/bioctl.c:1.18
--- src/sbin/bioctl/bioctl.c:1.17	Fri Jan 16 20:12:28 2015
+++ src/sbin/bioctl/bioctl.c	Mon Feb  4 04:36:41 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: bioctl.c,v 1.17 2015/01/16 20:12:28 christos Exp $ */
+/* $NetBSD: bioctl.c,v 1.18 2019/02/04 04:36:41 mrg Exp $ */
 /* $OpenBSD: bioctl.c,v 1.52 2007/03/20 15:26:06 jmc Exp $ */
 
 /*
@@ -31,7 +31,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: bioctl.c,v 1.17 2015/01/16 20:12:28 christos Exp $");
+__RCSID("$NetBSD: bioctl.c,v 1.18 2019/02/04 04:36:41 mrg Exp $");
 #endif
 
 #include 
@@ -237,7 +237,7 @@ bio_show_volumes(struct biotmp *bt)
 	struct bioc_vol 	bv;
 	const char 		*status, 

CVS commit: src

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 04:36:41 UTC 2019

Modified Files:
src/bin/pax: ar_io.c
src/crypto/external/bsd/openssh/dist: fmt_scaled.h scp.c
src/libexec/telnetd: utility.c
src/sbin/bioctl: bioctl.c

Log Message:
- bump buffer sizes to avoid potential truncation issues


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/bin/pax/ar_io.c
cvs rdiff -u -r1.7 -r1.8 src/crypto/external/bsd/openssh/dist/fmt_scaled.h
cvs rdiff -u -r1.21 -r1.22 src/crypto/external/bsd/openssh/dist/scp.c
cvs rdiff -u -r1.32 -r1.33 src/libexec/telnetd/utility.c
cvs rdiff -u -r1.17 -r1.18 src/sbin/bioctl/bioctl.c

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



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

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 04:20:13 UTC 2019

Modified Files:
src/tests/lib/libc/rpc: t_rpc.c

Log Message:
- make ERRX() return a value since it doesn't actually exit in the !TEST case.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/lib/libc/rpc/t_rpc.c

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



CVS commit: src/sys/kern

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 04:18:59 UTC 2019

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

Log Message:
s/fall into .../FALLTHROUGH/


To generate a diff of this commit:
cvs rdiff -u -r1.198 -r1.199 src/sys/kern/vfs_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/kern/vfs_vnops.c
diff -u src/sys/kern/vfs_vnops.c:1.198 src/sys/kern/vfs_vnops.c:1.199
--- src/sys/kern/vfs_vnops.c:1.198	Mon Sep  3 16:29:35 2018
+++ src/sys/kern/vfs_vnops.c	Mon Feb  4 04:18:59 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_vnops.c,v 1.198 2018/09/03 16:29:35 riastradh Exp $	*/
+/*	$NetBSD: vfs_vnops.c,v 1.199 2019/02/04 04:18:59 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.198 2018/09/03 16:29:35 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.199 2019/02/04 04:18:59 mrg Exp $");
 
 #include "veriexec.h"
 
@@ -762,7 +762,7 @@ vn_ioctl(file_t *fp, u_long com, void *d
 		}
 		if (com == FIONBIO || com == FIOASYNC)	/* XXX */
 			return (0);			/* XXX */
-		/* fall into ... */
+		/* FALLTHROUGH */
 	case VFIFO:
 	case VCHR:
 	case VBLK:



CVS commit: src/sys/kern

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 04:18:59 UTC 2019

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

Log Message:
s/fall into .../FALLTHROUGH/


To generate a diff of this commit:
cvs rdiff -u -r1.198 -r1.199 src/sys/kern/vfs_vnops.c

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



CVS commit: src/sys/kern

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 04:18:27 UTC 2019

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

Log Message:
add a couple of fallthru comments.


To generate a diff of this commit:
cvs rdiff -u -r1.268 -r1.269 src/sys/kern/uipc_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/kern/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.268 src/sys/kern/uipc_socket.c:1.269
--- src/sys/kern/uipc_socket.c:1.268	Sat Dec 22 14:28:56 2018
+++ src/sys/kern/uipc_socket.c	Mon Feb  4 04:18:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket.c,v 1.268 2018/12/22 14:28:56 maxv Exp $	*/
+/*	$NetBSD: uipc_socket.c,v 1.269 2019/02/04 04:18:27 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.268 2018/12/22 14:28:56 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.269 2019/02/04 04:18:27 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1844,7 +1844,9 @@ sosetopt1(struct socket *so, const struc
 	}
 #endif /* COMPAT_50 */
 
+		/*FALLTHROUGH*/
 	case SO_SNDTIMEO:
+		/*FALLTHROUGH*/
 	case SO_RCVTIMEO:
 		if (error)
 			error = sockopt_get(sopt, , sizeof(tv));



CVS commit: src/sys/kern

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 04:18:27 UTC 2019

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

Log Message:
add a couple of fallthru comments.


To generate a diff of this commit:
cvs rdiff -u -r1.268 -r1.269 src/sys/kern/uipc_socket.c

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



CVS commit: src/usr.bin/ftp

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 04:09:13 UTC 2019

Modified Files:
src/usr.bin/ftp: cmds.c extern.h ftp.c main.c

Log Message:
- add justquit() that always exits.  use it to avoid unreachable code.


To generate a diff of this commit:
cvs rdiff -u -r1.138 -r1.139 src/usr.bin/ftp/cmds.c
cvs rdiff -u -r1.80 -r1.81 src/usr.bin/ftp/extern.h
cvs rdiff -u -r1.167 -r1.168 src/usr.bin/ftp/ftp.c
cvs rdiff -u -r1.125 -r1.126 src/usr.bin/ftp/main.c

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

Modified files:

Index: src/usr.bin/ftp/cmds.c
diff -u src/usr.bin/ftp/cmds.c:1.138 src/usr.bin/ftp/cmds.c:1.139
--- src/usr.bin/ftp/cmds.c:1.138	Mon Nov 20 21:11:36 2017
+++ src/usr.bin/ftp/cmds.c	Mon Feb  4 04:09:13 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: cmds.c,v 1.138 2017/11/20 21:11:36 kre Exp $	*/
+/*	$NetBSD: cmds.c,v 1.139 2019/02/04 04:09:13 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
 #if 0
 static char sccsid[] = "@(#)cmds.c	8.6 (Berkeley) 10/9/94";
 #else
-__RCSID("$NetBSD: cmds.c,v 1.138 2017/11/20 21:11:36 kre Exp $");
+__RCSID("$NetBSD: cmds.c,v 1.139 2019/02/04 04:09:13 mrg Exp $");
 #endif
 #endif /* not lint */
 
@@ -1776,6 +1776,13 @@ quit(int argc, char *argv[])
 	exit(0);
 }
 
+void __dead
+justquit(void)
+{
+
+	quit(0, NULL);
+}
+
 /*
  * Terminate session, but don't exit.
  * May be called with 0, NULL.
@@ -2185,7 +2192,7 @@ LOOP:
 	}
 	break;
 }
-/* intentional drop through */
+/* FALLTHROUGH */
 			default:
 *cp2++ = *cp1;
 break;

Index: src/usr.bin/ftp/extern.h
diff -u src/usr.bin/ftp/extern.h:1.80 src/usr.bin/ftp/extern.h:1.81
--- src/usr.bin/ftp/extern.h:1.80	Wed Jul  4 06:09:37 2012
+++ src/usr.bin/ftp/extern.h	Mon Feb  4 04:09:13 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: extern.h,v 1.80 2012/07/04 06:09:37 is Exp $	*/
+/*	$NetBSD: extern.h,v 1.81 2019/02/04 04:09:13 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -173,6 +173,7 @@ void	pswitch(int);
 void	put(int, char **);
 void	pwd(int, char **);
 void	quit(int, char **);
+void	justquit(void) __dead;
 void	quote(int, char **);
 void	quote1(const char *, int, char **);
 void	recvrequest(const char *, const char *, const char *,

Index: src/usr.bin/ftp/ftp.c
diff -u src/usr.bin/ftp/ftp.c:1.167 src/usr.bin/ftp/ftp.c:1.168
--- src/usr.bin/ftp/ftp.c:1.167	Tue Oct  4 15:06:31 2016
+++ src/usr.bin/ftp/ftp.c	Mon Feb  4 04:09:13 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ftp.c,v 1.167 2016/10/04 15:06:31 joerg Exp $	*/
+/*	$NetBSD: ftp.c,v 1.168 2019/02/04 04:09:13 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -92,7 +92,7 @@
 #if 0
 static char sccsid[] = "@(#)ftp.c	8.6 (Berkeley) 10/27/94";
 #else
-__RCSID("$NetBSD: ftp.c,v 1.167 2016/10/04 15:06:31 joerg Exp $");
+__RCSID("$NetBSD: ftp.c,v 1.168 2019/02/04 04:09:13 mrg Exp $");
 #endif
 #endif /* not lint */
 
@@ -1553,8 +1553,8 @@ initconn(void)
 result = COMPLETE + 1;
 break;
 			}
-			/* FALLTHROUGH */
 #ifdef INET6
+			/* FALLTHROUGH */
 		case AF_INET6:
 			if (!epsv6 || epsv6bad) {
 result = COMPLETE + 1;

Index: src/usr.bin/ftp/main.c
diff -u src/usr.bin/ftp/main.c:1.125 src/usr.bin/ftp/main.c:1.126
--- src/usr.bin/ftp/main.c:1.125	Sun Mar  4 19:57:41 2018
+++ src/usr.bin/ftp/main.c	Mon Feb  4 04:09:13 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.125 2018/03/04 19:57:41 dholland Exp $	*/
+/*	$NetBSD: main.c,v 1.126 2019/02/04 04:09:13 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1996-2015 The NetBSD Foundation, Inc.
@@ -98,7 +98,7 @@ __COPYRIGHT("@(#) Copyright (c) 1985, 19
 #if 0
 static char sccsid[] = "@(#)main.c	8.6 (Berkeley) 10/9/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.125 2018/03/04 19:57:41 dholland Exp $");
+__RCSID("$NetBSD: main.c,v 1.126 2019/02/04 04:09:13 mrg Exp $");
 #endif
 #endif /* not lint */
 
@@ -660,7 +660,7 @@ cmdscanner(void)
 			case -2:	/* error */
 if (fromatty)
 	putc('\n', ttyout);
-quit(0, NULL);
+justquit();
 /* NOTREACHED */
 			case -3:	/* too long; try again */
 fputs("Sorry, input line is too long.\n",
@@ -682,7 +682,7 @@ cmdscanner(void)
 			if (buf == NULL || num == 0) {
 if (fromatty)
 	putc('\n', ttyout);
-quit(0, NULL);
+justquit();
 			}
 			if (num >= sizeof(line)) {
 fputs("Sorry, input line is too long.\n",



CVS commit: src/usr.bin/ftp

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 04:09:13 UTC 2019

Modified Files:
src/usr.bin/ftp: cmds.c extern.h ftp.c main.c

Log Message:
- add justquit() that always exits.  use it to avoid unreachable code.


To generate a diff of this commit:
cvs rdiff -u -r1.138 -r1.139 src/usr.bin/ftp/cmds.c
cvs rdiff -u -r1.80 -r1.81 src/usr.bin/ftp/extern.h
cvs rdiff -u -r1.167 -r1.168 src/usr.bin/ftp/ftp.c
cvs rdiff -u -r1.125 -r1.126 src/usr.bin/ftp/main.c

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



CVS commit: src

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 04:05:16 UTC 2019

Modified Files:
src/bin/ksh: Makefile
src/crypto/external/bsd/netpgp/bin/netpgpverify: Makefile
src/crypto/external/bsd/netpgp/lib/verify: Makefile
src/crypto/external/bsd/openssh/bin/sftp: Makefile
src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile
src/external/bsd/libarchive/lib/libarchive: Makefile
src/external/bsd/libevent/lib/libevent: Makefile
src/external/bsd/libpcap/lib: Makefile
src/external/bsd/ntp: Makefile.inc
src/external/bsd/nvi/usr.bin/nvi: Makefile
src/external/bsd/pdisk/bin: Makefile
src/lib/libbz2: Makefile
src/lib/libz: Makefile
src/sys/modules/pf: Makefile
src/sys/modules/radeondrm: Makefile

Log Message:
- use -Wno-error=implicit-fallthrough with GCC7.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/bin/ksh/Makefile
cvs rdiff -u -r1.15 -r1.16 \
src/crypto/external/bsd/netpgp/bin/netpgpverify/Makefile
cvs rdiff -u -r1.9 -r1.10 src/crypto/external/bsd/netpgp/lib/verify/Makefile
cvs rdiff -u -r1.5 -r1.6 src/crypto/external/bsd/openssh/bin/sftp/Makefile
cvs rdiff -u -r1.43 -r1.44 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/libarchive/lib/libarchive/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/libevent/lib/libevent/Makefile
cvs rdiff -u -r1.21 -r1.22 src/external/bsd/libpcap/lib/Makefile
cvs rdiff -u -r1.17 -r1.18 src/external/bsd/ntp/Makefile.inc
cvs rdiff -u -r1.17 -r1.18 src/external/bsd/nvi/usr.bin/nvi/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/pdisk/bin/Makefile
cvs rdiff -u -r1.18 -r1.19 src/lib/libbz2/Makefile
cvs rdiff -u -r1.23 -r1.24 src/lib/libz/Makefile
cvs rdiff -u -r1.9 -r1.10 src/sys/modules/pf/Makefile
cvs rdiff -u -r1.10 -r1.11 src/sys/modules/radeondrm/Makefile

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

Modified files:

Index: src/bin/ksh/Makefile
diff -u src/bin/ksh/Makefile:1.34 src/bin/ksh/Makefile:1.35
--- src/bin/ksh/Makefile:1.34	Fri Jun 30 04:22:22 2017
+++ src/bin/ksh/Makefile	Mon Feb  4 04:05:15 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.34 2017/06/30 04:22:22 kamil Exp $
+#	$NetBSD: Makefile,v 1.35 2019/02/04 04:05:15 mrg Exp $
 
 WARNS=3
 CWARNFLAGS.clang+=	-Wno-error=cast-qual
@@ -48,4 +48,8 @@ ksh.1: ksh.Man mkman
 	${HOST_SH} $(.CURDIR)/mkman ksh $(.CURDIR)/ksh.Man >ksh.1.tmp \
 	&& mv ksh.1.tmp ksh.1
 
+.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
+COPTS+=	-Wno-error=implicit-fallthrough
+.endif
+
 .include 

Index: src/crypto/external/bsd/netpgp/bin/netpgpverify/Makefile
diff -u src/crypto/external/bsd/netpgp/bin/netpgpverify/Makefile:1.15 src/crypto/external/bsd/netpgp/bin/netpgpverify/Makefile:1.16
--- src/crypto/external/bsd/netpgp/bin/netpgpverify/Makefile:1.15	Mon Apr 17 19:50:27 2017
+++ src/crypto/external/bsd/netpgp/bin/netpgpverify/Makefile	Mon Feb  4 04:05:15 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2017/04/17 19:50:27 agc Exp $
+#	$NetBSD: Makefile,v 1.16 2019/02/04 04:05:15 mrg Exp $
 
 PROG=netpgpverify
 BINDIR=		/usr/bin
@@ -26,6 +26,12 @@ EXTDIST=${.CURDIR}/../../dist
 
 .PATH: ${EXTDIST}/src/netpgpverify
 
+.include 
+
+.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
+COPTS+=	-Wno-error=implicit-fallthrough
+.endif
+
 .include 
 
 t tst: ${PROG}

Index: src/crypto/external/bsd/netpgp/lib/verify/Makefile
diff -u src/crypto/external/bsd/netpgp/lib/verify/Makefile:1.9 src/crypto/external/bsd/netpgp/lib/verify/Makefile:1.10
--- src/crypto/external/bsd/netpgp/lib/verify/Makefile:1.9	Mon Apr 17 19:50:28 2017
+++ src/crypto/external/bsd/netpgp/lib/verify/Makefile	Mon Feb  4 04:05:15 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2017/04/17 19:50:28 agc Exp $
+# $NetBSD: Makefile,v 1.10 2019/02/04 04:05:15 mrg Exp $
 
 LIB=netpgpverify
 SRCS+=b64.c
@@ -25,4 +25,10 @@ EXTDIST=${.CURDIR}/../../dist
 INCS=verify.h
 INCSDIR=/usr/include/netpgp
 
+.include 
+
+.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
+COPTS+=	-Wno-error=implicit-fallthrough
+.endif
+
 .include 

Index: src/crypto/external/bsd/openssh/bin/sftp/Makefile
diff -u src/crypto/external/bsd/openssh/bin/sftp/Makefile:1.5 src/crypto/external/bsd/openssh/bin/sftp/Makefile:1.6
--- src/crypto/external/bsd/openssh/bin/sftp/Makefile:1.5	Fri Aug 10 12:20:11 2012
+++ src/crypto/external/bsd/openssh/bin/sftp/Makefile	Mon Feb  4 04:05:15 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2012/08/10 12:20:11 joerg Exp $
+#	$NetBSD: Makefile,v 1.6 2019/02/04 04:05:15 mrg Exp $
 
 BINDIR=	/usr/bin
 
@@ -12,4 +12,10 @@ DPADD+=	${LIBEDIT} ${LIBTERMINFO}
 COPTS.sftp.c+=		-Wno-pointer-sign
 COPTS.sftp-client.c+=	-Wno-pointer-sign
 
+.include 
+
+.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
+COPTS.sftp.c+=		-Wno-error=implicit-fallthrough
+.endif
+
 .include 

Index: 

CVS commit: src

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 04:05:16 UTC 2019

Modified Files:
src/bin/ksh: Makefile
src/crypto/external/bsd/netpgp/bin/netpgpverify: Makefile
src/crypto/external/bsd/netpgp/lib/verify: Makefile
src/crypto/external/bsd/openssh/bin/sftp: Makefile
src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile
src/external/bsd/libarchive/lib/libarchive: Makefile
src/external/bsd/libevent/lib/libevent: Makefile
src/external/bsd/libpcap/lib: Makefile
src/external/bsd/ntp: Makefile.inc
src/external/bsd/nvi/usr.bin/nvi: Makefile
src/external/bsd/pdisk/bin: Makefile
src/lib/libbz2: Makefile
src/lib/libz: Makefile
src/sys/modules/pf: Makefile
src/sys/modules/radeondrm: Makefile

Log Message:
- use -Wno-error=implicit-fallthrough with GCC7.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/bin/ksh/Makefile
cvs rdiff -u -r1.15 -r1.16 \
src/crypto/external/bsd/netpgp/bin/netpgpverify/Makefile
cvs rdiff -u -r1.9 -r1.10 src/crypto/external/bsd/netpgp/lib/verify/Makefile
cvs rdiff -u -r1.5 -r1.6 src/crypto/external/bsd/openssh/bin/sftp/Makefile
cvs rdiff -u -r1.43 -r1.44 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/libarchive/lib/libarchive/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/libevent/lib/libevent/Makefile
cvs rdiff -u -r1.21 -r1.22 src/external/bsd/libpcap/lib/Makefile
cvs rdiff -u -r1.17 -r1.18 src/external/bsd/ntp/Makefile.inc
cvs rdiff -u -r1.17 -r1.18 src/external/bsd/nvi/usr.bin/nvi/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/pdisk/bin/Makefile
cvs rdiff -u -r1.18 -r1.19 src/lib/libbz2/Makefile
cvs rdiff -u -r1.23 -r1.24 src/lib/libz/Makefile
cvs rdiff -u -r1.9 -r1.10 src/sys/modules/pf/Makefile
cvs rdiff -u -r1.10 -r1.11 src/sys/modules/radeondrm/Makefile

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



Re: CVS commit: src/tests/lib/libc/misc

2019-02-03 Thread Kamil Rytarowski
On 04.02.2019 04:10, matthew green wrote:
> Module Name:  src
> Committed By: mrg
> Date: Mon Feb  4 03:10:33 UTC 2019
> 
> Modified Files:
>   src/tests/lib/libc/misc: Makefile t_ubsan.c
> 
> Log Message:
> - revert previous to t_ubsan.c, it is desired behaviour.  from kamil.
> - use -Wno-int-in-bool-context instead
> 


> @@ -376,7 +376,7 @@ test_mul_overflow_signed(void)
>   volatile int a = INT_MAX;
>   volatile int b = atoi("2");
>  
> - raise((a && b) ? SIGSEGV : SIGBUS);
> + raise((a * b) ? SIGSEGV : SIGBUS);

If GCC is fine with it, we could try raise(!!(a * b) ? SIGSEGV : SIGBUS);

It just matters to perform multiplication and overflow here. If it
works, we can drop -Wno.

>  }
>  
>  UBSAN_TC_BODY(mul_overflow_signed, tc)
> 




signature.asc
Description: OpenPGP digital signature


CVS commit: src/usr.bin

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:58:41 UTC 2019

Modified Files:
src/usr.bin/make: Makefile
src/usr.bin/newsyslog: Makefile
src/usr.bin/rdist: Makefile
src/usr.bin/systat: Makefile

Log Message:
- use -Wno-error=format-truncation


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/usr.bin/make/Makefile
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/newsyslog/Makefile
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/rdist/Makefile
cvs rdiff -u -r1.40 -r1.41 src/usr.bin/systat/Makefile

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/Makefile
diff -u src/usr.bin/make/Makefile:1.60 src/usr.bin/make/Makefile:1.61
--- src/usr.bin/make/Makefile:1.60	Sun Jun 10 17:55:11 2018
+++ src/usr.bin/make/Makefile	Mon Feb  4 03:58:41 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.60 2018/06/10 17:55:11 christos Exp $
+#	$NetBSD: Makefile,v 1.61 2019/02/04 03:58:41 mrg Exp $
 #	@(#)Makefile	5.2 (Berkeley) 12/28/90
 
 PROG=	make
@@ -46,6 +46,10 @@ LDADD+=-lutil
 DPADD+=${LIBUTIL}
 .endif
 
+.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
+COPTS.arch.c += -Wno-error=format-truncation
+.endif
+
 # A simple unit-test driver to help catch regressions
 accept test:
 	cd ${.CURDIR}/unit-tests && MAKEFLAGS= ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET}

Index: src/usr.bin/newsyslog/Makefile
diff -u src/usr.bin/newsyslog/Makefile:1.18 src/usr.bin/newsyslog/Makefile:1.19
--- src/usr.bin/newsyslog/Makefile:1.18	Tue Apr 14 22:15:24 2009
+++ src/usr.bin/newsyslog/Makefile	Mon Feb  4 03:58:41 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.18 2009/04/14 22:15:24 lukem Exp $
+#	$NetBSD: Makefile,v 1.19 2019/02/04 03:58:41 mrg Exp $
 
 PROG=	newsyslog
 SRCS=	newsyslog.c
@@ -6,4 +6,10 @@ SRCS=	newsyslog.c
 MAN=	newsyslog.8
 MLINKS+=newsyslog.8 newsyslog.conf.5
 
+.include 
+
+.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
+COPTS.newsyslog.c += -Wno-error=format-truncation
+.endif
+
 .include 

Index: src/usr.bin/rdist/Makefile
diff -u src/usr.bin/rdist/Makefile:1.11 src/usr.bin/rdist/Makefile:1.12
--- src/usr.bin/rdist/Makefile:1.11	Mon May 28 12:06:29 2007
+++ src/usr.bin/rdist/Makefile	Mon Feb  4 03:58:41 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2007/05/28 12:06:29 tls Exp $
+#	$NetBSD: Makefile,v 1.12 2019/02/04 03:58:41 mrg Exp $
 #	from: @(#)Makefile	8.3 (Berkeley) 7/19/93
 
 USE_FORT?= yes	# network client/server
@@ -7,4 +7,10 @@ CPPFLAGS+= -I${.CURDIR}
 PROG=	rdist
 SRCS=	docmd.c expand.c gram.y lookup.c main.c server.c
 
+.include 
+
+.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
+COPTS.server.c += -Wno-error=format-truncation
+.endif
+
 .include 

Index: src/usr.bin/systat/Makefile
diff -u src/usr.bin/systat/Makefile:1.40 src/usr.bin/systat/Makefile:1.41
--- src/usr.bin/systat/Makefile:1.40	Fri Dec 23 10:19:57 2016
+++ src/usr.bin/systat/Makefile	Mon Feb  4 03:58:41 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.40 2016/12/23 10:19:57 mrg Exp $
+#	$NetBSD: Makefile,v 1.41 2019/02/04 03:58:41 mrg Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/6/93
 
 .include 
@@ -29,4 +29,8 @@ SRCS+=	ip6.c
 
 .include "../../compat/exec.mk"
 
+.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
+COPTS.df.c += -Wno-error=format-truncation
+.endif
+
 .include 



CVS commit: src/usr.bin

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:58:41 UTC 2019

Modified Files:
src/usr.bin/make: Makefile
src/usr.bin/newsyslog: Makefile
src/usr.bin/rdist: Makefile
src/usr.bin/systat: Makefile

Log Message:
- use -Wno-error=format-truncation


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/usr.bin/make/Makefile
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/newsyslog/Makefile
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/rdist/Makefile
cvs rdiff -u -r1.40 -r1.41 src/usr.bin/systat/Makefile

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



CVS commit: src/games/hack

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:33:15 UTC 2019

Modified Files:
src/games/hack: hack.eat.c

Log Message:
- done() can return in wizard mode.  don't NOTREACHED'd it
  but break instead.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/games/hack/hack.eat.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/hack/hack.eat.c
diff -u src/games/hack/hack.eat.c:1.12 src/games/hack/hack.eat.c:1.13
--- src/games/hack/hack.eat.c:1.12	Sun Aug  7 06:03:45 2011
+++ src/games/hack/hack.eat.c	Mon Feb  4 03:33:15 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: hack.eat.c,v 1.12 2011/08/07 06:03:45 dholland Exp $	*/
+/*	$NetBSD: hack.eat.c,v 1.13 2019/02/04 03:33:15 mrg Exp $	*/
 
 /*
  * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: hack.eat.c,v 1.12 2011/08/07 06:03:45 dholland Exp $");
+__RCSID("$NetBSD: hack.eat.c,v 1.13 2019/02/04 03:33:15 mrg Exp $");
 #endif/* not lint */
 
 #include "hack.h"
@@ -539,7 +539,7 @@ eatcorpse(struct obj *otmp)
 		pline("You turn to stone.");
 		killer = "dead cockatrice";
 		done("died");
-		/* NOTREACHED */
+		break;
 	case 'a':
 		if (Stoned) {
 			pline("What a pity - you just destroyed a future piece of art!");



CVS commit: src/games/hack

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:33:15 UTC 2019

Modified Files:
src/games/hack: hack.eat.c

Log Message:
- done() can return in wizard mode.  don't NOTREACHED'd it
  but break instead.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/games/hack/hack.eat.c

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



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

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:32:27 UTC 2019

Modified Files:
src/sys/arch/sparc/sparc: machdep.c

Log Message:
- rework mm_md_readwrite() to avoid fallthrough warnings entirely


To generate a diff of this commit:
cvs rdiff -u -r1.328 -r1.329 src/sys/arch/sparc/sparc/machdep.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/sparc/sparc/machdep.c
diff -u src/sys/arch/sparc/sparc/machdep.c:1.328 src/sys/arch/sparc/sparc/machdep.c:1.329
--- src/sys/arch/sparc/sparc/machdep.c:1.328	Sat Dec 10 10:41:07 2016
+++ src/sys/arch/sparc/sparc/machdep.c	Mon Feb  4 03:32:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.328 2016/12/10 10:41:07 mrg Exp $ */
+/*	$NetBSD: machdep.c,v 1.329 2019/02/04 03:32:27 mrg Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.328 2016/12/10 10:41:07 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.329 2019/02/04 03:32:27 mrg Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_compat_sunos.h"
@@ -3143,10 +3143,7 @@ mm_md_readwrite(dev_t dev, struct uio *u
 	case DEV_EEPROM:
 		if (cputyp == CPU_SUN4)
 			return eeprom_uio(uio);
-		else
 #endif
-		return ENXIO;
-	default:
-		return ENXIO;
 	}
+	return ENXIO;
 }



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

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:32:27 UTC 2019

Modified Files:
src/sys/arch/sparc/sparc: machdep.c

Log Message:
- rework mm_md_readwrite() to avoid fallthrough warnings entirely


To generate a diff of this commit:
cvs rdiff -u -r1.328 -r1.329 src/sys/arch/sparc/sparc/machdep.c

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



CVS commit: src/lib/libm/noieee_src

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:30:20 UTC 2019

Modified Files:
src/lib/libm/noieee_src: n_lgamma.c

Log Message:
add some fallthru comments.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/noieee_src/n_lgamma.c

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



CVS commit: src/lib/libm/noieee_src

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:30:20 UTC 2019

Modified Files:
src/lib/libm/noieee_src: n_lgamma.c

Log Message:
add some fallthru comments.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/noieee_src/n_lgamma.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/libm/noieee_src/n_lgamma.c
diff -u src/lib/libm/noieee_src/n_lgamma.c:1.6 src/lib/libm/noieee_src/n_lgamma.c:1.7
--- src/lib/libm/noieee_src/n_lgamma.c:1.6	Fri Nov 24 21:15:54 2006
+++ src/lib/libm/noieee_src/n_lgamma.c	Mon Feb  4 03:30:20 2019
@@ -1,4 +1,4 @@
-/*  $NetBSD: n_lgamma.c,v 1.6 2006/11/24 21:15:54 wiz Exp $ */
+/*  $NetBSD: n_lgamma.c,v 1.7 2019/02/04 03:30:20 mrg Exp $ */
 /*-
  * Copyright (c) 1992, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -221,15 +221,15 @@ CONTINUE:
 		t = .5*t*t;
 		z = 1.0;
 		switch (x_int) {
-		case 6:	z  = (y + 5);
-		case 5:	z *= (y + 4);
-		case 4:	z *= (y + 3);
+		case 6:	z  = (y + 5); /* FALLTHROUGH */
+		case 5:	z *= (y + 4); /* FALLTHROUGH */
+		case 4:	z *= (y + 3); /* FALLTHROUGH */
 		case 3:	z *= (y + 2);
 			rr = __log__D(z);
 			rr.b += a0_lo; rr.a += a0_hi;
 			return(((r+rr.b)+t+rr.a));
 		case 2: return(((r+a0_lo)+t)+a0_hi);
-		case 0: r -= log1p(x);
+		case 0: r -= log1p(x); /* FALLTHROUGH */
 		default: rr = __log__D(x);
 			rr.a -= a0_hi; rr.b -= a0_lo;
 			return(((r - rr.b) + t) - rr.a);
@@ -246,9 +246,9 @@ CONTINUE:
 		q = hi*t;
 		z = 1.0;
 		switch (x_int) {
-		case 6:	z  = (y + 5);
-		case 5:	z *= (y + 4);
-		case 4:	z *= (y + 3);
+		case 6:	z  = (y + 5); /* FALLTHROUGH */
+		case 5:	z *= (y + 4); /* FALLTHROUGH */
+		case 4:	z *= (y + 3); /* FALLTHROUGH */
 		case 3:	z *= (y + 2);
 			rr = __log__D(z);
 			r += rr.b; r += q;



CVS commit: src/games/mille

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:29:41 UTC 2019

Modified Files:
src/games/mille: comp.c

Log Message:
- 'cango' is used beyond a bool type.  make it an int.
- add a couple of fallthru comments.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/games/mille/comp.c

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



CVS commit: src/games/mille

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:29:41 UTC 2019

Modified Files:
src/games/mille: comp.c

Log Message:
- 'cango' is used beyond a bool type.  make it an int.
- add a couple of fallthru comments.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/games/mille/comp.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/mille/comp.c
diff -u src/games/mille/comp.c:1.13 src/games/mille/comp.c:1.14
--- src/games/mille/comp.c:1.13	Mon May 25 23:44:04 2009
+++ src/games/mille/comp.c	Mon Feb  4 03:29:41 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: comp.c,v 1.13 2009/05/25 23:44:04 dholland Exp $	*/
+/*	$NetBSD: comp.c,v 1.14 2019/02/04 03:29:41 mrg Exp $	*/
 
 /*
  * Copyright (c) 1982, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)comp.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: comp.c,v 1.13 2009/05/25 23:44:04 dholland Exp $");
+__RCSID("$NetBSD: comp.c,v 1.14 2019/02/04 03:29:41 mrg Exp $");
 #endif
 #endif /* not lint */
 
@@ -52,7 +52,8 @@ calcmove(void)
 	CARD		card;
 	int		*value;
 	PLAY		*pp, *op;
-	bool		foundend, cango, canstop, foundlow;
+	bool		foundend, canstop, foundlow;
+	int		cango;
 	unsigned int	i, count200, badcount, nummin, nummax, diff;
 	int		curmin, curmax;
 	CARD		safe, oppos;
@@ -217,6 +218,7 @@ okay:
 	*value = 0;
 	break;
 }
+/* FALLTHROUGH */
 			  case C_75:	case C_100:
 *value = (Value[card] >> 3);
 if (pp->speed == C_LIMIT)
@@ -423,6 +425,7 @@ onecard(const PLAY *pp)
 card = (End - pp->mileage == 75 ? C_75 : C_100);
 			if (spd == C_LIMIT)
 return Numseen[S_RIGHT_WAY] == 0;
+			/* FALLTHROUGH */
 		  case 50:
 		  case 25:
 			if (card == -1)



CVS commit: src/etc/mtree

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:26:53 UTC 2019

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

Log Message:
create include/dev/dm here instead of elsewhere, where it may fail


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



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

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:26:27 UTC 2019

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

Log Message:
lto1 and lto-wrapper are part of gcccmds set.


To generate a diff of this commit:
cvs rdiff -u -r1.2255 -r1.2256 src/distrib/sets/lists/comp/mi

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



CVS commit: src/etc/mtree

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:26:53 UTC 2019

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

Log Message:
create include/dev/dm here instead of elsewhere, where it may fail


To generate a diff of this commit:
cvs rdiff -u -r1.186 -r1.187 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.186 src/etc/mtree/NetBSD.dist.base:1.187
--- src/etc/mtree/NetBSD.dist.base:1.186	Sat Feb  2 22:39:33 2019
+++ src/etc/mtree/NetBSD.dist.base	Mon Feb  4 03:26:53 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.186 2019/02/02 22:39:33 mrg Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.187 2019/02/04 03:26:53 mrg Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -114,6 +114,7 @@
 ./usr/include/dev/ata
 ./usr/include/dev/bluetooth
 ./usr/include/dev/dec
+./usr/include/dev/dm
 ./usr/include/dev/dmover
 ./usr/include/dev/dtv
 ./usr/include/dev/filemon



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

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:26:27 UTC 2019

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

Log Message:
lto1 and lto-wrapper are part of gcccmds set.


To generate a diff of this commit:
cvs rdiff -u -r1.2255 -r1.2256 src/distrib/sets/lists/comp/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/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2255 src/distrib/sets/lists/comp/mi:1.2256
--- src/distrib/sets/lists/comp/mi:1.2255	Sun Feb  3 03:28:04 2019
+++ src/distrib/sets/lists/comp/mi	Mon Feb  4 03:26:27 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2255 2019/02/03 03:28:04 mrg Exp $
+#	$NetBSD: mi,v 1.2256 2019/02/04 03:26:27 mrg Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -3985,8 +3985,8 @@
 ./usr/libexec/f771comp-obsolete		obsolete
 ./usr/libexec/lint1comp-c-bin
 ./usr/libexec/lint2comp-c-bin
-./usr/libexec/lto-wrapper			comp-c-bin		gcc,pic
-./usr/libexec/lto1comp-c-bin		gcc,pic
+./usr/libexec/lto-wrapper			comp-c-bin		gcc,gcccmds,pic
+./usr/libexec/lto1comp-c-bin		gcc,gcccmds,pic
 ./usr/libexec/pcppcomp-c-bin		pcc
 ./usr/sbin/configcomp-obsolete		obsolete
 ./usr/sbin/config.newcomp-obsolete		obsolete



CVS commit: src/external/gpl3/gcc

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:19:23 UTC 2019

Modified Files:
src/external/gpl3/gcc: README.gcc7

Log Message:
- sanitizer source list is not properly updated yet
- several platforms have progressed.  in particular, evbmips64-eb works.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/README.gcc7

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



CVS commit: src/external/gpl3/gcc

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:19:23 UTC 2019

Modified Files:
src/external/gpl3/gcc: README.gcc7

Log Message:
- sanitizer source list is not properly updated yet
- several platforms have progressed.  in particular, evbmips64-eb works.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/README.gcc7

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/README.gcc7
diff -u src/external/gpl3/gcc/README.gcc7:1.2 src/external/gpl3/gcc/README.gcc7:1.3
--- src/external/gpl3/gcc/README.gcc7:1.2	Sun Feb  3 12:14:45 2019
+++ src/external/gpl3/gcc/README.gcc7	Mon Feb  4 03:19:23 2019
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc7,v 1.2 2019/02/03 12:14:45 mrg Exp $
+$NetBSD: README.gcc7,v 1.3 2019/02/04 03:19:23 mrg Exp $
 
 new stuff (from gcc 5):
 	cc1objcplus
@@ -8,6 +8,11 @@ new stuff (from gcc 5):
 	libvtv
 	libitm
 
+known todo for gcc7:
+	- sanitizer file lists are not updated properly
+		- pull out more stuff via mknative-gcc vs hand coded in Makefile??
+
+
 arch/feature list.  anything not here has been switched already:
 
 tools:		does build.sh tools work?
@@ -22,14 +27,14 @@ atf:		does atf run / compare well
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf
 	-	---	--	--			---
 aarch64		y	?	y	y		n[2]		?	?
-alpha		?	?	?	?		?		?	?
+alpha		y	?	y	y		?		?	?
 arm		?	?	?	?		?		?	?
 armeb		?	?	?	?		?		?	?
 earm		?	?	?	?		?		?	?
 earmeb		?	?	?	?		?		?	?
 earmhf		?	?	?	?		?		?	?
 earmhfeb	?	?	?	?		?		?	?
-earmv4		?	?	?	?		?		?	?
+earmv4		y	?	n[5]	y		?		?	?
 earmv4eb	?	?	?	?		?		?	?
 earmv6		?	?	?	?		?		?	?
 earmv6eb	?	?	?	?		?		?	?
@@ -39,22 +44,22 @@ earmv7		?	?	?	?		?		?	?
 earmv7eb	?	?	?	?		?		?	?
 earmv7hf	?	?	?	?		?		?	?
 earmv7hfeb	?	?	?	?		?		?	?
-hppa		?	?	?	?		?		?	?
-i386		y	builds	y	y		y		?	?
-ia64		?	?	?	?		?		?	?
-m68000		?	?	?	?		?		?	?
+hppa		y	?	?	y		?		?	?
+i386		y	builds	?	y		y		?	?
+ia64		y	?	?	y		?		?	?
+m68000		n[4]	?	?	?		?		?	?
 m68k		?	?	?	?		?		?	?
-mipseb		?	?	?	?		?		?	?
-mipsel		?	?	?	?		?		?	?
-mips64eb	?	?	?	?		?		?	?
-mips64el	?	?	?	?		?		?	?
+mipseb		y	?	?	y		?		?	?
+mipsel		y	?	?	y		?		?	?
+mips64eb	y	y	y	y		y		y	?
+mips64el	y	?	?	y		?		?	?
 powerpc		?	?	?	?		?		?	?
 powerpc64	?	?	?	?		?		?	?
-sh3eb		?	?	?	?		?		?	?
-sh3el		?	?	?	?		?		?	?
+sh3eb		y	?	?	y		?		?	?
+sh3el		y	?	?	y		?		?	?
 sparc		y	y	y	y		y		y	?
 sparc64		y	?	?	n[1]		?		?	?
-vax		?	?	?	?		?		?	?
+vax		y	?	?	y		y/n[3]		?	?
 x86_64		y	y	y	y		y		y	y
 --
 or1k		
@@ -66,3 +71,17 @@ architecture	tools	kernels	libgcc	native
 
 [1] - sparc64-gcc gets ICE at startup
 [2] - __curbrk won't link libc.so
+[3] - gcc can't be built: 
+	/usr/src6/external/gpl3/gcc/dist/gcc/calls.c:1361:1: error: unrecognizable insn:
+	 }
+	 ^
+	(insn 444 443 445 19 (set (reg:SI 389)
+		(subreg:SI (mem:DI (plus:SI (plus:SI (mult:SI (reg:SI 387)
+(const_int 8 [0x8]))
+(reg/f:SI 17 virtual-stack-vars))
+			(const_int -224 [0xff20])) [18 *_176+0 S8 A32]) 4)) "/usr/src6/external/gpl3/gcc/dist/gcc/wide-int.h":1817 -1
+	 (nil))
+	/usr/src6/external/gpl3/gcc/dist/gcc/calls.c:1361:1: internal compiler error: in extract_insn, at recog.c:2311
+- the rest of the world builds fine.
+[4] - ar: netbsd.o: No such file or directory
+[5] - libstdc++ eh_personality.cc ends up with refs to arm eabi specific functions that are in libunwind for us



re: CVS commit: src

2019-02-03 Thread matthew green
> Multiplication was here on purpose to check UB report.

thanks.  i reverted this and put -Wno in the makefile instead.


.mrg.


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

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:10:33 UTC 2019

Modified Files:
src/tests/lib/libc/misc: Makefile t_ubsan.c

Log Message:
- revert previous to t_ubsan.c, it is desired behaviour.  from kamil.
- use -Wno-int-in-bool-context instead


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/misc/Makefile \
src/tests/lib/libc/misc/t_ubsan.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/misc/Makefile
diff -u src/tests/lib/libc/misc/Makefile:1.2 src/tests/lib/libc/misc/Makefile:1.3
--- src/tests/lib/libc/misc/Makefile:1.2	Thu Aug  9 12:45:15 2018
+++ src/tests/lib/libc/misc/Makefile	Mon Feb  4 03:10:33 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2018/08/09 12:45:15 christos Exp $
+# $NetBSD: Makefile,v 1.3 2019/02/04 03:10:33 mrg Exp $
 
 .include 
 
@@ -27,4 +27,9 @@ CWARNFLAGS.clang+=	-Wno-nullability-comp
 COPTS.t_ubsan.c += -Wno-stack-protector
 COPTS.t_ubsanxx.cpp += -Wno-stack-protector
 
+.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
+COPTS.t_ubsan.c+=	-Wno-int-in-bool-context
+COPTS.t_ubsanxx.cpp+=	-Wno-int-in-bool-context
+.endif
+
 .include 
Index: src/tests/lib/libc/misc/t_ubsan.c
diff -u src/tests/lib/libc/misc/t_ubsan.c:1.2 src/tests/lib/libc/misc/t_ubsan.c:1.3
--- src/tests/lib/libc/misc/t_ubsan.c:1.2	Sun Feb  3 10:45:58 2019
+++ src/tests/lib/libc/misc/t_ubsan.c	Mon Feb  4 03:10:33 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ubsan.c,v 1.2 2019/02/03 10:45:58 mrg Exp $	*/
+/*	$NetBSD: t_ubsan.c,v 1.3 2019/02/04 03:10:33 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
 #include 
 __COPYRIGHT("@(#) Copyright (c) 2018\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_ubsan.c,v 1.2 2019/02/03 10:45:58 mrg Exp $");
+__RCSID("$NetBSD: t_ubsan.c,v 1.3 2019/02/04 03:10:33 mrg Exp $");
 
 #include 
 #include 
@@ -376,7 +376,7 @@ test_mul_overflow_signed(void)
 	volatile int a = INT_MAX;
 	volatile int b = atoi("2");
 
-	raise((a && b) ? SIGSEGV : SIGBUS);
+	raise((a * b) ? SIGSEGV : SIGBUS);
 }
 
 UBSAN_TC_BODY(mul_overflow_signed, tc)



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

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:10:33 UTC 2019

Modified Files:
src/tests/lib/libc/misc: Makefile t_ubsan.c

Log Message:
- revert previous to t_ubsan.c, it is desired behaviour.  from kamil.
- use -Wno-int-in-bool-context instead


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/misc/Makefile \
src/tests/lib/libc/misc/t_ubsan.c

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



CVS commit: src/external/gpl3/gcc

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:01:52 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib/libgomp: Makefile
src/external/gpl3/gcc/usr.bin/common: Makefile
src/external/gpl3/gcc/usr.bin/common-target: Makefile
Added Files:
src/external/gpl3/gcc/lib/libgomp: defs.mk
src/external/gpl3/gcc/usr.bin/common: defs.mk

Log Message:
move libgomp, libcommon and libcommon-target source lists into the
generated files.  libcommon-target has a per-arch list, but the
other two are the same.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/external/gpl3/gcc/lib/libgomp/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/lib/libgomp/defs.mk
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/usr.bin/common/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/common/defs.mk
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/usr.bin/common-target/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/gcc/lib/libgomp/Makefile
diff -u src/external/gpl3/gcc/lib/libgomp/Makefile:1.22 src/external/gpl3/gcc/lib/libgomp/Makefile:1.23
--- src/external/gpl3/gcc/lib/libgomp/Makefile:1.22	Sun Feb  3 12:11:11 2019
+++ src/external/gpl3/gcc/lib/libgomp/Makefile	Mon Feb  4 03:01:52 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.22 2019/02/03 12:11:11 mrg Exp $
+#	$NetBSD: Makefile,v 1.23 2019/02/04 03:01:52 mrg Exp $
 
 # build GCC's libgomp, so that -fopenmp works.
 
@@ -11,16 +11,11 @@ NOLINT=	# defined
 
 DIST=	${GCCDIST}
 
+
 LIB=	gomp
-# XXX mknative-gcc should pull out libgomp_la_SOURCES
-SRCS= \
-	alloc.c atomic.c barrier.c critical.c env.c error.c \
-	icv.c icv-device.c iter.c iter_ull.c loop.c loop_ull.c ordered.c \
-	parallel.c sections.c single.c task.c team.c work.c lock.c mutex.c \
-	proc.c sem.c bar.c ptrlock.c time.c fortran.c affinity.c target.c \
-	splay-tree.c libgomp-plugin.c oacc-parallel.c oacc-host.c oacc-init.c \
-	oacc-mem.c oacc-async.c oacc-plugin.c oacc-cuda.c priority_queue.c
 
+.include "${.CURDIR}/defs.mk"
+SRCS=	${G_libgomp_la_SOURCES}
 
 GOMP_MACHINE_ARCH?=	${MACHINE_ARCH:S/earmv5/earm/}
 ARCHDIR=		${.CURDIR}/arch/${GOMP_MACHINE_ARCH}

Index: src/external/gpl3/gcc/usr.bin/common/Makefile
diff -u src/external/gpl3/gcc/usr.bin/common/Makefile:1.7 src/external/gpl3/gcc/usr.bin/common/Makefile:1.8
--- src/external/gpl3/gcc/usr.bin/common/Makefile:1.7	Fri Feb  1 10:39:48 2019
+++ src/external/gpl3/gcc/usr.bin/common/Makefile	Mon Feb  4 03:01:52 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2019/02/01 10:39:48 mrg Exp $
+#	$NetBSD: Makefile,v 1.8 2019/02/04 03:01:52 mrg Exp $
 
 LIBISPRIVATE=	yes
 
@@ -7,20 +7,8 @@ LIBISPRIVATE=	yes
 
 LIB=		common
 
-# XXX pullout OBJS-libcommon-target
-SRCS=		diagnostic.c \
-		diagnostic-color.c \
-		diagnostic-show-locus.o \
-		edit-context.o \
-		pretty-print.c \
-		intl.c \
-		vec.c \
-		input.c \
-		version.c \
-		hash-table.c \
-		ggc-none.c \
-		memory-block.cc \
-		selftest.cc
+.include "${.CURDIR}/defs.mk"
+SRCS=	${G_OBJS-libcommon:.o=.c}
 
 # XXX make sure this doesn't have more than it needs
 CPPFLAGS+=	-I${GCCARCH} -I${BACKENDOBJ} -I. \

Index: src/external/gpl3/gcc/usr.bin/common-target/Makefile
diff -u src/external/gpl3/gcc/usr.bin/common-target/Makefile:1.6 src/external/gpl3/gcc/usr.bin/common-target/Makefile:1.7
--- src/external/gpl3/gcc/usr.bin/common-target/Makefile:1.6	Fri Feb  1 10:39:48 2019
+++ src/external/gpl3/gcc/usr.bin/common-target/Makefile	Mon Feb  4 03:01:52 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2019/02/01 10:39:48 mrg Exp $
+#	$NetBSD: Makefile,v 1.7 2019/02/04 03:01:52 mrg Exp $
 
 LIBISPRIVATE=	yes
 
@@ -7,11 +7,8 @@ LIBISPRIVATE=	yes
 
 LIB=		common-target
 
-# XXX pullout OBJS-libcommon-target
-SRCS=		prefix.c params.c opts.c opts-common.c options.c vec.c \
-		hooks.c common-targhooks.c hash-table.c file-find.c \
-		spellcheck.c selftest.c \
-		${G_common_out_file:T}
+.include "${.CURDIR}/arch/${GCC_MACHINE_ARCH}.mk"
+SRCS=		${G_OBJS-libcommon-target:.o=.c}
 
 CPPFLAGS+=	-I${GCCARCH} -I${BACKENDOBJ} -I. \
 		${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} \

Added files:

Index: src/external/gpl3/gcc/lib/libgomp/defs.mk
diff -u /dev/null src/external/gpl3/gcc/lib/libgomp/defs.mk:1.1
--- /dev/null	Mon Feb  4 03:01:52 2019
+++ src/external/gpl3/gcc/lib/libgomp/defs.mk	Mon Feb  4 03:01:52 2019
@@ -0,0 +1,5 @@
+# This file is automatically generated.  DO NOT EDIT!
+# Generated from: NetBSD: mknative-gcc,v 1.97 2019/02/01 09:27:23 mrg Exp 
+# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp 
+#
+G_libgomp_la_SOURCES=alloc.c atomic.c barrier.c critical.c env.c error.c icv.c icv-device.c iter.c iter_ull.c loop.c loop_ull.c ordered.c parallel.c sections.c single.c task.c team.c work.c lock.c mutex.c proc.c sem.c bar.c ptrlock.c time.c fortran.c affinity.c target.c splay-tree.c libgomp-plugin.c oacc-parallel.c 

CVS commit: src/external/gpl3/gcc

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:01:52 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib/libgomp: Makefile
src/external/gpl3/gcc/usr.bin/common: Makefile
src/external/gpl3/gcc/usr.bin/common-target: Makefile
Added Files:
src/external/gpl3/gcc/lib/libgomp: defs.mk
src/external/gpl3/gcc/usr.bin/common: defs.mk

Log Message:
move libgomp, libcommon and libcommon-target source lists into the
generated files.  libcommon-target has a per-arch list, but the
other two are the same.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/external/gpl3/gcc/lib/libgomp/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/lib/libgomp/defs.mk
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/usr.bin/common/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/common/defs.mk
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/usr.bin/common-target/Makefile

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



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

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:00:11 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_linux.cc

Log Message:
make the internal_fstat() for netbsd be like the others.
fixes powerpc (at least) builds.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc

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/libsanitizer/sanitizer_common/sanitizer_linux.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.24 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.25
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.24	Sun Feb  3 11:12:01 2019
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc	Mon Feb  4 03:00:11 2019
@@ -297,7 +297,11 @@ uptr internal_lstat(const char *path, vo
 }
 
 uptr internal_fstat(fd_t fd, void *buf) {
-#if SANITIZER_FREEBSD || SANITIZER_NETBSD || SANITIZER_LINUX_USES_64BIT_SYSCALLS
+#if SANITIZER_FREEBSD || SANITIZER_NETBSD
+  return internal_syscall(SYSCALL(fstat), fd, (uptr)buf);
+#elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS
+  return = internal_syscall(SYSCALL(fstat), fd, );
+#elif SANITIZER_LINUX_USES_64BIT_SYSCALLS
 # if SANITIZER_MIPS64
   // For mips64, fstat syscall fills buffer in the format of kernel_stat
   struct kernel_stat kbuf;



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

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 03:00:11 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_linux.cc

Log Message:
make the internal_fstat() for netbsd be like the others.
fixes powerpc (at least) builds.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc

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



CVS commit: src/external/gpl3/gcc

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 02:58:48 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib/libbacktrace/arch/alpha:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/hppa: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/ia64: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/mips64eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/mips64el:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/mipseb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/mipsel:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/sh3eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/sh3el:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/vax: backtrace-supported.h
src/external/gpl3/gcc/lib/libgcc/arch/alpha: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/hppa: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/i386: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/ia64: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/mips64eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/mips64el: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/mipseb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/mipsel: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/powerpc: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/sh3eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/sh3el: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/sparc: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/vax: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/x86_64: defs.mk
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/alpha: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/hppa: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/ia64: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/mips64eb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/mips64el: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/mipseb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/mipsel: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/sh3eb: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/sh3el: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/vax: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgomp/arch/alpha: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/hppa: config.h libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libgomp/arch/ia64: config.h libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libgomp/arch/mips64eb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/mips64el: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/mipseb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/mipsel: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/sh3eb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/sh3el: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/vax: config.h libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libobjc/arch/alpha: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/hppa: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/i386: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/ia64: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/mips64eb: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/mips64el: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/mipseb: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/mipsel: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/powerpc: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/sh3eb: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/sh3el: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/sparc: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/vax: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/x86_64: defs.mk
src/external/gpl3/gcc/lib/libstdc++-v3/arch/alpha: c++config.h
cxxabi_tweaks.h defs.mk gstdint.h gthr-posix.h gthr-single.h gthr.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/hppa: c++config.h
cxxabi_tweaks.h defs.mk gstdint.h gthr-posix.h gthr-single.h gthr.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/i386: defs.mk

CVS commit: src/external/gpl3/gcc

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 02:58:48 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib/libbacktrace/arch/alpha:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/hppa: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/ia64: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/mips64eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/mips64el:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/mipseb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/mipsel:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/sh3eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/sh3el:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/vax: backtrace-supported.h
src/external/gpl3/gcc/lib/libgcc/arch/alpha: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/hppa: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/i386: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/ia64: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/mips64eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/mips64el: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/mipseb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/mipsel: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/powerpc: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/sh3eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/sh3el: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/sparc: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/vax: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/x86_64: defs.mk
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/alpha: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/hppa: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/ia64: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/mips64eb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/mips64el: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/mipseb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/mipsel: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/sh3eb: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/sh3el: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/vax: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgomp/arch/alpha: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/hppa: config.h libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libgomp/arch/ia64: config.h libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libgomp/arch/mips64eb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/mips64el: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/mipseb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/mipsel: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/sh3eb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/sh3el: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/vax: config.h libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libobjc/arch/alpha: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/hppa: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/i386: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/ia64: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/mips64eb: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/mips64el: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/mipseb: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/mipsel: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/powerpc: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/sh3eb: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/sh3el: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/sparc: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/vax: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/x86_64: defs.mk
src/external/gpl3/gcc/lib/libstdc++-v3/arch/alpha: c++config.h
cxxabi_tweaks.h defs.mk gstdint.h gthr-posix.h gthr-single.h gthr.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/hppa: c++config.h
cxxabi_tweaks.h defs.mk gstdint.h gthr-posix.h gthr-single.h gthr.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/i386: defs.mk

CVS commit: src/sys/dev/pci

2019-02-03 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Mon Feb  4 02:49:28 UTC 2019

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

Log Message:
Do not call virtio_start_vq_intr() for ctrlq
unless the iface has a control queue


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/pci/if_vioif.c

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

Modified files:

Index: src/sys/dev/pci/if_vioif.c
diff -u src/sys/dev/pci/if_vioif.c:1.46 src/sys/dev/pci/if_vioif.c:1.47
--- src/sys/dev/pci/if_vioif.c:1.46	Mon Jan 14 15:00:27 2019
+++ src/sys/dev/pci/if_vioif.c	Mon Feb  4 02:49:28 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vioif.c,v 1.46 2019/01/14 15:00:27 yamaguchi Exp $	*/
+/*	$NetBSD: if_vioif.c,v 1.47 2019/02/04 02:49:28 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.46 2019/01/14 15:00:27 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.47 2019/02/04 02:49:28 yamaguchi Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -1029,6 +1029,8 @@ vioif_init(struct ifnet *ifp)
 	}
 
 	virtio_reinit_end(vsc);
+
+	if (sc->sc_has_ctrl)
 		virtio_start_vq_intr(vsc, ctrlq->ctrlq_vq);
 
 	r = vioif_ctrl_mq_vq_pairs_set(sc, sc->sc_req_nvq_pairs);



CVS commit: src/sys/dev/pci

2019-02-03 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Mon Feb  4 02:49:28 UTC 2019

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

Log Message:
Do not call virtio_start_vq_intr() for ctrlq
unless the iface has a control queue


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/pci/if_vioif.c

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



CVS commit: src/tools/gcc

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 01:46:59 UTC 2019

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

Log Message:
common-target source list is MD.  make it so.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.98 src/tools/gcc/mknative-gcc:1.99
--- src/tools/gcc/mknative-gcc:1.98	Mon Feb  4 00:55:26 2019
+++ src/tools/gcc/mknative-gcc	Mon Feb  4 01:46:59 2019
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.98 2019/02/04 00:55:26 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.99 2019/02/04 01:46:59 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -302,6 +302,7 @@ get_gcc () {
 	mkdir -p $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH
 	mkdir -p $_OUTDIR/usr.bin/libcpp/arch/$MACHINE_ARCH
 	mkdir -p $_OUTDIR/usr.bin/include/arch
+	mkdir -p $_OUTDIR/usr.bin/common-target/arch
 	_buildname="BUILD_"
 	_libcppsubdir=""
 	_extravars="TM_H ALL_OPT_FILES"
@@ -357,7 +358,7 @@ get_gcc () {
 			| write_mk $_OUTDIRBASE/usr.bin/common/defs.mk
 	getvars gcc/Makefile \
 		OBJS-libcommon-target \
-			| write_mk $_OUTDIRBASE/usr.bin/common-target/defs.mk
+			| write_mk $_OUTDIRBASE/usr.bin/common-target/arch/$MACHINE_ARCH.mk
 
 	write_c $_OUTDIRBASE/usr.bin/libcpp/arch/$MACHINE_ARCH/config.h <$_TMPDIR/libcpp/config.h
 	hfiles='auto-host configargs config bconfig bversion plugin-version multilib tm'



CVS commit: src/tools/gcc

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 01:46:59 UTC 2019

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

Log Message:
common-target source list is MD.  make it so.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/tools/gcc/mknative-gcc

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



CVS commit: src/usr.sbin/sup/source

2019-02-03 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Feb  4 01:07:34 UTC 2019

Modified Files:
src/usr.sbin/sup/source: scmio.c

Log Message:
Fix handling of pushback operation which isn't using negative lengths
for about 10 years.

Found by gcc7.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/sup/source/scmio.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/sup/source/scmio.c
diff -u src/usr.sbin/sup/source/scmio.c:1.22 src/usr.sbin/sup/source/scmio.c:1.23
--- src/usr.sbin/sup/source/scmio.c:1.22	Fri Mar  8 20:56:44 2013
+++ src/usr.sbin/sup/source/scmio.c	Mon Feb  4 01:07:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: scmio.c,v 1.22 2013/03/08 20:56:44 christos Exp $	*/
+/*	$NetBSD: scmio.c,v 1.23 2019/02/04 01:07:34 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1992 Carnegie Mellon University
@@ -434,11 +434,11 @@ readdata(size_t count, void *vdata, bool
 	char *data = vdata;
 
 	if (push) {
-		if (bufptr + count < buffer)
+		if (bufptr - count < buffer)
 			return (scmerr(-1, "No space in buffer %zu", count));
 		bufptr -= count;
 		bufcnt += count;
-		memcpy(bufptr, data, -count);
+		memcpy(bufptr, data, count);
 		return (SCMOK);
 	}
 	if (count == 0 && data == NULL) {



CVS commit: src/usr.sbin/sup/source

2019-02-03 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Feb  4 01:07:34 UTC 2019

Modified Files:
src/usr.sbin/sup/source: scmio.c

Log Message:
Fix handling of pushback operation which isn't using negative lengths
for about 10 years.

Found by gcc7.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/sup/source/scmio.c

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



CVS commit: src/tools/gcc

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 00:55:26 UTC 2019

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

Log Message:
- don't getlinks here, they're no longer used.
- pullout the libcommon, libcommon-target and libgomp source list so they
  don't have to be hard coded in the reachover makefile


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.97 src/tools/gcc/mknative-gcc:1.98
--- src/tools/gcc/mknative-gcc:1.97	Fri Feb  1 09:27:23 2019
+++ src/tools/gcc/mknative-gcc	Mon Feb  4 00:55:26 2019
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.97 2019/02/01 09:27:23 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.98 2019/02/04 00:55:26 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -82,7 +82,6 @@ get_libgcc () {
 			SHLIB_MAPFILES SHLIB_NM_FLAGS
 		getvars gcc/Makefile \
 			NOEXCEPTION_FLAGS EXTRA_HEADERS
-		getlinks config.status libgcc
 	}	| sanitise_includes \
 		| write_mk $_OUTDIRBASE/lib/lib$_subdir/arch/$MACHINE_ARCH/defs.mk
 
@@ -161,6 +160,11 @@ get_libgomp () {
 	_subdir="$1"
 
 	mkdir -p $_OUTDIR/lib/$_subdir/arch/$MACHINE_ARCH
+
+	getvars $_PLATFORM/libgomp/Makefile \
+		libgomp_la_SOURCES \
+		| write_mk $_OUTDIRBASE/lib/$_subdir/defs.mk
+
 	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/config.h \
 		<$_TMPDIR/$_PLATFORM/libgomp/config.h
 	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/libgomp_f.h \
@@ -198,7 +202,6 @@ get_libobjc () {
 		getvars $_PLATFORM/libobjc/Makefile \
 			ALL_CFLAGS INCLUDES OBJC_SOURCE_FILES C_SOURCE_FILES OBJC_H \
 			| sed "s,$_GNU_DIST,\${GNUHOSTDIST},g"
-		getlinks $_TMPDIR/$_PLATFORM/libgcc/config.status libgcc
 	} | sanitise_includes \
 	  | write_mk $_OUTDIRBASE/lib/$_subdir/defs.mk
 
@@ -275,7 +278,6 @@ get_libstdcxx_v3 () {
 			$_pf_headers | sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/include/profile/##g'
 		getvars $_PLATFORM/libstdc++-v3/include/Makefile \
 			BASIC_FILE_H ALLOCATOR_H CSTDIO_H CLOCALE_H CMESSAGES_H CTIME_H
-		getlinks $_TMPDIR/$_PLATFORM/libgcc/config.status libgcc
 	} | sanitise_includes \
 	  | write_mk $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/defs.mk
 }
@@ -350,6 +352,13 @@ get_gcc () {
 		EXTRA_HEADERS \
 			| write_mk $_OUTDIRBASE/usr.bin/include/arch/$MACHINE_ARCH.mk
 
+	getvars gcc/Makefile \
+		OBJS-libcommon \
+			| write_mk $_OUTDIRBASE/usr.bin/common/defs.mk
+	getvars gcc/Makefile \
+		OBJS-libcommon-target \
+			| write_mk $_OUTDIRBASE/usr.bin/common-target/defs.mk
+
 	write_c $_OUTDIRBASE/usr.bin/libcpp/arch/$MACHINE_ARCH/config.h <$_TMPDIR/libcpp/config.h
 	hfiles='auto-host configargs config bconfig bversion plugin-version multilib tm'
 	for f in $hfiles; do



CVS commit: src/tools/gcc

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 00:55:26 UTC 2019

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

Log Message:
- don't getlinks here, they're no longer used.
- pullout the libcommon, libcommon-target and libgomp source list so they
  don't have to be hard coded in the reachover makefile


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/tools/gcc/mknative-gcc

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



CVS commit: src/share/mk

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 00:34:12 UTC 2019

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

Log Message:
revert previous for now.


To generate a diff of this commit:
cvs rdiff -u -r1.1098 -r1.1099 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.1098 src/share/mk/bsd.own.mk:1.1099
--- src/share/mk/bsd.own.mk:1.1098	Mon Feb  4 00:06:14 2019
+++ src/share/mk/bsd.own.mk	Mon Feb  4 00:34:12 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1098 2019/02/04 00:06:14 mrg Exp $
+#	$NetBSD: bsd.own.mk,v 1.1099 2019/02/04 00:34:12 mrg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -626,9 +626,7 @@ OBJECT_FMTS=
 .if	${MACHINE_ARCH} != "alpha" && ${MACHINE_ARCH} != "ia64"
 OBJECT_FMTS+=	elf32
 .endif
-.if	${MACHINE_ARCH} == "alpha" || \
-	(${MACHINE_ARCH:M*64*} != "" && \
-	 ${MKCOMPAT} != "no" && ${MACHINE_CPU} != "mips64el")
+.if	${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH:M*64*} != ""
 OBJECT_FMTS+=	elf64
 .endif
 



CVS commit: src/share/mk

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 00:34:12 UTC 2019

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

Log Message:
revert previous for now.


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



CVS commit: src/share/mk

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 00:06:14 UTC 2019

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

Log Message:
don't add elf64 to OBJECT_FMTS if !MKCOMPAT and mips64.


To generate a diff of this commit:
cvs rdiff -u -r1.1097 -r1.1098 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.1097 src/share/mk/bsd.own.mk:1.1098
--- src/share/mk/bsd.own.mk:1.1097	Wed Jan 30 22:51:33 2019
+++ src/share/mk/bsd.own.mk	Mon Feb  4 00:06:14 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1097 2019/01/30 22:51:33 scole Exp $
+#	$NetBSD: bsd.own.mk,v 1.1098 2019/02/04 00:06:14 mrg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -626,7 +626,9 @@ OBJECT_FMTS=
 .if	${MACHINE_ARCH} != "alpha" && ${MACHINE_ARCH} != "ia64"
 OBJECT_FMTS+=	elf32
 .endif
-.if	${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH:M*64*} != ""
+.if	${MACHINE_ARCH} == "alpha" || \
+	(${MACHINE_ARCH:M*64*} != "" && \
+	 ${MKCOMPAT} != "no" && ${MACHINE_CPU} != "mips64el")
 OBJECT_FMTS+=	elf64
 .endif
 



CVS commit: src/share/mk

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 00:06:14 UTC 2019

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

Log Message:
don't add elf64 to OBJECT_FMTS if !MKCOMPAT and mips64.


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



CVS commit: src/usr.bin/ldd

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 00:05:21 UTC 2019

Modified Files:
src/usr.bin/ldd/build: Makefile
src/usr.bin/ldd/elf64: Makefile

Log Message:
don't build ldd64 support if !MKCOMPAT and mips64.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/ldd/build/Makefile
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/ldd/elf64/Makefile

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



CVS commit: src/usr.bin/ldd

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 00:05:21 UTC 2019

Modified Files:
src/usr.bin/ldd/build: Makefile
src/usr.bin/ldd/elf64: Makefile

Log Message:
don't build ldd64 support if !MKCOMPAT and mips64.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/ldd/build/Makefile
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/ldd/elf64/Makefile

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/ldd/build/Makefile
diff -u src/usr.bin/ldd/build/Makefile:1.5 src/usr.bin/ldd/build/Makefile:1.6
--- src/usr.bin/ldd/build/Makefile:1.5	Sun Jan 27 05:17:48 2019
+++ src/usr.bin/ldd/build/Makefile	Mon Feb  4 00:05:20 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2019/01/27 05:17:48 kre Exp $
+#	$NetBSD: Makefile,v 1.6 2019/02/04 00:05:20 mrg Exp $
 
 NOSANITIZER=		# defined
 
@@ -17,9 +17,11 @@ EXTRA_LIBS+=	${LIB_ELF32DIR}/libldd_elf3
 CPPFLAGS.ldd.c+= -DELF64_ONLY
 .endif
 
-.if (${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
+.if ${MKCOMPAT} != "no"
+. if (${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
 LIB_ELF32COMPATDIR!=	cd ${.CURDIR}/../elf32_compat && ${PRINTOBJDIR}
 EXTRA_LIBS+=		${LIB_ELF32COMPATDIR}/libldd_elf32_compat.a
+. endif
 .endif
 
 .if ${OBJECT_FMTS:Melf64} != ""

Index: src/usr.bin/ldd/elf64/Makefile
diff -u src/usr.bin/ldd/elf64/Makefile:1.11 src/usr.bin/ldd/elf64/Makefile:1.12
--- src/usr.bin/ldd/elf64/Makefile:1.11	Sun Jan 27 05:14:45 2019
+++ src/usr.bin/ldd/elf64/Makefile	Mon Feb  4 00:05:20 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2019/01/27 05:14:45 kre Exp $
+#	$NetBSD: Makefile,v 1.12 2019/02/04 00:05:20 mrg Exp $
 
 NOSANITIZER=		# defined
 
@@ -40,8 +40,10 @@ RTLD_FUNCS	= \
 CPPFLAGS+=	-D${_d}=_elf64_${_d}
 .endfor
 
-.if (${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
+.if ${MKCOMPAT} != "no"
+. if (${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
 CPPFLAGS+=	-DRTLD_ARCH_SUBDIR=\"${MLIBDIR}\"
+. endif
 .endif
 
 .include "../Makefile.elf"



CVS commit: src/doc

2019-02-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Feb  4 00:03:24 UTC 2019

Modified Files:
src/doc: TODO.compat-module

Log Message:
Note that the current raidframe rf_compat32 implementation is rather
"sub-optimal" and needs some TLC.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/doc/TODO.compat-module

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

Modified files:

Index: src/doc/TODO.compat-module
diff -u src/doc/TODO.compat-module:1.3 src/doc/TODO.compat-module:1.4
--- src/doc/TODO.compat-module:1.3	Thu Jan 31 03:25:29 2019
+++ src/doc/TODO.compat-module	Mon Feb  4 00:03:24 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO.compat-module,v 1.3 2019/01/31 03:25:29 pgoyette Exp $ */
+/* $NetBSD: TODO.compat-module,v 1.4 2019/02/04 00:03:24 pgoyette Exp $ */
 
 DONE
 
@@ -113,3 +113,10 @@ TODO - Not required for branch merge
 network interface device drivers), you'll need to build custom
 modules, too.  The MPSAFE stuff needs to be extracted out and made
 into "hooks".
+
+23. The raidframe-netbsd32 compat code needs to be better separated
+from the main raidframe module.  The current mechanism requires us
+to include compat/netbsd32/netbsd32.h in rf_netbsdkintf.c which
+requires us to explicitly #define COMPAT_NETBSD32 to get various
+structure definitions which conflicts with possible definitions of
+COMPAT_NETBSD32 in opt_compat_netbsd32.h



CVS commit: src/doc

2019-02-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Feb  4 00:03:24 UTC 2019

Modified Files:
src/doc: TODO.compat-module

Log Message:
Note that the current raidframe rf_compat32 implementation is rather
"sub-optimal" and needs some TLC.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/doc/TODO.compat-module

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



CVS commit: xsrc/external/mit/xf86-video-wsfb/dist/src

2019-02-03 Thread Jared D. McNeill
Module Name:xsrc
Committed By:   jmcneill
Date:   Sun Feb  3 17:11:49 UTC 2019

Modified Files:
xsrc/external/mit/xf86-video-wsfb/dist/src: wsfb_driver.c

Log Message:
The modesetting driver and wsfb access the same hardware but through
different interfaces (/dev/dri/card0 vs /dev/ttyE0). To prevent both
drivers from being active at once, skip wsfb probe if the modesetting
driver has claimed the fb slot.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 \
xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.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/xf86-video-wsfb/dist/src/wsfb_driver.c
diff -u xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.32 xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.33
--- xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.32	Mon Dec 31 13:02:41 2018
+++ xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c	Sun Feb  3 17:11:49 2019
@@ -368,6 +368,13 @@ WsfbProbe(DriverPtr drv, int flags)
 	  )) <= 0)
 		return FALSE;
 
+	/* Do not attach if the modesetting driver is active */
+	if (fbSlotClaimed == TRUE) {
+		DriverPtr fbSlotDrv = xf86GetEntityInfo(0)->driver;
+		if (strcmp(fbSlotDrv->driverName, "modesetting") == 0)
+			return FALSE;
+	}
+
 	for (i = 0; i < numDevSections; i++) {
 		ScrnInfoPtr pScrn = NULL;
 



CVS commit: xsrc/external/mit/xf86-video-wsfb/dist/src

2019-02-03 Thread Jared D. McNeill
Module Name:xsrc
Committed By:   jmcneill
Date:   Sun Feb  3 17:11:49 UTC 2019

Modified Files:
xsrc/external/mit/xf86-video-wsfb/dist/src: wsfb_driver.c

Log Message:
The modesetting driver and wsfb access the same hardware but through
different interfaces (/dev/dri/card0 vs /dev/ttyE0). To prevent both
drivers from being active at once, skip wsfb probe if the modesetting
driver has claimed the fb slot.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 \
xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c

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



CVS commit: src/sys/arch/arm/sunxi

2019-02-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Feb  3 15:43:57 UTC 2019

Modified Files:
src/sys/arch/arm/sunxi: sunxi_drm.c sunxi_platform.c

Log Message:
Support "nomodeset" kernel cmdline flag to disable sunxidrm


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/sunxi/sunxi_drm.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/arm/sunxi/sunxi_platform.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/sunxi/sunxi_drm.c
diff -u src/sys/arch/arm/sunxi/sunxi_drm.c:1.4 src/sys/arch/arm/sunxi/sunxi_drm.c:1.5
--- src/sys/arch/arm/sunxi/sunxi_drm.c:1.4	Thu Jan 31 01:49:28 2019
+++ src/sys/arch/arm/sunxi/sunxi_drm.c	Sun Feb  3 15:43:57 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_drm.c,v 1.4 2019/01/31 01:49:28 jmcneill Exp $ */
+/* $NetBSD: sunxi_drm.c,v 1.5 2019/02/03 15:43:57 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_drm.c,v 1.4 2019/01/31 01:49:28 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_drm.c,v 1.5 2019/02/03 15:43:57 jmcneill Exp $");
 
 #include 
 #include 
@@ -121,6 +121,8 @@ sunxi_drm_attach(device_t parent, device
 	struct sunxi_drm_softc * const sc = device_private(self);
 	struct fdt_attach_args * const faa = aux;
 	struct drm_driver * const driver = _drm_driver;
+	prop_dictionary_t dict = device_properties(self);
+	bool is_disabled;
 
 	sc->sc_dev = self;
 	sc->sc_dmat = faa->faa_dmat;
@@ -128,6 +130,12 @@ sunxi_drm_attach(device_t parent, device
 	sc->sc_phandle = faa->faa_phandle;
 
 	aprint_naive("\n");
+
+	if (prop_dictionary_get_bool(dict, "disabled", _disabled) && is_disabled) {
+		aprint_normal(": Display Engine Pipeline (disabled)\n");
+		return;
+	}
+
 	aprint_normal(": Display Engine Pipeline\n");
 
 	sc->sc_ddev = drm_dev_alloc(driver, sc->sc_dev);

Index: src/sys/arch/arm/sunxi/sunxi_platform.c
diff -u src/sys/arch/arm/sunxi/sunxi_platform.c:1.34 src/sys/arch/arm/sunxi/sunxi_platform.c:1.35
--- src/sys/arch/arm/sunxi/sunxi_platform.c:1.34	Thu Jan  3 14:44:21 2019
+++ src/sys/arch/arm/sunxi/sunxi_platform.c	Sun Feb  3 15:43:57 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_platform.c,v 1.34 2019/01/03 14:44:21 jmcneill Exp $ */
+/* $NetBSD: sunxi_platform.c,v 1.35 2019/02/03 15:43:57 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill 
@@ -31,7 +31,7 @@
 #include "opt_console.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.34 2019/01/03 14:44:21 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.35 2019/02/03 15:43:57 jmcneill Exp $");
 
 #include 
 #include 
@@ -201,6 +201,7 @@ static void
 sunxi_platform_device_register(device_t self, void *aux)
 {
 	prop_dictionary_t prop = device_properties(self);
+	int val;
 
 	if (device_is_a(self, "rgephy")) {
 		/* Pine64+ and NanoPi NEO Plus2 gigabit ethernet workaround */
@@ -224,6 +225,12 @@ sunxi_platform_device_register(device_t 
 			prop_dictionary_set_bool(prop, "sun50i-a64-unstable-timer", true);
 		}
 	}
+
+	if (device_is_a(self, "sunxidrm")) {
+		if (get_bootconf_option(boot_args, "nomodeset", BOOTOPT_TYPE_BOOLEAN, ))
+			if (val)
+prop_dictionary_set_bool(prop, "disabled", true);
+	}
 }
 
 static u_int



CVS commit: src/sys/arch/arm/sunxi

2019-02-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Feb  3 15:43:57 UTC 2019

Modified Files:
src/sys/arch/arm/sunxi: sunxi_drm.c sunxi_platform.c

Log Message:
Support "nomodeset" kernel cmdline flag to disable sunxidrm


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/sunxi/sunxi_drm.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/arm/sunxi/sunxi_platform.c

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



CVS commit: src/sys/dev/i2c

2019-02-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Feb  3 13:56:38 UTC 2019

Modified Files:
src/sys/dev/i2c: anxedp.c

Log Message:
Broadcast PMF display on/off events when our connector is handling dpms so we 
can turn off the backlight


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/anxedp.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/i2c/anxedp.c
diff -u src/sys/dev/i2c/anxedp.c:1.1 src/sys/dev/i2c/anxedp.c:1.2
--- src/sys/dev/i2c/anxedp.c:1.1	Sun Feb  3 13:17:12 2019
+++ src/sys/dev/i2c/anxedp.c	Sun Feb  3 13:56:38 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: anxedp.c,v 1.1 2019/02/03 13:17:12 jmcneill Exp $ */
+/* $NetBSD: anxedp.c,v 1.2 2019/02/03 13:56:38 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: anxedp.c,v 1.1 2019/02/03 13:17:12 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: anxedp.c,v 1.2 2019/02/03 13:56:38 jmcneill Exp $");
 
 #include 
 #include 
@@ -111,6 +111,22 @@ anxedp_write(struct anxedp_softc *sc, u_
 	(void)iic_smbus_write_byte(sc->sc_i2c, sc->sc_addr + off, reg, val, I2C_F_POLL);
 }
 
+static int
+anxedp_connector_dpms(struct drm_connector *connector, int mode)
+{
+	int error;
+
+	if (mode != DRM_MODE_DPMS_ON)
+		pmf_event_inject(NULL, PMFE_DISPLAY_OFF);
+
+	error = drm_helper_connector_dpms(connector, mode);
+
+	if (mode == DRM_MODE_DPMS_ON)
+		pmf_event_inject(NULL, PMFE_DISPLAY_ON);
+		
+	return error;
+}
+
 static enum drm_connector_status
 anxedp_connector_detect(struct drm_connector *connector, bool force)
 {
@@ -125,7 +141,7 @@ anxedp_connector_destroy(struct drm_conn
 }
 
 static const struct drm_connector_funcs anxedp_connector_funcs = {
-	.dpms = drm_helper_connector_dpms,
+	.dpms = anxedp_connector_dpms,
 	.detect = anxedp_connector_detect,
 	.fill_modes = drm_helper_probe_single_connector_modes,
 	.destroy = anxedp_connector_destroy,



CVS commit: src/sys/dev/i2c

2019-02-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Feb  3 13:56:38 UTC 2019

Modified Files:
src/sys/dev/i2c: anxedp.c

Log Message:
Broadcast PMF display on/off events when our connector is handling dpms so we 
can turn off the backlight


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/anxedp.c

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



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

2019-02-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Feb  3 13:18:52 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: GENERIC64

Log Message:
Add anxedp


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/evbarm/conf/GENERIC64

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



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

2019-02-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Feb  3 13:18:52 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: GENERIC64

Log Message:
Add anxedp


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/evbarm/conf/GENERIC64

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/evbarm/conf/GENERIC64
diff -u src/sys/arch/evbarm/conf/GENERIC64:1.77 src/sys/arch/evbarm/conf/GENERIC64:1.78
--- src/sys/arch/evbarm/conf/GENERIC64:1.77	Wed Jan 30 11:25:40 2019
+++ src/sys/arch/evbarm/conf/GENERIC64	Sun Feb  3 13:18:52 2019
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC64,v 1.77 2019/01/30 11:25:40 jmcneill Exp $
+#	$NetBSD: GENERIC64,v 1.78 2019/02/03 13:18:52 jmcneill Exp $
 #
 #	GENERIC ARM (aarch64) kernel
 #
@@ -359,6 +359,7 @@ tegracec0	at fdt?			# NVIDIA Tegra HDMI 
 hdmicec*	at hdmicecbus?
 
 # Display
+anxedp*		at iic?			# Analogix eDP TX
 dispcon*	at fdt?			# Display connector devices
 dwhdmi* 	at fdt?			# Designware HDMI TX
 sunxide2bus*	at fdt? pass 4		# Allwinner DE2 bus



CVS commit: src/sys/arch/arm/dts

2019-02-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Feb  3 13:19:20 UTC 2019

Modified Files:
src/sys/arch/arm/dts: sun50i-a64-pinebook.dts

Log Message:
Add eDP transmitter and enable display pipeline


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/dts/sun50i-a64-pinebook.dts

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/dts/sun50i-a64-pinebook.dts
diff -u src/sys/arch/arm/dts/sun50i-a64-pinebook.dts:1.14 src/sys/arch/arm/dts/sun50i-a64-pinebook.dts:1.15
--- src/sys/arch/arm/dts/sun50i-a64-pinebook.dts:1.14	Tue Jan 22 15:28:45 2019
+++ src/sys/arch/arm/dts/sun50i-a64-pinebook.dts	Sun Feb  3 13:19:20 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sun50i-a64-pinebook.dts,v 1.14 2019/01/22 15:28:45 jmcneill Exp $ */
+/* $NetBSD: sun50i-a64-pinebook.dts,v 1.15 2019/02/03 13:19:20 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017-2019 Jared McNeill 
@@ -102,3 +102,64 @@
  {
 	status = "okay";
 };
+
+ {
+	status = "okay";
+};
+
+ {
+	status = "okay";
+};
+
+ {
+	lcd_rgb666_pins: lcd-rgb666 {
+		pins = "PD0", "PD1", "PD2", "PD3", "PD4",
+		   "PD5", "PD6", "PD7", "PD8", "PD9",
+		   "PD10", "PD11", "PD12", "PD13",
+		   "PD14", "PD15", "PD16", "PD17",
+		   "PD18", "PD19", "PD20", "PD21";
+		function = "lcd0";
+	};
+};
+
+ {
+	pinctrl-names = "default";
+	pinctrl-0 = <_rgb666_pins>;
+
+	status = "okay";
+};
+
+_out {
+	tcon0_out_anx6345: endpoint@0 {
+		reg = <0>;
+		remote-endpoint = <_in>;
+	};
+};
+
+_pio {
+	r_i2c_pins_a: i2c-a {
+		pins = "PL8", "PL9";
+		function = "s_i2c";
+	};
+};
+
+_i2c {
+	pinctrl-names = "default";
+	pinctrl-0 = <_i2c_pins_a>;
+	status = "okay";
+
+	anx6345: anx6345@38 {
+		compatible = "analogix,anx6345";
+		reg = <0x38>;
+		reset-gpios = < 3 24 GPIO_ACTIVE_HIGH>;	/* PD24 */
+		panel-supply = <_dc1sw>;
+		dvdd25-supply = <_dldo2>;
+		dvdd12-supply = <_fldo1>;
+
+		port {
+			anx6345_in: endpoint {
+remote-endpoint = <_out_anx6345>;
+			};
+		};
+	};
+};



CVS commit: src/sys/arch/arm/dts

2019-02-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Feb  3 13:19:20 UTC 2019

Modified Files:
src/sys/arch/arm/dts: sun50i-a64-pinebook.dts

Log Message:
Add eDP transmitter and enable display pipeline


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/dts/sun50i-a64-pinebook.dts

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



CVS commit: src/sys/dev/i2c

2019-02-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Feb  3 13:17:12 UTC 2019

Modified Files:
src/sys/dev/i2c: files.i2c
Added Files:
src/sys/dev/i2c: anxedp.c

Log Message:
Add basic support for Analogix eDP transmitters. This driver doesn't
know how to mode set yet -- it only knows how to read EDID from a panel.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/anxedp.c
cvs rdiff -u -r1.97 -r1.98 src/sys/dev/i2c/files.i2c

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/i2c/files.i2c
diff -u src/sys/dev/i2c/files.i2c:1.97 src/sys/dev/i2c/files.i2c:1.98
--- src/sys/dev/i2c/files.i2c:1.97	Fri Dec 14 22:05:36 2018
+++ src/sys/dev/i2c/files.i2c	Sun Feb  3 13:17:12 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: files.i2c,v 1.97 2018/12/14 22:05:36 macallan Exp $
+#	$NetBSD: files.i2c,v 1.98 2019/02/03 13:17:12 jmcneill Exp $
 
 obsolete defflag	opt_i2cbus.h		I2C_SCAN
 define	i2cbus { }
@@ -357,3 +357,8 @@ device	rkreg: rkpmic
 attach	rkpmic at iic
 attach	rkreg at rkpmic
 file	dev/i2c/rkpmic.c			rkpmic
+
+# Analogix ANX6345 eDP transmitter
+device	anxedp: edid, videomode, drmkms, drmkms_i2c
+attach	anxedp at iic
+file	dev/i2c/anxedp.c			anxedp

Added files:

Index: src/sys/dev/i2c/anxedp.c
diff -u /dev/null src/sys/dev/i2c/anxedp.c:1.1
--- /dev/null	Sun Feb  3 13:17:12 2019
+++ src/sys/dev/i2c/anxedp.c	Sun Feb  3 13:17:12 2019
@@ -0,0 +1,432 @@
+/* $NetBSD: anxedp.c,v 1.1 2019/02/03 13:17:12 jmcneill Exp $ */
+
+/*-
+ * Copyright (c) 2019 Jared D. McNeill 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: anxedp.c,v 1.1 2019/02/03 13:17:12 jmcneill Exp $");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#define	ANX_DP_AUX_CH_CTL_1	0xe5
+#define	 ANX_AUX_LENGTH		__BITS(7,4)
+#define	 ANX_AUX_TX_COMM	__BITS(3,0)
+#define	  ANX_AUX_TX_COMM_MOT	4
+#define	  ANX_AUX_TX_COMM_READ	1
+#define	ANX_DP_AUX_ADDR(n)	(0xe6 + (n))
+#define	ANX_DP_AUX_CH_CTL_2	0xe9
+#define	 ANX_ADDR_ONLY		__BIT(1)
+#define	 ANX_AUX_EN		__BIT(0)
+#define	ANX_BUF_DATA(n)		(0xf0 + (n))
+
+#define	ANX_DP_INT_STA		0xf7
+#define	 ANX_RPLY_RECEIV	__BIT(1)
+
+static const struct device_compatible_entry compat_data[] = {
+	{ "analogix,anx6345",		1 },
+	{ NULL }
+};
+
+struct anxedp_softc;
+
+struct anxedp_connector {
+	struct drm_connector	base;
+	struct anxedp_softc	*sc;
+};
+
+struct anxedp_softc {
+	device_t		sc_dev;
+	i2c_tag_t		sc_i2c;
+	i2c_addr_t		sc_addr;
+	int			sc_phandle;
+
+	struct anxedp_connector sc_connector;
+	struct drm_bridge	sc_bridge;
+
+	struct fdt_device_ports	sc_ports;
+	struct drm_display_mode	sc_curmode;
+};
+
+#define	to_anxedp_connector(x)	container_of(x, struct anxedp_connector, base)
+
+static uint8_t
+anxedp_read(struct anxedp_softc *sc, u_int off, uint8_t reg)
+{
+	uint8_t val;
+
+	if (iic_smbus_read_byte(sc->sc_i2c, sc->sc_addr + off, reg, , I2C_F_POLL) != 0)
+		val = 0xff;
+
+	return val;
+}
+
+static void
+anxedp_write(struct anxedp_softc *sc, u_int off, uint8_t reg, uint8_t val)
+{
+	(void)iic_smbus_write_byte(sc->sc_i2c, sc->sc_addr + off, reg, val, I2C_F_POLL);
+}
+
+static enum drm_connector_status
+anxedp_connector_detect(struct drm_connector *connector, bool force)
+{
+	return connector_status_connected;
+}
+
+static void
+anxedp_connector_destroy(struct drm_connector *connector)
+{
+	drm_connector_unregister(connector);
+	drm_connector_cleanup(connector);
+}
+
+static const struct drm_connector_funcs anxedp_connector_funcs = {

CVS commit: src/sys/dev/i2c

2019-02-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Feb  3 13:17:12 UTC 2019

Modified Files:
src/sys/dev/i2c: files.i2c
Added Files:
src/sys/dev/i2c: anxedp.c

Log Message:
Add basic support for Analogix eDP transmitters. This driver doesn't
know how to mode set yet -- it only knows how to read EDID from a panel.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/anxedp.c
cvs rdiff -u -r1.97 -r1.98 src/sys/dev/i2c/files.i2c

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



CVS commit: src/sys/arch/arm/sunxi

2019-02-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Feb  3 13:15:19 UTC 2019

Modified Files:
src/sys/arch/arm/sunxi: sunxi_lcdc.c

Log Message:
Add TCON0 support


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sunxi_lcdc.c

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



CVS commit: src/sys/arch/arm/sunxi

2019-02-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Feb  3 13:15:19 UTC 2019

Modified Files:
src/sys/arch/arm/sunxi: sunxi_lcdc.c

Log Message:
Add TCON0 support


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sunxi_lcdc.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/sunxi/sunxi_lcdc.c
diff -u src/sys/arch/arm/sunxi/sunxi_lcdc.c:1.2 src/sys/arch/arm/sunxi/sunxi_lcdc.c:1.3
--- src/sys/arch/arm/sunxi/sunxi_lcdc.c:1.2	Thu Jan 31 01:49:28 2019
+++ src/sys/arch/arm/sunxi/sunxi_lcdc.c	Sun Feb  3 13:15:19 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_lcdc.c,v 1.2 2019/01/31 01:49:28 jmcneill Exp $ */
+/* $NetBSD: sunxi_lcdc.c,v 1.3 2019/02/03 13:15:19 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_lcdc.c,v 1.2 2019/01/31 01:49:28 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_lcdc.c,v 1.3 2019/02/03 13:15:19 jmcneill Exp $");
 
 #include 
 #include 
@@ -47,11 +47,31 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_lcdc.c
 #define	 TCON_GCTL_TCON_EN			__BIT(31)
 #define	 TCON_GCTL_GAMMA_EN			__BIT(30)
 #define	 TCON_GCTL_IO_MAP_SEL			__BIT(0)
-
 #define	TCON_GINT0_REG		0x004
 #define	TCON_GINT1_REG		0x008
 #define	 TCON_GINT1_TCON1_LINE_INT_NUM		__BITS(11,0)
 
+#define	TCON0_CTL_REG		0x040
+#define	 TCON0_CTL_TCON0_EN			__BIT(31)
+#define	 TCON0_CTL_START_DELAY			__BITS(8,4)
+#define	 TCON0_CTL_TCON0_SRC_SEL		__BITS(2,0)
+#define	TCON0_DCLK_REG		0x044
+#define	 TCON0_DCLK_EN__BITS(31,28)
+#define	 TCON0_DCLK_DIV__BITS(6,0)
+#define	TCON0_BASIC0_REG	0x048
+#define	TCON0_BASIC1_REG	0x04c
+#define	TCON0_BASIC2_REG	0x050
+#define	TCON0_BASIC3_REG	0x054
+#define	TCON0_IO_POL_REG	0x088
+#define	 TCON0_IO_POL_IO_OUTPUT_SEL		__BIT(31)
+#define	 TCON0_IO_POL_DCLK_SEL			__BITS(30,28)
+#define	 TCON0_IO_POL_IO3_INV			__BIT(27)
+#define	 TCON0_IO_POL_IO2_INV			__BIT(26)
+#define	 TCON0_IO_POL_IO1_INV			__BIT(25)
+#define	 TCON0_IO_POL_IO0_INV			__BIT(24)
+#define	 TCON0_IO_POL_DATA_INV			__BITS(23,0)
+#define	TCON0_IO_TRI_REG	0x08c
+
 #define	TCON1_CTL_REG		0x090
 #define	 TCON1_CTL_TCON1_EN			__BIT(31)
 #define	 TCON1_CTL_START_DELAY			__BITS(8,4)
@@ -62,7 +82,6 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_lcdc.c
 #define	TCON1_BASIC3_REG	0x0a0
 #define	TCON1_BASIC4_REG	0x0a4
 #define	TCON1_BASIC5_REG	0x0a8
-
 #define	TCON1_IO_POL_REG	0x0f0
 #define	 TCON1_IO_POL_IO3_INV			__BIT(27)
 #define	 TCON1_IO_POL_IO2_INV			__BIT(26)
@@ -72,15 +91,20 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_lcdc.c
 #define	TCON1_IO_TRI_REG	0x0f4
 
 enum {
-	MIXER_PORT_INPUT = 0,
-	MIXER_PORT_OUTPUT = 1,
+	TCON_PORT_INPUT = 0,
+	TCON_PORT_OUTPUT = 1,
+};
+
+enum tcon_type {
+	TYPE_TCON0,
+	TYPE_TCON1,
 };
 
-static const char * const compatible[] = {
-	"allwinner,sun8i-h3-tcon-tv",
-	"allwinner,sun50i-a64-tcon-lcd",
-	"allwinner,sun50i-a64-tcon-tv",
-	NULL
+static const struct of_compat_data compat_data[] = {
+	{ "allwinner,sun8i-h3-tcon-tv",		TYPE_TCON1 },
+	{ "allwinner,sun50i-a64-tcon-lcd",	TYPE_TCON0 },
+	{ "allwinner,sun50i-a64-tcon-tv",	TYPE_TCON1 },
+	{ NULL }
 };
 
 struct sunxi_lcdc_softc;
@@ -97,6 +121,8 @@ struct sunxi_lcdc_softc {
 	bus_space_handle_t	sc_bsh;
 	int			sc_phandle;
 
+	enum tcon_type		sc_type;
+
 	struct clk		*sc_clk_ch[2];
 
 	struct sunxi_lcdc_encoder sc_encoder;
@@ -122,19 +148,19 @@ static const struct drm_encoder_funcs su
 };
 
 static void
-sunxi_lcdc_tcon1_dpms(struct drm_encoder *encoder, int mode)
+sunxi_lcdc_tcon_dpms(struct drm_encoder *encoder, int mode)
 {
 }
 
 static bool
-sunxi_lcdc_tcon1_mode_fixup(struct drm_encoder *encoder,
+sunxi_lcdc_tcon_mode_fixup(struct drm_encoder *encoder,
 const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode)
 {
 	return true;
 }
 
 static void
-sunxi_lcdc_tcon1_mode_set(struct drm_encoder *encoder,
+sunxi_lcdc_tcon_mode_set(struct drm_encoder *encoder,
 struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode)
 {
 	struct sunxi_lcdc_encoder *lcdc_encoder = to_sunxi_lcdc_encoder(encoder);
@@ -143,6 +169,20 @@ sunxi_lcdc_tcon1_mode_set(struct drm_enc
 }
 
 static void
+sunxi_lcdc_tcon0_prepare(struct drm_encoder *encoder)
+{
+	struct sunxi_lcdc_encoder *lcdc_encoder = to_sunxi_lcdc_encoder(encoder);
+	struct sunxi_lcdc_softc * const sc = lcdc_encoder->sc;
+	uint32_t val;
+
+	val = TCON_READ(sc, TCON_GCTL_REG);
+	val |= TCON_GCTL_TCON_EN;
+	TCON_WRITE(sc, TCON_GCTL_REG, val);
+
+	TCON_WRITE(sc, TCON0_IO_TRI_REG, 0);
+}
+
+static void
 sunxi_lcdc_tcon1_prepare(struct drm_encoder *encoder)
 {
 	struct sunxi_lcdc_encoder *lcdc_encoder = to_sunxi_lcdc_encoder(encoder);
@@ -158,6 +198,61 @@ sunxi_lcdc_tcon1_prepare(struct drm_enco
 }
 
 static void
+sunxi_lcdc_tcon0_commit(struct drm_encoder *encoder)
+{
+	struct sunxi_lcdc_encoder *lcdc_encoder = to_sunxi_lcdc_encoder(encoder);
+	struct sunxi_lcdc_softc * 

Re: CVS commit: src

2019-02-03 Thread Kamil Rytarowski
On 03.02.2019 11:45, matthew green wrote:
> Module Name:  src
> Committed By: mrg
> Date: Sun Feb  3 10:45:58 UTC 2019
> 
> Modified Files:
>   src/games/backgammon/backgammon: main.c
>   src/tests/lib/libc/misc: t_ubsan.c
> 
> Log Message:
> - avoid multipling a boolean value, use &&.
> 
> 

> diff -u src/tests/lib/libc/misc/t_ubsan.c:1.1 
> src/tests/lib/libc/misc/t_ubsan.c:1.2
> --- src/tests/lib/libc/misc/t_ubsan.c:1.1 Fri Aug  3 04:18:40 2018
> +++ src/tests/lib/libc/misc/t_ubsan.c Sun Feb  3 10:45:58 2019
> @@ -1,4 +1,4 @@
> -/*   $NetBSD: t_ubsan.c,v 1.1 2018/08/03 04:18:40 kamil Exp $*/
> +/*   $NetBSD: t_ubsan.c,v 1.2 2019/02/03 10:45:58 mrg Exp $  */
>  
>  /*-
>   * Copyright (c) 2018 The NetBSD Foundation, Inc.
> @@ -29,7 +29,7 @@
>  #include 
>  __COPYRIGHT("@(#) Copyright (c) 2018\
>   The NetBSD Foundation, inc. All rights reserved.");
> -__RCSID("$NetBSD: t_ubsan.c,v 1.1 2018/08/03 04:18:40 kamil Exp $");
> +__RCSID("$NetBSD: t_ubsan.c,v 1.2 2019/02/03 10:45:58 mrg Exp $");
>  
>  #include 
>  #include 
> @@ -376,7 +376,7 @@ test_mul_overflow_signed(void)
>   volatile int a = INT_MAX;
>   volatile int b = atoi("2");
>  
> - raise((a * b) ? SIGSEGV : SIGBUS);
> + raise((a && b) ? SIGSEGV : SIGBUS);
>  }
>  
>  UBSAN_TC_BODY(mul_overflow_signed, tc)
> 

Multiplication was here on purpose to check UB report.



signature.asc
Description: OpenPGP digital signature


CVS commit: src/sys/dev/usb

2019-02-03 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Feb  3 13:11:07 UTC 2019

Modified Files:
src/sys/dev/usb: if_mue.c if_muereg.h if_muevar.h

Log Message:
Make size of transmit/receive queues variable. Restrict queue size again
to 1 for LAN7500 as some chips fail.

Read Chip revision register and report value. Maybe we can identify
chisp better now.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/usb/if_mue.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/usb/if_muereg.h
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/usb/if_muevar.h

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

Modified files:

Index: src/sys/dev/usb/if_mue.c
diff -u src/sys/dev/usb/if_mue.c:1.30 src/sys/dev/usb/if_mue.c:1.31
--- src/sys/dev/usb/if_mue.c:1.30	Thu Jan 31 05:25:48 2019
+++ src/sys/dev/usb/if_mue.c	Sun Feb  3 13:11:07 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_mue.c,v 1.30 2019/01/31 05:25:48 rin Exp $	*/
+/*	$NetBSD: if_mue.c,v 1.31 2019/02/03 13:11:07 mlelstv Exp $	*/
 /*	$OpenBSD: if_mue.c,v 1.3 2018/08/04 16:42:46 jsg Exp $	*/
 
 /*
@@ -20,7 +20,7 @@
 /* Driver for Microchip LAN7500/LAN7800 chipsets. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.30 2019/01/31 05:25:48 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.31 2019/02/03 13:11:07 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -897,6 +897,7 @@ mue_attach(device_t parent, device_t sel
 	struct mii_data	*mii;
 	struct ifnet *ifp;
 	usbd_status err;
+	const char *descr;
 	uint8_t i;
 	int s;
 
@@ -932,12 +933,19 @@ mue_attach(device_t parent, device_t sel
 	sc->mue_product = uaa->uaa_product;
 	sc->mue_flags = MUE_LOOKUP(uaa)->mue_flags;
 
+	sc->mue_id_rev = mue_csr_read(sc, MUE_ID_REV);
+
 	/* Decide on what our bufsize will be. */
-	if (sc->mue_flags & LAN7500)
+	if (sc->mue_flags & LAN7500) {
 		sc->mue_rxbufsz = (sc->mue_udev->ud_speed == USB_SPEED_HIGH) ?
 		MUE_7500_HS_RX_BUFSIZE : MUE_7500_FS_RX_BUFSIZE;
-	else
+		sc->mue_rx_list_cnt = 1;
+		sc->mue_tx_list_cnt = 1;
+	} else {
 		sc->mue_rxbufsz = MUE_7800_RX_BUFSIZE;
+		sc->mue_rx_list_cnt = MUE_RX_LIST_CNT;
+		sc->mue_tx_list_cnt = MUE_TX_LIST_CNT;
+	}
 	sc->mue_txbufsz = MUE_TX_BUFSIZE;
 
 	/* Find endpoints. */
@@ -974,10 +982,10 @@ mue_attach(device_t parent, device_t sel
 	}
 
 	/* A Microchip chip was detected.  Inform the world. */
-	if (sc->mue_flags & LAN7500)
-		aprint_normal_dev(self, "LAN7500\n");
-	else
-		aprint_normal_dev(self, "LAN7800\n");
+	descr = (sc->mue_flags & LAN7500) ? "LAN7500" : "LAN7800";
+	aprint_normal_dev(self, "%s id 0x%x rev 0x%x\n", descr,
+		(unsigned)__SHIFTOUT(sc->mue_id_rev, MUE_ID_REV_ID),
+		(unsigned)__SHIFTOUT(sc->mue_id_rev, MUE_ID_REV_REV));
 
 	if (mue_get_macaddr(sc, dict)) {
 		aprint_error_dev(self, "failed to read MAC address\n");
@@ -1125,7 +1133,7 @@ mue_rx_list_init(struct mue_softc *sc)
 	int err;
 
 	cd = >mue_cdata;
-	for (i = 0; i < __arraycount(cd->mue_rx_chain); i++) {
+	for (i = 0; i < sc->mue_rx_list_cnt; i++) {
 		c = >mue_rx_chain[i];
 		c->mue_sc = sc;
 		c->mue_idx = i;
@@ -1150,7 +1158,7 @@ mue_tx_list_init(struct mue_softc *sc)
 	int err;
 
 	cd = >mue_cdata;
-	for (i = 0; i < __arraycount(cd->mue_tx_chain); i++) {
+	for (i = 0; i < sc->mue_tx_list_cnt; i++) {
 		c = >mue_tx_chain[i];
 		c->mue_sc = sc;
 		c->mue_idx = i;
@@ -1198,7 +1206,7 @@ mue_startup_rx_pipes(struct mue_softc *s
 	size_t i;
 
 	/* Start up the receive pipe. */
-	for (i = 0; i < __arraycount(sc->mue_cdata.mue_rx_chain); i++) {
+	for (i = 0; i < sc->mue_rx_list_cnt; i++) {
 		c = >mue_cdata.mue_rx_chain[i];
 		usbd_setup_xfer(c->mue_xfer, c, c->mue_buf, sc->mue_rxbufsz,
 		USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT, mue_rxeof);
@@ -1461,11 +1469,6 @@ mue_rxeof(struct usbd_xfer *xfer, void *
 		return;
 	}
 
-	if (__predict_false(!(ifp->if_flags & IFF_RUNNING))) {
-		DPRINTF(sc, "not running\n");
-		return;
-	}
-
 	if (__predict_false(status != USBD_NORMAL_COMPLETION)) {
 		DPRINTF(sc, "%s\n", usbd_errstr(status));
 		if (status == USBD_NOT_STARTED || status == USBD_CANCELLED)
@@ -1790,7 +1793,7 @@ mue_start(struct ifnet *ifp)
 	}
 
 	idx = cd->mue_tx_prod;
-	while (cd->mue_tx_cnt < MUE_TX_LIST_CNT) {
+	while ((unsigned)cd->mue_tx_cnt < sc->mue_tx_list_cnt) {
 		IFQ_POLL(>if_snd, m);
 		if (m == NULL)
 			break;
@@ -1804,13 +1807,13 @@ mue_start(struct ifnet *ifp)
 		bpf_mtap(ifp, m, BPF_D_OUT);
 		m_freem(m);
 
-		idx = (idx + 1) % MUE_TX_LIST_CNT;
+		idx = (idx + 1) % sc->mue_tx_list_cnt;
 		cd->mue_tx_cnt++;
 
 	}
 	cd->mue_tx_prod = idx;
 
-	if (cd->mue_tx_cnt >= MUE_TX_LIST_CNT)
+	if ((unsigned)cd->mue_tx_cnt >= sc->mue_tx_list_cnt)
 		ifp->if_flags |= IFF_OACTIVE;
 
 	/* Set a timeout in case the chip goes out to lunch. */
@@ -1841,7 +1844,7 @@ mue_stop(struct ifnet *ifp, int disable 
 		}
 
 	/* Free RX resources. */
-	for (i = 0; i < __arraycount(sc->mue_cdata.mue_rx_chain); i++)
+	for (i = 0; i < sc->mue_rx_list_cnt; i++)
 		if 

CVS commit: src/sys/dev/usb

2019-02-03 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Feb  3 13:11:07 UTC 2019

Modified Files:
src/sys/dev/usb: if_mue.c if_muereg.h if_muevar.h

Log Message:
Make size of transmit/receive queues variable. Restrict queue size again
to 1 for LAN7500 as some chips fail.

Read Chip revision register and report value. Maybe we can identify
chisp better now.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/usb/if_mue.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/usb/if_muereg.h
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/usb/if_muevar.h

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



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

2019-02-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Feb  3 13:01:57 UTC 2019

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

Log Message:
Add debug info for new ksem test


To generate a diff of this commit:
cvs rdiff -u -r1.275 -r1.276 src/distrib/sets/lists/debug/mi

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



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

2019-02-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Feb  3 13:01:57 UTC 2019

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

Log Message:
Add debug info for new ksem test


To generate a diff of this commit:
cvs rdiff -u -r1.275 -r1.276 src/distrib/sets/lists/debug/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/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.275 src/distrib/sets/lists/debug/mi:1.276
--- src/distrib/sets/lists/debug/mi:1.275	Sat Feb  2 22:39:33 2019
+++ src/distrib/sets/lists/debug/mi	Sun Feb  3 13:01:57 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.275 2019/02/02 22:39:33 mrg Exp $
+# $NetBSD: mi,v 1.276 2019/02/03 13:01:57 martin Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib,compatfile
@@ -1707,6 +1707,7 @@
 ./usr/libdata/debug/usr/tests/kernel/h_ps_strings1.debug		tests-kernel-tests	debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/kernel/h_ps_strings2.debug		tests-kernel-tests	debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/kernel/h_segv.debug			tests-kernel-tests	debug,atf,compattestfile
+./usr/libdata/debug/usr/tests/kernel/t_ksem.debug			tests-kernel-tests	debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/kernel/kqueue/read/t_fifo.debug		tests-kernel-tests	debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/kernel/kqueue/read/t_file.debug		tests-kernel-tests	debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/kernel/kqueue/read/t_file2.debug		tests-kernel-tests	debug,atf,compattestfile



CVS commit: src/sys/dev/fdt

2019-02-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Feb  3 12:53:11 UTC 2019

Modified Files:
src/sys/dev/fdt: fdt_port.h

Log Message:
Add EP_DRM_PANEL endpoint type


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/fdt/fdt_port.h

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

Modified files:

Index: src/sys/dev/fdt/fdt_port.h
diff -u src/sys/dev/fdt/fdt_port.h:1.2 src/sys/dev/fdt/fdt_port.h:1.3
--- src/sys/dev/fdt/fdt_port.h:1.2	Wed Jan 30 01:24:00 2019
+++ src/sys/dev/fdt/fdt_port.h	Sun Feb  3 12:53:11 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdt_port.h,v 1.2 2019/01/30 01:24:00 jmcneill Exp $	*/
+/*	$NetBSD: fdt_port.h,v 1.3 2019/02/03 12:53:11 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -70,6 +70,7 @@ enum endpoint_type {
 	EP_DRM_CONNECTOR,	/* struct drm_connector */
 	EP_DRM_CRTC,		/* struct drm_crtc */
 	EP_DRM_ENCODER,		/* struct drm_encoder */
+	EP_DRM_PANEL,		/* struct drm_panel */
 };
 
 



CVS commit: src/sys/dev/fdt

2019-02-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Feb  3 12:53:11 UTC 2019

Modified Files:
src/sys/dev/fdt: fdt_port.h

Log Message:
Add EP_DRM_PANEL endpoint type


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/fdt/fdt_port.h

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



CVS commit: src/sys/dev/pci

2019-02-03 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sun Feb  3 12:39:38 UTC 2019

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

Log Message:
machfb: guard against absent mode information from firmware


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/dev/pci/machfb.c

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

Modified files:

Index: src/sys/dev/pci/machfb.c
diff -u src/sys/dev/pci/machfb.c:1.95 src/sys/dev/pci/machfb.c:1.96
--- src/sys/dev/pci/machfb.c:1.95	Mon Sep  3 16:29:32 2018
+++ src/sys/dev/pci/machfb.c	Sun Feb  3 12:39:38 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: machfb.c,v 1.95 2018/09/03 16:29:32 riastradh Exp $	*/
+/*	$NetBSD: machfb.c,v 1.96 2019/02/03 12:39:38 tnn Exp $	*/
 
 /*
  * Copyright (c) 2002 Bang Jun-Young
@@ -34,7 +34,7 @@
 
 #include 
 __KERNEL_RCSID(0,
-	"$NetBSD: machfb.c,v 1.95 2018/09/03 16:29:32 riastradh Exp $");
+	"$NetBSD: machfb.c,v 1.96 2019/02/03 12:39:38 tnn Exp $");
 
 #include 
 #include 
@@ -645,7 +645,7 @@ mach64_attach(device_t parent, device_t 
 			}
 		}
 		/* got nothing? try to pick one based on firmware parameters */
-		if (setmode == 0) {
+		if (setmode == 0 && width > 0 && height > 0) {
 			/* no EDID data? */
 			mode = pick_mode_by_ref(width, height, 60);
 			memcpy(_mode, mode, sizeof(struct videomode));



CVS commit: src/sys/dev/pci

2019-02-03 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sun Feb  3 12:39:38 UTC 2019

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

Log Message:
machfb: guard against absent mode information from firmware


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/dev/pci/machfb.c

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



CVS commit: src/sys/dev/i2c

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb  3 12:18:21 UTC 2019

Modified Files:
src/sys/dev/i2c: si70xx.c

Log Message:
add missing break.

fairly sure this is correct, otherwise modelstr would be overwritten
with the next entry in this list..


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/i2c/si70xx.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/i2c/si70xx.c
diff -u src/sys/dev/i2c/si70xx.c:1.4 src/sys/dev/i2c/si70xx.c:1.5
--- src/sys/dev/i2c/si70xx.c:1.4	Sat Jun 16 21:22:13 2018
+++ src/sys/dev/i2c/si70xx.c	Sun Feb  3 12:18:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: si70xx.c,v 1.4 2018/06/16 21:22:13 thorpej Exp $	*/
+/*	$NetBSD: si70xx.c,v 1.5 2019/02/03 12:18:21 mrg Exp $	*/
 
 /*
  * Copyright (c) 2017 Brad Spencer 
@@ -17,7 +17,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: si70xx.c,v 1.4 2018/06/16 21:22:13 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: si70xx.c,v 1.5 2019/02/03 12:18:21 mrg Exp $");
 
 /*
   Driver for the Silicon Labs SI7013/SI7020/SI7021
@@ -746,6 +746,7 @@ si70xx_attach(device_t parent, device_t 
 	case 0:
 	case 0xff:
 		snprintf(modelstr, sizeof(modelstr), "Engineering Sample");
+		break;
 	case 13:
 	case 20:
 	case 21:



CVS commit: src/sys/dev/i2c

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb  3 12:18:21 UTC 2019

Modified Files:
src/sys/dev/i2c: si70xx.c

Log Message:
add missing break.

fairly sure this is correct, otherwise modelstr would be overwritten
with the next entry in this list..


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/i2c/si70xx.c

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



CVS commit: src/sbin/dump

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb  3 12:17:14 UTC 2019

Modified Files:
src/sbin/dump: dump.h snapshot.c traverse.c

Log Message:
- mark Exit() __dead
- bump a buffer size to avoid possible truncation
- adding missing fallthru comment


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sbin/dump/dump.h
cvs rdiff -u -r1.6 -r1.7 src/sbin/dump/snapshot.c
cvs rdiff -u -r1.50 -r1.51 src/sbin/dump/traverse.c

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



CVS commit: src/sbin/dump

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb  3 12:17:14 UTC 2019

Modified Files:
src/sbin/dump: dump.h snapshot.c traverse.c

Log Message:
- mark Exit() __dead
- bump a buffer size to avoid possible truncation
- adding missing fallthru comment


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sbin/dump/dump.h
cvs rdiff -u -r1.6 -r1.7 src/sbin/dump/snapshot.c
cvs rdiff -u -r1.50 -r1.51 src/sbin/dump/traverse.c

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

Modified files:

Index: src/sbin/dump/dump.h
diff -u src/sbin/dump/dump.h:1.54 src/sbin/dump/dump.h:1.55
--- src/sbin/dump/dump.h:1.54	Mon Nov 16 17:06:47 2015
+++ src/sbin/dump/dump.h	Sun Feb  3 12:17:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: dump.h,v 1.54 2015/11/16 17:06:47 christos Exp $	*/
+/*	$NetBSD: dump.h,v 1.55 2019/02/03 12:17:14 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1993
@@ -224,7 +224,7 @@ void	startnewtape(int);
 void	trewind(int);
 void	writerec(const char *, int);
 
-void	Exit(int);
+void	Exit(int) __dead;
 void	dumpabort(int);
 void	getfstab(void);
 

Index: src/sbin/dump/snapshot.c
diff -u src/sbin/dump/snapshot.c:1.6 src/sbin/dump/snapshot.c:1.7
--- src/sbin/dump/snapshot.c:1.6	Thu Feb 24 09:38:57 2011
+++ src/sbin/dump/snapshot.c	Sun Feb  3 12:17:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: snapshot.c,v 1.6 2011/02/24 09:38:57 hannken Exp $	*/
+/*	$NetBSD: snapshot.c,v 1.7 2019/02/03 12:17:14 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@ int
 snap_open(char *file, char *backup, time_t *snap_date, char **snap_dev)
 {
 	int i, n, fd, israw, fsinternal, dounlink;
-	char path[MAXPATHLEN], fss_dev[14], *cp;
+	char path[MAXPATHLEN], fss_dev[20], *cp;
 	dev_t mountdev;
 	struct fss_set fss;
 	struct fss_get fsg;

Index: src/sbin/dump/traverse.c
diff -u src/sbin/dump/traverse.c:1.50 src/sbin/dump/traverse.c:1.51
--- src/sbin/dump/traverse.c:1.50	Sat Jun 15 01:27:19 2013
+++ src/sbin/dump/traverse.c	Sun Feb  3 12:17:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: traverse.c,v 1.50 2013/06/15 01:27:19 christos Exp $	*/
+/*	$NetBSD: traverse.c,v 1.51 2019/02/03 12:17:14 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1988, 1991, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)traverse.c	8.7 (Berkeley) 6/15/95";
 #else
-__RCSID("$NetBSD: traverse.c,v 1.50 2013/06/15 01:27:19 christos Exp $");
+__RCSID("$NetBSD: traverse.c,v 1.51 2019/02/03 12:17:14 mrg Exp $");
 #endif
 #endif /* not lint */
 
@@ -199,6 +199,7 @@ mapfiles(ino_t maxino, u_int64_t *tape_s
 			case FTS_NS:
 msg("Can't fts_read %s: %s\n", entry->fts_path,
 strerror(errno));
+/* FALLTHROUGH */
 			case FTS_DP:		/* already seen dir */
 continue;
 			}



CVS commit: src/external/gpl3/gcc

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb  3 12:14:45 UTC 2019

Modified Files:
src/external/gpl3/gcc: README.gcc7

Log Message:
update status: i386 builds (not properly tested), arm64 fails to build,
sparc64 has ICE in compiler startup (hopefully easy fix)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/README.gcc7

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/README.gcc7
diff -u src/external/gpl3/gcc/README.gcc7:1.1 src/external/gpl3/gcc/README.gcc7:1.2
--- src/external/gpl3/gcc/README.gcc7:1.1	Sat Feb  2 12:09:55 2019
+++ src/external/gpl3/gcc/README.gcc7	Sun Feb  3 12:14:45 2019
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc7,v 1.1 2019/02/02 12:09:55 mrg Exp $
+$NetBSD: README.gcc7,v 1.2 2019/02/03 12:14:45 mrg Exp $
 
 new stuff (from gcc 5):
 	cc1objcplus
@@ -21,7 +21,7 @@ atf:		does atf run / compare well
 
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf
 	-	---	--	--			---
-aarch64		?	?	?	?		?		?	?
+aarch64		y	?	y	y		n[2]		?	?
 alpha		?	?	?	?		?		?	?
 arm		?	?	?	?		?		?	?
 armeb		?	?	?	?		?		?	?
@@ -40,7 +40,7 @@ earmv7eb	?	?	?	?		?		?	?
 earmv7hf	?	?	?	?		?		?	?
 earmv7hfeb	?	?	?	?		?		?	?
 hppa		?	?	?	?		?		?	?
-i386		y	?	?	?		?		?	?
+i386		y	builds	y	y		y		?	?
 ia64		?	?	?	?		?		?	?
 m68000		?	?	?	?		?		?	?
 m68k		?	?	?	?		?		?	?
@@ -52,8 +52,8 @@ powerpc		?	?	?	?		?		?	?
 powerpc64	?	?	?	?		?		?	?
 sh3eb		?	?	?	?		?		?	?
 sh3el		?	?	?	?		?		?	?
-sparc		y	?	?	?		?		?	?
-sparc64		y	?	?	?		?		?	?
+sparc		y	y	y	y		y		y	?
+sparc64		y	?	?	n[1]		?		?	?
 vax		?	?	?	?		?		?	?
 x86_64		y	y	y	y		y		y	y
 --
@@ -64,3 +64,5 @@ coldfire	?	N/A	?	?		?		N/A	N/A
 	-	---	--	--			---
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf
 
+[1] - sparc64-gcc gets ICE at startup
+[2] - __curbrk won't link libc.so



CVS commit: src/external/gpl3/gcc

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb  3 12:14:45 UTC 2019

Modified Files:
src/external/gpl3/gcc: README.gcc7

Log Message:
update status: i386 builds (not properly tested), arm64 fails to build,
sparc64 has ICE in compiler startup (hopefully easy fix)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/README.gcc7

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



CVS commit: src/usr.sbin/sup/source

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb  3 12:13:37 UTC 2019

Modified Files:
src/usr.sbin/sup/source: supextern.h

Log Message:
- mark logerr(), quit() and done() as __dead.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/sup/source/supextern.h

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



CVS commit: src/usr.sbin/sup/source

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb  3 12:13:37 UTC 2019

Modified Files:
src/usr.sbin/sup/source: supextern.h

Log Message:
- mark logerr(), quit() and done() as __dead.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/sup/source/supextern.h

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/sup/source/supextern.h
diff -u src/usr.sbin/sup/source/supextern.h:1.24 src/usr.sbin/sup/source/supextern.h:1.25
--- src/usr.sbin/sup/source/supextern.h:1.24	Fri Mar  8 20:56:44 2013
+++ src/usr.sbin/sup/source/supextern.h	Sun Feb  3 12:13:37 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: supextern.h,v 1.24 2013/03/08 20:56:44 christos Exp $	*/
+/*	$NetBSD: supextern.h,v 1.25 2019/02/03 12:13:37 mrg Exp $	*/
 
 struct stat;
 
@@ -19,7 +19,7 @@ void logopen(char *);
 void logquit(int, const char *, ...)
 	__attribute__((__format__(__printf__, 2, 3)));
 void logerr(const char *, ...)
-	__attribute__((__format__(__printf__, 1, 2))) ;
+	__attribute__((__format__(__printf__, 1, 2)));
 void loginfo(const char *, ...)
 	__attribute__((__format__(__printf__, 1, 2)));
 #ifdef LIBWRAP
@@ -43,7 +43,7 @@ void path(const char *, char *, char *);
 
 /* quit.c */
 void quit(int, const char *, ...)
-	__attribute__((__format__(__printf__, 2, 3)));
+	__attribute__((__format__(__printf__, 2, 3))) __dead;
 
 /* read_line.c */
 char *read_line(FILE *, size_t *, size_t *, const char[3], int);
@@ -133,7 +133,7 @@ int recvreg(TREE *, int, struct stat *);
 int copyfile(char *, char *);
 void finishup(int);
 void done(int, const char *, ...)
-	__attribute__((__format__(__printf__, 2, 3)));
+	__attribute__((__format__(__printf__, 2, 3))) __dead;
 void goaway(const char *, ...)
 	__attribute__((__format__(__printf__, 1, 2)));
 



CVS commit: src/external/gpl3/gcc/lib/libgomp

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb  3 12:11:11 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib/libgomp: Makefile

Log Message:
- fix the sources list.
- since a few functions disappear, call this libgomp.so.2 now.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/gpl3/gcc/lib/libgomp/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/gcc/lib/libgomp/Makefile
diff -u src/external/gpl3/gcc/lib/libgomp/Makefile:1.21 src/external/gpl3/gcc/lib/libgomp/Makefile:1.22
--- src/external/gpl3/gcc/lib/libgomp/Makefile:1.21	Tue Jan 22 23:55:54 2019
+++ src/external/gpl3/gcc/lib/libgomp/Makefile	Sun Feb  3 12:11:11 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.21 2019/01/22 23:55:54 mrg Exp $
+#	$NetBSD: Makefile,v 1.22 2019/02/03 12:11:11 mrg Exp $
 
 # build GCC's libgomp, so that -fopenmp works.
 
@@ -12,43 +12,14 @@ NOLINT=	# defined
 DIST=	${GCCDIST}
 
 LIB=	gomp
+# XXX mknative-gcc should pull out libgomp_la_SOURCES
 SRCS= \
-	alloc.c \
-	barrier.c \
-	critical.c \
-	env.c \
-	error.c \
-	iter.c \
-	iter_ull.c \
-	loop.c \
-	loop_ull.c \
-	ordered.c \
-	parallel.c \
-	sections.c \
-	single.c \
-	task.c \
-	team.c \
-	work.c \
-	lock.c \
-	mutex.c \
-	proc.c \
-	sem.c \
-	bar.c \
-	ptrlock.c \
-	time.c \
-	fortran.c \
-	affinity.c \
-	target.c \
-	splay-tree.c \
-	libgomp-plugin.c \
-	oacc-parallel.c \
-	oacc-host.c \
-	oacc-init.c \
-	oacc-mem.c \
-	oacc-async.c \
-	oacc-plugin.c \
-	oacc-cuda.c \
-	priority_queue.c
+	alloc.c atomic.c barrier.c critical.c env.c error.c \
+	icv.c icv-device.c iter.c iter_ull.c loop.c loop_ull.c ordered.c \
+	parallel.c sections.c single.c task.c team.c work.c lock.c mutex.c \
+	proc.c sem.c bar.c ptrlock.c time.c fortran.c affinity.c target.c \
+	splay-tree.c libgomp-plugin.c oacc-parallel.c oacc-host.c oacc-init.c \
+	oacc-mem.c oacc-async.c oacc-plugin.c oacc-cuda.c priority_queue.c
 
 
 GOMP_MACHINE_ARCH?=	${MACHINE_ARCH:S/earmv5/earm/}
@@ -65,11 +36,8 @@ CFLAGS+=-pthread
 
 CWARNFLAGS.clang+=	-Wno-conversion
 
-# libgomp is 1.0 is in GCC 4.5, and 1.1 in 4.8 since it added more symbols
-# XXXGCC5 -- marking 1.2 for GCC 5.3 for now
-# XXXGCC6 -- marking 1.3 for GCC 6 for now
-SHLIB_MAJOR=	1
-SHLIB_MINOR=	3
+SHLIB_MAJOR=	2
+SHLIB_MINOR=	0
 
 LDFLAGS+=	-Wl,--version-script,${DIST}/libgomp/libgomp.map
 
@@ -91,7 +59,8 @@ libinstall::
 COPTS+=	-Wno-stack-protector -Wno-missing-prototypes
 COPTS.oacc-mem.c+= -Wno-pointer-arith
 
-COPTS.lock.c+=	-Wno-error=incompatible-pointer-types
+COPTS.lock.c+=		-Wno-error=incompatible-pointer-types
+COPTS.target.c+=	-Wno-error=pointer-arith
 
 
 .PATH:	${ARCHDIR} ${DIST}/libgomp ${DIST}/libgomp/config/posix



CVS commit: src/external/gpl3/gcc/lib/libgomp

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb  3 12:11:11 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib/libgomp: Makefile

Log Message:
- fix the sources list.
- since a few functions disappear, call this libgomp.so.2 now.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/gpl3/gcc/lib/libgomp/Makefile

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



CVS commit: src/usr.sbin/autofs

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb  3 12:03:22 UTC 2019

Modified Files:
src/usr.sbin/autofs: common.h

Log Message:
- mark log_err() and log_errx() as __dead.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/autofs/common.h

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/autofs/common.h
diff -u src/usr.sbin/autofs/common.h:1.1 src/usr.sbin/autofs/common.h:1.2
--- src/usr.sbin/autofs/common.h:1.1	Tue Jan  9 03:31:15 2018
+++ src/usr.sbin/autofs/common.h	Sun Feb  3 12:03:22 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: common.h,v 1.1 2018/01/09 03:31:15 christos Exp $	*/
+/*	$NetBSD: common.h,v 1.2 2019/02/03 12:03:22 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -70,8 +70,8 @@ struct defined_value {
 void	log_init(int);
 void	log_set_peer_name(const char *);
 void	log_set_peer_addr(const char *);
-void	log_err(int, const char *, ...) __printflike(2, 3);
-void	log_errx(int, const char *, ...) __printflike(2, 3);
+void	log_err(int, const char *, ...) __printflike(2, 3) __dead;
+void	log_errx(int, const char *, ...) __printflike(2, 3) __dead;
 void	log_warn(const char *, ...) __printflike(1, 2);
 void	log_warnx(const char *, ...) __printflike(1, 2);
 void	log_debugx(const char *, ...) __printflike(1, 2);



CVS commit: src/usr.sbin/autofs

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb  3 12:03:22 UTC 2019

Modified Files:
src/usr.sbin/autofs: common.h

Log Message:
- mark log_err() and log_errx() as __dead.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/autofs/common.h

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



  1   2   >