CVS commit: src/lib/libc/arch/alpha/sys

2021-11-02 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Nov  3 04:52:51 UTC 2021

Modified Files:
src/lib/libc/arch/alpha/sys: __sigtramp2.S

Log Message:
CFI: Saved RA needs to point to the PC slot in the ucontext_t.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/alpha/sys/__sigtramp2.S

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

Modified files:

Index: src/lib/libc/arch/alpha/sys/__sigtramp2.S
diff -u src/lib/libc/arch/alpha/sys/__sigtramp2.S:1.6 src/lib/libc/arch/alpha/sys/__sigtramp2.S:1.7
--- src/lib/libc/arch/alpha/sys/__sigtramp2.S:1.6	Wed Nov  3 03:58:31 2021
+++ src/lib/libc/arch/alpha/sys/__sigtramp2.S	Wed Nov  3 04:52:51 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: __sigtramp2.S,v 1.6 2021/11/03 03:58:31 thorpej Exp $	*/
+/*	$NetBSD: __sigtramp2.S,v 1.7 2021/11/03 04:52:51 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -40,7 +40,8 @@
  *	sp->	siginfo structure	[0]
  */
 
-#define	CFI_OFFSET(r)	.cfi_offset r, r*8
+#define	CFI_OFFSET_REG(n, r)	.cfi_offset n, r*8
+#define	CFI_OFFSET(r)		CFI_OFFSET_REG(r, r)
 
 	.cfi_startproc simple
 	.cfi_signal_frame
@@ -71,7 +72,7 @@
 	CFI_OFFSET(_REG_T9)
 	CFI_OFFSET(_REG_T10)
 	CFI_OFFSET(_REG_T11)
-	CFI_OFFSET(_REG_RA)
+	CFI_OFFSET_REG(_REG_RA, _REG_PC)
 	CFI_OFFSET(_REG_T12)	/* a.k.a. _REG_PV */
 	CFI_OFFSET(_REG_AT)
 	CFI_OFFSET(_REG_GP)



CVS commit: src/lib/libc/arch/alpha/sys

2021-11-02 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Nov  3 04:52:51 UTC 2021

Modified Files:
src/lib/libc/arch/alpha/sys: __sigtramp2.S

Log Message:
CFI: Saved RA needs to point to the PC slot in the ucontext_t.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/alpha/sys/__sigtramp2.S

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



CVS commit: src/lib/libc/arch/alpha/sys

2021-11-02 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Nov  3 03:58:31 UTC 2021

Modified Files:
src/lib/libc/arch/alpha/sys: __sigtramp2.S

Log Message:
Set up the CFI in a slightly more rational way.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/alpha/sys/__sigtramp2.S

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

Modified files:

Index: src/lib/libc/arch/alpha/sys/__sigtramp2.S
diff -u src/lib/libc/arch/alpha/sys/__sigtramp2.S:1.5 src/lib/libc/arch/alpha/sys/__sigtramp2.S:1.6
--- src/lib/libc/arch/alpha/sys/__sigtramp2.S:1.5	Wed Oct 21 01:58:30 2020
+++ src/lib/libc/arch/alpha/sys/__sigtramp2.S	Wed Nov  3 03:58:31 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: __sigtramp2.S,v 1.5 2020/10/21 01:58:30 thorpej Exp $	*/
+/*	$NetBSD: __sigtramp2.S,v 1.6 2021/11/03 03:58:31 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -40,11 +40,11 @@
  *	sp->	siginfo structure	[0]
  */
 
-#define	CFI_OFFSET(r)	.cfi_offset r, SIZEOF_SIGINFO + UC_GREGS + r*8
+#define	CFI_OFFSET(r)	.cfi_offset r, r*8
 
 	.cfi_startproc simple
 	.cfi_signal_frame
-	.cfi_def_cfa _REG_SP, 0
+	.cfi_def_cfa _REG_SP, SIZEOF_SIGINFO + UC_GREGS
 	CFI_OFFSET(_REG_V0)
 	CFI_OFFSET(_REG_T0)
 	CFI_OFFSET(_REG_T1)



CVS commit: src/lib/libc/arch/alpha/sys

2021-11-02 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Nov  3 03:58:31 UTC 2021

Modified Files:
src/lib/libc/arch/alpha/sys: __sigtramp2.S

Log Message:
Set up the CFI in a slightly more rational way.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/alpha/sys/__sigtramp2.S

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



CVS commit: src/share/man/man7

2021-11-02 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Tue Nov  2 22:13:14 UTC 2021

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

Log Message:
Update glob example from X11R6 to X11R7


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man7/glob.7

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



CVS commit: src/share/man/man7

2021-11-02 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Tue Nov  2 22:13:14 UTC 2021

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

Log Message:
Update glob example from X11R6 to X11R7


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man7/glob.7

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

Modified files:

Index: src/share/man/man7/glob.7
diff -u src/share/man/man7/glob.7:1.3 src/share/man/man7/glob.7:1.4
--- src/share/man/man7/glob.7:1.3	Wed Jan 19 00:33:10 2011
+++ src/share/man/man7/glob.7	Tue Nov  2 22:13:14 2021
@@ -1,4 +1,4 @@
-.\" $NetBSD: glob.7,v 1.3 2011/01/19 00:33:10 uwe Exp $
+.\" $NetBSD: glob.7,v 1.4 2021/11/02 22:13:14 abs Exp $
 .\"
 .\"	$OpenBSD: glob.7,v 1.3 2009/12/26 15:24:54 schwarze Exp $
 .\"
@@ -16,7 +16,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd November 30, 2010
+.Dd November 2, 2021
 .Dt GLOB 7
 .Os
 .Sh NAME
@@ -125,9 +125,9 @@ sequence.
 Thus,
 .Pa /usr/*/*/X11
 would match
-.Pa /usr/X11R6/lib/X11
+.Pa /usr/X11R7/lib/X11
 and
