CVS commit: src/usr.sbin/pstat

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 05:11:10 UTC 2021

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

Log Message:
fix a buffer size (off by one), and fix all the comments for the
3 other correctly sized buffers with the same comment/context.


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/usr.sbin/pstat/pstat.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/pstat/pstat.c
diff -u src/usr.sbin/pstat/pstat.c:1.131 src/usr.sbin/pstat/pstat.c:1.132
--- src/usr.sbin/pstat/pstat.c:1.131	Sat Oct  3 14:01:16 2020
+++ src/usr.sbin/pstat/pstat.c	Mon Apr 12 05:11:09 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pstat.c,v 1.131 2020/10/03 14:01:16 christos Exp $	*/
+/*	$NetBSD: pstat.c,v 1.132 2021/04/12 05:11:09 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)pstat.c	8.16 (Berkeley) 5/9/95";
 #else
-__RCSID("$NetBSD: pstat.c,v 1.131 2020/10/03 14:01:16 christos Exp $");
+__RCSID("$NetBSD: pstat.c,v 1.132 2021/04/12 05:11:09 mrg Exp $");
 #endif
 #endif /* not lint */
 
@@ -481,7 +481,7 @@ ufs_print(struct vnode *vp, int ovflw)
 	} dip;
 	struct ufsmount ump;
 	char flags[sizeof(ufs_flags) / sizeof(ufs_flags[0])];
-	char dev[4 + 1 + 7 + 1]; /* 12bit marjor + 20bit minor */
+	char dev[4 + 1 + 7 + 1]; /* 12bit major + 20bit minor */
 	char *name;
 	mode_t type;
 	dev_t rdev;
@@ -526,7 +526,7 @@ ext2fs_print(struct vnode *vp, int ovflw
 	struct inode inode, *ip = 
 	struct ext2fs_dinode dip;
 	char flags[sizeof(ufs_flags) / sizeof(ufs_flags[0])];
-	char dev[4 + 1 + 7 + 1]; /* 12bit marjor + 20bit minor */
+	char dev[4 + 1 + 7 + 1]; /* 12bit major + 20bit minor */
 	char *name;
 	mode_t type;
 
@@ -577,7 +577,7 @@ nfs_print(struct vnode *vp, int ovflw)
 {
 	struct nfsnode nfsnode, *np = 
 	char flags[sizeof(nfs_flags) / sizeof(nfs_flags[0])];
-	char dev[4 + 1 + 7 + 1]; /* 12bit marjor + 20bit minor */
+	char dev[4 + 1 + 7 + 1]; /* 12bit major + 20bit minor */
 	struct vattr va;
 	char *name;
 	mode_t type;
@@ -835,7 +835,7 @@ void
 ttyprt(struct tty *tp)
 {
 	char state[sizeof(ttystates) / sizeof(ttystates[0]) + 1];
-	char dev[2 + 3 + 1 + 5 + 1]; /* 12bit major + 20bit minor */
+	char dev[4 + 1 + 7 + 1]; /* 12bit major + 20bit minor */
 	struct linesw t_linesw;
 	const char *name;
 	char buffer;



CVS commit: src/usr.sbin/pstat

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 05:11:10 UTC 2021

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

Log Message:
fix a buffer size (off by one), and fix all the comments for the
3 other correctly sized buffers with the same comment/context.


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/usr.sbin/pstat/pstat.c

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



CVS commit: src/sys/modules/solaris

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 04:41:54 UTC 2021

Modified Files:
src/sys/modules/solaris: Makefile.solmod

Log Message:
include bsd.own.mk to make sure $S is set.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/modules/solaris/Makefile.solmod

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



CVS commit: src/sys/modules/solaris

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 04:41:54 UTC 2021

Modified Files:
src/sys/modules/solaris: Makefile.solmod

Log Message:
include bsd.own.mk to make sure $S is set.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/modules/solaris/Makefile.solmod

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

Modified files:

Index: src/sys/modules/solaris/Makefile.solmod
diff -u src/sys/modules/solaris/Makefile.solmod:1.7 src/sys/modules/solaris/Makefile.solmod:1.8
--- src/sys/modules/solaris/Makefile.solmod:1.7	Wed Jun  5 16:28:07 2019
+++ src/sys/modules/solaris/Makefile.solmod	Mon Apr 12 04:41:54 2021
@@ -1,4 +1,6 @@
-#	$NetBSD: Makefile.solmod,v 1.7 2019/06/05 16:28:07 hannken Exp $
+#	$NetBSD: Makefile.solmod,v 1.8 2021/04/12 04:41:54 mrg Exp $
+
+.include 
 
 ZFSDIR=	${S}/../external/cddl/osnet
 



CVS commit: src/games/factor

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 04:19:32 UTC 2021

Modified Files:
src/games/factor: Makefile

Log Message:
include bsd.own.mk to be sure NETBSDSRCDIR is set.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/games/factor/Makefile

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

Modified files:

Index: src/games/factor/Makefile
diff -u src/games/factor/Makefile:1.13 src/games/factor/Makefile:1.14
--- src/games/factor/Makefile:1.13	Sun May 21 15:28:41 2017
+++ src/games/factor/Makefile	Mon Apr 12 04:19:32 2021
@@ -1,6 +1,8 @@
-#	$NetBSD: Makefile,v 1.13 2017/05/21 15:28:41 riastradh Exp $
+#	$NetBSD: Makefile,v 1.14 2021/04/12 04:19:32 mrg Exp $
 #	@(#)Makefile	8.1 (Berkeley) 5/31/93
 
+.include 
+
 PRIMES=	${NETBSDSRCDIR}/games/primes
 
 PROG=	factor



CVS commit: src/games/factor

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 04:19:32 UTC 2021

Modified Files:
src/games/factor: Makefile

Log Message:
include bsd.own.mk to be sure NETBSDSRCDIR is set.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/games/factor/Makefile

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



CVS commit: src/share/mk

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 04:18:38 UTC 2021

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

Log Message:
add GCC_NO_IMPLICIT_FALLTHRU, GCC_NO_MAYBE_UNINITIALIZED, and
GCC_NO_RETURN_LOCAL_ADDR.


To generate a diff of this commit:
cvs rdiff -u -r1.1238 -r1.1239 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.1238 src/share/mk/bsd.own.mk:1.1239
--- src/share/mk/bsd.own.mk:1.1238	Sat Apr 10 00:35:24 2021
+++ src/share/mk/bsd.own.mk	Mon Apr 12 04:18:38 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1238 2021/04/10 00:35:24 mrg Exp $
+#	$NetBSD: bsd.own.mk,v 1.1239 2021/04/12 04:18:38 mrg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -859,9 +859,12 @@ NOPROFILE=	# defined
 GCC_NO_FORMAT_TRUNCATION=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-truncation :}
 GCC_NO_FORMAT_OVERFLOW=		${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-overflow :}
 GCC_NO_STRINGOP_OVERFLOW=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-stringop-overflow :}
+GCC_NO_IMPLICIT_FALLTHRU=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-implicit-fallthrough :} 
 GCC_NO_STRINGOP_TRUNCATION=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-truncation :}
 GCC_NO_CAST_FUNCTION_TYPE=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-cast-function-type :}
-GCC_NO_ADDR_OF_PACKED_MEMBER=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-error=address-of-packed-member :}
+GCC_NO_ADDR_OF_PACKED_MEMBER=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-address-of-packed-member :}
+GCC_NO_MAYBE_UNINITIALIZED=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-maybe-uninitialized :}
+GCC_NO_RETURN_LOCAL_ADDR=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-return-local-addr :}
 
 #
 # Clang warnings



CVS commit: src/share/mk

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 04:18:38 UTC 2021

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

Log Message:
add GCC_NO_IMPLICIT_FALLTHRU, GCC_NO_MAYBE_UNINITIALIZED, and
GCC_NO_RETURN_LOCAL_ADDR.


To generate a diff of this commit:
cvs rdiff -u -r1.1238 -r1.1239 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/external/bsd/ipf/dist/tools

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 04:09:26 UTC 2021

Modified Files:
src/external/bsd/ipf/dist/tools: ipnat.c

Log Message:
avoid common symbols.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ipf/dist/tools/ipnat.c

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



CVS commit: src/external/bsd/ipf/dist/tools

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 04:09:26 UTC 2021

Modified Files:
src/external/bsd/ipf/dist/tools: ipnat.c

Log Message:
avoid common symbols.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ipf/dist/tools/ipnat.c

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

Modified files:

Index: src/external/bsd/ipf/dist/tools/ipnat.c
diff -u src/external/bsd/ipf/dist/tools/ipnat.c:1.3 src/external/bsd/ipf/dist/tools/ipnat.c:1.4
--- src/external/bsd/ipf/dist/tools/ipnat.c:1.3	Sun Feb  4 08:19:42 2018
+++ src/external/bsd/ipf/dist/tools/ipnat.c	Mon Apr 12 04:09:26 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipnat.c,v 1.3 2018/02/04 08:19:42 mrg Exp $	*/
+/*	$NetBSD: ipnat.c,v 1.4 2021/04/12 04:09:26 mrg Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -75,7 +75,6 @@ static __attribute__((__used__)) const c
 #define	bzero(a,b)	memset(a,0,b)
 #endif
 int	use_inet6 = 0;
-char	thishost[MAXHOSTNAMELEN];
 
 extern	char	*optarg;
 



CVS commit: src

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 03:57:07 UTC 2021

Modified Files:
src/external/ibm-public/postfix: Makefile.inc
src/external/mit/ctwm/bin/ctwm: Makefile
src/external/mit/xorg/lib: libmesa.mk
src/external/mit/xorg/server/drivers: Makefile.xf86-driver
src/external/mit/xorg/server/xorg-server: Makefile.serverlib
Makefile.servermod
src/external/mit/xorg/server/xorg-server.old: Makefile.serverlib
Makefile.servermod
src/lib/libc/gen: Makefile.inc

Log Message:
use -fcommon where necessary.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/external/ibm-public/postfix/Makefile.inc
cvs rdiff -u -r1.10 -r1.11 src/external/mit/ctwm/bin/ctwm/Makefile
cvs rdiff -u -r1.13 -r1.14 src/external/mit/xorg/lib/libmesa.mk
cvs rdiff -u -r1.26 -r1.27 \
src/external/mit/xorg/server/drivers/Makefile.xf86-driver
cvs rdiff -u -r1.12 -r1.13 \
src/external/mit/xorg/server/xorg-server/Makefile.serverlib
cvs rdiff -u -r1.5 -r1.6 \
src/external/mit/xorg/server/xorg-server/Makefile.servermod
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/mit/xorg/server/xorg-server.old/Makefile.serverlib \
src/external/mit/xorg/server/xorg-server.old/Makefile.servermod
cvs rdiff -u -r1.210 -r1.211 src/lib/libc/gen/Makefile.inc

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

Modified files:

Index: src/external/ibm-public/postfix/Makefile.inc
diff -u src/external/ibm-public/postfix/Makefile.inc:1.26 src/external/ibm-public/postfix/Makefile.inc:1.27
--- src/external/ibm-public/postfix/Makefile.inc:1.26	Thu Nov 12 17:53:43 2020
+++ src/external/ibm-public/postfix/Makefile.inc	Mon Apr 12 03:57:06 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.26 2020/11/12 17:53:43 nia Exp $
+#	$NetBSD: Makefile.inc,v 1.27 2021/04/12 03:57:06 mrg Exp $
 
 .include 
 
@@ -9,6 +9,9 @@ WARNS?=	0
 
 PFIX_DISTDIR=	${NETBSDSRCDIR}/external/ibm-public/postfix/dist
 
+# Many issues need to be resolved.
+COPTS+=	-fcommon
+
 CPPFLAGS+= -DNETBSD7 -DUSE_SASL_AUTH -DNO_EAI \
 	-I${DIST} \
 	-I${PFIX_DISTDIR}/src/dns -I${PFIX_DISTDIR}/src/global \

Index: src/external/mit/ctwm/bin/ctwm/Makefile
diff -u src/external/mit/ctwm/bin/ctwm/Makefile:1.10 src/external/mit/ctwm/bin/ctwm/Makefile:1.11
--- src/external/mit/ctwm/bin/ctwm/Makefile:1.10	Sun Apr 11 10:52:16 2021
+++ src/external/mit/ctwm/bin/ctwm/Makefile	Mon Apr 12 03:57:06 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2021/04/11 10:52:16 nia Exp $
+#	$NetBSD: Makefile,v 1.11 2021/04/12 03:57:06 mrg Exp $
 
 .include 
 
@@ -65,3 +65,5 @@ DPADD+=	${LIBXPM} ${LIBXMU} ${LIBXT} ${L
 .include 
 .include 
 .include 
+
+COPTS+=			${${ACTIVE_CC} == "gcc":? -fcommon :}

Index: src/external/mit/xorg/lib/libmesa.mk
diff -u src/external/mit/xorg/lib/libmesa.mk:1.13 src/external/mit/xorg/lib/libmesa.mk:1.14
--- src/external/mit/xorg/lib/libmesa.mk:1.13	Sat Oct 31 13:28:22 2020
+++ src/external/mit/xorg/lib/libmesa.mk	Mon Apr 12 03:57:06 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: libmesa.mk,v 1.13 2020/10/31 13:28:22 nia Exp $
+#	$NetBSD: libmesa.mk,v 1.14 2021/04/12 03:57:06 mrg Exp $
 #
 # Consumer of this Makefile should set MESA_SRC_MODULES.
 
@@ -548,6 +548,6 @@ CPPFLAGS+=	\
 CPPFLAGS+=	\
 	-DYYTEXT_POINTER=1
 
-CFLAGS+=	-fvisibility=hidden -fno-strict-aliasing -fno-builtin-memcmp
+CFLAGS+=	-fvisibility=hidden -fno-strict-aliasing -fno-builtin-memcmp -fcommon
 
 .include "libGL/mesa-ver.mk"

Index: src/external/mit/xorg/server/drivers/Makefile.xf86-driver
diff -u src/external/mit/xorg/server/drivers/Makefile.xf86-driver:1.26 src/external/mit/xorg/server/drivers/Makefile.xf86-driver:1.27
--- src/external/mit/xorg/server/drivers/Makefile.xf86-driver:1.26	Thu Jan  3 23:25:52 2019
+++ src/external/mit/xorg/server/drivers/Makefile.xf86-driver	Mon Apr 12 03:57:06 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.xf86-driver,v 1.26 2019/01/03 23:25:52 mrg Exp $
+#	$NetBSD: Makefile.xf86-driver,v 1.27 2021/04/12 03:57:06 mrg Exp $
 
 LIBISMODULE=	yes
 SHLIB_MAJOR=	${PACKAGE_MAJOR}
@@ -49,6 +49,9 @@ CPPFLAGS+=	-DPACKAGE_VERSION_MINOR=${PAC
 CPPFLAGS+=	-DPACKAGE_VERSION_PATCHLEVEL=${PACKAGE_PATCH}
 CPPFLAGS+=	-DXORG_VERSION_CURRENT=${XORG_VERSION_CURRENT}
 
+# IOPortBase is particularly annoying to fix
+COPTS+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -fcommon :}
+
 .PATH:	${X11SRCDIR.${DRIVER}}/src
 .PATH:	${X11SRCDIR.${DRIVER}}/man
 .PATH:	${X11SRCDIR.${DRIVER}}

Index: src/external/mit/xorg/server/xorg-server/Makefile.serverlib
diff -u src/external/mit/xorg/server/xorg-server/Makefile.serverlib:1.12 src/external/mit/xorg/server/xorg-server/Makefile.serverlib:1.13
--- src/external/mit/xorg/server/xorg-server/Makefile.serverlib:1.12	Fri Aug 19 03:59:30 2016
+++ src/external/mit/xorg/server/xorg-server/Makefile.serverlib	Mon Apr 12 03:57:06 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.serverlib,v 1.12 2016/08/19 03:59:30 mrg Exp $
+#	

CVS commit: src

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 03:57:07 UTC 2021

Modified Files:
src/external/ibm-public/postfix: Makefile.inc
src/external/mit/ctwm/bin/ctwm: Makefile
src/external/mit/xorg/lib: libmesa.mk
src/external/mit/xorg/server/drivers: Makefile.xf86-driver
src/external/mit/xorg/server/xorg-server: Makefile.serverlib
Makefile.servermod
src/external/mit/xorg/server/xorg-server.old: Makefile.serverlib
Makefile.servermod
src/lib/libc/gen: Makefile.inc

Log Message:
use -fcommon where necessary.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/external/ibm-public/postfix/Makefile.inc
cvs rdiff -u -r1.10 -r1.11 src/external/mit/ctwm/bin/ctwm/Makefile
cvs rdiff -u -r1.13 -r1.14 src/external/mit/xorg/lib/libmesa.mk
cvs rdiff -u -r1.26 -r1.27 \
src/external/mit/xorg/server/drivers/Makefile.xf86-driver
cvs rdiff -u -r1.12 -r1.13 \
src/external/mit/xorg/server/xorg-server/Makefile.serverlib
cvs rdiff -u -r1.5 -r1.6 \
src/external/mit/xorg/server/xorg-server/Makefile.servermod
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/mit/xorg/server/xorg-server.old/Makefile.serverlib \
src/external/mit/xorg/server/xorg-server.old/Makefile.servermod
cvs rdiff -u -r1.210 -r1.211 src/lib/libc/gen/Makefile.inc

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



CVS commit: src/sys/arch

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 03:55:41 UTC 2021

Modified Files:
src/sys/arch/alpha/stand/netboot: dev_net.c
src/sys/arch/evbmips/stand/sbmips/netboot: dev_net.c
src/sys/arch/hp300/stand/common: netio.c
src/sys/arch/macppc/stand: Makefile.inc
src/sys/arch/macppc/stand/ofwboot: net.c
src/sys/arch/newsmips/stand/boot: net.c
src/sys/arch/ofppc/stand/ofwboot: net.c
src/sys/arch/shark/stand/ofwboot: net.c
src/sys/arch/sparc/stand/common: net.c
src/sys/arch/sparc/stand/ofwboot: net.c
src/sys/arch/zaurus/stand: Makefile.inc

Log Message:
remove shadowed (common) declarations of various libsa variables
from various boot programs.  for macppc and zaurus, avoid building
with -fcommon any more.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/alpha/stand/netboot/dev_net.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/arch/evbmips/stand/sbmips/netboot/dev_net.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hp300/stand/common/netio.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/macppc/stand/Makefile.inc
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/macppc/stand/ofwboot/net.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/newsmips/stand/boot/net.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ofppc/stand/ofwboot/net.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/shark/stand/ofwboot/net.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sparc/stand/common/net.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sparc/stand/ofwboot/net.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/zaurus/stand/Makefile.inc

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

Modified files:

Index: src/sys/arch/alpha/stand/netboot/dev_net.c
diff -u src/sys/arch/alpha/stand/netboot/dev_net.c:1.16 src/sys/arch/alpha/stand/netboot/dev_net.c:1.17
--- src/sys/arch/alpha/stand/netboot/dev_net.c:1.16	Sun Jul 17 20:54:36 2011
+++ src/sys/arch/alpha/stand/netboot/dev_net.c	Mon Apr 12 03:55:40 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: dev_net.c,v 1.16 2011/07/17 20:54:36 joerg Exp $ */
+/* $NetBSD: dev_net.c,v 1.17 2021/04/12 03:55:40 mrg Exp $ */
 
 /*
  * Copyright (c) 1995 Gordon W. Ross
@@ -67,23 +67,6 @@ extern int debug;
 extern int nfs_root_node[];	/* XXX - get from nfs_mount() */
 
 /*
- * Various globals needed by the network code:
- */
-
-#if 0
-/* for arp.c, rarp.c */
-u_char bcea[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
-#endif
-
-struct	in_addr myip;		/* my ip address */
-struct	in_addr rootip;		/* root ip address */
-struct	in_addr gateip;		/* swap ip address */
-n_long	netmask;		/* subnet or net mask */
-
-char rootpath[FNAME_SIZE];
-char hostname[FNAME_SIZE];
-
-/*
  * Local things...
  */
 static int netdev_sock = -1;

Index: src/sys/arch/evbmips/stand/sbmips/netboot/dev_net.c
diff -u src/sys/arch/evbmips/stand/sbmips/netboot/dev_net.c:1.1.1.1 src/sys/arch/evbmips/stand/sbmips/netboot/dev_net.c:1.2
--- src/sys/arch/evbmips/stand/sbmips/netboot/dev_net.c:1.1.1.1	Mon Jul 24 08:56:29 2017
+++ src/sys/arch/evbmips/stand/sbmips/netboot/dev_net.c	Mon Apr 12 03:55:40 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: dev_net.c,v 1.1.1.1 2017/07/24 08:56:29 mrg Exp $ */
+/* $NetBSD: dev_net.c,v 1.2 2021/04/12 03:55:40 mrg Exp $ */
 
 /*
  * Copyright (c) 1995 Gordon W. Ross
@@ -67,23 +67,6 @@ extern int debug;
 extern int nfs_root_node[];	/* XXX - get from nfs_mount() */
 
 /*
- * Various globals needed by the network code:
- */
-
-#if 0
-/* for arp.c, rarp.c */
-u_char bcea[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
-#endif
-
-struct	in_addr myip;		/* my ip address */
-struct	in_addr rootip;		/* root ip address */
-struct	in_addr gateip;		/* swap ip address */
-n_long	netmask;		/* subnet or net mask */
-
-char rootpath[FNAME_SIZE];
-char hostname[FNAME_SIZE];
-
-/*
  * Local things...
  */
 static int netdev_sock = -1;

Index: src/sys/arch/hp300/stand/common/netio.c
diff -u src/sys/arch/hp300/stand/common/netio.c:1.17 src/sys/arch/hp300/stand/common/netio.c:1.18
--- src/sys/arch/hp300/stand/common/netio.c:1.17	Tue Apr 28 14:45:23 2020
+++ src/sys/arch/hp300/stand/common/netio.c	Mon Apr 12 03:55:40 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: netio.c,v 1.17 2020/04/28 14:45:23 tsutsui Exp $	*/
+/*	$NetBSD: netio.c,v 1.18 2021/04/12 03:55:40 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -93,10 +93,6 @@
 
 extern int nfs_root_node[];	/* XXX - get from nfs_mount() */
 
-struct	in_addr myip, rootip, gateip;
-n_long	netmask;
-char rootpath[FNAME_SIZE];
-
 static int netdev_sock = -1;
 static int open_count;
 

Index: src/sys/arch/macppc/stand/Makefile.inc
diff -u src/sys/arch/macppc/stand/Makefile.inc:1.6 src/sys/arch/macppc/stand/Makefile.inc:1.7
--- src/sys/arch/macppc/stand/Makefile.inc:1.6	Sun Sep  6 07:20:29 2020
+++ src/sys/arch/macppc/stand/Makefile.inc	Mon Apr 12 03:55:40 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.6 2020/09/06 07:20:29 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.7 2021/04/12 

CVS commit: src/sys/arch

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 03:55:41 UTC 2021

Modified Files:
src/sys/arch/alpha/stand/netboot: dev_net.c
src/sys/arch/evbmips/stand/sbmips/netboot: dev_net.c
src/sys/arch/hp300/stand/common: netio.c
src/sys/arch/macppc/stand: Makefile.inc
src/sys/arch/macppc/stand/ofwboot: net.c
src/sys/arch/newsmips/stand/boot: net.c
src/sys/arch/ofppc/stand/ofwboot: net.c
src/sys/arch/shark/stand/ofwboot: net.c
src/sys/arch/sparc/stand/common: net.c
src/sys/arch/sparc/stand/ofwboot: net.c
src/sys/arch/zaurus/stand: Makefile.inc

Log Message:
remove shadowed (common) declarations of various libsa variables
from various boot programs.  for macppc and zaurus, avoid building
with -fcommon any more.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/alpha/stand/netboot/dev_net.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/arch/evbmips/stand/sbmips/netboot/dev_net.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hp300/stand/common/netio.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/macppc/stand/Makefile.inc
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/macppc/stand/ofwboot/net.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/newsmips/stand/boot/net.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ofppc/stand/ofwboot/net.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/shark/stand/ofwboot/net.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sparc/stand/common/net.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sparc/stand/ofwboot/net.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/zaurus/stand/Makefile.inc

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



CVS commit: src

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 02:54:09 UTC 2021

Modified Files:
src/external/bsd/flex/bin: Makefile
src/external/bsd/ipf/bin/ipfstat: Makefile
src/external/bsd/tcpdump/bin: Makefile
src/external/gpl2/lvm2/lib/libdevmapper: Makefile
src/external/gpl2/lvm2/lib/liblvm: Makefile
src/external/mit/lua/lib/liblua: Makefile
src/external/public-domain/xz/bin/xz: Makefile
src/games/hunt/huntd: Makefile
src/sys/modules/lua: Makefile
src/tests/sys/netatalk: Makefile
src/usr.sbin/pf/pfctl: Makefile

Log Message:
add some new uses of existing GCC_NO_* variables for warning issues.
remove an no longer relevant for gcc7 workaround (works fine in both
gcc9 and gcc 10.)


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/flex/bin/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/ipf/bin/ipfstat/Makefile
cvs rdiff -u -r1.20 -r1.21 src/external/bsd/tcpdump/bin/Makefile
cvs rdiff -u -r1.10 -r1.11 src/external/gpl2/lvm2/lib/libdevmapper/Makefile
cvs rdiff -u -r1.8 -r1.9 src/external/gpl2/lvm2/lib/liblvm/Makefile
cvs rdiff -u -r1.9 -r1.10 src/external/mit/lua/lib/liblua/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/public-domain/xz/bin/xz/Makefile
cvs rdiff -u -r1.8 -r1.9 src/games/hunt/huntd/Makefile
cvs rdiff -u -r1.11 -r1.12 src/sys/modules/lua/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tests/sys/netatalk/Makefile
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/pf/pfctl/Makefile

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

Modified files:

Index: src/external/bsd/flex/bin/Makefile
diff -u src/external/bsd/flex/bin/Makefile:1.15 src/external/bsd/flex/bin/Makefile:1.16
--- src/external/bsd/flex/bin/Makefile:1.15	Sun Oct 13 07:28:06 2019
+++ src/external/bsd/flex/bin/Makefile	Mon Apr 12 02:54:07 2021
@@ -1,5 +1,5 @@
 #	from: @(#)Makefile	5.4 (Berkeley) 6/24/90
-#	$NetBSD: Makefile,v 1.15 2019/10/13 07:28:06 mrg Exp $
+#	$NetBSD: Makefile,v 1.16 2021/04/12 02:54:07 mrg Exp $
 #
 # By default, flex will be configured to generate 8-bit scanners only if the
 # -8 flag is given.  If you want it to always generate 8-bit scanners, add
@@ -80,5 +80,6 @@ COPTS.scan.c+=-O1
 
 COPTS.filter.c+=	${GCC_NO_FORMAT_TRUNCATION}
 COPTS.misc.c+=		${GCC_NO_FORMAT_TRUNCATION}
+COPTS.parse.c+=		${GCC_NO_FORMAT_TRUNCATION}
 
 .include 

Index: src/external/bsd/ipf/bin/ipfstat/Makefile
diff -u src/external/bsd/ipf/bin/ipfstat/Makefile:1.1 src/external/bsd/ipf/bin/ipfstat/Makefile:1.2
--- src/external/bsd/ipf/bin/ipfstat/Makefile:1.1	Fri Mar 23 21:29:45 2012
+++ src/external/bsd/ipf/bin/ipfstat/Makefile	Mon Apr 12 02:54:07 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2012/03/23 21:29:45 christos Exp $
+#	$NetBSD: Makefile,v 1.2 2021/04/12 02:54:07 mrg Exp $
 
 PROG=		ipfstat
 SRCS=		ipfstat.c
@@ -6,4 +6,6 @@ MAN=		ipfstat.8
 DPADD+=  	${LIBCURSES} ${LIBTERMINFO}
 LDADD+=  	-lcurses -lterminfo
 
+COPTS.ipfstat.c+=	${GCC_NO_FORMAT_OVERFLOW}
+
 .include 

Index: src/external/bsd/tcpdump/bin/Makefile
diff -u src/external/bsd/tcpdump/bin/Makefile:1.20 src/external/bsd/tcpdump/bin/Makefile:1.21
--- src/external/bsd/tcpdump/bin/Makefile:1.20	Sun Sep  6 07:20:26 2020
+++ src/external/bsd/tcpdump/bin/Makefile	Mon Apr 12 02:54:07 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.20 2020/09/06 07:20:26 mrg Exp $	
+#	$NetBSD: Makefile,v 1.21 2021/04/12 02:54:07 mrg Exp $	
 
 WARNS?=	1	# XXX: need to cleanup later
 
@@ -207,5 +207,6 @@ tcpdump.8: tcpdump.1.in
 
 CWARNFLAGS.clang+=	-Wno-error=address-of-packed-member
 CWARNFLAGS.gcc+=	${GCC_NO_ADDR_OF_PACKED_MEMBER}
+COPTS.print-bgp.c+=	${GCC_NO_FORMAT_TRUNCATION}
 
 .include 

Index: src/external/gpl2/lvm2/lib/libdevmapper/Makefile
diff -u src/external/gpl2/lvm2/lib/libdevmapper/Makefile:1.10 src/external/gpl2/lvm2/lib/libdevmapper/Makefile:1.11
--- src/external/gpl2/lvm2/lib/libdevmapper/Makefile:1.10	Tue Oct  4 14:33:16 2016
+++ src/external/gpl2/lvm2/lib/libdevmapper/Makefile	Mon Apr 12 02:54:08 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2016/10/04 14:33:16 christos Exp $
+#	$NetBSD: Makefile,v 1.11 2021/04/12 02:54:08 mrg Exp $
 
 USE_SHLIBDIR=	yes
 USE_FORT?=	no
@@ -46,4 +46,7 @@ COPTS.libdm-nbsd-iface.c+= -O0
 .PATH: ${LIBDEVMAPPER_DISTDIR}/regex
 .PATH: ${LIBDEVMAPPER_DISTDIR}/ioctl
 
+COPTS.libdm-common.c	+= ${GCC_NO_STRINGOP_OVERFLOW}
+COPTS.fs.c		+= ${GCC_NO_STRINGOP_OVERFLOW}
+
 .include 

Index: src/external/gpl2/lvm2/lib/liblvm/Makefile
diff -u src/external/gpl2/lvm2/lib/liblvm/Makefile:1.8 src/external/gpl2/lvm2/lib/liblvm/Makefile:1.9
--- src/external/gpl2/lvm2/lib/liblvm/Makefile:1.8	Tue Jan  5 13:07:46 2016
+++ src/external/gpl2/lvm2/lib/liblvm/Makefile	Mon Apr 12 02:54:08 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2016/01/05 13:07:46 christos Exp $
+#	$NetBSD: Makefile,v 1.9 2021/04/12 02:54:08 mrg Exp $
 
 LIBISPRIVATE=	yes
 
@@ -9,13 +9,13 @@ NOLINT=		#defined
 
 LIB=		lvm

CVS commit: src

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 02:54:09 UTC 2021

Modified Files:
src/external/bsd/flex/bin: Makefile
src/external/bsd/ipf/bin/ipfstat: Makefile
src/external/bsd/tcpdump/bin: Makefile
src/external/gpl2/lvm2/lib/libdevmapper: Makefile
src/external/gpl2/lvm2/lib/liblvm: Makefile
src/external/mit/lua/lib/liblua: Makefile
src/external/public-domain/xz/bin/xz: Makefile
src/games/hunt/huntd: Makefile
src/sys/modules/lua: Makefile
src/tests/sys/netatalk: Makefile
src/usr.sbin/pf/pfctl: Makefile

Log Message:
add some new uses of existing GCC_NO_* variables for warning issues.
remove an no longer relevant for gcc7 workaround (works fine in both
gcc9 and gcc 10.)


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/flex/bin/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/ipf/bin/ipfstat/Makefile
cvs rdiff -u -r1.20 -r1.21 src/external/bsd/tcpdump/bin/Makefile
cvs rdiff -u -r1.10 -r1.11 src/external/gpl2/lvm2/lib/libdevmapper/Makefile
cvs rdiff -u -r1.8 -r1.9 src/external/gpl2/lvm2/lib/liblvm/Makefile
cvs rdiff -u -r1.9 -r1.10 src/external/mit/lua/lib/liblua/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/public-domain/xz/bin/xz/Makefile
cvs rdiff -u -r1.8 -r1.9 src/games/hunt/huntd/Makefile
cvs rdiff -u -r1.11 -r1.12 src/sys/modules/lua/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tests/sys/netatalk/Makefile
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/pf/pfctl/Makefile

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



CVS commit: src/sys/ddb

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 02:49:02 UTC 2021

Modified Files:
src/sys/ddb: db_sym.c

Log Message:
avoid assigning both signed and unsigned variables in the same statement.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/ddb/db_sym.c

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



CVS commit: src/sys/ddb

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 02:49:02 UTC 2021

Modified Files:
src/sys/ddb: db_sym.c

Log Message:
avoid assigning both signed and unsigned variables in the same statement.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/ddb/db_sym.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/ddb/db_sym.c
diff -u src/sys/ddb/db_sym.c:1.66 src/sys/ddb/db_sym.c:1.67
--- src/sys/ddb/db_sym.c:1.66	Mon Mar 30 20:45:59 2020
+++ src/sys/ddb/db_sym.c	Mon Apr 12 02:49:02 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_sym.c,v 1.66 2020/03/30 20:45:59 maya Exp $	*/
+/*	$NetBSD: db_sym.c,v 1.67 2021/04/12 02:49:02 mrg Exp $	*/
 
 /*
  * Mach Operating System
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_sym.c,v 1.66 2020/03/30 20:45:59 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_sym.c,v 1.67 2021/04/12 02:49:02 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddbparam.h"
@@ -224,7 +224,8 @@ db_search_symbol(db_addr_t val, db_strat
 		db_expr_t newdiff;
 		db_sym_t ssym;
 
-		newdiff = diff = ~0;
+		diff = ~0u;
+		newdiff = ~0;
 		ssym = (*db_symformat->sym_search)
 		(NULL, val, strategy, );
 		if ((unsigned int) newdiff < diff) {



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

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 02:23:41 UTC 2021

Modified Files:
src/sys/arch/mips/mips: db_interface.c

Log Message:
avoid duplicate "ddb_regs" in crash with GCC 10 and -fcommon default.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/mips/mips/db_interface.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/mips/mips/db_interface.c
diff -u src/sys/arch/mips/mips/db_interface.c:1.92 src/sys/arch/mips/mips/db_interface.c:1.93
--- src/sys/arch/mips/mips/db_interface.c:1.92	Tue Feb 23 07:13:52 2021
+++ src/sys/arch/mips/mips/db_interface.c	Mon Apr 12 02:23:41 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_interface.c,v 1.92 2021/02/23 07:13:52 mrg Exp $	*/
+/*	$NetBSD: db_interface.c,v 1.93 2021/04/12 02:23:41 mrg Exp $	*/
 
 /*
  * Mach Operating System
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.92 2021/02/23 07:13:52 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.93 2021/04/12 02:23:41 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_multiprocessor.h"
@@ -74,7 +74,9 @@ __KERNEL_RCSID(0, "$NetBSD: db_interface
 volatile u_int ddb_cpu = NOCPU;
 
 int		db_active = 0;
+#ifdef _KERNEL
 db_regs_t	ddb_regs;
+#endif
 
 #if (MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2) > 0
 static void db_watch_cmd(db_expr_t, bool, db_expr_t, const char *);



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

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 02:23:41 UTC 2021

Modified Files:
src/sys/arch/mips/mips: db_interface.c

Log Message:
avoid duplicate "ddb_regs" in crash with GCC 10 and -fcommon default.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/mips/mips/db_interface.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/x86/x86

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 02:23:02 UTC 2021

Modified Files:
src/sys/arch/x86/x86: identcpu.c

Log Message:
make a numeric literal unsigned as it is bit-negated.


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/sys/arch/x86/x86/identcpu.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/x86/x86

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 02:23:02 UTC 2021

Modified Files:
src/sys/arch/x86/x86: identcpu.c

Log Message:
make a numeric literal unsigned as it is bit-negated.


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/sys/arch/x86/x86/identcpu.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/x86/x86/identcpu.c
diff -u src/sys/arch/x86/x86/identcpu.c:1.120 src/sys/arch/x86/x86/identcpu.c:1.121
--- src/sys/arch/x86/x86/identcpu.c:1.120	Sat Mar  6 19:16:45 2021
+++ src/sys/arch/x86/x86/identcpu.c	Mon Apr 12 02:23:01 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: identcpu.c,v 1.120 2021/03/06 19:16:45 bouyer Exp $	*/
+/*	$NetBSD: identcpu.c,v 1.121 2021/04/12 02:23:01 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.120 2021/03/06 19:16:45 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.121 2021/04/12 02:23:01 mrg Exp $");
 
 #include "opt_xen.h"
 
@@ -509,7 +509,7 @@ cpu_probe_cyrix_cmn(struct cpu_info *ci)
 	/* cyrix's workaround  for the "coma bug" */
 	cyrix_write_reg(0x31, cyrix_read_reg(0x31) | 0xf8);
 	cyrix_write_reg(0x32, cyrix_read_reg(0x32) | 0x7f);
-	cyrix_write_reg(0x33, cyrix_read_reg(0x33) & ~0xff);
+	cyrix_write_reg(0x33, cyrix_read_reg(0x33) & ~0xffu);
 	cyrix_write_reg(0x3c, cyrix_read_reg(0x3c) | 0x87);
 	/* disable access to ccr4/ccr5 */
 	cyrix_write_reg(0xC3, c3);



CVS commit: src/etc/mtree

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 02:09:27 UTC 2021

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

Log Message:
create the gcc-10 subdirs, and don't create the gcc-8 ones.


To generate a diff of this commit:
cvs rdiff -u -r1.234 -r1.235 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.234 src/etc/mtree/NetBSD.dist.base:1.235
--- src/etc/mtree/NetBSD.dist.base:1.234	Wed Mar 31 04:58:01 2021
+++ src/etc/mtree/NetBSD.dist.base	Mon Apr 12 02:09:27 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.234 2021/03/31 04:58:01 christos Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.235 2021/04/12 02:09:27 mrg Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -201,10 +201,10 @@
 ./usr/include/g++/tr1
 ./usr/include/g++/tr1_impl
 ./usr/include/g++/tr2
-./usr/include/gcc-8
-./usr/include/gcc-8/sanitizer
 ./usr/include/gcc-9
 ./usr/include/gcc-9/sanitizer
+./usr/include/gcc-10
+./usr/include/gcc-10/sanitizer
 ./usr/include/gssapi
 ./usr/include/isofs
 ./usr/include/isofs/cd9660



CVS commit: src/etc/mtree

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 02:09:27 UTC 2021

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

Log Message:
create the gcc-10 subdirs, and don't create the gcc-8 ones.


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

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 02:09:00 UTC 2021

Modified Files:
src/distrib/sets/lists/base: ad.mips mi shl.mi
src/distrib/sets/lists/comp: ad.aarch64 ad.arm ad.hppa ad.m68k ad.mips
ad.powerpc ad.riscv ad.sh3 md.alpha md.amd64 md.hppa md.i386
md.ia64 md.or1k md.sparc md.sparc64 md.vax mi shl.mi
src/distrib/sets/lists/debug: ad.mips mi shl.mi

Log Message:
various updates for GCC 10 support.  remove dead gcc7/8 support
and properly mark obsolete files in gcc9/gcc10.

testing on amd64 and shark for GCC 9, and many platforms for GCC 10,
(though not arm yet.)


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/distrib/sets/lists/base/ad.mips
cvs rdiff -u -r1.1276 -r1.1277 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.916 -r1.917 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.44 -r1.45 src/distrib/sets/lists/comp/ad.aarch64
cvs rdiff -u -r1.104 -r1.105 src/distrib/sets/lists/comp/ad.arm
cvs rdiff -u -r1.17 -r1.18 src/distrib/sets/lists/comp/ad.hppa
cvs rdiff -u -r1.64 -r1.65 src/distrib/sets/lists/comp/ad.m68k
cvs rdiff -u -r1.87 -r1.88 src/distrib/sets/lists/comp/ad.mips
cvs rdiff -u -r1.100 -r1.101 src/distrib/sets/lists/comp/ad.powerpc \
src/distrib/sets/lists/comp/md.sparc
cvs rdiff -u -r1.16 -r1.17 src/distrib/sets/lists/comp/ad.riscv
cvs rdiff -u -r1.45 -r1.46 src/distrib/sets/lists/comp/ad.sh3
cvs rdiff -u -r1.78 -r1.79 src/distrib/sets/lists/comp/md.alpha
cvs rdiff -u -r1.284 -r1.285 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.14 -r1.15 src/distrib/sets/lists/comp/md.hppa
cvs rdiff -u -r1.200 -r1.201 src/distrib/sets/lists/comp/md.i386
cvs rdiff -u -r1.8 -r1.9 src/distrib/sets/lists/comp/md.ia64
cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/comp/md.or1k
cvs rdiff -u -r1.212 -r1.213 src/distrib/sets/lists/comp/md.sparc64
cvs rdiff -u -r1.52 -r1.53 src/distrib/sets/lists/comp/md.vax
cvs rdiff -u -r1.2378 -r1.2379 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.344 -r1.345 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.78 -r1.79 src/distrib/sets/lists/debug/ad.mips
cvs rdiff -u -r1.348 -r1.349 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.273 -r1.274 src/distrib/sets/lists/debug/shl.mi

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

Modified files:

Index: src/distrib/sets/lists/base/ad.mips
diff -u src/distrib/sets/lists/base/ad.mips:1.81 src/distrib/sets/lists/base/ad.mips:1.82
--- src/distrib/sets/lists/base/ad.mips:1.81	Mon Sep  7 00:19:04 2020
+++ src/distrib/sets/lists/base/ad.mips	Mon Apr 12 02:08:59 2021
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips,v 1.81 2020/09/07 00:19:04 mrg Exp $
+# $NetBSD: ad.mips,v 1.82 2021/04/12 02:08:59 mrg Exp $
 ./lib/libc_fp.sobase-sys-shlib		dynamicroot,softfloat,arch64
 ./lib/libc_fp.so.0base-sys-shlib		dynamicroot,softfloat,arch64
 ./lib/libc_fp.so.0.0base-sys-shlib		dynamicroot,softfloat,arch64
@@ -14,9 +14,9 @@
 ./usr/lib/o32/libc_fp.so.0			base-compat-shlib	compat,pic,arch64
 ./usr/lib/o32/libc_fp.so.0.0			base-compat-shlib	compat,pic,arch64
 ./usr/lib/o32/libgomp.so.1.3			base-compat-shlib	obsolete
-./usr/lib/o32/libgomp.so.2.0			base-compat-shlib	compat,pic,arch64,gcc=7
-./usr/lib/o32/libgomp.so.2.0			base-compat-shlib	compat,pic,arch64,gcc=8
 ./usr/lib/o32/libgomp.so.2.0			base-compat-shlib	compat,pic,arch64,gcc=9
+./usr/lib/o32/libgomp.so.2.0			base-compat-shlib	compat,pic,arch64,gcc=10,obsolete
+./usr/lib/o32/libgomp.so.2.1			base-compat-shlib	compat,pic,arch64,gcc=10
 ./usr/libexec/ld.elf_so-64			base-compat-shlib	compat,pic,arch64
 ./usr/libexec/ld.elf_so-o32			base-sysutil-bin	compat,pic,arch64
 ./usr/lkm/ldscriptbase-obsolete		obsolete

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1276 src/distrib/sets/lists/base/mi:1.1277
--- src/distrib/sets/lists/base/mi:1.1276	Thu Apr  1 10:35:24 2021
+++ src/distrib/sets/lists/base/mi	Mon Apr 12 02:08:59 2021
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1276 2021/04/01 10:35:24 martin Exp $
+# $NetBSD: mi,v 1.1277 2021/04/12 02:08:59 mrg Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -1240,10 +1240,10 @@
 ./usr/include/gcc-6/sanitizer			base-obsolete		obsolete
 ./usr/include/gcc-7base-obsolete		obsolete
 ./usr/include/gcc-7/sanitizer			base-obsolete		obsolete
-./usr/include/gcc-8base-c-usr
-./usr/include/gcc-8/sanitizer			base-c-usr
 ./usr/include/gcc-9base-c-usr
 ./usr/include/gcc-9/sanitizer			base-c-usr
+./usr/include/gcc-10base-c-usr
+./usr/include/gcc-10/sanitizer			base-c-usr
 ./usr/include/gssapibase-c-usr
 ./usr/include/gssapi/rpc			base-obsolete		obsolete
 ./usr/include/isofsbase-c-usr

Index: src/distrib/sets/lists/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.916 src/distrib/sets/lists/base/shl.mi:1.917
--- src/distrib/sets/lists/base/shl.mi:1.916	Wed Apr  7 03:45:18 

CVS commit: src/distrib/sets/lists

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 02:09:00 UTC 2021

Modified Files:
src/distrib/sets/lists/base: ad.mips mi shl.mi
src/distrib/sets/lists/comp: ad.aarch64 ad.arm ad.hppa ad.m68k ad.mips
ad.powerpc ad.riscv ad.sh3 md.alpha md.amd64 md.hppa md.i386
md.ia64 md.or1k md.sparc md.sparc64 md.vax mi shl.mi
src/distrib/sets/lists/debug: ad.mips mi shl.mi

Log Message:
various updates for GCC 10 support.  remove dead gcc7/8 support
and properly mark obsolete files in gcc9/gcc10.

testing on amd64 and shark for GCC 9, and many platforms for GCC 10,
(though not arm yet.)


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/distrib/sets/lists/base/ad.mips
cvs rdiff -u -r1.1276 -r1.1277 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.916 -r1.917 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.44 -r1.45 src/distrib/sets/lists/comp/ad.aarch64
cvs rdiff -u -r1.104 -r1.105 src/distrib/sets/lists/comp/ad.arm
cvs rdiff -u -r1.17 -r1.18 src/distrib/sets/lists/comp/ad.hppa
cvs rdiff -u -r1.64 -r1.65 src/distrib/sets/lists/comp/ad.m68k
cvs rdiff -u -r1.87 -r1.88 src/distrib/sets/lists/comp/ad.mips
cvs rdiff -u -r1.100 -r1.101 src/distrib/sets/lists/comp/ad.powerpc \
src/distrib/sets/lists/comp/md.sparc
cvs rdiff -u -r1.16 -r1.17 src/distrib/sets/lists/comp/ad.riscv
cvs rdiff -u -r1.45 -r1.46 src/distrib/sets/lists/comp/ad.sh3
cvs rdiff -u -r1.78 -r1.79 src/distrib/sets/lists/comp/md.alpha
cvs rdiff -u -r1.284 -r1.285 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.14 -r1.15 src/distrib/sets/lists/comp/md.hppa
cvs rdiff -u -r1.200 -r1.201 src/distrib/sets/lists/comp/md.i386
cvs rdiff -u -r1.8 -r1.9 src/distrib/sets/lists/comp/md.ia64
cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/comp/md.or1k
cvs rdiff -u -r1.212 -r1.213 src/distrib/sets/lists/comp/md.sparc64
cvs rdiff -u -r1.52 -r1.53 src/distrib/sets/lists/comp/md.vax
cvs rdiff -u -r1.2378 -r1.2379 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.344 -r1.345 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.78 -r1.79 src/distrib/sets/lists/debug/ad.mips
cvs rdiff -u -r1.348 -r1.349 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.273 -r1.274 src/distrib/sets/lists/debug/shl.mi

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



CVS commit: src/tests/usr.sbin/cpuctl

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 01:18:13 UTC 2021

Modified Files:
src/tests/usr.sbin/cpuctl: t_cpuctl.sh

Log Message:
don't run the "offline" or "nointr" tests by default.  they exercise
bugs that exist in the current code and leave the target machine in
a broken state, requiring ddb or hard reset.

setting ATF_USR_SBIN_CPUCTL_OFFLINE_ENABLE to any non-empty string
will enable these tests again.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.sbin/cpuctl/t_cpuctl.sh

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

Modified files:

Index: src/tests/usr.sbin/cpuctl/t_cpuctl.sh
diff -u src/tests/usr.sbin/cpuctl/t_cpuctl.sh:1.5 src/tests/usr.sbin/cpuctl/t_cpuctl.sh:1.6
--- src/tests/usr.sbin/cpuctl/t_cpuctl.sh:1.5	Fri Aug 14 05:22:25 2020
+++ src/tests/usr.sbin/cpuctl/t_cpuctl.sh	Mon Apr 12 01:18:13 2021
@@ -1,4 +1,4 @@
-# $NetBSD: t_cpuctl.sh,v 1.5 2020/08/14 05:22:25 martin Exp $
+# $NetBSD: t_cpuctl.sh,v 1.6 2021/04/12 01:18:13 mrg Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -167,6 +167,16 @@ identify_body() {
 	atf_pass
 }
 
+#
+# check_cpuctl_ok - only run some tests if
+# is set ATF_USR_SBIN_CPUCTL_OFFLINE_ENABLE.
+check_cpuctl_ok() {
+	if [ -z "$ATF_USR_SBIN_CPUCTL_OFFLINE_ENABLE" ]; then
+		return 1
+	fi
+	return 0
+}
+
 # offline
 #
 atf_test_case offline cleanup
@@ -178,6 +188,11 @@ offline_head() {
 
 offline_body() {
 
+	if ! check_cpuctl_ok; then
+		atf_skip \
+		   "test sometimes hangs or upsets machine"
+	fi
+
 	cpuctl list > $tmp
 	setcpu "offline" atf_fail "error in setting a CPU offline"
 
@@ -216,6 +231,12 @@ nointr_head() {
 }
 
 nointr_body() {
+
+	if ! check_cpuctl_ok; then
+		atf_skip \
+		   "test sometimes hangs or upsets machine"
+	fi
+
 	cpuctl list > $tmp
 	setcpu "nointr" atf_fail "error in disabling interrupts"
 }



CVS commit: src/tests/usr.sbin/cpuctl

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 01:18:13 UTC 2021

Modified Files:
src/tests/usr.sbin/cpuctl: t_cpuctl.sh

Log Message:
don't run the "offline" or "nointr" tests by default.  they exercise
bugs that exist in the current code and leave the target machine in
a broken state, requiring ddb or hard reset.

setting ATF_USR_SBIN_CPUCTL_OFFLINE_ENABLE to any non-empty string
will enable these tests again.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.sbin/cpuctl/t_cpuctl.sh

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

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 00:05:56 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/gcc/config: netbsd.h
src/external/gpl3/gcc/dist/libgomp: acc_prof.h
src/external/gpl3/gcc/dist/libstdc++-v3/include/ext: numeric_traits.h
src/external/gpl3/gcc/lib/libgcc: Makefile.inc
src/external/gpl3/gcc/lib/libgcc/libgcc: Makefile
src/external/gpl3/gcc/lib/libgcc/libgcc_eh: Makefile
src/external/gpl3/gcc/lib/libgcc/libgcc_s: Makefile
src/external/gpl3/gcc/lib/libgomp: Makefile defs.mk
src/external/gpl3/gcc/lib/libiberty: defs.mk
src/external/gpl3/gcc/lib/libstdc++-v3/include: Makefile
src/external/gpl3/gcc/lib/libubsan: Makefile
src/external/gpl3/gcc/usr.bin: Makefile.inc
src/external/gpl3/gcc/usr.bin/backend: Makefile
src/external/gpl3/gcc/usr.bin/cc1plus: Makefile
src/external/gpl3/gcc/usr.bin/common: defs.mk
src/external/gpl3/gcc/usr.bin/lto1: Makefile
Added Files:
src/external/gpl3/gcc: README.gcc10
Removed Files:
src/external/gpl3/gcc: README.gcc9

Log Message:
various changes to get GCC 10 to build here.

- fix path to compiler-specific includes
- missing (void) for (older) C
- fix __is_signed/__is_signed_val change
- avoid compiler warning-as-errors
- add to existing COPTS.file values, instead of setting
- bump libgomp minor; functions were added
- add new 'compare' c++ header
- handle new analyzer subdirectory.  set TARGET_MACHINE for lto-streamer-in.c.
  remove params.list etc handling.
- coroutines.cc is another .cc not .c.  adjust .PATH to suit.
- add new lto1 sources
- couple of files not in /arch/ subdirs missed in mknative update.

rs6000.c is still not merged.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/README.gcc10
cvs rdiff -u -r1.16 -r0 src/external/gpl3/gcc/README.gcc9
cvs rdiff -u -r1.36 -r1.37 src/external/gpl3/gcc/dist/gcc/config/netbsd.h
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/libgomp/acc_prof.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gcc/dist/libstdc++-v3/include/ext/numeric_traits.h
cvs rdiff -u -r1.46 -r1.47 src/external/gpl3/gcc/lib/libgcc/Makefile.inc
cvs rdiff -u -r1.28 -r1.29 src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gcc/lib/libgcc/libgcc_eh/Makefile
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/lib/libgcc/libgcc_s/Makefile
cvs rdiff -u -r1.25 -r1.26 src/external/gpl3/gcc/lib/libgomp/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/lib/libgomp/defs.mk
cvs rdiff -u -r1.27 -r1.28 src/external/gpl3/gcc/lib/libiberty/defs.mk
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gcc/lib/libstdc++-v3/include/Makefile
cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gcc/lib/libubsan/Makefile
cvs rdiff -u -r1.32 -r1.33 src/external/gpl3/gcc/usr.bin/Makefile.inc
cvs rdiff -u -r1.63 -r1.64 src/external/gpl3/gcc/usr.bin/backend/Makefile
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/usr.bin/cc1plus/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/usr.bin/common/defs.mk
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/usr.bin/lto1/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/dist/gcc/config/netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.36 src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.37
--- src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.36	Sun Apr 11 00:02:12 2021
+++ src/external/gpl3/gcc/dist/gcc/config/netbsd.h	Mon Apr 12 00:05:54 2021
@@ -63,7 +63,7 @@ along with GCC; see the file COPYING3.  
  * XXX figure out a better way to do this
  */
 #undef GCC_INCLUDE_DIR
-#define GCC_INCLUDE_DIR "/usr/include/gcc-9"
+#define GCC_INCLUDE_DIR "/usr/include/gcc-10"
 
 /* Under NetBSD, the normal location of the various *crt*.o files is the
/usr/lib directory.  */

Index: src/external/gpl3/gcc/dist/libgomp/acc_prof.h
diff -u src/external/gpl3/gcc/dist/libgomp/acc_prof.h:1.1.1.1 src/external/gpl3/gcc/dist/libgomp/acc_prof.h:1.2
--- src/external/gpl3/gcc/dist/libgomp/acc_prof.h:1.1.1.1	Sat Apr 10 22:09:57 2021
+++ src/external/gpl3/gcc/dist/libgomp/acc_prof.h	Mon Apr 12 00:05:54 2021
@@ -235,7 +235,7 @@ extern void acc_prof_register (acc_event
 			   acc_register_t) __GOACC_NOTHROW;
 extern void acc_prof_unregister (acc_event_t, acc_prof_callback,
  acc_register_t) __GOACC_NOTHROW;
-typedef void (*acc_query_fn) ();
+typedef void (*acc_query_fn) (void);
 typedef acc_query_fn (*acc_prof_lookup_func) (const char *);
 extern acc_query_fn acc_prof_lookup (const char *) __GOACC_NOTHROW;
 /* Don't tag 'acc_register_library' as '__GOACC_NOTHROW': this function can be

Index: src/external/gpl3/gcc/dist/libstdc++-v3/include/ext/numeric_traits.h
diff -u src/external/gpl3/gcc/dist/libstdc++-v3/include/ext/numeric_traits.h:1.9 

CVS commit: src/external/gpl3/gcc

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 00:05:56 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/gcc/config: netbsd.h
src/external/gpl3/gcc/dist/libgomp: acc_prof.h
src/external/gpl3/gcc/dist/libstdc++-v3/include/ext: numeric_traits.h
src/external/gpl3/gcc/lib/libgcc: Makefile.inc
src/external/gpl3/gcc/lib/libgcc/libgcc: Makefile
src/external/gpl3/gcc/lib/libgcc/libgcc_eh: Makefile
src/external/gpl3/gcc/lib/libgcc/libgcc_s: Makefile
src/external/gpl3/gcc/lib/libgomp: Makefile defs.mk
src/external/gpl3/gcc/lib/libiberty: defs.mk
src/external/gpl3/gcc/lib/libstdc++-v3/include: Makefile
src/external/gpl3/gcc/lib/libubsan: Makefile
src/external/gpl3/gcc/usr.bin: Makefile.inc
src/external/gpl3/gcc/usr.bin/backend: Makefile
src/external/gpl3/gcc/usr.bin/cc1plus: Makefile
src/external/gpl3/gcc/usr.bin/common: defs.mk
src/external/gpl3/gcc/usr.bin/lto1: Makefile
Added Files:
src/external/gpl3/gcc: README.gcc10
Removed Files:
src/external/gpl3/gcc: README.gcc9

Log Message:
various changes to get GCC 10 to build here.

- fix path to compiler-specific includes
- missing (void) for (older) C
- fix __is_signed/__is_signed_val change
- avoid compiler warning-as-errors
- add to existing COPTS.file values, instead of setting
- bump libgomp minor; functions were added
- add new 'compare' c++ header
- handle new analyzer subdirectory.  set TARGET_MACHINE for lto-streamer-in.c.
  remove params.list etc handling.
- coroutines.cc is another .cc not .c.  adjust .PATH to suit.
- add new lto1 sources
- couple of files not in /arch/ subdirs missed in mknative update.

rs6000.c is still not merged.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/README.gcc10
cvs rdiff -u -r1.16 -r0 src/external/gpl3/gcc/README.gcc9
cvs rdiff -u -r1.36 -r1.37 src/external/gpl3/gcc/dist/gcc/config/netbsd.h
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/libgomp/acc_prof.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gcc/dist/libstdc++-v3/include/ext/numeric_traits.h
cvs rdiff -u -r1.46 -r1.47 src/external/gpl3/gcc/lib/libgcc/Makefile.inc
cvs rdiff -u -r1.28 -r1.29 src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gcc/lib/libgcc/libgcc_eh/Makefile
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/lib/libgcc/libgcc_s/Makefile
cvs rdiff -u -r1.25 -r1.26 src/external/gpl3/gcc/lib/libgomp/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/lib/libgomp/defs.mk
cvs rdiff -u -r1.27 -r1.28 src/external/gpl3/gcc/lib/libiberty/defs.mk
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gcc/lib/libstdc++-v3/include/Makefile
cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gcc/lib/libubsan/Makefile
cvs rdiff -u -r1.32 -r1.33 src/external/gpl3/gcc/usr.bin/Makefile.inc
cvs rdiff -u -r1.63 -r1.64 src/external/gpl3/gcc/usr.bin/backend/Makefile
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/usr.bin/cc1plus/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/usr.bin/common/defs.mk
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/usr.bin/lto1/Makefile

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



CVS commit: src/tools/gcc

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Apr 11 23:55:47 UTC 2021

Modified Files:
src/tools/gcc: Makefile gcc-version.mk

Log Message:
add a netbsd version for GCC 10.  properly generate omp-device-properties.h.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/tools/gcc/Makefile
cvs rdiff -u -r1.20 -r1.21 src/tools/gcc/gcc-version.mk

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/Makefile
diff -u src/tools/gcc/Makefile:1.101 src/tools/gcc/Makefile:1.102
--- src/tools/gcc/Makefile:1.101	Sun Apr 11 07:35:45 2021
+++ src/tools/gcc/Makefile	Sun Apr 11 23:55:47 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.101 2021/04/11 07:35:45 mrg Exp $
+#	$NetBSD: Makefile,v 1.102 2021/04/11 23:55:47 mrg Exp $
 
 .include 
 
@@ -234,7 +234,7 @@ MKENV_BUILD_MAKE=cd .native && ${MKNATIV
 		(cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e libgcc.mvars tconfig.h); \
 		(cd .native && touch gcc/cc1obj gcc/cc1plus gcc/f771 gcc/libgcc.a gcc/libgcc_s.so)
 	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
-		(cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e omp-device-properties.h)
+		(cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e s-omp-device-properties-h)
 .if defined(EXTRA_GCC_TARGETS)
 	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
 		(cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e ${EXTRA_GCC_TARGETS})

Index: src/tools/gcc/gcc-version.mk
diff -u src/tools/gcc/gcc-version.mk:1.20 src/tools/gcc/gcc-version.mk:1.21
--- src/tools/gcc/gcc-version.mk:1.20	Sun Sep  6 21:59:33 2020
+++ src/tools/gcc/gcc-version.mk	Sun Apr 11 23:55:47 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: gcc-version.mk,v 1.20 2020/09/06 21:59:33 mrg Exp $
+#	$NetBSD: gcc-version.mk,v 1.21 2021/04/11 23:55:47 mrg Exp $
 
 # common location for tools and native build
 
@@ -6,4 +6,6 @@
 NETBSD_GCC_VERSION=nb1 20200311
 .elif ${HAVE_GCC} == 9
 NETBSD_GCC_VERSION=nb1 20200907
+.elif ${HAVE_GCC} == 10
+NETBSD_GCC_VERSION=nb1 20210411
 .endif



CVS commit: src/tools/gcc

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Apr 11 23:55:47 UTC 2021

Modified Files:
src/tools/gcc: Makefile gcc-version.mk

Log Message:
add a netbsd version for GCC 10.  properly generate omp-device-properties.h.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/tools/gcc/Makefile
cvs rdiff -u -r1.20 -r1.21 src/tools/gcc/gcc-version.mk

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

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Apr 11 23:54:29 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer: ChangeLog LOCAL_PATCHES MERGE
Makefile.in aclocal.m4 configure configure.ac configure.tgt
merge.sh
src/external/gpl3/gcc/dist/libsanitizer/asan: Makefile.am Makefile.in
asan_activation.h asan_activation_flags.inc asan_allocator.h
asan_descriptions.h asan_errors.h asan_fake_stack.h asan_flags.h
asan_flags.inc asan_init_version.h asan_interceptors.h
asan_interceptors_memintrinsics.h asan_interface.inc
asan_interface_internal.h asan_internal.h asan_malloc_local.h
asan_mapping.h asan_mapping_myriad.h asan_mapping_sparc64.h
asan_poisoning.h asan_premap_shadow.h asan_report.h
asan_scariness_score.h asan_stack.h asan_stats.h
asan_suppressions.h asan_thread.h libtool-version
src/external/gpl3/gcc/dist/libsanitizer/builtins: assembly.h
src/external/gpl3/gcc/dist/libsanitizer/include/sanitizer:
allocator_interface.h asan_interface.h common_interface_defs.h
coverage_interface.h dfsan_interface.h hwasan_interface.h
linux_syscall_hooks.h lsan_interface.h msan_interface.h
scudo_interface.h tsan_interface.h tsan_interface_atomic.h
src/external/gpl3/gcc/dist/libsanitizer/interception: Makefile.am
Makefile.in interception.h interception_linux.h interception_mac.h
interception_win.h
src/external/gpl3/gcc/dist/libsanitizer/libbacktrace: Makefile.in
src/external/gpl3/gcc/dist/libsanitizer/lsan: Makefile.am Makefile.in
libtool-version lsan.h lsan_common.h lsan_flags.inc lsan_thread.h
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: Makefile.am
Makefile.in sancov_flags.h sancov_flags.inc sanitizer_addrhashmap.h
sanitizer_allocator.h sanitizer_allocator_bytemap.h
sanitizer_allocator_checks.h sanitizer_allocator_combined.h
sanitizer_allocator_interface.h sanitizer_allocator_internal.h
sanitizer_allocator_local_cache.h sanitizer_allocator_primary32.h
sanitizer_allocator_primary64.h sanitizer_allocator_report.h
sanitizer_allocator_secondary.h
sanitizer_allocator_size_class_map.h sanitizer_allocator_stats.h
sanitizer_asm.h sanitizer_atomic.h sanitizer_atomic_clang.h
sanitizer_atomic_clang_mips.h sanitizer_atomic_clang_other.h
sanitizer_atomic_clang_x86.h sanitizer_atomic_msvc.h
sanitizer_bitvector.h sanitizer_bvgraph.h sanitizer_common.h
sanitizer_common_interceptors.inc
sanitizer_common_interceptors_format.inc
sanitizer_common_interceptors_ioctl.inc
sanitizer_common_interface.inc sanitizer_common_interface_posix.inc
sanitizer_common_syscalls.inc sanitizer_coverage_interface.inc
sanitizer_dbghelp.h sanitizer_deadlock_detector.h
sanitizer_deadlock_detector_interface.h sanitizer_errno.h
sanitizer_errno_codes.h sanitizer_file.h sanitizer_flag_parser.h
sanitizer_flags.h sanitizer_flags.inc sanitizer_freebsd.h
sanitizer_fuchsia.h sanitizer_getauxval.h
sanitizer_interceptors_ioctl_netbsd.inc
sanitizer_interface_internal.h sanitizer_internal_defs.h
sanitizer_lfstack.h sanitizer_libc.h sanitizer_libignore.h
sanitizer_linux.h sanitizer_list.h sanitizer_mac.h
sanitizer_malloc_mac.inc sanitizer_mutex.h
sanitizer_persistent_allocator.h sanitizer_placement_new.h
sanitizer_platform.h sanitizer_platform_interceptors.h
sanitizer_platform_limits_netbsd.h
sanitizer_platform_limits_openbsd.h
sanitizer_platform_limits_solaris.h sanitizer_posix.h
sanitizer_procmaps.h sanitizer_quarantine.h
sanitizer_report_decorator.h sanitizer_ring_buffer.h
sanitizer_rtems.h sanitizer_signal_interceptors.inc
sanitizer_stackdepot.h sanitizer_stackdepotbase.h
sanitizer_stacktrace.h sanitizer_stacktrace_printer.h
sanitizer_stoptheworld.h sanitizer_suppressions.h
sanitizer_symbolizer.h sanitizer_symbolizer_fuchsia.h
sanitizer_symbolizer_internal.h sanitizer_symbolizer_libbacktrace.h
sanitizer_symbolizer_mac.h sanitizer_symbolizer_rtems.h
sanitizer_syscall_generic.inc sanitizer_syscall_linux_aarch64.inc
sanitizer_syscall_linux_arm.inc sanitizer_syscall_linux_x86_64.inc
sanitizer_syscalls_netbsd.inc sanitizer_thread_registry.h
sanitizer_tls_get_addr.h sanitizer_vector.h sanitizer_win.h
sanitizer_win_defs.h sanitizer_win_dll_thunk.h
sanitizer_win_weak_interception.h

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

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Apr 11 23:54:29 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer: ChangeLog LOCAL_PATCHES MERGE
Makefile.in aclocal.m4 configure configure.ac configure.tgt
merge.sh
src/external/gpl3/gcc/dist/libsanitizer/asan: Makefile.am Makefile.in
asan_activation.h asan_activation_flags.inc asan_allocator.h
asan_descriptions.h asan_errors.h asan_fake_stack.h asan_flags.h
asan_flags.inc asan_init_version.h asan_interceptors.h
asan_interceptors_memintrinsics.h asan_interface.inc
asan_interface_internal.h asan_internal.h asan_malloc_local.h
asan_mapping.h asan_mapping_myriad.h asan_mapping_sparc64.h
asan_poisoning.h asan_premap_shadow.h asan_report.h
asan_scariness_score.h asan_stack.h asan_stats.h
asan_suppressions.h asan_thread.h libtool-version
src/external/gpl3/gcc/dist/libsanitizer/builtins: assembly.h
src/external/gpl3/gcc/dist/libsanitizer/include/sanitizer:
allocator_interface.h asan_interface.h common_interface_defs.h
coverage_interface.h dfsan_interface.h hwasan_interface.h
linux_syscall_hooks.h lsan_interface.h msan_interface.h
scudo_interface.h tsan_interface.h tsan_interface_atomic.h
src/external/gpl3/gcc/dist/libsanitizer/interception: Makefile.am
Makefile.in interception.h interception_linux.h interception_mac.h
interception_win.h
src/external/gpl3/gcc/dist/libsanitizer/libbacktrace: Makefile.in
src/external/gpl3/gcc/dist/libsanitizer/lsan: Makefile.am Makefile.in
libtool-version lsan.h lsan_common.h lsan_flags.inc lsan_thread.h
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: Makefile.am
Makefile.in sancov_flags.h sancov_flags.inc sanitizer_addrhashmap.h
sanitizer_allocator.h sanitizer_allocator_bytemap.h
sanitizer_allocator_checks.h sanitizer_allocator_combined.h
sanitizer_allocator_interface.h sanitizer_allocator_internal.h
sanitizer_allocator_local_cache.h sanitizer_allocator_primary32.h
sanitizer_allocator_primary64.h sanitizer_allocator_report.h
sanitizer_allocator_secondary.h
sanitizer_allocator_size_class_map.h sanitizer_allocator_stats.h
sanitizer_asm.h sanitizer_atomic.h sanitizer_atomic_clang.h
sanitizer_atomic_clang_mips.h sanitizer_atomic_clang_other.h
sanitizer_atomic_clang_x86.h sanitizer_atomic_msvc.h
sanitizer_bitvector.h sanitizer_bvgraph.h sanitizer_common.h
sanitizer_common_interceptors.inc
sanitizer_common_interceptors_format.inc
sanitizer_common_interceptors_ioctl.inc
sanitizer_common_interface.inc sanitizer_common_interface_posix.inc
sanitizer_common_syscalls.inc sanitizer_coverage_interface.inc
sanitizer_dbghelp.h sanitizer_deadlock_detector.h
sanitizer_deadlock_detector_interface.h sanitizer_errno.h
sanitizer_errno_codes.h sanitizer_file.h sanitizer_flag_parser.h
sanitizer_flags.h sanitizer_flags.inc sanitizer_freebsd.h
sanitizer_fuchsia.h sanitizer_getauxval.h
sanitizer_interceptors_ioctl_netbsd.inc
sanitizer_interface_internal.h sanitizer_internal_defs.h
sanitizer_lfstack.h sanitizer_libc.h sanitizer_libignore.h
sanitizer_linux.h sanitizer_list.h sanitizer_mac.h
sanitizer_malloc_mac.inc sanitizer_mutex.h
sanitizer_persistent_allocator.h sanitizer_placement_new.h
sanitizer_platform.h sanitizer_platform_interceptors.h
sanitizer_platform_limits_netbsd.h
sanitizer_platform_limits_openbsd.h
sanitizer_platform_limits_solaris.h sanitizer_posix.h
sanitizer_procmaps.h sanitizer_quarantine.h
sanitizer_report_decorator.h sanitizer_ring_buffer.h
sanitizer_rtems.h sanitizer_signal_interceptors.inc
sanitizer_stackdepot.h sanitizer_stackdepotbase.h
sanitizer_stacktrace.h sanitizer_stacktrace_printer.h
sanitizer_stoptheworld.h sanitizer_suppressions.h
sanitizer_symbolizer.h sanitizer_symbolizer_fuchsia.h
sanitizer_symbolizer_internal.h sanitizer_symbolizer_libbacktrace.h
sanitizer_symbolizer_mac.h sanitizer_symbolizer_rtems.h
sanitizer_syscall_generic.inc sanitizer_syscall_linux_aarch64.inc
sanitizer_syscall_linux_arm.inc sanitizer_syscall_linux_x86_64.inc
sanitizer_syscalls_netbsd.inc sanitizer_thread_registry.h
sanitizer_tls_get_addr.h sanitizer_vector.h sanitizer_win.h
sanitizer_win_defs.h sanitizer_win_dll_thunk.h
sanitizer_win_weak_interception.h

CVS commit: src/usr.bin/make

2021-04-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 11 22:53:46 UTC 2021

Modified Files:
src/usr.bin/make: str.h var.c

Log Message:
make: improve performance for LazyBuf

The previous O(n^2) time complexity for parsing a long string with many
variable expressions was not meant to last for long.  I had hoped to fix
it within a few minutes, but that will take more time.

For now, make LazyBuf simpler by using a traditional C string for the
expected part instead of a Substring.  This avoids a strlen call per
Var_Parse.

No functional change, only performance.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/str.h
cvs rdiff -u -r1.922 -r1.923 src/usr.bin/make/var.c

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

Modified files:

Index: src/usr.bin/make/str.h
diff -u src/usr.bin/make/str.h:1.4 src/usr.bin/make/str.h:1.5
--- src/usr.bin/make/str.h:1.4	Sun Apr 11 20:38:43 2021
+++ src/usr.bin/make/str.h	Sun Apr 11 22:53:45 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: str.h,v 1.4 2021/04/11 20:38:43 rillig Exp $	*/
+/*	$NetBSD: str.h,v 1.5 2021/04/11 22:53:45 rillig Exp $	*/
 
 /*
  Copyright (c) 2021 Roland Illig 
@@ -59,7 +59,7 @@ typedef struct LazyBuf {
 	char *data;
 	size_t len;
 	size_t cap;
-	Substring expected;
+	const char *expected;
 	void *freeIt;
 } LazyBuf;
 
@@ -231,7 +231,7 @@ Substring_Basename(Substring pathname)
 
 
 MAKE_INLINE void
-LazyBuf_Init(LazyBuf *buf, Substring expected)
+LazyBuf_Init(LazyBuf *buf, const char *expected)
 {
 	buf->data = NULL;
 	buf->len = 0;
@@ -257,15 +257,14 @@ LazyBuf_Add(LazyBuf *buf, char ch)
 		}
 		buf->data[buf->len++] = ch;
 
-	} else if (buf->len < Substring_Length(buf->expected) &&
-	ch == buf->expected.start[buf->len]) {
+	} else if (ch == buf->expected[buf->len]) {
 		buf->len++;
 		return;
 
 	} else {
 		buf->cap = buf->len + 16;
 		buf->data = bmake_malloc(buf->cap);
-		memcpy(buf->data, buf->expected.start, buf->len);
+		memcpy(buf->data, buf->expected, buf->len);
 		buf->data[buf->len++] = ch;
 	}
 }
@@ -297,8 +296,7 @@ LazyBuf_AddSubstring(LazyBuf *buf, Subst
 MAKE_INLINE Substring
 LazyBuf_Get(const LazyBuf *buf)
 {
-	const char *start = buf->data != NULL
-	? buf->data : buf->expected.start;
+	const char *start = buf->data != NULL ? buf->data : buf->expected;
 	return Substring_Init(start, start + buf->len);
 }
 

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.922 src/usr.bin/make/var.c:1.923
--- src/usr.bin/make/var.c:1.922	Sun Apr 11 21:29:57 2021
+++ src/usr.bin/make/var.c	Sun Apr 11 22:53:45 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.922 2021/04/11 21:29:57 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.923 2021/04/11 22:53:45 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.922 2021/04/11 21:29:57 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.923 2021/04/11 22:53:45 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -2233,7 +2233,7 @@ ParseModifierPartSubst(
 	const char *p;
 
 	p = *pp;
-	LazyBuf_Init(part, Substring_InitStr(p)); /* TODO: O(n^2) */
+	LazyBuf_Init(part, p);
 
 	/*
 	 * Skim through until the matching delimiter is found; pick up
@@ -4136,7 +4136,7 @@ ParseVarname(const char **pp, char start
 	const char *p = *pp;
 	int depth = 0;		/* Track depth so we can spot parse errors. */
 
-	LazyBuf_Init(buf, Substring_InitStr(p));
+	LazyBuf_Init(buf, p);
 
 	while (*p != '\0') {
 		if ((*p == endc || *p == ':') && depth == 0)



CVS commit: src/usr.bin/make

2021-04-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 11 22:53:46 UTC 2021

Modified Files:
src/usr.bin/make: str.h var.c

Log Message:
make: improve performance for LazyBuf

The previous O(n^2) time complexity for parsing a long string with many
variable expressions was not meant to last for long.  I had hoped to fix
it within a few minutes, but that will take more time.

For now, make LazyBuf simpler by using a traditional C string for the
expected part instead of a Substring.  This avoids a strlen call per
Var_Parse.

No functional change, only performance.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/str.h
cvs rdiff -u -r1.922 -r1.923 src/usr.bin/make/var.c

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



CVS commit: src/usr.bin/make

2021-04-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 11 21:29:57 UTC 2021

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

Log Message:
make: remove redundant parameter from ParseVarnameLong

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.921 -r1.922 src/usr.bin/make/var.c

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



CVS commit: src/usr.bin/make

2021-04-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 11 21:29:57 UTC 2021

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

Log Message:
make: remove redundant parameter from ParseVarnameLong

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.921 -r1.922 src/usr.bin/make/var.c

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

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.921 src/usr.bin/make/var.c:1.922
--- src/usr.bin/make/var.c:1.921	Sun Apr 11 20:38:43 2021
+++ src/usr.bin/make/var.c	Sun Apr 11 21:29:57 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.921 2021/04/11 20:38:43 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.922 2021/04/11 21:29:57 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.921 2021/04/11 20:38:43 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.922 2021/04/11 21:29:57 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -4305,7 +4305,7 @@ EvalUndefined(bool dynamic, const char *
  */
 static bool
 ParseVarnameLong(
-	const char *p,
+	const char **pp,
 	char startc,
 	GNode *scope,
 	VarEvalMode emode,
@@ -4315,7 +4315,6 @@ ParseVarnameLong(
 	FStr *out_false_val,
 
 	char *out_true_endc,
-	const char **out_true_p,
 	Var **out_true_v,
 	bool *out_true_haveModifier,
 	const char **out_true_extraModifiers,
@@ -4328,6 +4327,7 @@ ParseVarnameLong(
 	bool haveModifier;
 	bool dynamic = false;
 
+	const char *p = *pp;
 	const char *const start = p;
 	char endc = startc == '(' ? ')' : '}';
 
@@ -4394,8 +4394,8 @@ ParseVarnameLong(
 	} else
 		LazyBuf_Done();
 
+	*pp = p;
 	*out_true_endc = endc;
-	*out_true_p = p;
 	*out_true_v = v;
 	*out_true_haveModifier = haveModifier;
 	*out_true_dynamic = dynamic;
@@ -4548,9 +4548,9 @@ Var_Parse(const char **pp, GNode *scope,
 		p++;
 	} else {
 		VarParseResult res;
-		if (!ParseVarnameLong(p, startc, scope, emode,
+		if (!ParseVarnameLong(, startc, scope, emode,
 		pp, , out_val,
-		, , , , ,
+		, , , ,
 		, ))
 			return res;
 	}



CVS commit: src/usr.bin/make

2021-04-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 11 20:38:43 UTC 2021

Modified Files:
src/usr.bin/make: str.h var.c

Log Message:
make: migrate ParseModifierPart to use Substring

This will reduce memory allocation for modifier parts without the escape
characters '$' or '\'.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/str.h
cvs rdiff -u -r1.920 -r1.921 src/usr.bin/make/var.c

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



CVS commit: src/usr.bin/make

2021-04-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 11 20:38:43 UTC 2021

Modified Files:
src/usr.bin/make: str.h var.c

Log Message:
make: migrate ParseModifierPart to use Substring

This will reduce memory allocation for modifier parts without the escape
characters '$' or '\'.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/str.h
cvs rdiff -u -r1.920 -r1.921 src/usr.bin/make/var.c

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

Modified files:

Index: src/usr.bin/make/str.h
diff -u src/usr.bin/make/str.h:1.3 src/usr.bin/make/str.h:1.4
--- src/usr.bin/make/str.h:1.3	Sun Apr 11 19:05:06 2021
+++ src/usr.bin/make/str.h	Sun Apr 11 20:38:43 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: str.h,v 1.3 2021/04/11 19:05:06 rillig Exp $	*/
+/*	$NetBSD: str.h,v 1.4 2021/04/11 20:38:43 rillig Exp $	*/
 
 /*
  Copyright (c) 2021 Roland Illig 
@@ -46,7 +46,7 @@ typedef struct MFStr {
 } MFStr;
 
 /* A read-only range of a character array, NOT null-terminated. */
-typedef struct {
+typedef struct Substring {
 	const char *start;
 	const char *end;
 } Substring;
@@ -279,6 +279,21 @@ LazyBuf_AddStr(LazyBuf *buf, const char 
 		LazyBuf_Add(buf, *p);
 }
 
+MAKE_INLINE void
+LazyBuf_AddBytesBetween(LazyBuf *buf, const char *start, const char *end)
+{
+	const char *p;
+
+	for (p = start; p != end; p++)
+		LazyBuf_Add(buf, *p);
+}
+
+MAKE_INLINE void
+LazyBuf_AddSubstring(LazyBuf *buf, Substring sub)
+{
+	LazyBuf_AddBytesBetween(buf, sub.start, sub.end);
+}
+
 MAKE_INLINE Substring
 LazyBuf_Get(const LazyBuf *buf)
 {

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.920 src/usr.bin/make/var.c:1.921
--- src/usr.bin/make/var.c:1.920	Sun Apr 11 19:05:06 2021
+++ src/usr.bin/make/var.c	Sun Apr 11 20:38:43 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.920 2021/04/11 19:05:06 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.921 2021/04/11 20:38:43 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.920 2021/04/11 19:05:06 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.921 2021/04/11 20:38:43 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -1618,7 +1618,7 @@ ModifyWord_Subst(Substring word, SepBuf 
 		return;
 	}
 
-	if (args->lhs.start[0] == '\0')
+	if (Substring_IsEmpty(args->lhs))
 		goto nosub;
 
 	/* unanchored case, may match more than once */
@@ -1626,7 +1626,7 @@ ModifyWord_Subst(Substring word, SepBuf 
 		SepBuf_AddBytesBetween(buf, word.start, match);
 		SepBuf_AddSubstring(buf, args->rhs);
 		args->matched = true;
-		word.start += (size_t)(match - word.start) + lhsLen;
+		word.start = match + lhsLen;
 		if (Substring_IsEmpty(word) || !args->pflags.subGlobal)
 			break;
 	}
@@ -1649,7 +1649,7 @@ VarREError(int reerr, const regex_t *pat
 struct ModifyWord_SubstRegexArgs {
 	regex_t re;
 	size_t nsub;
-	char *replace;
+	const char *replace;
 	VarPatternFlags pflags;
 	bool matched;
 };
@@ -1664,7 +1664,7 @@ ModifyWord_SubstRegex(Substring word, Se
 	struct ModifyWord_SubstRegexArgs *args = data;
 	int xrv;
 	const char *wp;
-	char *rp;
+	const char *rp;
 	int flags = 0;
 	regmatch_t m[10];
 
@@ -1749,8 +1749,8 @@ tryagain:
 
 struct ModifyWord_LoopArgs {
 	GNode *scope;
-	char *tvar;		/* name of temporary variable */
-	char *str;		/* string to expand */
+	const char *tvar;	/* name of temporary variable */
+	const char *str;	/* string to expand */
 	VarEvalMode emode;
 };
 
@@ -2157,17 +2157,22 @@ Expr_Define(Expr *expr)
 }
 
 static void
-Expr_SetValueOwn(Expr *expr, char *value)
+Expr_SetValue(Expr *expr, FStr value)
 {
 	FStr_Done(>value);
-	expr->value = FStr_InitOwn(value);
+	expr->value = value;
+}
+
+static void
+Expr_SetValueOwn(Expr *expr, char *value)
+{
+	Expr_SetValue(expr, FStr_InitOwn(value));
 }
 
 static void
 Expr_SetValueRefer(Expr *expr, const char *value)
 {
-	FStr_Done(>value);
-	expr->value = FStr_InitRefer(value);
+	Expr_SetValue(expr, FStr_InitRefer(value));
 }
 
 static bool
@@ -2216,10 +2221,7 @@ ParseModifierPartSubst(
 char delim,
 VarEvalMode emode,
 ModChain *ch,
-char **out_part,
-/* Optionally stores the end of the returned string, just to save
- * another strlen call. */
-const char **out_part_end,
+LazyBuf *part,
 /* For the first part of the :S modifier, sets the VARP_ANCHOR_END flag
  * if the last character of the pattern is a $. */
 VarPatternFlags *out_pflags,
@@ -2228,31 +2230,29 @@ ParseModifierPartSubst(
 struct ModifyWord_SubstArgs *subst
 )
 {
-	Buffer buf;
 	const char *p;
 
-	Buf_Init();
+	p = *pp;
+	LazyBuf_Init(part, Substring_InitStr(p)); /* TODO: O(n^2) */
 
 	/*
 	 * Skim through until the matching delimiter is found; pick up
 	 * variable expressions on the way.
 	 */
-	p = *pp;
 	while (*p != '\0' && *p != delim) {
 		

CVS commit: src/external/gpl3/gcc

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Apr 11 20:27:11 UTC 2021

Modified Files:
src/external/gpl3/gcc/lib/libbacktrace/arch/aarch64:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/aarch64eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/alpha:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earm: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmeb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmhfeb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6hf:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6hfeb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7hf:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7hfeb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/hppa: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/i386: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/ia64: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/m68000:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/m68k: 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/riscv32:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/riscv64:
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/sparc:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/sparc64:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/vax: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/x86_64:
backtrace-supported.h
src/external/gpl3/gcc/lib/libgcc/arch/aarch64: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/aarch64eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/alpha: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earm: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmeb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmhfeb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv4: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv4eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6hf: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6hfeb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7hf: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7hfeb: 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: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/ia64: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/m68000: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/m68k: 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

CVS commit: src/external/gpl3/gcc

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Apr 11 20:27:11 UTC 2021

Modified Files:
src/external/gpl3/gcc/lib/libbacktrace/arch/aarch64:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/aarch64eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/alpha:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earm: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmeb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmhfeb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6hf:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6hfeb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7hf:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7hfeb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/hppa: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/i386: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/ia64: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/m68000:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/m68k: 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/riscv32:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/riscv64:
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/sparc:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/sparc64:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/vax: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/x86_64:
backtrace-supported.h
src/external/gpl3/gcc/lib/libgcc/arch/aarch64: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/aarch64eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/alpha: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earm: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmeb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmhfeb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv4: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv4eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6hf: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6hfeb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7hf: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7hfeb: 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: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/ia64: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/m68000: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/m68k: 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

CVS commit: src/usr.bin/make

2021-04-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 11 19:05:06 UTC 2021

Modified Files:
src/usr.bin/make: str.c str.h var.c

Log Message:
make: avoid unnecessary calls to strlen when evaluating modifiers

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/usr.bin/make/str.c
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/str.h
cvs rdiff -u -r1.919 -r1.920 src/usr.bin/make/var.c

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

Modified files:

Index: src/usr.bin/make/str.c
diff -u src/usr.bin/make/str.c:1.83 src/usr.bin/make/str.c:1.84
--- src/usr.bin/make/str.c:1.83	Sat Apr  3 14:39:02 2021
+++ src/usr.bin/make/str.c	Sun Apr 11 19:05:06 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: str.c,v 1.83 2021/04/03 14:39:02 rillig Exp $	*/
+/*	$NetBSD: str.c,v 1.84 2021/04/11 19:05:06 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -71,7 +71,7 @@
 #include "make.h"
 
 /*	"@(#)str.c	5.8 (Berkeley) 6/1/90"	*/
-MAKE_RCSID("$NetBSD: str.c,v 1.83 2021/04/03 14:39:02 rillig Exp $");
+MAKE_RCSID("$NetBSD: str.c,v 1.84 2021/04/11 19:05:06 rillig Exp $");
 
 /* Return the concatenation of s1 and s2, freshly allocated. */
 char *
@@ -125,13 +125,13 @@ str_concat4(const char *s1, const char *
  * Returns the fractured words, which must be freed later using Words_Free,
  * unless the returned Words.words was NULL.
  */
-Words
-Str_Words(const char *str, bool expand)
+SubstringWords
+Substring_Words(const char *str, bool expand)
 {
 	size_t str_len;
 	char *words_buf;
 	size_t words_cap;
-	char **words;
+	Substring *words;
 	size_t words_len;
 	char inquote;
 	char *word_start;
@@ -146,7 +146,7 @@ Str_Words(const char *str, bool expand)
 	words_buf = bmake_malloc(str_len + 1);
 
 	words_cap = str_len / 5 > 50 ? str_len / 5 : 50;
-	words = bmake_malloc((words_cap + 1) * sizeof(char *));
+	words = bmake_malloc((words_cap + 1) * sizeof(words[0]));
 
 	/*
 	 * copy the string; at the same time, parse backslashes,
@@ -205,15 +205,16 @@ Str_Words(const char *str, bool expand)
 			*word_end++ = '\0';
 			if (words_len == words_cap) {
 size_t new_size;
-words_cap *= 2;		/* ramp up fast */
-new_size = (words_cap + 1) * sizeof(char *);
+words_cap *= 2;
+new_size = (words_cap + 1) * sizeof(words[0]);
 words = bmake_realloc(words, new_size);
 			}
-			words[words_len++] = word_start;
+			words[words_len++] =
+			Substring_Init(word_start, word_end - 1);
 			word_start = NULL;
 			if (ch == '\n' || ch == '\0') {
 if (expand && inquote != '\0') {
-	Words res;
+	SubstringWords res;
 
 	free(words);
 	free(words_buf);
@@ -268,10 +269,10 @@ Str_Words(const char *str, bool expand)
 		*word_end++ = ch;
 	}
 done:
-	words[words_len] = NULL;	/* useful for argv */
+	words[words_len] = Substring_Init(NULL, NULL);	/* useful for argv */
 
 	{
-		Words result;
+		SubstringWords result;
 
 		result.words = words;
 		result.len = words_len;
@@ -280,6 +281,30 @@ done:
 	}
 }
 
+Words
+Str_Words(const char *str, bool expand)
+{
+	SubstringWords swords;
+	Words words;
+	size_t i;
+
+	swords = Substring_Words(str, expand);
+	if (swords.words == NULL) {
+		words.words = NULL;
+		words.len = 0;
+		words.freeIt = NULL;
+		return words;
+	}
+
+	words.words = bmake_malloc((swords.len + 1) * sizeof(words.words[0]));
+	words.len = swords.len;
+	words.freeIt = swords.freeIt;
+	for (i = 0; i < swords.len + 1; i++)
+		words.words[i] = UNCONST(swords.words[i].start);
+	free(swords.words);
+	return words;
+}
+
 /*
  * Str_Match -- Test if a string matches a pattern like "*.[ch]".
  * The following special characters are known *?\[] (as in fnmatch(3)).

Index: src/usr.bin/make/str.h
diff -u src/usr.bin/make/str.h:1.2 src/usr.bin/make/str.h:1.3
--- src/usr.bin/make/str.h:1.2	Sun Apr 11 18:44:57 2021
+++ src/usr.bin/make/str.h	Sun Apr 11 19:05:06 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: str.h,v 1.2 2021/04/11 18:44:57 rillig Exp $	*/
+/*	$NetBSD: str.h,v 1.3 2021/04/11 19:05:06 rillig Exp $	*/
 
 /*
  Copyright (c) 2021 Roland Illig 
@@ -70,6 +70,13 @@ typedef struct Words {
 	void *freeIt;
 } Words;
 
+/* The result of splitting a string into words. */
+typedef struct SubstringWords {
+	Substring *words;
+	size_t len;
+	void *freeIt;
+} SubstringWords;
+
 
 MAKE_INLINE FStr
 FStr_Init(const char *str, void *freeIt)
@@ -301,6 +308,16 @@ Words_Free(Words w)
 }
 
 
+SubstringWords Substring_Words(const char *, bool);
+
+MAKE_INLINE void
+SubstringWords_Free(SubstringWords w)
+{
+	free(w.words);
+	free(w.freeIt);
+}
+
+
 char *str_concat2(const char *, const char *);
 char *str_concat3(const char *, const char *, const char *);
 char *str_concat4(const char *, const char *, const char *, const char *);

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.919 src/usr.bin/make/var.c:1.920
--- src/usr.bin/make/var.c:1.919	Sun Apr 11 18:44:57 2021
+++ src/usr.bin/make/var.c	Sun Apr 11 19:05:06 2021
@@ 

CVS commit: src/usr.bin/make

2021-04-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 11 19:05:06 UTC 2021

Modified Files:
src/usr.bin/make: str.c str.h var.c

Log Message:
make: avoid unnecessary calls to strlen when evaluating modifiers

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/usr.bin/make/str.c
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/str.h
cvs rdiff -u -r1.919 -r1.920 src/usr.bin/make/var.c

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



CVS commit: src/usr.bin/make

2021-04-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 11 18:44:58 UTC 2021

Modified Files:
src/usr.bin/make: str.h var.c

Log Message:
make: migrate ModifyWord functions to use Substring

This benefits the modifiers ':T' and ':H' since these scan the word from
the end.  The SysV modifier '.c=.o' does not benefit yet, this will be
done in a follow-up commit.

Currently ModifyWords calls strlen for each single word, which degrades
performance.  This will be cleaned up in a follow-up commit as well.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/str.h
cvs rdiff -u -r1.918 -r1.919 src/usr.bin/make/var.c

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

Modified files:

Index: src/usr.bin/make/str.h
diff -u src/usr.bin/make/str.h:1.1 src/usr.bin/make/str.h:1.2
--- src/usr.bin/make/str.h:1.1	Sun Apr 11 12:06:53 2021
+++ src/usr.bin/make/str.h	Sun Apr 11 18:44:57 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: str.h,v 1.1 2021/04/11 12:06:53 rillig Exp $	*/
+/*	$NetBSD: str.h,v 1.2 2021/04/11 18:44:57 rillig Exp $	*/
 
 /*
  Copyright (c) 2021 Roland Illig 
@@ -162,6 +162,12 @@ Substring_Length(Substring sub)
 }
 
 MAKE_INLINE bool
+Substring_IsEmpty(Substring sub)
+{
+	return sub.start == sub.end;
+}
+
+MAKE_INLINE bool
 Substring_Equals(Substring sub, const char *str)
 {
 	size_t len = strlen(str);
@@ -183,6 +189,39 @@ Substring_Str(Substring sub)
 	return FStr_InitOwn(bmake_strsedup(sub.start, sub.end));
 }
 
+MAKE_INLINE const char *
+Substring_LastIndex(Substring sub, char ch)
+{
+	const char *p;
+
+	for (p = sub.end; p != sub.start; p--)
+		if (p[-1] == ch)
+			return p - 1;
+	return NULL;
+}
+
+MAKE_INLINE Substring
+Substring_Dirname(Substring pathname)
+{
+	const char *p;
+
+	for (p = pathname.end; p != pathname.start; p--)
+		if (p[-1] == '/')
+			return Substring_Init(pathname.start, p - 1);
+	return Substring_InitStr(".");
+}
+
+MAKE_INLINE Substring
+Substring_Basename(Substring pathname)
+{
+	const char *p;
+
+	for (p = pathname.end; p != pathname.start; p--)
+		if (p[-1] == '/')
+			return Substring_Init(p, pathname.end);
+	return pathname;
+}
+
 
 MAKE_INLINE void
 LazyBuf_Init(LazyBuf *buf, Substring expected)

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.918 src/usr.bin/make/var.c:1.919
--- src/usr.bin/make/var.c:1.918	Sun Apr 11 17:48:01 2021
+++ src/usr.bin/make/var.c	Sun Apr 11 18:44:57 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.918 2021/04/11 17:48:01 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.919 2021/04/11 18:44:57 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.918 2021/04/11 17:48:01 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.919 2021/04/11 18:44:57 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -1334,6 +1334,12 @@ SepBuf_AddStr(SepBuf *buf, const char *s
 	SepBuf_AddBytes(buf, str, strlen(str));
 }
 
+static void
+SepBuf_AddSubstring(SepBuf *buf, Substring sub)
+{
+	SepBuf_AddBytesBetween(buf, sub.start, sub.end);
+}
+
 static char *
 SepBuf_DoneData(SepBuf *buf)
 {
@@ -1348,8 +1354,12 @@ SepBuf_DoneData(SepBuf *buf)
  *
  * For example, when evaluating the modifier ':M*b' in ${:Ua b c:M*b}, the
  * callback is called 3 times, once for "a", "b" and "c".
+ *
+ * Some ModifyWord functions assume that they are always passed a
+ * null-terminated substring, which is currently guaranteed but may change in
+ * the future.
  */
-typedef void (*ModifyWordProc)(const char *word, SepBuf *buf, void *data);
+typedef void (*ModifyWordProc)(Substring word, SepBuf *buf, void *data);
 
 
 /*
@@ -1358,13 +1368,9 @@ typedef void (*ModifyWordProc)(const cha
  */
 /*ARGSUSED*/
 static void
-ModifyWord_Head(const char *word, SepBuf *buf, void *dummy MAKE_ATTR_UNUSED)
+ModifyWord_Head(Substring word, SepBuf *buf, void *dummy MAKE_ATTR_UNUSED)
 {
-	const char *slash = strrchr(word, '/');
-	if (slash != NULL)
-		SepBuf_AddBytesBetween(buf, word, slash);
-	else
-		SepBuf_AddStr(buf, ".");
+	SepBuf_AddSubstring(buf, Substring_Dirname(word));
 }
 
 /*
@@ -1373,9 +1379,9 @@ ModifyWord_Head(const char *word, SepBuf
  */
 /*ARGSUSED*/
 static void
-ModifyWord_Tail(const char *word, SepBuf *buf, void *dummy MAKE_ATTR_UNUSED)
+ModifyWord_Tail(Substring word, SepBuf *buf, void *dummy MAKE_ATTR_UNUSED)
 {
-	SepBuf_AddStr(buf, str_basename(word));
+	SepBuf_AddSubstring(buf, Substring_Basename(word));
 }
 
 /*
@@ -1384,11 +1390,11 @@ ModifyWord_Tail(const char *word, SepBuf
  */
 /*ARGSUSED*/
 static void
-ModifyWord_Suffix(const char *word, SepBuf *buf, void *dummy MAKE_ATTR_UNUSED)
+ModifyWord_Suffix(Substring word, SepBuf *buf, void *dummy MAKE_ATTR_UNUSED)
 {
-	const char *lastDot = strrchr(word, '.');
+	const char *lastDot = Substring_LastIndex(word, '.');
 	if (lastDot != NULL)
-		

CVS commit: src/usr.bin/make

2021-04-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 11 18:44:58 UTC 2021

Modified Files:
src/usr.bin/make: str.h var.c

Log Message:
make: migrate ModifyWord functions to use Substring

This benefits the modifiers ':T' and ':H' since these scan the word from
the end.  The SysV modifier '.c=.o' does not benefit yet, this will be
done in a follow-up commit.

Currently ModifyWords calls strlen for each single word, which degrades
performance.  This will be cleaned up in a follow-up commit as well.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/str.h
cvs rdiff -u -r1.918 -r1.919 src/usr.bin/make/var.c

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



CVS commit: src/sys/dev

2021-04-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Apr 11 18:18:39 UTC 2021

Modified Files:
src/sys/dev: vnd.c

Log Message:
Provide a default preferred I/O size.


To generate a diff of this commit:
cvs rdiff -u -r1.279 -r1.280 src/sys/dev/vnd.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/vnd.c
diff -u src/sys/dev/vnd.c:1.279 src/sys/dev/vnd.c:1.280
--- src/sys/dev/vnd.c:1.279	Sun Apr 11 18:17:22 2021
+++ src/sys/dev/vnd.c	Sun Apr 11 18:18:39 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnd.c,v 1.279 2021/04/11 18:17:22 mlelstv Exp $	*/
+/*	$NetBSD: vnd.c,v 1.280 2021/04/11 18:18:39 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008, 2020 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.279 2021/04/11 18:17:22 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.280 2021/04/11 18:18:39 mlelstv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_vnd.h"
@@ -1433,6 +1433,10 @@ vndioctl(dev_t dev, u_long cmd, void *da
 		if (error)
 			vnd->sc_iosize = vnd->sc_vp->v_mount->mnt_stat.f_frsize;
 
+		/* Default I/O size to DEV_BSIZE */
+		if (vnd->sc_iosize == 0)
+			vnd->sc_iosize = DEV_BSIZE;
+
 		/*
 		 * Use pseudo-geometry specified.  If none was provided,
 		 * use "standard" Adaptec fictitious geometry.



CVS commit: src/sys/dev

2021-04-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Apr 11 18:18:39 UTC 2021

Modified Files:
src/sys/dev: vnd.c

Log Message:
Provide a default preferred I/O size.


To generate a diff of this commit:
cvs rdiff -u -r1.279 -r1.280 src/sys/dev/vnd.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

2021-04-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Apr 11 18:17:22 UTC 2021

Modified Files:
src/sys/dev: vnd.c

Log Message:
Don't truncate disk size to full cylinders.


To generate a diff of this commit:
cvs rdiff -u -r1.278 -r1.279 src/sys/dev/vnd.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

2021-04-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Apr 11 18:17:22 UTC 2021

Modified Files:
src/sys/dev: vnd.c

Log Message:
Don't truncate disk size to full cylinders.


To generate a diff of this commit:
cvs rdiff -u -r1.278 -r1.279 src/sys/dev/vnd.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/vnd.c
diff -u src/sys/dev/vnd.c:1.278 src/sys/dev/vnd.c:1.279
--- src/sys/dev/vnd.c:1.278	Mon Jan  4 16:17:26 2021
+++ src/sys/dev/vnd.c	Sun Apr 11 18:17:22 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnd.c,v 1.278 2021/01/04 16:17:26 mlelstv Exp $	*/
+/*	$NetBSD: vnd.c,v 1.279 2021/04/11 18:17:22 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008, 2020 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.278 2021/01/04 16:17:26 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.279 2021/04/11 18:17:22 mlelstv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_vnd.h"
@@ -2104,11 +2104,12 @@ static void
 vnd_set_geometry(struct vnd_softc *vnd)
 {
 	struct disk_geom *dg = >sc_dkdev.dk_geom;
+	unsigned spb;
 
 	memset(dg, 0, sizeof(*dg));
 
-	dg->dg_secperunit = (int64_t)vnd->sc_geom.vng_nsectors *
-	vnd->sc_geom.vng_ntracks * vnd->sc_geom.vng_ncylinders;
+	spb = vnd->sc_geom.vng_secsize / DEV_BSIZE;
+	dg->dg_secperunit = vnd->sc_size / spb;
 	dg->dg_secsize = vnd->sc_geom.vng_secsize;
 	dg->dg_nsectors = vnd->sc_geom.vng_nsectors;
 	dg->dg_ntracks = vnd->sc_geom.vng_ntracks;



CVS commit: src/usr.bin/make

2021-04-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 11 17:48:01 UTC 2021

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

Log Message:
make: migrate handling of the modifier ':S,from,to,' to Substring

Right now this does not gain any performance, it only makes the code in
ModifyWord_Subst a little simpler since it only uses
Buf_AddBytesBetween, not a mixture with Buf_AddBytes.

When the word passed to the ModifyWord functions is converted to
Substring as well, the call to strlen will become redundant.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.917 -r1.918 src/usr.bin/make/var.c

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

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.917 src/usr.bin/make/var.c:1.918
--- src/usr.bin/make/var.c:1.917	Sun Apr 11 13:35:56 2021
+++ src/usr.bin/make/var.c	Sun Apr 11 17:48:01 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.917 2021/04/11 13:35:56 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.918 2021/04/11 17:48:01 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.917 2021/04/11 13:35:56 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.918 2021/04/11 17:48:01 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -1541,14 +1541,25 @@ ModifyWord_SYSVSubst(const char *word, S
 
 
 struct ModifyWord_SubstArgs {
-	const char *lhs;
-	size_t lhsLen;
-	const char *rhs;
-	size_t rhsLen;
+	Substring lhs;
+	Substring rhs;
 	VarPatternFlags pflags;
 	bool matched;
 };
 
+static const char *
+Substring_Find(Substring haystack, Substring needle)
+{
+	size_t len, needleLen, i;
+
+	len = Substring_Length(haystack);
+	needleLen = Substring_Length(needle);
+	for (i = 0; i + needleLen <= len; i++)
+		if (memcmp(haystack.start + i, needle.start, needleLen) == 0)
+			return haystack.start + i;
+	return NULL;
+}
+
 /*
  * Callback for ModifyWords to implement the :S,from,to, modifier.
  * Perform a string substitution on the given word.
@@ -1556,61 +1567,59 @@ struct ModifyWord_SubstArgs {
 static void
 ModifyWord_Subst(const char *word, SepBuf *buf, void *data)
 {
-	size_t wordLen = strlen(word);
 	struct ModifyWord_SubstArgs *args = data;
-	const char *match;
+	size_t wordLen, lhsLen;
+	const char *wordEnd, *match;
 
+	wordLen = strlen(word);
+	wordEnd = word + wordLen;
 	if (args->pflags.subOnce && args->matched)
 		goto nosub;
 
+	lhsLen = Substring_Length(args->lhs);
 	if (args->pflags.anchorStart) {
-		if (wordLen < args->lhsLen ||
-		memcmp(word, args->lhs, args->lhsLen) != 0)
+		if (wordLen < lhsLen ||
+		memcmp(word, args->lhs.start, lhsLen) != 0)
 			goto nosub;
 
-		if (args->pflags.anchorEnd && wordLen != args->lhsLen)
+		if (args->pflags.anchorEnd && wordLen != lhsLen)
 			goto nosub;
 
 		/* :S,^prefix,replacement, or :S,^whole$,replacement, */
-		SepBuf_AddBytes(buf, args->rhs, args->rhsLen);
-		SepBuf_AddBytesBetween(buf,
-		word + args->lhsLen, word + wordLen);
+		SepBuf_AddBytesBetween(buf, args->rhs.start, args->rhs.end);
+		SepBuf_AddBytesBetween(buf, word + lhsLen, wordEnd);
 		args->matched = true;
 		return;
 	}
 
 	if (args->pflags.anchorEnd) {
-		const char *start;
-
-		if (wordLen < args->lhsLen)
+		if (wordLen < lhsLen)
 			goto nosub;
-
-		start = word + (wordLen - args->lhsLen);
-		if (memcmp(start, args->lhs, args->lhsLen) != 0)
+		if (memcmp(wordEnd - lhsLen, args->lhs.start, lhsLen) != 0)
 			goto nosub;
 
 		/* :S,suffix$,replacement, */
-		SepBuf_AddBytesBetween(buf, word, start);
-		SepBuf_AddBytes(buf, args->rhs, args->rhsLen);
+		SepBuf_AddBytesBetween(buf, word, wordEnd - lhsLen);
+		SepBuf_AddBytesBetween(buf, args->rhs.start, args->rhs.end);
 		args->matched = true;
 		return;
 	}
 
-	if (args->lhs[0] == '\0')
+	if (args->lhs.start[0] == '\0')
 		goto nosub;
 
 	/* unanchored case, may match more than once */
-	while ((match = strstr(word, args->lhs)) != NULL) {
+	while ((match = Substring_Find(Substring_Init(word, wordEnd),
+	args->lhs)) != NULL) {
 		SepBuf_AddBytesBetween(buf, word, match);
-		SepBuf_AddBytes(buf, args->rhs, args->rhsLen);
+		SepBuf_AddBytesBetween(buf, args->rhs.start, args->rhs.end);
 		args->matched = true;
-		wordLen -= (size_t)(match - word) + args->lhsLen;
-		word += (size_t)(match - word) + args->lhsLen;
-		if (wordLen == 0 || !args->pflags.subGlobal)
+		word += (size_t)(match - word) + lhsLen;
+		if (word == wordEnd || !args->pflags.subGlobal)
 			break;
 	}
 nosub:
-	SepBuf_AddBytes(buf, word, wordLen);
+	SepBuf_AddBytesBetween(buf, word, wordEnd);
 }
 
 #ifndef NO_REGEX
@@ -2189,9 +2198,9 @@ ParseModifierPartSubst(
 VarEvalMode emode,
 ModChain *ch,
 char **out_part,
-/* Optionally stores the length of the returned string, just to save
+/* Optionally stores the end of the returned 

CVS commit: src/usr.bin/make

2021-04-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 11 17:48:01 UTC 2021

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

Log Message:
make: migrate handling of the modifier ':S,from,to,' to Substring

Right now this does not gain any performance, it only makes the code in
ModifyWord_Subst a little simpler since it only uses
Buf_AddBytesBetween, not a mixture with Buf_AddBytes.

When the word passed to the ModifyWord functions is converted to
Substring as well, the call to strlen will become redundant.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.917 -r1.918 src/usr.bin/make/var.c

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



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc

2021-04-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Apr 11 16:21:05 UTC 2021

Added Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: modes.inc

Log Message:
Restore r1.3 of modes.inc: we are using this directory for the
-m32 compat builds on sparc64, where the sparcv9 instructions
and the GHASH asm code are usefull.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.6 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc

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

Added files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc
diff -u /dev/null src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc:1.6
--- /dev/null	Sun Apr 11 16:21:05 2021
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc	Sun Apr 11 16:21:04 2021
@@ -0,0 +1,7 @@
+.if ${MACHINE} == "sparc64"
+.PATH.S: ${.PARSEDIR}
+MODES_SRCS = ghash-sparcv9.S
+MODESCPPFLAGS = -DGHASH_ASM
+AFLAGS.ghash-sparcv9.S+= -Wa,-Av9
+.endif
+.include "../../modes.inc"



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc

2021-04-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Apr 11 16:21:05 UTC 2021

Added Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: modes.inc

Log Message:
Restore r1.3 of modes.inc: we are using this directory for the
-m32 compat builds on sparc64, where the sparcv9 instructions
and the GHASH asm code are usefull.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.6 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc

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



CVS commit: src/usr.bin/make

2021-04-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 11 13:35:56 UTC 2021

Modified Files:
src/usr.bin/make: nonints.h var.c
src/usr.bin/make/unit-tests: cond-func-empty.mk varmod-defined.mk
varmod-ifelse.mk varmod-loop.mk

Log Message:
make: clean up remaining references to VarEvalFlags

VarEvalFlags has been replaced with VarEvalMode.  There were some
comments and tests that still referred to the old names.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.212 -r1.213 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.916 -r1.917 src/usr.bin/make/var.c
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/cond-func-empty.mk
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/varmod-defined.mk \
src/usr.bin/make/unit-tests/varmod-ifelse.mk
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/make/unit-tests/varmod-loop.mk

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

Modified files:

Index: src/usr.bin/make/nonints.h
diff -u src/usr.bin/make/nonints.h:1.212 src/usr.bin/make/nonints.h:1.213
--- src/usr.bin/make/nonints.h:1.212	Sun Apr 11 12:06:53 2021
+++ src/usr.bin/make/nonints.h	Sun Apr 11 13:35:56 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: nonints.h,v 1.212 2021/04/11 12:06:53 rillig Exp $	*/
+/*	$NetBSD: nonints.h,v 1.213 2021/04/11 13:35:56 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -292,7 +292,7 @@ typedef enum VarParseResult {
 	 * information to them, for now.
 	 *
 	 * TODO: Instead of having this special return value, rather ensure
-	 *  that VarEvalFlags.keepUndef is processed properly.
+	 *  that VARE_EVAL_KEEP_UNDEF is processed properly.
 	 */
 	VPR_UNDEF
 

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.916 src/usr.bin/make/var.c:1.917
--- src/usr.bin/make/var.c:1.916	Sun Apr 11 12:46:54 2021
+++ src/usr.bin/make/var.c	Sun Apr 11 13:35:56 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.916 2021/04/11 12:46:54 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.917 2021/04/11 13:35:56 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.916 2021/04/11 12:46:54 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.917 2021/04/11 13:35:56 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -272,11 +272,11 @@ char var_Error[] = "";
 
 /*
  * Special return value for Var_Parse, indicating an undefined variable in
- * a case where VarEvalFlags.undefErr is not set.  This undefined variable is
+ * a case where VARE_UNDEFERR is not set.  This undefined variable is
  * typically a dynamic variable such as ${.TARGET}, whose expansion needs to
  * be deferred until it is defined in an actual target.
  *
- * See VarEvalFlags.keepUndef.
+ * See VARE_EVAL_KEEP_UNDEF.
  */
 static char varUndefined[] = "";
 
@@ -2253,7 +2253,7 @@ ParseModifierPartSubst(
 
 		/*
 		 * XXX: This whole block is very similar to Var_Parse without
-		 * VarEvalFlags.wantRes.  There may be subtle edge cases
+		 * VARE_WANTRES.  There may be subtle edge cases
 		 * though that are not yet covered in the unit tests and that
 		 * are parsed differently, depending on whether they are
 		 * evaluated or not.
@@ -4352,18 +4352,18 @@ FreeEnvVar(Var *v, FStr *inout_val)
 }
 
 #if __STDC_VERSION__ >= 199901L
-#define Expr_Literal(name, value, eflags, scope, defined) \
-	{ name, value, eflags, scope, defined }
+#define Expr_Literal(name, value, emode, scope, defined) \
+	{ name, value, emode, scope, defined }
 #else
 MAKE_INLINE Expr
 Expr_Literal(const char *name, FStr value,
-	 VarEvalFlags eflags, GNode *scope, ExprDefined defined)
+	 VarEvalMode emode, GNode *scope, ExprDefined defined)
 {
 	Expr expr;
 
 	expr.name = name;
 	expr.value = value;
-	expr.eflags = eflags;
+	expr.emode = emode;
 	expr.scope = scope;
 	expr.defined = defined;
 	return expr;
@@ -4412,7 +4412,7 @@ Var_Parse_FastLane(const char **pp, VarE
  *			point to the "y" of "empty(VARNAME:Modifiers)", which
  *			is syntactically the same.
  *	scope		The scope for finding variables
- *	eflags		Control the exact details of parsing
+ *	emode		Controls the exact details of parsing and evaluation
  *
  * Output:
  *	*pp		The position where to continue parsing.
@@ -4424,13 +4424,13 @@ Var_Parse_FastLane(const char **pp, VarE
  *	*out_val	The value of the variable expression, never NULL.
  *	*out_val	var_Error if there was a parse error.
  *	*out_val	var_Error if the base variable of the expression was
- *			undefined, eflags has undefErr set, and none of
+ *			undefined, emode is VARE_UNDEFERR, and none of
  *			the modifiers turned the undefined expression into a
  *			defined expression.
  *			XXX: It is not guaranteed that an error message has
  *			been printed.
  *	*out_val	varUndefined if the base variable of the expression
- *			was undefined, eflags did not 

CVS commit: src/usr.bin/make

2021-04-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 11 13:35:56 UTC 2021

Modified Files:
src/usr.bin/make: nonints.h var.c
src/usr.bin/make/unit-tests: cond-func-empty.mk varmod-defined.mk
varmod-ifelse.mk varmod-loop.mk

Log Message:
make: clean up remaining references to VarEvalFlags

VarEvalFlags has been replaced with VarEvalMode.  There were some
comments and tests that still referred to the old names.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.212 -r1.213 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.916 -r1.917 src/usr.bin/make/var.c
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/cond-func-empty.mk
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/varmod-defined.mk \
src/usr.bin/make/unit-tests/varmod-ifelse.mk
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/make/unit-tests/varmod-loop.mk

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



CVS commit: src/usr.bin/make

2021-04-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 11 12:46:55 UTC 2021

Modified Files:
src/usr.bin/make: hash.c hash.h var.c

Log Message:
make: avoid allocating memory for simple variable names

The main change is in ParseVarname, where a Buffer is replaced with the
newly introduced LazyBuf.  LazyBuf is inspired by
https://golang.org/src/path/path.go.

In CanonicalVarname, the pre-comparison of the first letter of the
variable name is no longer necessary.  GCC 9 optimizes a fixed-length
memcmp so well that the code can finally be written to target human
readers, leaving the optimization to the compiler.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/usr.bin/make/hash.c
cvs rdiff -u -r1.39 -r1.40 src/usr.bin/make/hash.h
cvs rdiff -u -r1.915 -r1.916 src/usr.bin/make/var.c

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

Modified files:

Index: src/usr.bin/make/hash.c
diff -u src/usr.bin/make/hash.c:1.63 src/usr.bin/make/hash.c:1.64
--- src/usr.bin/make/hash.c:1.63	Sat Apr  3 14:39:02 2021
+++ src/usr.bin/make/hash.c	Sun Apr 11 12:46:54 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: hash.c,v 1.63 2021/04/03 14:39:02 rillig Exp $	*/
+/*	$NetBSD: hash.c,v 1.64 2021/04/11 12:46:54 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -74,7 +74,7 @@
 #include "make.h"
 
 /*	"@(#)hash.c	8.1 (Berkeley) 6/6/93"	*/
-MAKE_RCSID("$NetBSD: hash.c,v 1.63 2021/04/03 14:39:02 rillig Exp $");
+MAKE_RCSID("$NetBSD: hash.c,v 1.64 2021/04/11 12:46:54 rillig Exp $");
 
 /*
  * The ratio of # entries to # buckets at which we rebuild the table to
@@ -84,7 +84,7 @@ MAKE_RCSID("$NetBSD: hash.c,v 1.63 2021/
 
 /* This hash function matches Gosling's Emacs and java.lang.String. */
 static unsigned int
-hash(const char *key, size_t *out_keylen)
+Hash_String(const char *key, size_t *out_keylen)
 {
 	unsigned int h;
 	const char *p;
@@ -98,10 +98,17 @@ hash(const char *key, size_t *out_keylen
 	return h;
 }
 
+/* This hash function matches Gosling's Emacs and java.lang.String. */
 unsigned int
-Hash_Hash(const char *key)
+Hash_Substring(Substring key)
 {
-	return hash(key, NULL);
+	unsigned int h;
+	const char *p;
+
+	h = 0;
+	for (p = key.start; p != key.end; p++)
+		h = 31 * h + (unsigned char)*p;
+	return h;
 }
 
 static HashEntry *
@@ -126,6 +133,41 @@ HashTable_Find(HashTable *t, unsigned in
 	return e;
 }
 
+static bool
+HashEntry_KeyEquals(const HashEntry *he, Substring key)
+{
+	const char *heKey, *p;
+
+	heKey = he->key;
+	for (p = key.start; p != key.end; p++, heKey++)
+		if (*p != *heKey || *heKey == '\0')
+			return false;
+	return *heKey == '\0';
+}
+
+static HashEntry *
+HashTable_FindEntryBySubstring(HashTable *t, Substring key, unsigned int h)
+{
+	HashEntry *e;
+	unsigned int chainlen = 0;
+
+#ifdef DEBUG_HASH_LOOKUP
+	DEBUG4(HASH, "%s: %p h=%08x key=%.*s\n", __func__, t, h,
+	(int)Substring_Length(key), key.start);
+#endif
+
+	for (e = t->buckets[h & t->bucketsMask]; e != NULL; e = e->next) {
+		chainlen++;
+		if (e->key_hash == h && HashEntry_KeyEquals(e, key))
+			break;
+	}
+
+	if (chainlen > t->maxchain)
+		t->maxchain = chainlen;
+
+	return e;
+}
+
 /* Set up the hash table. */
 void
 HashTable_Init(HashTable *t)
@@ -171,7 +213,7 @@ HashTable_Done(HashTable *t)
 HashEntry *
 HashTable_FindEntry(HashTable *t, const char *key)
 {
-	unsigned int h = hash(key, NULL);
+	unsigned int h = Hash_String(key, NULL);
 	return HashTable_Find(t, h, key);
 }
 
@@ -188,9 +230,9 @@ HashTable_FindValue(HashTable *t, const 
  * or return NULL.
  */
 void *
-HashTable_FindValueHash(HashTable *t, const char *key, unsigned int h)
+HashTable_FindValueBySubstringHash(HashTable *t, Substring key, unsigned int h)
 {
-	HashEntry *he = HashTable_Find(t, h, key);
+	HashEntry *he = HashTable_FindEntryBySubstring(t, key, h);
 	return he != NULL ? he->value : NULL;
 }
 
@@ -239,7 +281,7 @@ HashEntry *
 HashTable_CreateEntry(HashTable *t, const char *key, bool *out_isNew)
 {
 	size_t keylen;
-	unsigned int h = hash(key, );
+	unsigned int h = Hash_String(key, );
 	HashEntry *he = HashTable_Find(t, h, key);
 
 	if (he != NULL) {

Index: src/usr.bin/make/hash.h
diff -u src/usr.bin/make/hash.h:1.39 src/usr.bin/make/hash.h:1.40
--- src/usr.bin/make/hash.h:1.39	Sat Apr  3 11:08:40 2021
+++ src/usr.bin/make/hash.h	Sun Apr 11 12:46:54 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: hash.h,v 1.39 2021/04/03 11:08:40 rillig Exp $	*/
+/*	$NetBSD: hash.h,v 1.40 2021/04/11 12:46:54 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -124,8 +124,8 @@ void HashTable_Init(HashTable *);
 void HashTable_Done(HashTable *);
 HashEntry *HashTable_FindEntry(HashTable *, const char *);
 void *HashTable_FindValue(HashTable *, const char *);
-unsigned int Hash_Hash(const char *);
-void *HashTable_FindValueHash(HashTable *, const char *, unsigned int);
+unsigned int 

CVS commit: src/usr.bin/make

2021-04-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 11 12:46:55 UTC 2021

Modified Files:
src/usr.bin/make: hash.c hash.h var.c

Log Message:
make: avoid allocating memory for simple variable names

The main change is in ParseVarname, where a Buffer is replaced with the
newly introduced LazyBuf.  LazyBuf is inspired by
https://golang.org/src/path/path.go.

In CanonicalVarname, the pre-comparison of the first letter of the
variable name is no longer necessary.  GCC 9 optimizes a fixed-length
memcmp so well that the code can finally be written to target human
readers, leaving the optimization to the compiler.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/usr.bin/make/hash.c
cvs rdiff -u -r1.39 -r1.40 src/usr.bin/make/hash.h
cvs rdiff -u -r1.915 -r1.916 src/usr.bin/make/var.c

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



CVS commit: src/usr.bin/make

2021-04-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 11 12:06:53 UTC 2021

Modified Files:
src/usr.bin/make: make.h nonints.h
Added Files:
src/usr.bin/make: str.h

Log Message:
make: add types Substring and LazyBuf

These will be used for making the string handling more efficient,
avoiding allocations, especially when evaluating variable expressions.

Since the string handling has grown quite a bit in the last months,
extract it into its own header file.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.260 -r1.261 src/usr.bin/make/make.h
cvs rdiff -u -r1.211 -r1.212 src/usr.bin/make/nonints.h
cvs rdiff -u -r0 -r1.1 src/usr.bin/make/str.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.bin/make/make.h
diff -u src/usr.bin/make/make.h:1.260 src/usr.bin/make/make.h:1.261
--- src/usr.bin/make/make.h:1.260	Sun Apr  4 10:05:08 2021
+++ src/usr.bin/make/make.h	Sun Apr 11 12:06:53 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: make.h,v 1.260 2021/04/04 10:05:08 rillig Exp $	*/
+/*	$NetBSD: make.h,v 1.261 2021/04/11 12:06:53 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -149,10 +149,11 @@ typedef unsigned int Boolean;
 
 #include "lst.h"
 #include "enum.h"
+#include "make_malloc.h"
+#include "str.h"
 #include "hash.h"
 #include "config.h"
 #include "buf.h"
-#include "make_malloc.h"
 
 /*
  * The typical flow of states is:

Index: src/usr.bin/make/nonints.h
diff -u src/usr.bin/make/nonints.h:1.211 src/usr.bin/make/nonints.h:1.212
--- src/usr.bin/make/nonints.h:1.211	Sun Apr  4 11:56:43 2021
+++ src/usr.bin/make/nonints.h	Sun Apr 11 12:06:53 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: nonints.h,v 1.211 2021/04/04 11:56:43 rillig Exp $	*/
+/*	$NetBSD: nonints.h,v 1.212 2021/04/11 12:06:53 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -166,112 +166,6 @@ void Parse_SetInput(const char *, int, i
 void Parse_MainName(GNodeList *);
 int Parse_GetFatals(void);
 
-/* str.c */
-
-/* A read-only string that may need to be freed after use. */
-typedef struct FStr {
-	const char *str;
-	void *freeIt;
-} FStr;
-
-/* A modifiable string that may need to be freed after use. */
-typedef struct MFStr {
-	char *str;
-	void *freeIt;
-} MFStr;
-
-typedef struct Words {
-	char **words;
-	size_t len;
-	void *freeIt;
-} Words;
-
-#if __STDC_VERSION__ >= 199901L
-#  define FStr_Literal(str, freeIt) (FStr) { str, freeIt }
-#else
-MAKE_INLINE FStr
-FStr_Literal(const char *str, void *freeIt)
-{
-	FStr fstr;
-	fstr.str = str;
-	fstr.freeIt = freeIt;
-	return fstr;
-}
-#endif
-
-/* Return a string that is the sole owner of str. */
-MAKE_INLINE FStr
-FStr_InitOwn(char *str)
-{
-	return FStr_Literal(str, str);
-}
-
-/* Return a string that refers to the shared str. */
-MAKE_INLINE FStr
-FStr_InitRefer(const char *str)
-{
-	return FStr_Literal(str, NULL);
-}
-
-MAKE_INLINE void
-FStr_Done(FStr *fstr)
-{
-	free(fstr->freeIt);
-#ifdef CLEANUP
-	fstr->str = NULL;
-	fstr->freeIt = NULL;
-#endif
-}
-
-#if __STDC_VERSION__ >= 199901L
-#  define MFStr_Literal(str, freeIt) (MFStr) { str, freeIt }
-#else
-MAKE_INLINE MFStr
-MFStr_Literal(char *str, void *freeIt)
-{
-	MFStr mfstr;
-	mfstr.str = str;
-	mfstr.freeIt = freeIt;
-	return mfstr;
-}
-#endif
-
-/* Return a string that is the sole owner of str. */
-MAKE_INLINE MFStr
-MFStr_InitOwn(char *str)
-{
-	return MFStr_Literal(str, str);
-}
-
-/* Return a string that refers to the shared str. */
-MAKE_INLINE MFStr
-MFStr_InitRefer(char *str)
-{
-	return MFStr_Literal(str, NULL);
-}
-
-MAKE_INLINE void
-MFStr_Done(MFStr *mfstr)
-{
-	free(mfstr->freeIt);
-#ifdef CLEANUP
-	mfstr->str = NULL;
-	mfstr->freeIt = NULL;
-#endif
-}
-
-Words Str_Words(const char *, bool);
-MAKE_INLINE void
-Words_Free(Words w)
-{
-	free(w.words);
-	free(w.freeIt);
-}
-
-char *str_concat2(const char *, const char *);
-char *str_concat3(const char *, const char *, const char *);
-char *str_concat4(const char *, const char *, const char *, const char *);
-bool Str_Match(const char *, const char *);
 
 /* suff.c */
 void Suff_Init(void);

Added files:

Index: src/usr.bin/make/str.h
diff -u /dev/null src/usr.bin/make/str.h:1.1
--- /dev/null	Sun Apr 11 12:06:53 2021
+++ src/usr.bin/make/str.h	Sun Apr 11 12:06:53 2021
@@ -0,0 +1,269 @@
+/*	$NetBSD: str.h,v 1.1 2021/04/11 12:06:53 rillig Exp $	*/
+
+/*
+ Copyright (c) 2021 Roland Illig 
+ 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 

CVS commit: src/usr.bin/make

2021-04-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 11 12:06:53 UTC 2021

Modified Files:
src/usr.bin/make: make.h nonints.h
Added Files:
src/usr.bin/make: str.h

Log Message:
make: add types Substring and LazyBuf

These will be used for making the string handling more efficient,
avoiding allocations, especially when evaluating variable expressions.

Since the string handling has grown quite a bit in the last months,
extract it into its own header file.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.260 -r1.261 src/usr.bin/make/make.h
cvs rdiff -u -r1.211 -r1.212 src/usr.bin/make/nonints.h
cvs rdiff -u -r0 -r1.1 src/usr.bin/make/str.h

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



CVS commit: src/usr.bin/make

2021-04-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 11 11:41:27 UTC 2021

Modified Files:
src/usr.bin/make: Makefile

Log Message:
make: clean up Makefile

The dependencies on the header files are handled by 'make depend'.  They
do not need to be spelled out.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/usr.bin/make/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.113 src/usr.bin/make/Makefile:1.114
--- src/usr.bin/make/Makefile:1.113	Mon Feb 22 20:45:46 2021
+++ src/usr.bin/make/Makefile	Sun Apr 11 11:41:27 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.113 2021/02/22 20:45:46 rillig Exp $
+#	$NetBSD: Makefile,v 1.114 2021/04/11 11:41:27 rillig Exp $
 #	@(#)Makefile	5.2 (Berkeley) 12/28/90
 
 PROG=	make
@@ -23,20 +23,6 @@ SRCS+=  targ.c
 SRCS+=  trace.c
 SRCS+=  var.c
 SRCS+=  util.c
-HDRS=   buf.h
-HDRS+=  config.h
-HDRS+=  dir.h
-HDRS+=  enum.h
-HDRS+=  hash.h
-HDRS+=  job.h
-HDRS+=  lst.h
-HDRS+=  make.h
-HDRS+=  make_malloc.h
-HDRS+=  meta.h
-HDRS+=  metachar.h
-HDRS+=  nonints.h
-HDRS+=  pathnames.h
-HDRS+=  trace.h
 
 # Whether to generate a coverage report after running the tests.
 USE_COVERAGE?=	no		# works only with gcc; clang9 fails to link
@@ -128,9 +114,7 @@ SUBDIR+=	unit-tests
 .endif
 
 LINTFLAGS+=	-T	# strict bool mode, available since 2021-01-11
-
-${SRCS:M*.c:.c=.o}: ${HDRS}
-CLEANFILES+=	*.o
+CLEANFILES+=	*.o	# for filemon objects
 
 COPTS.arch.c+=	${GCC_NO_FORMAT_TRUNCATION}
 COPTS.dir.c+=	${GCC_NO_FORMAT_TRUNCATION}



CVS commit: src/usr.bin/make

2021-04-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Apr 11 11:41:27 UTC 2021

Modified Files:
src/usr.bin/make: Makefile

Log Message:
make: clean up Makefile

The dependencies on the header files are handled by 'make depend'.  They
do not need to be spelled out.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/usr.bin/make/Makefile

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



CVS commit: src/external/mit/ctwm/etc

2021-04-11 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Apr 11 11:05:50 UTC 2021

Modified Files:
src/external/mit/ctwm/etc: system.ctwmrc

Log Message:
ctwmrc: add DontShowWelcomeWindow, new in 4.x


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/mit/ctwm/etc/system.ctwmrc

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

Modified files:

Index: src/external/mit/ctwm/etc/system.ctwmrc
diff -u src/external/mit/ctwm/etc/system.ctwmrc:1.12 src/external/mit/ctwm/etc/system.ctwmrc:1.13
--- src/external/mit/ctwm/etc/system.ctwmrc:1.12	Thu Mar  4 08:35:58 2021
+++ src/external/mit/ctwm/etc/system.ctwmrc	Sun Apr 11 11:05:49 2021
@@ -1,5 +1,5 @@
 #
-# $NetBSD: system.ctwmrc,v 1.12 2021/03/04 08:35:58 nia Exp $
+# $NetBSD: system.ctwmrc,v 1.13 2021/04/11 11:05:49 nia Exp $
 #
 # ctwmrc by nia
 #
@@ -15,6 +15,8 @@
 # don't use the default buttons or key bindings, we define our own
 NoDefaults
 
+DontShowWelcomeWindow
+
 ShowWorkSpaceManager
 ShowIconManager
 



CVS commit: src/external/mit/ctwm/etc

2021-04-11 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Apr 11 11:05:50 UTC 2021

Modified Files:
src/external/mit/ctwm/etc: system.ctwmrc

Log Message:
ctwmrc: add DontShowWelcomeWindow, new in 4.x


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/mit/ctwm/etc/system.ctwmrc

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



CVS commit: xsrc/external/mit/ctwm

2021-04-11 Thread Nia Alarie
Module Name:xsrc
Committed By:   nia
Date:   Sun Apr 11 11:00:30 UTC 2021

Added Files:
xsrc/external/mit/ctwm: prepare-import.sh
Removed Files:
xsrc/external/mit/ctwm/dist: CHANGES.html CMakeLists.txt Doxyfile.in
README.html image_jpeg.c image_jpeg.h sound.c sound.h
xsrc/external/mit/ctwm/dist/examples: example.ctwmrc levitte.ctwmrc
peterc.ctwmrc
xsrc/external/mit/ctwm/dist/gen: ctwm.1.html
xsrc/external/mit/ctwm/dist/minibuild: README.md defs.mk main.mk
mkmk.sh
xsrc/external/mit/ctwm/dist/tools: ctwm.astyle mk_atoms.sh
mk_ctf_info.sh mk_deftwmrc.sh mk_event_names.sh mk_function_bits.sh
mk_tar.sh mk_version_in.sh rewrite_version_bzr.sh
rewrite_version_git.sh try_all_opts.pl

Log Message:
Remove some files we don't need, add a prepare-import script to automate it


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 xsrc/external/mit/ctwm/prepare-import.sh
cvs rdiff -u -r1.1.1.1 -r0 xsrc/external/mit/ctwm/dist/CHANGES.html \
xsrc/external/mit/ctwm/dist/CMakeLists.txt \
xsrc/external/mit/ctwm/dist/Doxyfile.in \
xsrc/external/mit/ctwm/dist/README.html \
xsrc/external/mit/ctwm/dist/image_jpeg.c \
xsrc/external/mit/ctwm/dist/image_jpeg.h
cvs rdiff -u -r1.2 -r0 xsrc/external/mit/ctwm/dist/sound.c \
xsrc/external/mit/ctwm/dist/sound.h
cvs rdiff -u -r1.1.1.1 -r0 \
xsrc/external/mit/ctwm/dist/examples/example.ctwmrc \
xsrc/external/mit/ctwm/dist/examples/levitte.ctwmrc \
xsrc/external/mit/ctwm/dist/examples/peterc.ctwmrc
cvs rdiff -u -r1.1.1.1 -r0 xsrc/external/mit/ctwm/dist/gen/ctwm.1.html
cvs rdiff -u -r1.1.1.1 -r0 xsrc/external/mit/ctwm/dist/minibuild/README.md \
xsrc/external/mit/ctwm/dist/minibuild/defs.mk \
xsrc/external/mit/ctwm/dist/minibuild/main.mk \
xsrc/external/mit/ctwm/dist/minibuild/mkmk.sh
cvs rdiff -u -r1.1.1.1 -r0 xsrc/external/mit/ctwm/dist/tools/ctwm.astyle \
xsrc/external/mit/ctwm/dist/tools/mk_atoms.sh \
xsrc/external/mit/ctwm/dist/tools/mk_ctf_info.sh \
xsrc/external/mit/ctwm/dist/tools/mk_deftwmrc.sh \
xsrc/external/mit/ctwm/dist/tools/mk_event_names.sh \
xsrc/external/mit/ctwm/dist/tools/mk_function_bits.sh \
xsrc/external/mit/ctwm/dist/tools/mk_tar.sh \
xsrc/external/mit/ctwm/dist/tools/mk_version_in.sh \
xsrc/external/mit/ctwm/dist/tools/rewrite_version_bzr.sh \
xsrc/external/mit/ctwm/dist/tools/rewrite_version_git.sh \
xsrc/external/mit/ctwm/dist/tools/try_all_opts.pl

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

Added files:

Index: xsrc/external/mit/ctwm/prepare-import.sh
diff -u /dev/null xsrc/external/mit/ctwm/prepare-import.sh:1.1
--- /dev/null	Sun Apr 11 11:00:30 2021
+++ xsrc/external/mit/ctwm/prepare-import.sh	Sun Apr 11 11:00:29 2021
@@ -0,0 +1,17 @@
+#!/bin/sh
+# $NetBSD: prepare-import.sh,v 1.1 2021/04/11 11:00:29 nia Exp $
+#
+# Run this script and check for additional files and
+# directories to prune, only relevant content is included.
+
+set -e
+
+cd dist
+rm -f CMakeLists.txt Doxyfile.in
+rm -f README.html CHANGES.html
+rm -f system.ctwmrc examples/*.ctwmrc
+rm -f tools/*.sh tools/*.pl tools/*.astyle
+rm -f minibuild/*.mk minibuild/*.sh minibuild/*.md
+rm -f gen/ctwm.1.html
+rm -f image_jpeg.c image_jpeg.h
+rm -f sound.c sound.h



CVS commit: xsrc/external/mit/ctwm

2021-04-11 Thread Nia Alarie
Module Name:xsrc
Committed By:   nia
Date:   Sun Apr 11 11:00:30 UTC 2021

Added Files:
xsrc/external/mit/ctwm: prepare-import.sh
Removed Files:
xsrc/external/mit/ctwm/dist: CHANGES.html CMakeLists.txt Doxyfile.in
README.html image_jpeg.c image_jpeg.h sound.c sound.h
xsrc/external/mit/ctwm/dist/examples: example.ctwmrc levitte.ctwmrc
peterc.ctwmrc
xsrc/external/mit/ctwm/dist/gen: ctwm.1.html
xsrc/external/mit/ctwm/dist/minibuild: README.md defs.mk main.mk
mkmk.sh
xsrc/external/mit/ctwm/dist/tools: ctwm.astyle mk_atoms.sh
mk_ctf_info.sh mk_deftwmrc.sh mk_event_names.sh mk_function_bits.sh
mk_tar.sh mk_version_in.sh rewrite_version_bzr.sh
rewrite_version_git.sh try_all_opts.pl

Log Message:
Remove some files we don't need, add a prepare-import script to automate it


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 xsrc/external/mit/ctwm/prepare-import.sh
cvs rdiff -u -r1.1.1.1 -r0 xsrc/external/mit/ctwm/dist/CHANGES.html \
xsrc/external/mit/ctwm/dist/CMakeLists.txt \
xsrc/external/mit/ctwm/dist/Doxyfile.in \
xsrc/external/mit/ctwm/dist/README.html \
xsrc/external/mit/ctwm/dist/image_jpeg.c \
xsrc/external/mit/ctwm/dist/image_jpeg.h
cvs rdiff -u -r1.2 -r0 xsrc/external/mit/ctwm/dist/sound.c \
xsrc/external/mit/ctwm/dist/sound.h
cvs rdiff -u -r1.1.1.1 -r0 \
xsrc/external/mit/ctwm/dist/examples/example.ctwmrc \
xsrc/external/mit/ctwm/dist/examples/levitte.ctwmrc \
xsrc/external/mit/ctwm/dist/examples/peterc.ctwmrc
cvs rdiff -u -r1.1.1.1 -r0 xsrc/external/mit/ctwm/dist/gen/ctwm.1.html
cvs rdiff -u -r1.1.1.1 -r0 xsrc/external/mit/ctwm/dist/minibuild/README.md \
xsrc/external/mit/ctwm/dist/minibuild/defs.mk \
xsrc/external/mit/ctwm/dist/minibuild/main.mk \
xsrc/external/mit/ctwm/dist/minibuild/mkmk.sh
cvs rdiff -u -r1.1.1.1 -r0 xsrc/external/mit/ctwm/dist/tools/ctwm.astyle \
xsrc/external/mit/ctwm/dist/tools/mk_atoms.sh \
xsrc/external/mit/ctwm/dist/tools/mk_ctf_info.sh \
xsrc/external/mit/ctwm/dist/tools/mk_deftwmrc.sh \
xsrc/external/mit/ctwm/dist/tools/mk_event_names.sh \
xsrc/external/mit/ctwm/dist/tools/mk_function_bits.sh \
xsrc/external/mit/ctwm/dist/tools/mk_tar.sh \
xsrc/external/mit/ctwm/dist/tools/mk_version_in.sh \
xsrc/external/mit/ctwm/dist/tools/rewrite_version_bzr.sh \
xsrc/external/mit/ctwm/dist/tools/rewrite_version_git.sh \
xsrc/external/mit/ctwm/dist/tools/try_all_opts.pl

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



CVS commit: src/external/mit/ctwm/bin/ctwm

2021-04-11 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Apr 11 10:52:16 UTC 2021

Modified Files:
src/external/mit/ctwm/bin/ctwm: Makefile

Log Message:
ctwm: build autogenerated files from gen/


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/mit/ctwm/bin/ctwm/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/mit/ctwm/bin/ctwm/Makefile
diff -u src/external/mit/ctwm/bin/ctwm/Makefile:1.9 src/external/mit/ctwm/bin/ctwm/Makefile:1.10
--- src/external/mit/ctwm/bin/ctwm/Makefile:1.9	Sun Apr 11 10:29:50 2021
+++ src/external/mit/ctwm/bin/ctwm/Makefile	Sun Apr 11 10:52:16 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.9 2021/04/11 10:29:50 nia Exp $
+#	$NetBSD: Makefile,v 1.10 2021/04/11 10:52:16 nia Exp $
 
 .include 
 
@@ -15,11 +15,13 @@ SRCS=	add_window.c animate.c captive.c c
 	session.c util.c vscreen.c win_decorations.c win_decorations_init.c \
 	win_iconify.c win_ops.c win_regions.c win_resize.c win_utils.c \
 	windowbox.c workspace_config.c workspace_manager.c workspace_utils.c \
-	ctwm_atoms.c deftwmrc.c gram.tab.c lex.c version.c \
+	ctwm_atoms.c deftwmrc.c version.c \
 	image_xpm.c parse_m4.c ewmh.c ewmh_atoms.c ctwm_wrap.c
 
 SRCS+=	repl_str.c
 
+SRCS+=	gram.tab.c lex.c
+
 YHEADER=1
 
 CTWMCONFIGDIR=		${X11ETCDIR}/ctwm
@@ -27,7 +29,7 @@ CTWMCONFIGDIR=		${X11ETCDIR}/ctwm
 CTWMDIR=		${X11SRCDIR}/external/mit/ctwm/dist
 XPMDIR=			${X11INCDIR}/X11/pixmaps/ctwm
 
-CPPFLAGS+=		-I. -I${CTWMDIR} \
+CPPFLAGS+=		-I. -I${CTWMDIR} -I${CTWMDIR}/gen \
 			-DUSE_XPM -DUSE_M4 -DUSE_EWMH -DUSE_SREGEX \
 			-DPIXMAP_DIRECTORY=\"${XPMDIR}\" \
 			-DSYSTEM_INIT_FILE=\"${CTWMCONFIGDIR}/system.ctwmrc\" \
@@ -58,7 +60,7 @@ FILES=			3D_Expand15.xpm 3D_Iconify15.xp
 LDADD+=	-lXpm  -lXmu -lXt -lSM -lICE -lXext -lX11
 DPADD+=	${LIBXPM} ${LIBXMU} ${LIBXT} ${LIBSM} ${LIBICE} ${LIBXEXT} ${LIBX11}
 
-.PATH:	${CTWMDIR} ${CTWMDIR}/xpm ${CTWMDIR}/ext
+.PATH:	${CTWMDIR} ${CTWMDIR}/xpm ${CTWMDIR}/ext ${CTWMDIR}/gen
 
 .include 
 .include 



CVS commit: src/external/mit/ctwm/bin/ctwm

2021-04-11 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Apr 11 10:52:16 UTC 2021

Modified Files:
src/external/mit/ctwm/bin/ctwm: Makefile

Log Message:
ctwm: build autogenerated files from gen/


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/mit/ctwm/bin/ctwm/Makefile

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



CVS commit: xsrc/external/mit/ctwm/dist

2021-04-11 Thread Nia Alarie
Module Name:xsrc
Committed By:   nia
Date:   Sun Apr 11 10:51:49 UTC 2021

Removed Files:
xsrc/external/mit/ctwm/dist: gram.tab.c gram.tab.h lex.c

Log Message:
Remove accidental duplicates of autogenerated files


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 xsrc/external/mit/ctwm/dist/gram.tab.c \
xsrc/external/mit/ctwm/dist/lex.c
cvs rdiff -u -r1.2 -r0 xsrc/external/mit/ctwm/dist/gram.tab.h

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



CVS commit: xsrc/external/mit/ctwm/dist

2021-04-11 Thread Nia Alarie
Module Name:xsrc
Committed By:   nia
Date:   Sun Apr 11 10:51:49 UTC 2021

Removed Files:
xsrc/external/mit/ctwm/dist: gram.tab.c gram.tab.h lex.c

Log Message:
Remove accidental duplicates of autogenerated files


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 xsrc/external/mit/ctwm/dist/gram.tab.c \
xsrc/external/mit/ctwm/dist/lex.c
cvs rdiff -u -r1.2 -r0 xsrc/external/mit/ctwm/dist/gram.tab.h

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



CVS commit: src/external/mit/ctwm/bin/ctwm

2021-04-11 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Apr 11 10:29:50 UTC 2021

Modified Files:
src/external/mit/ctwm/bin/ctwm: Makefile

Log Message:
Update build recipe for ctwm-4.0.3


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/mit/ctwm/bin/ctwm/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/mit/ctwm/bin/ctwm/Makefile
diff -u src/external/mit/ctwm/bin/ctwm/Makefile:1.8 src/external/mit/ctwm/bin/ctwm/Makefile:1.9
--- src/external/mit/ctwm/bin/ctwm/Makefile:1.8	Mon Sep 28 06:04:08 2020
+++ src/external/mit/ctwm/bin/ctwm/Makefile	Sun Apr 11 10:29:50 2021
@@ -1,12 +1,24 @@
-#	$NetBSD: Makefile,v 1.8 2020/09/28 06:04:08 nia Exp $
+#	$NetBSD: Makefile,v 1.9 2021/04/11 10:29:50 nia Exp $
 
 .include 
 
 PROG=	ctwm
-SRCS=	add_window.c deftwmrc.c  events.c gram.tab.c gc.c \
-	list.c util.c ctwm.c lex.c parse.c menus.c resize.c \
-	version.c iconmgr.c cursor.c icons.c workmgr.c windowbox.c \
-	clicktofocus.c vscreen.c session.c mwmhints.c gnome.c
+SRCS=	add_window.c animate.c captive.c clargs.c clicktofocus.c \
+	colormaps.c ctopts.c ctwm_main.c cursor.c drawing.c \
+	event_core.c event_handlers.c event_names.c event_utils.c \
+	functions.c functions_captive.c functions_icmgr_wsmgr.c \
+	functions_identify.c functions_misc.c functions_warp.c \
+	functions_win.c functions_win_moveresize.c functions_workspaces.c \
+	gc.c iconmgr.c icons.c icons_builtin.c image.c image_bitmap.c \
+	image_bitmap_builtin.c image_xwd.c list.c mask_screen.c menus.c \
+	mwmhints.c occupation.c otp.c parse.c parse_be.c parse_yacc.c \
+	session.c util.c vscreen.c win_decorations.c win_decorations_init.c \
+	win_iconify.c win_ops.c win_regions.c win_resize.c win_utils.c \
+	windowbox.c workspace_config.c workspace_manager.c workspace_utils.c \
+	ctwm_atoms.c deftwmrc.c gram.tab.c lex.c version.c \
+	image_xpm.c parse_m4.c ewmh.c ewmh_atoms.c ctwm_wrap.c
+
+SRCS+=	repl_str.c
 
 YHEADER=1
 
@@ -15,13 +27,10 @@ CTWMCONFIGDIR=		${X11ETCDIR}/ctwm
 CTWMDIR=		${X11SRCDIR}/external/mit/ctwm/dist
 XPMDIR=			${X11INCDIR}/X11/pixmaps/ctwm
 
-CPPFLAGS+=		-I. -I${CTWMDIR}/src -DHAVE_MKSTEMP \
-			-DNO_ALLOCA -DCSRG_BASED -DUSEM4 -DGNOME -DXPM
-
-CPPFLAGS+=		-DPIXMAP_DIRECTORY=\"${XPMDIR}\"
-CPPFLAGS+=		-DCTWM_WELCOME_FILE=\"xpm:${X11INCDIR}/X11/pixmaps/NetBSD-inv.xpm\"
-
-CPPFLAGS.parse.c=	-DSYSTEM_INIT_FILE=\"${CTWMCONFIGDIR}/system.ctwmrc\" \
+CPPFLAGS+=		-I. -I${CTWMDIR} \
+			-DUSE_XPM -DUSE_M4 -DUSE_EWMH -DUSE_SREGEX \
+			-DPIXMAP_DIRECTORY=\"${XPMDIR}\" \
+			-DSYSTEM_INIT_FILE=\"${CTWMCONFIGDIR}/system.ctwmrc\" \
 			-DM4CMD=\"m4\"
 
 FILESDIR=		${XPMDIR}
@@ -49,7 +58,7 @@ FILES=			3D_Expand15.xpm 3D_Iconify15.xp
 LDADD+=	-lXpm  -lXmu -lXt -lSM -lICE -lXext -lX11
 DPADD+=	${LIBXPM} ${LIBXMU} ${LIBXT} ${LIBSM} ${LIBICE} ${LIBXEXT} ${LIBX11}
 
-.PATH:	${CTWMDIR} ${CTWMDIR}/xpm
+.PATH:	${CTWMDIR} ${CTWMDIR}/xpm ${CTWMDIR}/ext
 
 .include 
 .include 



CVS commit: src/external/mit/ctwm/bin/ctwm

2021-04-11 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Apr 11 10:29:50 UTC 2021

Modified Files:
src/external/mit/ctwm/bin/ctwm: Makefile

Log Message:
Update build recipe for ctwm-4.0.3


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/mit/ctwm/bin/ctwm/Makefile

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



CVS commit: xsrc/external/mit/ctwm/dist

2021-04-11 Thread Nia Alarie
Module Name:xsrc
Committed By:   nia
Date:   Sun Apr 11 10:11:58 UTC 2021

Modified Files:
xsrc/external/mit/ctwm/dist: add_window.c add_window.h clicktofocus.c
clicktofocus.h ctwm.h cursor.c cursor.h events.h gc.c gc.h
gram.tab.h gram.y iconmgr.c iconmgr.h icons.c icons.h lex.l list.c
list.h menus.c menus.h mwmhints.c mwmhints.h parse.c parse.h
screen.h session.c session.h sound.c sound.h types.h util.c util.h
version.c version.h vscreen.c vscreen.h windowbox.c windowbox.h
Added Files:
xsrc/external/mit/ctwm/dist: ctwm.1 ctwm_atoms.c ctwm_atoms.h
ctwm_config.h event_names_table.h ewmh_atoms.c ewmh_atoms.h
functions_deferral.h functions_defs.h
functions_dispatch_execution.h functions_parse_table.h
Removed Files:
xsrc/external/mit/ctwm/dist: CHANGES Imakefile Imakefile.local-template
PROBLEMS README README.VMS README.gnome TODO TODO.gnome
ctwm.axp_opt ctwm.c ctwm.com ctwm.man ctwm.spec ctwm.txt
ctwm.vax_opt demolib.c descrip.local-template descrip.mms
descrip.submms events.c example.ctwmrc gendeftwmrc.com gnome.c
gnome.h gnomewindefs.h gram.c_VMS gram.h_VMS gtw.c levitte.ctwmrc
lex.c_VMS libctwm.c link.com lnm.c lnm.h make.com mk_tar.sh
peterc.ctwmrc resize.c resize.h siconify.bm sound.doc system.ctwmrc
system.ctwmrc.gnome twm.h vms.txt vms2.txt vms_cmd_services.c
vms_cmd_services.h workmgr.c workmgr.h

Log Message:
Merge ctwm-4-0-3

# CTWM Change History

## 4.0.3  (2019-07-21)

### Bugfixes

1. Perform various manipulations and overrides of `WM_HINTS` property
   when it gets reset during runtime, like we do when initially adopting
   the window.  The most visible effect of this was in windows that don't
   give a focus hint (which we override to give focus), but then reset
   `WM_HINTS` later and still don't give us a hint, where we wound up not
   re-overriding previously.  Reported for `xvile` by Wayne Cuddy.

1. The font height estimation changes in 4.0.0 were not applied correctly
   when UseThreeDMenus was set, leading to some odd vertical misalignment
   of the text with some fonts.  Reported by Wayne Cuddy.

1. A failure in OTP consistency checks caused by the handling of
   transients of fullscreen windows has been fixed.  This manifested as
   failures in OtpCheckConsistencyVS() assertions.

## 4.0.2  (2018-08-25)

### Backward-Incompatible Changes And Removed Features

1. The `UseThreeDIconBorders` config var has been removed.  It came in
   silently and undocumented in 3.4 and has never done anything.

1. The attempts to use DNS lookups for setting the `HOSTNAME` `m4` variable
   have been removed; it is now just a duplicate of `CLIENTHOST`.

### New Features

1. The EWMH `_NET_WM_NAME` property is now supported, and used for the
   window name in place of the ICCCM `WM_NAME` when set.  By default, we
   also accept `UTF8_STRING` encoded `WM_NAME` as a result of this
   change; see below for var to restore historical strictness.

1. The EWMH `_NET_WM_ICON_NAME` property is now supported, and used for
   the icon name in place of the ICCCM `WM_ICON_NAME` when set.  Similar
   comments as above apply to the encodings.

1. Support has been added for `CTWM_WM_NAME` and `CTWM_WM_ICON_NAME`
   properties, which will override any window/icon names otherwise
   specified.  This may be useful for applications that set unhelpful
   names themselves, or for manually adjusting labelling.  These
   properties can be set from the command line via `xprop`; as an
   example, `xprop -f CTWM_WM_NAME 8u -set CTWM_WM_NAME "awesome
   windowsauce"`.  See `xprop(1)` manual for details; the `s`, `t`, and
   `u` field type specifiers will all work.

1. When no icon name is set for a window, we've always used the window
   name for the icon name as well.  But that only happened the first time
   the window name is set; after that, the icon name is stuck at the
   first name.  It now updates along with the window name, if no icon
   name is set.

1. All icon manager windows will now have the `TwmIconManager` class set
   on them, so they can be addressed en mass by other config like
   `NoTitle` by that class name.

### New Config Options

1. Added `DontNameDecorations` config option to disable setting names on
   the X windows we create for window decoration (added in 4.0.0).  These
   have been reported to confuse `xwit`, and might do the same for other
   tools that don't expect to find them on non-end-app windows.  Reported
   by Frank Steiner.

1. Added `StrictWinNameEncoding` config option to enable historical
   behavior, where we're reject invalid property encoding for window
   naming properties (like a `UTF8_STRING` encoded `WM_NAME`).

### Bugfixes

1. Fix up broken parsing of `IconifyStyle "sweep"`.  Bug was introduced
   in 4.0.0.

1. When multiple X Screens are used, 

CVS commit: xsrc/external/mit/ctwm/dist

2021-04-11 Thread Nia Alarie
Module Name:xsrc
Committed By:   nia
Date:   Sun Apr 11 10:11:58 UTC 2021

Modified Files:
xsrc/external/mit/ctwm/dist: add_window.c add_window.h clicktofocus.c
clicktofocus.h ctwm.h cursor.c cursor.h events.h gc.c gc.h
gram.tab.h gram.y iconmgr.c iconmgr.h icons.c icons.h lex.l list.c
list.h menus.c menus.h mwmhints.c mwmhints.h parse.c parse.h
screen.h session.c session.h sound.c sound.h types.h util.c util.h
version.c version.h vscreen.c vscreen.h windowbox.c windowbox.h
Added Files:
xsrc/external/mit/ctwm/dist: ctwm.1 ctwm_atoms.c ctwm_atoms.h
ctwm_config.h event_names_table.h ewmh_atoms.c ewmh_atoms.h
functions_deferral.h functions_defs.h
functions_dispatch_execution.h functions_parse_table.h
Removed Files:
xsrc/external/mit/ctwm/dist: CHANGES Imakefile Imakefile.local-template
PROBLEMS README README.VMS README.gnome TODO TODO.gnome
ctwm.axp_opt ctwm.c ctwm.com ctwm.man ctwm.spec ctwm.txt
ctwm.vax_opt demolib.c descrip.local-template descrip.mms
descrip.submms events.c example.ctwmrc gendeftwmrc.com gnome.c
gnome.h gnomewindefs.h gram.c_VMS gram.h_VMS gtw.c levitte.ctwmrc
lex.c_VMS libctwm.c link.com lnm.c lnm.h make.com mk_tar.sh
peterc.ctwmrc resize.c resize.h siconify.bm sound.doc system.ctwmrc
system.ctwmrc.gnome twm.h vms.txt vms2.txt vms_cmd_services.c
vms_cmd_services.h workmgr.c workmgr.h

Log Message:
Merge ctwm-4-0-3

# CTWM Change History

## 4.0.3  (2019-07-21)

### Bugfixes

1. Perform various manipulations and overrides of `WM_HINTS` property
   when it gets reset during runtime, like we do when initially adopting
   the window.  The most visible effect of this was in windows that don't
   give a focus hint (which we override to give focus), but then reset
   `WM_HINTS` later and still don't give us a hint, where we wound up not
   re-overriding previously.  Reported for `xvile` by Wayne Cuddy.

1. The font height estimation changes in 4.0.0 were not applied correctly
   when UseThreeDMenus was set, leading to some odd vertical misalignment
   of the text with some fonts.  Reported by Wayne Cuddy.

1. A failure in OTP consistency checks caused by the handling of
   transients of fullscreen windows has been fixed.  This manifested as
   failures in OtpCheckConsistencyVS() assertions.

## 4.0.2  (2018-08-25)

### Backward-Incompatible Changes And Removed Features

1. The `UseThreeDIconBorders` config var has been removed.  It came in
   silently and undocumented in 3.4 and has never done anything.

1. The attempts to use DNS lookups for setting the `HOSTNAME` `m4` variable
   have been removed; it is now just a duplicate of `CLIENTHOST`.

### New Features

1. The EWMH `_NET_WM_NAME` property is now supported, and used for the
   window name in place of the ICCCM `WM_NAME` when set.  By default, we
   also accept `UTF8_STRING` encoded `WM_NAME` as a result of this
   change; see below for var to restore historical strictness.

1. The EWMH `_NET_WM_ICON_NAME` property is now supported, and used for
   the icon name in place of the ICCCM `WM_ICON_NAME` when set.  Similar
   comments as above apply to the encodings.

1. Support has been added for `CTWM_WM_NAME` and `CTWM_WM_ICON_NAME`
   properties, which will override any window/icon names otherwise
   specified.  This may be useful for applications that set unhelpful
   names themselves, or for manually adjusting labelling.  These
   properties can be set from the command line via `xprop`; as an
   example, `xprop -f CTWM_WM_NAME 8u -set CTWM_WM_NAME "awesome
   windowsauce"`.  See `xprop(1)` manual for details; the `s`, `t`, and
   `u` field type specifiers will all work.

1. When no icon name is set for a window, we've always used the window
   name for the icon name as well.  But that only happened the first time
   the window name is set; after that, the icon name is stuck at the
   first name.  It now updates along with the window name, if no icon
   name is set.

1. All icon manager windows will now have the `TwmIconManager` class set
   on them, so they can be addressed en mass by other config like
   `NoTitle` by that class name.

### New Config Options

1. Added `DontNameDecorations` config option to disable setting names on
   the X windows we create for window decoration (added in 4.0.0).  These
   have been reported to confuse `xwit`, and might do the same for other
   tools that don't expect to find them on non-end-app windows.  Reported
   by Frank Steiner.

1. Added `StrictWinNameEncoding` config option to enable historical
   behavior, where we're reject invalid property encoding for window
   naming properties (like a `UTF8_STRING` encoded `WM_NAME`).

### Bugfixes

1. Fix up broken parsing of `IconifyStyle "sweep"`.  Bug was introduced
   in 4.0.0.

1. When multiple X Screens are used, 

CVS import: xsrc/external/mit/ctwm/dist/

2021-04-11 Thread Nia Alarie
Module Name:xsrc
Committed By:   nia
Date:   Sun Apr 11 08:36:54 UTC 2021

Update of /cvsroot/xsrc/external/mit/ctwm/dist/
In directory ivanova.netbsd.org:/tmp/cvs-serv9012

Log Message:
ctwm-4.0.3

Status:

Vendor Tag: CTWM
Release Tags:   ctwm-4-0-3

N xsrc/external/mit/ctwm/dist//workspace_manager.h
N xsrc/external/mit/ctwm/dist//ctopts.h
N xsrc/external/mit/ctwm/dist//colormaps.h
C xsrc/external/mit/ctwm/dist//menus.h
C xsrc/external/mit/ctwm/dist//gc.h
C xsrc/external/mit/ctwm/dist//system.ctwmrc
N xsrc/external/mit/ctwm/dist//event_handlers.h
N xsrc/external/mit/ctwm/dist//ctwm_config.h.in
N xsrc/external/mit/ctwm/dist//animate.c
C xsrc/external/mit/ctwm/dist//parse.c
N xsrc/external/mit/ctwm/dist//captive.h
N xsrc/external/mit/ctwm/dist//.bzrignore
C xsrc/external/mit/ctwm/dist//session.h
N xsrc/external/mit/ctwm/dist//parse_be.h
N xsrc/external/mit/ctwm/dist//deftwmrc.h
N xsrc/external/mit/ctwm/dist//win_utils.h
N xsrc/external/mit/ctwm/dist//workspace_utils.c
N xsrc/external/mit/ctwm/dist//otp.h
N xsrc/external/mit/ctwm/dist//win_decorations_init.c
N xsrc/external/mit/ctwm/dist//win_iconify.c
C xsrc/external/mit/ctwm/dist//list.c
N xsrc/external/mit/ctwm/dist//drawing.h
N xsrc/external/mit/ctwm/dist//parse_int.h
N xsrc/external/mit/ctwm/dist//ewmh_atoms.in
N xsrc/external/mit/ctwm/dist//event_names.list
C xsrc/external/mit/ctwm/dist//vscreen.h
C xsrc/external/mit/ctwm/dist//mwmhints.c
N xsrc/external/mit/ctwm/dist//COPYRIGHT
N xsrc/external/mit/ctwm/dist//clargs.h
N xsrc/external/mit/ctwm/dist//functions_misc.c
C xsrc/external/mit/ctwm/dist//icons.c
C xsrc/external/mit/ctwm/dist//gram.y
N xsrc/external/mit/ctwm/dist//occupation.h
N xsrc/external/mit/ctwm/dist//image_jpeg.h
N xsrc/external/mit/ctwm/dist//functions_captive.c
N xsrc/external/mit/ctwm/dist//win_ops.h
N xsrc/external/mit/ctwm/dist//ctwm_main.h
N xsrc/external/mit/ctwm/dist//mask_screen.h
N xsrc/external/mit/ctwm/dist//event_names.h
N xsrc/external/mit/ctwm/dist//image_bitmap.h
N xsrc/external/mit/ctwm/dist//parse_yacc.c
N xsrc/external/mit/ctwm/dist//workspace_config.h
C xsrc/external/mit/ctwm/dist//version.h
C xsrc/external/mit/ctwm/dist//clicktofocus.h
N xsrc/external/mit/ctwm/dist//functions_warp.c
N xsrc/external/mit/ctwm/dist//functions_defs.list
N xsrc/external/mit/ctwm/dist//win_resize.h
N xsrc/external/mit/ctwm/dist//README.html
C xsrc/external/mit/ctwm/dist//util.c
C xsrc/external/mit/ctwm/dist//windowbox.h
N xsrc/external/mit/ctwm/dist//functions_win.c
N xsrc/external/mit/ctwm/dist//VERSION
N xsrc/external/mit/ctwm/dist//ewmh.c
N xsrc/external/mit/ctwm/dist//win_decorations.c
N xsrc/external/mit/ctwm/dist//image.c
N xsrc/external/mit/ctwm/dist//functions.c
N xsrc/external/mit/ctwm/dist//functions_workspaces.c
C xsrc/external/mit/ctwm/dist//events.h
N xsrc/external/mit/ctwm/dist//image_xwd.c
C xsrc/external/mit/ctwm/dist//iconmgr.h
N xsrc/external/mit/ctwm/dist//image_xpm.c
N xsrc/external/mit/ctwm/dist//image_bitmap_builtin.h
N xsrc/external/mit/ctwm/dist//event_core.c
C xsrc/external/mit/ctwm/dist//cursor.h
N xsrc/external/mit/ctwm/dist//CHANGES.html
C xsrc/external/mit/ctwm/dist//sound.c
C xsrc/external/mit/ctwm/dist//add_window.h
N xsrc/external/mit/ctwm/dist//win_regions.c
N xsrc/external/mit/ctwm/dist//icons_builtin.c
N xsrc/external/mit/ctwm/dist//README.md
C xsrc/external/mit/ctwm/dist//mwmhints.h
N xsrc/external/mit/ctwm/dist//clargs.c
N xsrc/external/mit/ctwm/dist//functions_icmgr_wsmgr.c
C xsrc/external/mit/ctwm/dist//lex.l
C xsrc/external/mit/ctwm/dist//icons.h
N xsrc/external/mit/ctwm/dist//occupation.c
N xsrc/external/mit/ctwm/dist//parse_m4.c
N xsrc/external/mit/ctwm/dist//image_jpeg.c
N xsrc/external/mit/ctwm/dist//win_ops.c
N xsrc/external/mit/ctwm/dist//workspace_utils.h
N xsrc/external/mit/ctwm/dist//otp.c
N xsrc/external/mit/ctwm/dist//win_decorations_init.h
N xsrc/external/mit/ctwm/dist//win_iconify.h
C xsrc/external/mit/ctwm/dist//list.h
N xsrc/external/mit/ctwm/dist//drawing.c
C xsrc/external/mit/ctwm/dist//vscreen.c
C xsrc/external/mit/ctwm/dist//parse.h
N xsrc/external/mit/ctwm/dist//captive.c
N xsrc/external/mit/ctwm/dist//Doxyfile.in
N xsrc/external/mit/ctwm/dist//workspace_structs.h
C xsrc/external/mit/ctwm/dist//session.c
N xsrc/external/mit/ctwm/dist//parse_be.c
N xsrc/external/mit/ctwm/dist//win_utils.c
N xsrc/external/mit/ctwm/dist//CHANGES.md
N xsrc/external/mit/ctwm/dist//Makefile
N xsrc/external/mit/ctwm/dist//CMakeLists.txt
N xsrc/external/mit/ctwm/dist//workspace_manager.c
N xsrc/external/mit/ctwm/dist//event_internal.h
N xsrc/external/mit/ctwm/dist//ctopts.c
N xsrc/external/mit/ctwm/dist//colormaps.c
C xsrc/external/mit/ctwm/dist//menus.c
N xsrc/external/mit/ctwm/dist//version.c.in
C xsrc/external/mit/ctwm/dist//gc.c
N xsrc/external/mit/ctwm/dist//event_utils.c
N xsrc/external/mit/ctwm/dist//twm_window_struct.h
N xsrc/external/mit/ctwm/dist//ctwm_atoms.in
N xsrc/external/mit/ctwm/dist//event_handlers.c
C xsrc/external/mit/ctwm/dist//ctwm.h
N 

CVS import: xsrc/external/mit/ctwm/dist/

2021-04-11 Thread Nia Alarie
Module Name:xsrc
Committed By:   nia
Date:   Sun Apr 11 08:36:54 UTC 2021

Update of /cvsroot/xsrc/external/mit/ctwm/dist/
In directory ivanova.netbsd.org:/tmp/cvs-serv9012

Log Message:
ctwm-4.0.3

Status:

Vendor Tag: CTWM
Release Tags:   ctwm-4-0-3

N xsrc/external/mit/ctwm/dist//workspace_manager.h
N xsrc/external/mit/ctwm/dist//ctopts.h
N xsrc/external/mit/ctwm/dist//colormaps.h
C xsrc/external/mit/ctwm/dist//menus.h
C xsrc/external/mit/ctwm/dist//gc.h
C xsrc/external/mit/ctwm/dist//system.ctwmrc
N xsrc/external/mit/ctwm/dist//event_handlers.h
N xsrc/external/mit/ctwm/dist//ctwm_config.h.in
N xsrc/external/mit/ctwm/dist//animate.c
C xsrc/external/mit/ctwm/dist//parse.c
N xsrc/external/mit/ctwm/dist//captive.h
N xsrc/external/mit/ctwm/dist//.bzrignore
C xsrc/external/mit/ctwm/dist//session.h
N xsrc/external/mit/ctwm/dist//parse_be.h
N xsrc/external/mit/ctwm/dist//deftwmrc.h
N xsrc/external/mit/ctwm/dist//win_utils.h
N xsrc/external/mit/ctwm/dist//workspace_utils.c
N xsrc/external/mit/ctwm/dist//otp.h
N xsrc/external/mit/ctwm/dist//win_decorations_init.c
N xsrc/external/mit/ctwm/dist//win_iconify.c
C xsrc/external/mit/ctwm/dist//list.c
N xsrc/external/mit/ctwm/dist//drawing.h
N xsrc/external/mit/ctwm/dist//parse_int.h
N xsrc/external/mit/ctwm/dist//ewmh_atoms.in
N xsrc/external/mit/ctwm/dist//event_names.list
C xsrc/external/mit/ctwm/dist//vscreen.h
C xsrc/external/mit/ctwm/dist//mwmhints.c
N xsrc/external/mit/ctwm/dist//COPYRIGHT
N xsrc/external/mit/ctwm/dist//clargs.h
N xsrc/external/mit/ctwm/dist//functions_misc.c
C xsrc/external/mit/ctwm/dist//icons.c
C xsrc/external/mit/ctwm/dist//gram.y
N xsrc/external/mit/ctwm/dist//occupation.h
N xsrc/external/mit/ctwm/dist//image_jpeg.h
N xsrc/external/mit/ctwm/dist//functions_captive.c
N xsrc/external/mit/ctwm/dist//win_ops.h
N xsrc/external/mit/ctwm/dist//ctwm_main.h
N xsrc/external/mit/ctwm/dist//mask_screen.h
N xsrc/external/mit/ctwm/dist//event_names.h
N xsrc/external/mit/ctwm/dist//image_bitmap.h
N xsrc/external/mit/ctwm/dist//parse_yacc.c
N xsrc/external/mit/ctwm/dist//workspace_config.h
C xsrc/external/mit/ctwm/dist//version.h
C xsrc/external/mit/ctwm/dist//clicktofocus.h
N xsrc/external/mit/ctwm/dist//functions_warp.c
N xsrc/external/mit/ctwm/dist//functions_defs.list
N xsrc/external/mit/ctwm/dist//win_resize.h
N xsrc/external/mit/ctwm/dist//README.html
C xsrc/external/mit/ctwm/dist//util.c
C xsrc/external/mit/ctwm/dist//windowbox.h
N xsrc/external/mit/ctwm/dist//functions_win.c
N xsrc/external/mit/ctwm/dist//VERSION
N xsrc/external/mit/ctwm/dist//ewmh.c
N xsrc/external/mit/ctwm/dist//win_decorations.c
N xsrc/external/mit/ctwm/dist//image.c
N xsrc/external/mit/ctwm/dist//functions.c
N xsrc/external/mit/ctwm/dist//functions_workspaces.c
C xsrc/external/mit/ctwm/dist//events.h
N xsrc/external/mit/ctwm/dist//image_xwd.c
C xsrc/external/mit/ctwm/dist//iconmgr.h
N xsrc/external/mit/ctwm/dist//image_xpm.c
N xsrc/external/mit/ctwm/dist//image_bitmap_builtin.h
N xsrc/external/mit/ctwm/dist//event_core.c
C xsrc/external/mit/ctwm/dist//cursor.h
N xsrc/external/mit/ctwm/dist//CHANGES.html
C xsrc/external/mit/ctwm/dist//sound.c
C xsrc/external/mit/ctwm/dist//add_window.h
N xsrc/external/mit/ctwm/dist//win_regions.c
N xsrc/external/mit/ctwm/dist//icons_builtin.c
N xsrc/external/mit/ctwm/dist//README.md
C xsrc/external/mit/ctwm/dist//mwmhints.h
N xsrc/external/mit/ctwm/dist//clargs.c
N xsrc/external/mit/ctwm/dist//functions_icmgr_wsmgr.c
C xsrc/external/mit/ctwm/dist//lex.l
C xsrc/external/mit/ctwm/dist//icons.h
N xsrc/external/mit/ctwm/dist//occupation.c
N xsrc/external/mit/ctwm/dist//parse_m4.c
N xsrc/external/mit/ctwm/dist//image_jpeg.c
N xsrc/external/mit/ctwm/dist//win_ops.c
N xsrc/external/mit/ctwm/dist//workspace_utils.h
N xsrc/external/mit/ctwm/dist//otp.c
N xsrc/external/mit/ctwm/dist//win_decorations_init.h
N xsrc/external/mit/ctwm/dist//win_iconify.h
C xsrc/external/mit/ctwm/dist//list.h
N xsrc/external/mit/ctwm/dist//drawing.c
C xsrc/external/mit/ctwm/dist//vscreen.c
C xsrc/external/mit/ctwm/dist//parse.h
N xsrc/external/mit/ctwm/dist//captive.c
N xsrc/external/mit/ctwm/dist//Doxyfile.in
N xsrc/external/mit/ctwm/dist//workspace_structs.h
C xsrc/external/mit/ctwm/dist//session.c
N xsrc/external/mit/ctwm/dist//parse_be.c
N xsrc/external/mit/ctwm/dist//win_utils.c
N xsrc/external/mit/ctwm/dist//CHANGES.md
N xsrc/external/mit/ctwm/dist//Makefile
N xsrc/external/mit/ctwm/dist//CMakeLists.txt
N xsrc/external/mit/ctwm/dist//workspace_manager.c
N xsrc/external/mit/ctwm/dist//event_internal.h
N xsrc/external/mit/ctwm/dist//ctopts.c
N xsrc/external/mit/ctwm/dist//colormaps.c
C xsrc/external/mit/ctwm/dist//menus.c
N xsrc/external/mit/ctwm/dist//version.c.in
C xsrc/external/mit/ctwm/dist//gc.c
N xsrc/external/mit/ctwm/dist//event_utils.c
N xsrc/external/mit/ctwm/dist//twm_window_struct.h
N xsrc/external/mit/ctwm/dist//ctwm_atoms.in
N xsrc/external/mit/ctwm/dist//event_handlers.c
C xsrc/external/mit/ctwm/dist//ctwm.h
N 

CVS commit: src/tools/gcc

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Apr 11 07:35:45 UTC 2021

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

Log Message:
fetch omp-device-properties.h and don't try to fetch sanitizer
stuff automatically yet.


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/tools/gcc/Makefile
cvs rdiff -u -r1.113 -r1.114 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/Makefile
diff -u src/tools/gcc/Makefile:1.100 src/tools/gcc/Makefile:1.101
--- src/tools/gcc/Makefile:1.100	Sun Sep  6 02:24:38 2020
+++ src/tools/gcc/Makefile	Sun Apr 11 07:35:45 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.100 2020/09/06 02:24:38 mrg Exp $
+#	$NetBSD: Makefile,v 1.101 2021/04/11 07:35:45 mrg Exp $
 
 .include 
 
@@ -8,7 +8,7 @@ MODULE=		${EXTERNAL_GCC_SUBDIR}
 GCCDIST=	${.CURDIR}/../../external/gpl3/${EXTERNAL_GCC_SUBDIR}/dist
 GNUHOSTDIST=	${GCCDIST}
 
-.if ${HAVE_GCC} == 7
+.if ${HAVE_GCC} == 9
 MKNATIVE=		${.CURDIR}/mknative-gcc.old
 .endif
 
@@ -233,6 +233,8 @@ MKENV_BUILD_MAKE=cd .native && ${MKNATIV
 	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
 		(cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e libgcc.mvars tconfig.h); \
 		(cd .native && touch gcc/cc1obj gcc/cc1plus gcc/f771 gcc/libgcc.a gcc/libgcc_s.so)
+	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
+		(cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e omp-device-properties.h)
 .if defined(EXTRA_GCC_TARGETS)
 	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
 		(cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e ${EXTRA_GCC_TARGETS})

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.113 src/tools/gcc/mknative-gcc:1.114
--- src/tools/gcc/mknative-gcc:1.113	Sun Apr 11 01:44:14 2021
+++ src/tools/gcc/mknative-gcc	Sun Apr 11 07:35:45 2021
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.113 2021/04/11 01:44:14 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.114 2021/04/11 07:35:45 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -401,7 +401,7 @@ get_gcc () {
 			| 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'
+	hfiles='auto-host configargs config bconfig bversion plugin-version multilib tm omp-device-properties'
 	for f in $hfiles; do
 		write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$_MACHINE_ARCH/$f.h <$_TMPDIR/gcc/$f.h
 		if [ "${_MACHINE_ARCH}" = "powerpc" -a "${f}" = "configargs" ]
@@ -493,7 +493,8 @@ gcc*)
 	get_gcc_libiberty gcc
 	get_libobjc libobjc
 	get_libstdcxx_v3 libstdc++-v3 gcc
-	get_libsanitizer libsanitizer
+	# wants libstdc++-v3 built
+	# get_libsanitizer libsanitizer
 	get_libdecnumber libdecnumber
 	get_libgomp libgomp
 	get_libbacktrace libbacktrace



CVS commit: src/tools/gcc

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Apr 11 07:35:45 UTC 2021

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

Log Message:
fetch omp-device-properties.h and don't try to fetch sanitizer
stuff automatically yet.


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/tools/gcc/Makefile
cvs rdiff -u -r1.113 -r1.114 src/tools/gcc/mknative-gcc

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