-.Pa /usr/X11R6/include/X11
+.Pa /usr/X11R7/include/X11
 while
 .Pa /usr/*/X11
 would not match either.



CVS commit: xsrc

2021-11-02 Thread David Brownlee
Module Name:xsrc
Committed By:   abs
Date:   Tue Nov  2 22:09:17 UTC 2021

Modified Files:
xsrc: Makefile

Log Message:
Update Makefile comment from X11R6 to X11R7


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 xsrc/Makefile

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



CVS commit: xsrc

2021-11-02 Thread David Brownlee
Module Name:xsrc
Committed By:   abs
Date:   Tue Nov  2 22:09:17 UTC 2021

Modified Files:
xsrc: Makefile

Log Message:
Update Makefile comment from X11R6 to X11R7


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 xsrc/Makefile

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

Modified files:

Index: xsrc/Makefile
diff -u xsrc/Makefile:1.44 xsrc/Makefile:1.45
--- xsrc/Makefile:1.44	Fri Mar 18 15:56:09 2005
+++ xsrc/Makefile	Tue Nov  2 22:09:17 2021
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile,v 1.44 2005/03/18 15:56:09 tron Exp $
+#	$NetBSD: Makefile,v 1.45 2021/11/02 22:09:17 abs Exp $
 #
 # Targets & Variables
 #
 # build: Clean out xsrc, and build and install everything that goes
-#	under /usr/X11R6.
+#	under /usr/X11R7.
 #
 #  DESTDIR -- Set to an alternative directory to install under.
 #  UPDATE --  If set, don't make clean first, plus attempt to make



CVS commit: xsrc/local/programs/x11-ssh-askpass

2021-11-02 Thread David Brownlee
Module Name:xsrc
Committed By:   abs
Date:   Tue Nov  2 22:07:43 UTC 2021

Modified Files:
xsrc/local/programs/x11-ssh-askpass: x11-ssh-askpass.man.in

Log Message:
Update x11-ssh-askman manpage app-defaults paths to X11R7

Now matches actual code


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
xsrc/local/programs/x11-ssh-askpass/x11-ssh-askpass.man.in

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



CVS commit: xsrc/local/programs/x11-ssh-askpass

2021-11-02 Thread David Brownlee
Module Name:xsrc
Committed By:   abs
Date:   Tue Nov  2 22:07:43 UTC 2021

Modified Files:
xsrc/local/programs/x11-ssh-askpass: x11-ssh-askpass.man.in

Log Message:
Update x11-ssh-askman manpage app-defaults paths to X11R7

Now matches actual code


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
xsrc/local/programs/x11-ssh-askpass/x11-ssh-askpass.man.in

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

Modified files:

Index: xsrc/local/programs/x11-ssh-askpass/x11-ssh-askpass.man.in
diff -u xsrc/local/programs/x11-ssh-askpass/x11-ssh-askpass.man.in:1.2 xsrc/local/programs/x11-ssh-askpass/x11-ssh-askpass.man.in:1.3
--- xsrc/local/programs/x11-ssh-askpass/x11-ssh-askpass.man.in:1.2	Sun Apr  3 13:42:33 2011
+++ xsrc/local/programs/x11-ssh-askpass/x11-ssh-askpass.man.in	Tue Nov  2 22:07:43 2021
@@ -1,4 +1,4 @@
-.\" $NetBSD: x11-ssh-askpass.man.in,v 1.2 2011/04/03 13:42:33 wiz Exp $
+.\" $NetBSD: x11-ssh-askpass.man.in,v 1.3 2021/11/02 22:07:43 abs Exp $
 .\"
 .\" x11-ssh-askpass.man
 .\" Created by Matthieu Herrb  for OpenBSD
@@ -45,7 +45,7 @@ are as follows:
 .Bl -dash -offset indent
 .It
 Configurable via the standard X resource mechanisms
-.Pa /usr/X11R6/lib/X11/app-defaults ,
+.Pa /usr/X11R7/lib/X11/app-defaults ,
 .Pa ~/.Xdefaults ,
 .Xr xrdb 1 ,
 etc.
@@ -285,8 +285,8 @@ the string to display on the button.
 the font to use for this button label.
 .El
 .Sh FILES
-.Bl -tag -width "/usr/X11R6/lib/X11/app-defaults/SshAskpass" -compact
-.It Pa /usr/X11R6/lib/X11/app-defaults/SshAskpass
+.Bl -tag -width "/usr/X11R7/lib/X11/app-defaults/SshAskpass" -compact
+.It Pa /usr/X11R7/lib/X11/app-defaults/SshAskpass
 .El
 .Sh SEE ALSO
 .Xr ssh 1 ,



CVS commit: src/distrib

2021-11-02 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Tue Nov  2 22:02:42 UTC 2021

Modified Files:
src/distrib/alpha/rz25dist: Makefile
src/distrib/amiga/miniroot: install.md
src/distrib/sparc: install.md
src/distrib/syspkg/notes: NOTES PROPOSAL

Log Message:
Update some distrib X11R6 references to X11R7

Some of these scripts and notes may no longer be relevant, but now
they are at least not relevant while referring to the current X
installation directory


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/distrib/alpha/rz25dist/Makefile
cvs rdiff -u -r1.33 -r1.34 src/distrib/amiga/miniroot/install.md
cvs rdiff -u -r1.24 -r1.25 src/distrib/sparc/install.md
cvs rdiff -u -r1.1.1.1 -r1.2 src/distrib/syspkg/notes/NOTES
cvs rdiff -u -r1.2 -r1.3 src/distrib/syspkg/notes/PROPOSAL

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

Modified files:

Index: src/distrib/alpha/rz25dist/Makefile
diff -u src/distrib/alpha/rz25dist/Makefile:1.31 src/distrib/alpha/rz25dist/Makefile:1.32
--- src/distrib/alpha/rz25dist/Makefile:1.31	Tue Aug  5 15:40:58 2014
+++ src/distrib/alpha/rz25dist/Makefile	Tue Nov  2 22:02:42 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.31 2014/08/05 15:40:58 apb Exp $
+# $NetBSD: Makefile,v 1.32 2021/11/02 22:02:42 abs Exp $
 
 .include "../../../Makefile.inc"
 
@@ -82,7 +82,7 @@ diskimage.gz: mount-fs build-fs unmount-
 bin.tar.gz: mount-fs build-fs
 	/bin/rm -f $@
 	(cd ${DESTDIR} ; find . | grep -v '^./etc' | \
-	grep -v '^./usr/X11R6' | grep -v '^./netbsd' | \
+	grep -v '^./usr/X11R7' | grep -v '^./netbsd' | \
 	grep -v '^./boot' | pax -w -d | ${TOOL_GZIP_N} -9) > $@
 
 etc.tar.gz: mount-fs build-fs
@@ -91,7 +91,7 @@ etc.tar.gz: mount-fs build-fs
 
 x11.tar.gz: mount-fs build-fs
 	/bin/rm -f $@
-	(cd ${DESTDIR} ; find ./usr/X11R6 | pax -w -d | ${TOOL_GZIP_N} -9) > $@
+	(cd ${DESTDIR} ; find ./usr/X11R7 | pax -w -d | ${TOOL_GZIP_N} -9) > $@
 
 .endif
 

Index: src/distrib/amiga/miniroot/install.md
diff -u src/distrib/amiga/miniroot/install.md:1.33 src/distrib/amiga/miniroot/install.md:1.34
--- src/distrib/amiga/miniroot/install.md:1.33	Sat Jun 26 00:28:19 2021
+++ src/distrib/amiga/miniroot/install.md	Tue Nov  2 22:02:42 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: install.md,v 1.33 2021/06/26 00:28:19 tsutsui Exp $
+#	$NetBSD: install.md,v 1.34 2021/11/02 22:02:42 abs Exp $
 #
 #
 # Copyright (c) 1996,2006 The NetBSD Foundation, Inc.
@@ -400,7 +400,7 @@ md_mv_aout_libs()
 	md_mv_usr_lib $root || return 1
 
 	# If X11 is installed, move the those libraries as well
-	xlibdir="/usr/X11R6/lib"
+	xlibdir="/usr/X11R7/lib"
 	if [ -d $root/$xlibdir/. ]; then
 		mkdir -p $root/emul/aout/$xlibdir || return 1
 		md_mv_x_lib $root $xlibdir || return 1

Index: src/distrib/sparc/install.md
diff -u src/distrib/sparc/install.md:1.24 src/distrib/sparc/install.md:1.25
--- src/distrib/sparc/install.md:1.24	Wed Apr 10 14:52:53 2019
+++ src/distrib/sparc/install.md	Tue Nov  2 22:02:42 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: install.md,v 1.24 2019/04/10 14:52:53 christos Exp $
+#	$NetBSD: install.md,v 1.25 2021/11/02 22:02:42 abs Exp $
 #
 #
 # Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -350,7 +350,7 @@ md_mv_aout_libs()
 	md_mv_usr_lib $root || return 1
 
 	# If X11 is installed, move the those libraries as well
-	xlibdir="/usr/X11R6/lib"
+	xlibdir="/usr/X11R7/lib"
 	if [ -d $root/$xlibdir/. ]; then
 		mkdir -p $root/emul/aout/$xlibdir || return 1
 		md_mv_x_lib $root $xlibdir || return 1

Index: src/distrib/syspkg/notes/NOTES
diff -u src/distrib/syspkg/notes/NOTES:1.1.1.1 src/distrib/syspkg/notes/NOTES:1.2
--- src/distrib/syspkg/notes/NOTES:1.1.1.1	Mon Jan  7 22:46:16 2002
+++ src/distrib/syspkg/notes/NOTES	Tue Nov  2 22:02:42 2021
@@ -42,7 +42,7 @@ to this, I will put together a more conc
 
 2. Package Registration
 
-Currently, packages are installed in /usr/pkg and /usr/X11R6,
+Currently, packages are installed in /usr/pkg and /usr/X11R7,
 and all package registration is done by creating directories
 in /var/db/pkg.
 
@@ -108,4 +108,4 @@ to this, I will put together a more conc
 would also be easy for an admin to tell if a system had been
 upgraded by looking at pkg_info output.
 
-$Id: NOTES,v 1.1.1.1 2002/01/07 22:46:16 jwise Exp $
+$Id: NOTES,v 1.2 2021/11/02 22:02:42 abs Exp $

Index: src/distrib/syspkg/notes/PROPOSAL
diff -u src/distrib/syspkg/notes/PROPOSAL:1.2 src/distrib/syspkg/notes/PROPOSAL:1.3
--- src/distrib/syspkg/notes/PROPOSAL:1.2	Sat Jan 17 05:30:01 2004
+++ src/distrib/syspkg/notes/PROPOSAL	Tue Nov  2 22:02:42 2021
@@ -34,10 +34,10 @@ A. Working Plan
 	misc	-- items not falling into other categories
 	secr	-- items not exportable under US law
 	text	-- text processing tools
-	xbase	-- general X11R6 binaries
-	xcomp	-- X11R6 development items
-	xfont	-- X11R6 fonts
-	xserver -- X11R6 servers for various video hardware
+	xbase	-- general X11R7 binaries
+	xcomp	

CVS commit: src/distrib

2021-11-02 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Tue Nov  2 22:02:42 UTC 2021

Modified Files:
src/distrib/alpha/rz25dist: Makefile
src/distrib/amiga/miniroot: install.md
src/distrib/sparc: install.md
src/distrib/syspkg/notes: NOTES PROPOSAL

Log Message:
Update some distrib X11R6 references to X11R7

Some of these scripts and notes may no longer be relevant, but now
they are at least not relevant while referring to the current X
installation directory


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/distrib/alpha/rz25dist/Makefile
cvs rdiff -u -r1.33 -r1.34 src/distrib/amiga/miniroot/install.md
cvs rdiff -u -r1.24 -r1.25 src/distrib/sparc/install.md
cvs rdiff -u -r1.1.1.1 -r1.2 src/distrib/syspkg/notes/NOTES
cvs rdiff -u -r1.2 -r1.3 src/distrib/syspkg/notes/PROPOSAL

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



CVS commit: src/share/examples/apm

2021-11-02 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Tue Nov  2 21:55:38 UTC 2021

Modified Files:
src/share/examples/apm: script

Log Message:
Adjust example path to kde/sounds

Wherever sounds may be on a current NetBSD system, /usr/X11R6 is
unlikely to be in that set...


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/share/examples/apm/script

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

Modified files:

Index: src/share/examples/apm/script
diff -u src/share/examples/apm/script:1.6 src/share/examples/apm/script:1.7
--- src/share/examples/apm/script:1.6	Fri Jul 13 21:45:37 2018
+++ src/share/examples/apm/script	Tue Nov  2 21:55:38 2021
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: script,v 1.6 2018/07/13 21:45:37 maya Exp $
+# $NetBSD: script,v 1.7 2021/11/02 21:55:38 abs Exp $
 #
 
 #
@@ -22,7 +22,7 @@ PATH=/usr/pkg/bin:/sbin:$PATH
 export PATH
 
 # Where some sound files are stored:
-S=/usr/X11R6/share/kde/sounds
+S=/usr/pkg/share/kde/sounds
 
 # What my network card's recognized as:
 if=ne0



CVS commit: src/share/examples/apm

2021-11-02 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Tue Nov  2 21:55:38 UTC 2021

Modified Files:
src/share/examples/apm: script

Log Message:
Adjust example path to kde/sounds

Wherever sounds may be on a current NetBSD system, /usr/X11R6 is
unlikely to be in that set...


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/share/examples/apm/script

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



CVS commit: src/sys/sys

2021-11-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Nov  2 20:35:51 UTC 2021

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

Log Message:
unconditionally define sockaddr_storage; this is what linux and FreeBSD do
and it has been there since Issue 6:
https://pubs.opengroup.org/onlinepubs/009604599/basedefs/sys/socket.h.html


To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/sys/sys/socket.h

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



CVS commit: src/sys/sys

2021-11-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Nov  2 20:35:51 UTC 2021

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

Log Message:
unconditionally define sockaddr_storage; this is what linux and FreeBSD do
and it has been there since Issue 6:
https://pubs.opengroup.org/onlinepubs/009604599/basedefs/sys/socket.h.html


To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/sys/sys/socket.h

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

Modified files:

Index: src/sys/sys/socket.h
diff -u src/sys/sys/socket.h:1.130 src/sys/sys/socket.h:1.131
--- src/sys/sys/socket.h:1.130	Tue Oct 12 13:06:26 2021
+++ src/sys/sys/socket.h	Tue Nov  2 16:35:51 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: socket.h,v 1.130 2021/10/12 17:06:26 christos Exp $	*/
+/*	$NetBSD: socket.h,v 1.131 2021/11/02 20:35:51 christos Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -287,17 +287,14 @@ struct sockaddr_big {
 
 #endif /* _KERNEL */
 
-#if 1
 /*
  * RFC 2553: protocol-independent placeholder for socket addresses
  */
 #define _SS_MAXSIZE	128
 #define _SS_ALIGNSIZE	(sizeof(__int64_t))
 #define _SS_PAD1SIZE	(_SS_ALIGNSIZE - 2)
-#define _SS_PAD2SIZE	(_SS_MAXSIZE - 2 - \
-_SS_PAD1SIZE - _SS_ALIGNSIZE)
+#define _SS_PAD2SIZE	(_SS_MAXSIZE - 2 - _SS_PAD1SIZE - _SS_ALIGNSIZE)
 
-#if (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
 struct sockaddr_storage {
 	__uint8_t	ss_len;		/* address length */
 	sa_family_t	ss_family;	/* address family */
@@ -305,10 +302,11 @@ struct sockaddr_storage {
 	__int64_t __ss_align;/* force desired structure storage alignment */
 	char		__ss_pad2[_SS_PAD2SIZE];
 };
+
+#if defined(_NETBSD_SOURCE)
 #define	sstosa(__ss)	((struct sockaddr *)(__ss))
 #define	sstocsa(__ss)	((const struct sockaddr *)(__ss))
-#endif /* _XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */
-#endif /* 1 */
+#endif /* _NETBSD_SOURCE */
 
 /*
  * Protocol families, same as address families for now.



CVS commit: src

2021-11-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Nov  2 20:12:26 UTC 2021

Modified Files:
src/include: signal.h
src/sys/sys: signal.h sigtypes.h

Log Message:
Expose sigaltstack, stack_t and friends to Posix Issue 5 (200809L) References:

https://man7.org/linux/man-pages/man2/sigaltstack.2.html
https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigaltstack.html


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/include/signal.h
cvs rdiff -u -r1.74 -r1.75 src/sys/sys/signal.h
cvs rdiff -u -r1.11 -r1.12 src/sys/sys/sigtypes.h

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

Modified files:

Index: src/include/signal.h
diff -u src/include/signal.h:1.58 src/include/signal.h:1.59
--- src/include/signal.h:1.58	Mon Nov  1 01:53:45 2021
+++ src/include/signal.h	Tue Nov  2 16:12:25 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: signal.h,v 1.58 2021/11/01 05:53:45 thorpej Exp $	*/
+/*	$NetBSD: signal.h,v 1.59 2021/11/02 20:12:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -164,7 +164,8 @@ sigfillset(sigset_t *set)
  * X/Open CAE Specification Issue 4 Version 2
  */  
 #if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
-(_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
+(_XOPEN_SOURCE - 0) >= 500 || (_POSIX_C_SOURCE - 0) >= 200809L || \
+defined(_NETBSD_SOURCE)
 int	killpg(pid_t, int);
 int	siginterrupt(int, int);
 int	sigstack(const struct sigstack *, struct sigstack *);
@@ -177,7 +178,9 @@ int	sigignore(int);
 int	sigpause(int);
 int	sigrelse(int);
 void	(*sigset (int, void (*)(int)))(int);
-#endif /* _XOPEN_SOURCE_EXTENDED || _XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */
+#endif /* _XOPEN_SOURCE_EXTENDED || _XOPEN_SOURCE >= 500
+	* || _POSIX_C_SOURCE >= 200809L || _NETBSD_SOURCE
+	*/
 
 
 /*

Index: src/sys/sys/signal.h
diff -u src/sys/sys/signal.h:1.74 src/sys/sys/signal.h:1.75
--- src/sys/sys/signal.h:1.74	Wed Oct 27 01:18:51 2021
+++ src/sys/sys/signal.h	Tue Nov  2 16:12:26 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: signal.h,v 1.74 2021/10/27 05:18:51 thorpej Exp $	*/
+/*	$NetBSD: signal.h,v 1.75 2021/11/02 20:12:26 christos Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -251,7 +251,8 @@ typedef	void (*sig_t)(int);	/* type of s
 #endif
 
 #if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
-(_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
+(_XOPEN_SOURCE - 0) >= 500 || (_POSIX_C_SOURCE - 0) >= 200809L || \
+defined(_NETBSD_SOURCE)
 /*
  * Flags used with stack_t/struct sigaltstack.
  */
@@ -262,10 +263,13 @@ typedef	void (*sig_t)(int);	/* type of s
 #endif
 #define	MINSIGSTKSZ	8192			/* minimum allowable stack */
 #define	SIGSTKSZ	(MINSIGSTKSZ + 32768)	/* recommended stack size */
-#endif /* _XOPEN_SOURCE_EXTENDED || _XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */
+#endif /* _XOPEN_SOURCE_EXTENDED || _XOPEN_SOURCE >= 500
+	* || _POSIX_C_SOURCE >= 200809L || _NETBSD_SOURCE
+	*/
 
 #if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
-(_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
+(_XOPEN_SOURCE - 0) >= 500 || (_POSIX_C_SOURCE - 0) >= 200809L || \
+defined(_NETBSD_SOURCE)
 /*
  * Structure used in sigstack call.
  */
@@ -273,7 +277,9 @@ struct	sigstack {
 	void	*ss_sp;			/* signal stack pointer */
 	int	ss_onstack;		/* current status */
 };
-#endif /* _XOPEN_SOURCE_EXTENDED || _XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */
+#endif /* _XOPEN_SOURCE_EXTENDED || _XOPEN_SOURCE >= 500
+	* || _POSIX_C_SOURCE >= 200809L || _NETBSD_SOURCE
+	*/
 
 #if defined(_NETBSD_SOURCE) && !defined(_KERNEL)
 /*

Index: src/sys/sys/sigtypes.h
diff -u src/sys/sys/sigtypes.h:1.11 src/sys/sys/sigtypes.h:1.12
--- src/sys/sys/sigtypes.h:1.11	Thu Jan 12 13:29:14 2017
+++ src/sys/sys/sigtypes.h	Tue Nov  2 16:12:26 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: sigtypes.h,v 1.11 2017/01/12 18:29:14 christos Exp $	*/
+/*	$NetBSD: sigtypes.h,v 1.12 2021/11/02 20:12:26 christos Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -104,7 +104,8 @@ typedef struct {
 	} while (/* CONSTCOND */ 0)
 
 #if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
-(_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
+(_XOPEN_SOURCE - 0) >= 500 || (_POSIX_C_SOURCE - 0) >= 200809L || \
+defined(_NETBSD_SOURCE)
 typedef struct
 #if defined(_NETBSD_SOURCE)
sigaltstack
@@ -115,7 +116,9 @@ typedef struct
 	int	ss_flags;		/* SS_DISABLE and/or SS_ONSTACK */
 } stack_t;
 
-#endif /* _XOPEN_SOURCE_EXTENDED || XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */
+#endif /* _XOPEN_SOURCE_EXTENDED || _XOPEN_SOURCE >= 500
+	* || _POSIX_C_SOURCE >= 200809L || _NETBSD_SOURCE
+	*/
 
 #endif	/* _POSIX_C_SOURCE || _XOPEN_SOURCE || ... */
 



CVS commit: src

2021-11-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Nov  2 20:12:26 UTC 2021

Modified Files:
src/include: signal.h
src/sys/sys: signal.h sigtypes.h

Log Message:
Expose sigaltstack, stack_t and friends to Posix Issue 5 (200809L) References:

https://man7.org/linux/man-pages/man2/sigaltstack.2.html
https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigaltstack.html


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/include/signal.h
cvs rdiff -u -r1.74 -r1.75 src/sys/sys/signal.h
cvs rdiff -u -r1.11 -r1.12 src/sys/sys/sigtypes.h

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



CVS commit: src/sys

2021-11-02 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Tue Nov  2 11:26:05 UTC 2021

Modified Files:
src/sys/arch/aarch64/include: cpu.h
src/sys/arch/alpha/include: alpha_cpu.h
src/sys/arch/amd64/include: cpu.h profile.h
src/sys/arch/dreamcast/include: intr.h
src/sys/arch/evbsh3/include: intr.h
src/sys/arch/hpcsh/include: intr.h
src/sys/arch/hppa/include: cpu.h
src/sys/arch/i386/include: cpu.h profile.h
src/sys/arch/landisk/include: intr.h
src/sys/arch/mmeye/include: intr.h
src/sys/arch/powerpc/include: cpu.h
src/sys/arch/sparc/include: psl.h
src/sys/arch/sparc64/include: psl.h
src/sys/arch/vax/include: intr.h mtpr.h
src/sys/sys: spl.h

Log Message:
In order to prevent _mcount() from being recursively called when built with 
COPTS=-O0,
sprinkle `__always_inline' to make _mcount() be generated as a single function.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/aarch64/include/cpu.h
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/alpha/include/alpha_cpu.h
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/amd64/include/cpu.h
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/amd64/include/profile.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/dreamcast/include/intr.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbsh3/include/intr.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hpcsh/include/intr.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hppa/include/cpu.h
cvs rdiff -u -r1.182 -r1.183 src/sys/arch/i386/include/cpu.h
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/i386/include/profile.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/landisk/include/intr.h
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/mmeye/include/intr.h
cvs rdiff -u -r1.119 -r1.120 src/sys/arch/powerpc/include/cpu.h
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/sparc/include/psl.h
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/sparc64/include/psl.h
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/vax/include/intr.h
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/vax/include/mtpr.h
cvs rdiff -u -r1.9 -r1.10 src/sys/sys/spl.h

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

Modified files:

Index: src/sys/arch/aarch64/include/cpu.h
diff -u src/sys/arch/aarch64/include/cpu.h:1.44 src/sys/arch/aarch64/include/cpu.h:1.45
--- src/sys/arch/aarch64/include/cpu.h:1.44	Mon Nov  1 08:53:40 2021
+++ src/sys/arch/aarch64/include/cpu.h	Tue Nov  2 11:26:03 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.44 2021/11/01 08:53:40 skrll Exp $ */
+/* $NetBSD: cpu.h,v 1.45 2021/11/02 11:26:03 ryo Exp $ */
 
 /*-
  * Copyright (c) 2014, 2020 The NetBSD Foundation, Inc.
@@ -177,7 +177,7 @@ struct cpu_info {
 } __aligned(COHERENCY_UNIT);
 
 #ifdef _KERNEL
-static inline struct lwp * __attribute__ ((const))
+static inline __always_inline struct lwp * __attribute__ ((const))
 aarch64_curlwp(void)
 {
 	struct lwp *l;

Index: src/sys/arch/alpha/include/alpha_cpu.h
diff -u src/sys/arch/alpha/include/alpha_cpu.h:1.54 src/sys/arch/alpha/include/alpha_cpu.h:1.55
--- src/sys/arch/alpha/include/alpha_cpu.h:1.54	Thu May 27 22:05:24 2021
+++ src/sys/arch/alpha/include/alpha_cpu.h	Tue Nov  2 11:26:03 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: alpha_cpu.h,v 1.54 2021/05/27 22:05:24 thorpej Exp $ */
+/* $NetBSD: alpha_cpu.h,v 1.55 2021/11/02 11:26:03 ryo Exp $ */
 
 /*
  * Copyright (c) 1996 Carnegie-Mellon University.
@@ -453,7 +453,7 @@ alpha_pal_rdusp(void)
 	return (v0);
 }
 
-static __inline unsigned long
+static __inline __always_inline unsigned long
 alpha_pal_rdval(void)
 {
 	register unsigned long v0 __asm("$0");

Index: src/sys/arch/amd64/include/cpu.h
diff -u src/sys/arch/amd64/include/cpu.h:1.69 src/sys/arch/amd64/include/cpu.h:1.70
--- src/sys/arch/amd64/include/cpu.h:1.69	Sat Apr 17 20:12:55 2021
+++ src/sys/arch/amd64/include/cpu.h	Tue Nov  2 11:26:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.69 2021/04/17 20:12:55 rillig Exp $	*/
+/*	$NetBSD: cpu.h,v 1.70 2021/11/02 11:26:03 ryo Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -48,7 +48,7 @@
 static struct cpu_info *x86_curcpu(void);
 static lwp_t *x86_curlwp(void);
 
-__inline static struct cpu_info * __unused __nomsan
+__inline __always_inline static struct cpu_info * __unused __nomsan
 x86_curcpu(void)
 {
 	struct cpu_info *ci;

Index: src/sys/arch/amd64/include/profile.h
diff -u src/sys/arch/amd64/include/profile.h:1.20 src/sys/arch/amd64/include/profile.h:1.21
--- src/sys/arch/amd64/include/profile.h:1.20	Sat Apr 17 20:12:55 2021
+++ src/sys/arch/amd64/include/profile.h	Tue Nov  2 11:26:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: profile.h,v 1.20 2021/04/17 20:12:55 rillig Exp $	*/
+/*	$NetBSD: profile.h,v 1.21 2021/11/02 11:26:03 ryo Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -80,7 +80,7 @@ __asm(" .globl __mcount		\n"			\
 
 #ifdef _KERNEL
 #ifdef XENPV
-static inline void
+static inline __always_inline void
 mcount_disable_intr(void)
 {
 	/* should be __cli() but this 

CVS commit: src/sys

2021-11-02 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Tue Nov  2 11:26:05 UTC 2021

Modified Files:
src/sys/arch/aarch64/include: cpu.h
src/sys/arch/alpha/include: alpha_cpu.h
src/sys/arch/amd64/include: cpu.h profile.h
src/sys/arch/dreamcast/include: intr.h
src/sys/arch/evbsh3/include: intr.h
src/sys/arch/hpcsh/include: intr.h
src/sys/arch/hppa/include: cpu.h
src/sys/arch/i386/include: cpu.h profile.h
src/sys/arch/landisk/include: intr.h
src/sys/arch/mmeye/include: intr.h
src/sys/arch/powerpc/include: cpu.h
src/sys/arch/sparc/include: psl.h
src/sys/arch/sparc64/include: psl.h
src/sys/arch/vax/include: intr.h mtpr.h
src/sys/sys: spl.h

Log Message:
In order to prevent _mcount() from being recursively called when built with 
COPTS=-O0,
sprinkle `__always_inline' to make _mcount() be generated as a single function.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/aarch64/include/cpu.h
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/alpha/include/alpha_cpu.h
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/amd64/include/cpu.h
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/amd64/include/profile.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/dreamcast/include/intr.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbsh3/include/intr.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hpcsh/include/intr.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hppa/include/cpu.h
cvs rdiff -u -r1.182 -r1.183 src/sys/arch/i386/include/cpu.h
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/i386/include/profile.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/landisk/include/intr.h
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/mmeye/include/intr.h
cvs rdiff -u -r1.119 -r1.120 src/sys/arch/powerpc/include/cpu.h
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/sparc/include/psl.h
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/sparc64/include/psl.h
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/vax/include/intr.h
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/vax/include/mtpr.h
cvs rdiff -u -r1.9 -r1.10 src/sys/sys/spl.h

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



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

2021-11-02 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Tue Nov  2 11:22:03 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: profile.h

Log Message:
fix profiling kernel build


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/include/profile.h

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

Modified files:

Index: src/sys/arch/powerpc/include/profile.h
diff -u src/sys/arch/powerpc/include/profile.h:1.9 src/sys/arch/powerpc/include/profile.h:1.10
--- src/sys/arch/powerpc/include/profile.h:1.9	Thu Sep 12 15:36:17 2013
+++ src/sys/arch/powerpc/include/profile.h	Tue Nov  2 11:22:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: profile.h,v 1.9 2013/09/12 15:36:17 joerg Exp $	*/
+/*	$NetBSD: profile.h,v 1.10 2021/11/02 11:22:03 ryo Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -132,6 +132,7 @@ __asm("	.globl	_mcount			\n" \
 #define MCOUNT_ENTER	do s = wrtee(0); while (/*CONSTCOND*/ 0)
 #define MCOUNT_EXIT	wrtee(s)
 #else
+#include 
 #define MCOUNT_ENTER		\
 	__asm volatile("mfmsr %0" : "=r"(s));			\
 	if ((s & (PSL_IR | PSL_DR)) != (PSL_IR | PSL_DR))	\



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

2021-11-02 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Tue Nov  2 11:22:03 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: profile.h

Log Message:
fix profiling kernel build


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/include/profile.h

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



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

2021-11-02 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Tue Nov  2 11:21:24 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: spr.h
src/sys/arch/powerpc/include/ibm4xx: cpu.h

Log Message:
fix build with COPTS=-O0


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/powerpc/include/spr.h
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/powerpc/include/ibm4xx/cpu.h

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

Modified files:

Index: src/sys/arch/powerpc/include/spr.h
diff -u src/sys/arch/powerpc/include/spr.h:1.53 src/sys/arch/powerpc/include/spr.h:1.54
--- src/sys/arch/powerpc/include/spr.h:1.53	Mon Jul  6 10:31:23 2020
+++ src/sys/arch/powerpc/include/spr.h	Tue Nov  2 11:21:24 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: spr.h,v 1.53 2020/07/06 10:31:23 rin Exp $	*/
+/*	$NetBSD: spr.h,v 1.54 2021/11/02 11:21:24 ryo Exp $	*/
 
 /*
  * Copyright (c) 2001, The NetBSD Foundation, Inc.
@@ -72,8 +72,8 @@ mfspr64(int reg)
 } )
 #endif /* PPC_OEA64_BRIDGE || _ARCH_PPC64 */
 
-static __inline uint64_t
-mfspr32(int reg)
+static __inline __always_inline uint64_t
+mfspr32(const int reg)
 {
 	register_t val;
 
@@ -81,8 +81,8 @@ mfspr32(int reg)
 	return val;
 }
 
-static __inline void
-mtspr32(int reg, uint32_t val)
+static __inline __always_inline void
+mtspr32(const int reg, uint32_t val)
 {
 
 	__asm volatile("mtspr %0,%1" : : "K"(reg), "r"(val));

Index: src/sys/arch/powerpc/include/ibm4xx/cpu.h
diff -u src/sys/arch/powerpc/include/ibm4xx/cpu.h:1.26 src/sys/arch/powerpc/include/ibm4xx/cpu.h:1.27
--- src/sys/arch/powerpc/include/ibm4xx/cpu.h:1.26	Mon May 31 14:38:56 2021
+++ src/sys/arch/powerpc/include/ibm4xx/cpu.h	Tue Nov  2 11:21:24 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.26 2021/05/31 14:38:56 simonb Exp $	*/
+/*	$NetBSD: cpu.h,v 1.27 2021/11/02 11:21:24 ryo Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -90,14 +90,14 @@ extern void intr_init(void);
  * macros because register address is encoded as immediate
  * operand.
  */
-static __inline void
-mtdcr(int reg, uint32_t val)
+static __inline __always_inline void
+mtdcr(const int reg, uint32_t val)
 {
 	__asm volatile("mtdcr %0,%1" : : "K"(reg), "r"(val));
 }
 
-static __inline uint32_t
-mfdcr(int reg)
+static __inline __always_inline uint32_t
+mfdcr(const int reg)
 {
 	uint32_t val;	
 	



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

2021-11-02 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Tue Nov  2 11:21:24 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: spr.h
src/sys/arch/powerpc/include/ibm4xx: cpu.h

Log Message:
fix build with COPTS=-O0


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/powerpc/include/spr.h
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/powerpc/include/ibm4xx/cpu.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/xlint/arch

2021-11-02 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Nov  2 10:38:26 UTC 2021

Modified Files:
src/usr.bin/xlint/arch/mips64: targparam.h
src/usr.bin/xlint/arch/mipsn64: targparam.h

Log Message:
Hopefully fix builds


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/xlint/arch/mips64/targparam.h
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/xlint/arch/mipsn64/targparam.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/xlint/arch/mips64/targparam.h
diff -u src/usr.bin/xlint/arch/mips64/targparam.h:1.9 src/usr.bin/xlint/arch/mips64/targparam.h:1.10
--- src/usr.bin/xlint/arch/mips64/targparam.h:1.9	Sun Jun 27 08:43:48 2021
+++ src/usr.bin/xlint/arch/mips64/targparam.h	Tue Nov  2 10:38:26 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: targparam.h,v 1.9 2021/06/27 08:43:48 rillig Exp $	*/
+/*	$NetBSD: targparam.h,v 1.10 2021/11/02 10:38:26 skrll Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -35,7 +35,7 @@
  * Machine-dependent target parameters for lint1.
  */
 #include "schar.h"
-// This is for __mips_n32
+/* This is for __mips_n32 */
 #include "ilp32.h"
 
 /*

Index: src/usr.bin/xlint/arch/mipsn64/targparam.h
diff -u src/usr.bin/xlint/arch/mipsn64/targparam.h:1.2 src/usr.bin/xlint/arch/mipsn64/targparam.h:1.3
--- src/usr.bin/xlint/arch/mipsn64/targparam.h:1.2	Sun Jun 27 08:43:48 2021
+++ src/usr.bin/xlint/arch/mipsn64/targparam.h	Tue Nov  2 10:38:26 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: targparam.h,v 1.2 2021/06/27 08:43:48 rillig Exp $	*/
+/*	$NetBSD: targparam.h,v 1.3 2021/11/02 10:38:26 skrll Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -35,7 +35,7 @@
  * Machine-dependent target parameters for lint1.
  */
 #include "schar.h"
-// This is for __mips_n64
+/* This is for __mips_n64 */
 #include "lp64.h"
 
 /*



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

2021-11-02 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Nov  2 10:38:26 UTC 2021

Modified Files:
src/usr.bin/xlint/arch/mips64: targparam.h
src/usr.bin/xlint/arch/mipsn64: targparam.h

Log Message:
Hopefully fix builds


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/xlint/arch/mips64/targparam.h
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/xlint/arch/mipsn64/targparam.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/join

2021-11-02 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Tue Nov  2 10:05:49 UTC 2021

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

Log Message:
join(1): convert realloc(x * y) to reallocarr and eliminate temporary
variables


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/usr.bin/join/join.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/join/join.c
diff -u src/usr.bin/join/join.c:1.33 src/usr.bin/join/join.c:1.34
--- src/usr.bin/join/join.c:1.33	Thu Mar 18 19:47:41 2021
+++ src/usr.bin/join/join.c	Tue Nov  2 10:05:49 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: join.c,v 1.33 2021/03/18 19:47:41 cheusov Exp $	*/
+/*	$NetBSD: join.c,v 1.34 2021/11/02 10:05:49 nia Exp $	*/
 
 /*-
  * Copyright (c) 1991 The Regents of the University of California.
@@ -47,7 +47,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991\
 #if 0
 static char sccsid[] = "from: @(#)join.c	5.1 (Berkeley) 11/18/91";
 #else
-__RCSID("$NetBSD: join.c,v 1.33 2021/03/18 19:47:41 cheusov Exp $");
+__RCSID("$NetBSD: join.c,v 1.34 2021/11/02 10:05:49 nia Exp $");
 #endif
 #endif /* not lint */
 
@@ -301,7 +301,6 @@ slurp(INPUT *F)
 {
 	LINE *lp;
 	LINE tmp;
-	LINE *nline;
 	size_t len;
 	u_long cnt;
 	char *bp, *fieldp;
@@ -323,10 +322,8 @@ slurp(INPUT *F)
 nsize = 64;
 			else
 nsize = F->setalloc << 1;
-			if ((nline = realloc(F->set,
-			nsize * sizeof(LINE))) == NULL)
+			if (reallocarr(>set, nsize, sizeof(LINE)) != 0)
 enomem();
-			F->set = nline;
 			F->setalloc = nsize;
 			memset(F->set + cnt, 0,
 			(F->setalloc - cnt) * sizeof(LINE));
@@ -379,16 +376,13 @@ slurp(INPUT *F)
 			if (spans && *fieldp == '\0')
 continue;
 			if (lp->fieldcnt == lp->fieldalloc) {
-char **n;
-
 if (lp->fieldalloc == 0)
 	nsize = 16;
 else
 	nsize = lp->fieldalloc << 1;
-if ((n = realloc(lp->fields,
-nsize * sizeof(char *))) == NULL)
+if (reallocarr(>fields,
+nsize, sizeof(char *)) != 0)
 	enomem();
-lp->fields = n;
 lp->fieldalloc = nsize;
 			}
 			lp->fields[lp->fieldcnt++] = fieldp;
@@ -518,7 +512,6 @@ fieldarg(char *option)
 {
 	u_long fieldno;
 	char *end, *token;
-	OLIST *n;
 
 	while ((token = strsep(, ", \t")) != NULL) {
 		if (*token == '\0')
@@ -531,10 +524,9 @@ fieldarg(char *option)
 		if (fieldno == 0)
 			errx(1, "field numbers are 1 based");
 		if (olistcnt == olistalloc) {
-			if ((n = realloc(olist,
-			(olistalloc + 50) * sizeof(OLIST))) == NULL)
+			if (reallocarr(,
+			olistalloc + 50, sizeof(OLIST)) != 0)
 enomem();
-			olist = n;
 			olistalloc += 50;
 		}
 		olist[olistcnt].fileno = token[0] - '0';



CVS commit: src/usr.bin/join

2021-11-02 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Tue Nov  2 10:05:49 UTC 2021

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

Log Message:
join(1): convert realloc(x * y) to reallocarr and eliminate temporary
variables


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/usr.bin/join/join.c

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



CVS commit: src/lib/libc/gen

2021-11-02 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Tue Nov  2 08:39:20 UTC 2021

Modified Files:
src/lib/libc/gen: fts.c

Log Message:
fts(3): Use reallocarr instead of realloc(x * y), eliminate a temporary
variable.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/lib/libc/gen/fts.c

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

Modified files:

Index: src/lib/libc/gen/fts.c
diff -u src/lib/libc/gen/fts.c:1.49 src/lib/libc/gen/fts.c:1.50
--- src/lib/libc/gen/fts.c:1.49	Tue May 31 07:49:09 2016
+++ src/lib/libc/gen/fts.c	Tue Nov  2 08:39:20 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: fts.c,v 1.49 2016/05/31 07:49:09 pgoyette Exp $	*/
+/*	$NetBSD: fts.c,v 1.50 2021/11/02 08:39:20 nia Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)fts.c	8.6 (Berkeley) 8/14/94";
 #else
-__RCSID("$NetBSD: fts.c,v 1.49 2016/05/31 07:49:09 pgoyette Exp $");
+__RCSID("$NetBSD: fts.c,v 1.50 2021/11/02 08:39:20 nia Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -1015,12 +1015,9 @@ fts_sort(FTS *sp, FTSENT *head, size_t n
 	 * 40 so don't realloc one entry at a time.
 	 */
 	if (nitems > sp->fts_nitems) {
-		FTSENT **new;
-
-		new = realloc(sp->fts_array, sizeof(FTSENT *) * (nitems + 40));
-		if (new == 0)
+		if (reallocarr(>fts_array,
+		nitems + 40, sizeof(FTSENT *)) != 0)
 			return (head);
-		sp->fts_array = new;
 		sp->fts_nitems = fts_nitems_truncate(nitems + 40);
 	}
 	for (ap = sp->fts_array, p = head; p; p = p->fts_link)



CVS commit: src/lib/libc/gen

2021-11-02 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Tue Nov  2 08:39:20 UTC 2021

Modified Files:
src/lib/libc/gen: fts.c

Log Message:
fts(3): Use reallocarr instead of realloc(x * y), eliminate a temporary
variable.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/lib/libc/gen/fts.c

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



CVS commit: src/bin/ed

2021-11-02 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Tue Nov  2 08:04:20 UTC 2021

Modified Files:
src/bin/ed: undo.c

Log Message:
ed(1): use reallocarr instead of realloc(x * y)


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/bin/ed/undo.c

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

Modified files:

Index: src/bin/ed/undo.c
diff -u src/bin/ed/undo.c:1.7 src/bin/ed/undo.c:1.8
--- src/bin/ed/undo.c:1.7	Fri Jan  4 19:13:58 2019
+++ src/bin/ed/undo.c	Tue Nov  2 08:04:20 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: undo.c,v 1.7 2019/01/04 19:13:58 maya Exp $	*/
+/*	$NetBSD: undo.c,v 1.8 2021/11/02 08:04:20 nia Exp $	*/
 
 /* undo.c: This file contains the undo routines for the ed line editor */
 /*-
@@ -32,7 +32,7 @@
 #if 0
 static char *rcsid = "@(#)undo.c,v 1.1 1994/02/01 00:34:44 alm Exp";
 #else
-__RCSID("$NetBSD: undo.c,v 1.7 2019/01/04 19:13:58 maya Exp $");
+__RCSID("$NetBSD: undo.c,v 1.8 2021/11/02 08:04:20 nia Exp $");
 #endif
 #endif /* not lint */
 
@@ -48,19 +48,17 @@ long u_p = 0;	/* undo stack pointer 
 undo_t *
 push_undo_stack(int type, long from, long to)
 {
-	undo_t *t;
+	int err;
 
-	t = ustack;
 	if (u_p < usize ||
-	(t = (undo_t *) realloc(ustack, (usize += USIZE) * sizeof(undo_t))) != NULL) {
-		ustack = t;
+	(err = reallocarr(, usize += USIZE, sizeof(undo_t))) == 0) {
 		ustack[u_p].type = type;
 		ustack[u_p].t = get_addressed_line_node(to);
 		ustack[u_p].h = get_addressed_line_node(from);
 		return ustack + u_p++;
 	}
 	/* out of memory - release undo stack */
-	fprintf(stderr, "%s\n", strerror(errno));
+	fprintf(stderr, "%s\n", strerror(err));
 	seterrmsg("out of memory");
 	clear_undo_stack();
 	free(ustack);



CVS commit: src/bin/ed

2021-11-02 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Tue Nov  2 08:04:20 UTC 2021

Modified Files:
src/bin/ed: undo.c

Log Message:
ed(1): use reallocarr instead of realloc(x * y)


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/bin/ed/undo.c

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



CVS commit: src

2021-11-02 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Nov  2 06:54:10 UTC 2021

Modified Files:
src/lib/libc/compat/arch/powerpc64/sys: compat_missing.c
src/lib/libc/compat/include: signal.h
src/sys/external/bsd/compiler_rt/dist/lib/interception:
interception_linux.cc
src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common:
sanitizer_platform_limits_netbsd.h
sanitizer_signal_interceptors.inc

Log Message:
Adjust for new __sigaction_siginfo symbol.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/lib/libc/compat/arch/powerpc64/sys/compat_missing.c
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/compat/include/signal.h
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/bsd/compiler_rt/dist/lib/interception/interception_linux.cc
cvs rdiff -u -r1.4 -r1.5 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
cvs rdiff -u -r1.1.1.1 -r1.2 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_signal_interceptors.inc

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

Modified files:

Index: src/lib/libc/compat/arch/powerpc64/sys/compat_missing.c
diff -u src/lib/libc/compat/arch/powerpc64/sys/compat_missing.c:1.1 src/lib/libc/compat/arch/powerpc64/sys/compat_missing.c:1.2
--- src/lib/libc/compat/arch/powerpc64/sys/compat_missing.c:1.1	Sun Sep 20 20:14:50 2020
+++ src/lib/libc/compat/arch/powerpc64/sys/compat_missing.c	Tue Nov  2 06:54:10 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_missing.c,v 1.1 2020/09/20 20:14:50 christos Exp $	*/
+/*	$NetBSD: compat_missing.c,v 1.2 2021/11/02 06:54:10 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: compat_missing.c,v 1.1 2020/09/20 20:14:50 christos Exp $");
+__RCSID("$NetBSD: compat_missing.c,v 1.2 2021/11/02 06:54:10 thorpej Exp $");
 
 /*
  * define symbols that autoconf is supposed to find
@@ -50,14 +50,14 @@ __warn_references(sigsuspend,
 
 int sigaction(int, const struct sigaction * restrict,
 struct sigaction * restrict);
-int __sigaction14(int, const struct sigaction * restrict,
+int __sigaction_siginfo(int, const struct sigaction * restrict,
 struct sigaction * restrict);
 
 int
 sigaction(int sig, const struct sigaction * restrict act,
 struct sigaction * restrict oact)
 {
-	return __sigaction14(sig, act, oact);
+	return __sigaction_siginfo(sig, act, oact);
 }
 
 int sigpending(sigset_t *);

Index: src/lib/libc/compat/include/signal.h
diff -u src/lib/libc/compat/include/signal.h:1.2 src/lib/libc/compat/include/signal.h:1.3
--- src/lib/libc/compat/include/signal.h:1.2	Sun Jan 11 02:46:25 2009
+++ src/lib/libc/compat/include/signal.h	Tue Nov  2 06:54:10 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: signal.h,v 1.2 2009/01/11 02:46:25 christos Exp $	*/
+/*	$NetBSD: signal.h,v 1.3 2021/11/02 06:54:10 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -39,7 +39,7 @@
 __BEGIN_DECLS
 int	sigaction(int, const struct sigaction13 * __restrict,
 struct sigaction13 * __restrict);
-int	__sigaction14(int, const struct sigaction * __restrict,
+int	__sigaction_siginfo(int, const struct sigaction * __restrict,
 struct sigaction * __restrict);
 int	sigaddset(sigset13_t *, int);
 int	__sigaddset14(sigset_t *, int);

Index: src/sys/external/bsd/compiler_rt/dist/lib/interception/interception_linux.cc
diff -u src/sys/external/bsd/compiler_rt/dist/lib/interception/interception_linux.cc:1.1.1.1 src/sys/external/bsd/compiler_rt/dist/lib/interception/interception_linux.cc:1.2
--- src/sys/external/bsd/compiler_rt/dist/lib/interception/interception_linux.cc:1.1.1.1	Tue Jan  8 05:40:32 2019
+++ src/sys/external/bsd/compiler_rt/dist/lib/interception/interception_linux.cc	Tue Nov  2 06:54:10 2021
@@ -28,7 +28,8 @@ bool GetRealFunctionAddress(const char *
 uptr real, uptr wrapper) {
 #if SANITIZER_NETBSD
   // XXX: Find a better way to handle renames
-  if (internal_strcmp(func_name, "sigaction") == 0) func_name = "__sigaction14";
+  // XXX: Do we have to handle the old __sigaction14 name here too?
+  if (internal_strcmp(func_name, "sigaction") == 0) func_name = "__sigaction_siginfo";
 #endif
   *func_addr = (uptr)dlsym(RTLD_NEXT, func_name);
   if (!*func_addr) {

Index: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
diff -u src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h:1.4 src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h:1.5
--- src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h:1.4	Tue Dec 24 19:51:00 2019
+++ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h	Tue Nov  2 06:54:10 2021
@@ -2384,7 +2384,8 @@ struct __sanitizer_cdbw {
   

CVS commit: src

2021-11-02 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Nov  2 06:54:10 UTC 2021

Modified Files:
src/lib/libc/compat/arch/powerpc64/sys: compat_missing.c
src/lib/libc/compat/include: signal.h
src/sys/external/bsd/compiler_rt/dist/lib/interception:
interception_linux.cc
src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common:
sanitizer_platform_limits_netbsd.h
sanitizer_signal_interceptors.inc

Log Message:
Adjust for new __sigaction_siginfo symbol.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/lib/libc/compat/arch/powerpc64/sys/compat_missing.c
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/compat/include/signal.h
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/bsd/compiler_rt/dist/lib/interception/interception_linux.cc
cvs rdiff -u -r1.4 -r1.5 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
cvs rdiff -u -r1.1.1.1 -r1.2 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_signal_interceptors.inc

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