CVS commit: src

2024-06-09 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Mon Jun 10 01:53:35 UTC 2024

Modified Files:
src: UPDATING

Log Message:
UPDATING: fix an old typo


To generate a diff of this commit:
cvs rdiff -u -r1.350 -r1.351 src/UPDATING

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

Modified files:

Index: src/UPDATING
diff -u src/UPDATING:1.350 src/UPDATING:1.351
--- src/UPDATING:1.350	Sun May  5 02:50:11 2024
+++ src/UPDATING	Mon Jun 10 01:53:35 2024
@@ -1,4 +1,4 @@
-$NetBSD: UPDATING,v 1.350 2024/05/05 02:50:11 riastradh Exp $
+$NetBSD: UPDATING,v 1.351 2024/06/10 01:53:35 gutteridge Exp $
 
 This file (UPDATING) is intended to be a brief reference to recent
 changes that might cause problems in the build process, and a guide for
@@ -188,7 +188,7 @@ Recent changes:
 
 20210417:
 	GCC 10 was enabled for several platforms.  If builds fail in either
-	tools/gcc or external/gpl/gcc, first try cleaning those objects and
+	tools/gcc or external/gpl3/gcc, first try cleaning those objects and
 	removing the $DESTDIR/usr/include/g++ subdirectory.
 
 20201016:



CVS commit: src

2024-06-09 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Mon Jun 10 01:53:35 UTC 2024

Modified Files:
src: UPDATING

Log Message:
UPDATING: fix an old typo


To generate a diff of this commit:
cvs rdiff -u -r1.350 -r1.351 src/UPDATING

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



CVS commit: src/tests/lib/libarchive

2024-06-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jun 10 00:35:38 UTC 2024

Modified Files:
src/tests/lib/libarchive: Makefile

Log Message:
make it build (should add more tests)


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libarchive/Makefile

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

Modified files:

Index: src/tests/lib/libarchive/Makefile
diff -u src/tests/lib/libarchive/Makefile:1.7 src/tests/lib/libarchive/Makefile:1.8
--- src/tests/lib/libarchive/Makefile:1.7	Sun Jun  9 18:12:46 2024
+++ src/tests/lib/libarchive/Makefile	Sun Jun  9 20:35:38 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2024/06/09 22:12:46 kre Exp $
+# $NetBSD: Makefile,v 1.8 2024/06/10 00:35:38 christos Exp $
 
 NOMAN=
 
@@ -608,4 +608,5 @@ list.h: ${SRCS.h_libarchive} Makefile
 	${TOOL_GREP} -v test_compat_pax_libarchive_2x > ${.TARGET}
 
 COPTS.test_archive_string_conversion.c+=	${CC_WNO_STRINGOP_TRUNCATION}
+COPTS.test_main.c+=	${CC_WNO_STRINGOP_OVERFLOW}
 



CVS commit: src/tests/lib/libarchive

2024-06-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jun 10 00:35:38 UTC 2024

Modified Files:
src/tests/lib/libarchive: Makefile

Log Message:
make it build (should add more tests)


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libarchive/Makefile

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



CVS commit: src/external/bsd/libarchive/dist/libarchive/test

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 23:58:23 UTC 2024

Modified Files:
src/external/bsd/libarchive/dist/libarchive/test:
test_write_disk_secure.c

Log Message:
libarchive test_write_disk_secure.c: Restore hunk of local change.

This was part of a change added in revision 1.4 in order to avoid
cluttering /tmp (PR 55612), and lost in the 3.7.4 merge:

https://mail-index.netbsd.org/source-changes/2020/08/28/msg121149.html


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure.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/libarchive/dist/libarchive/test/test_write_disk_secure.c
diff -u src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure.c:1.5 src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure.c:1.6
--- src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure.c:1.5	Sun Jun  9 19:47:56 2024
+++ src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure.c	Sun Jun  9 23:58:23 2024
@@ -39,6 +39,16 @@ DEFINE_TEST(test_write_disk_secure)
 	struct archive *a;
 	struct archive_entry *ae;
 	struct stat st;
+	char tmp[2048];
+	const char *tmpdir;
+	const char *lname =
+	"libarchive_test-test_write_disk_secure-absolute_symlink";
+#if 0
+	const char *fname =
+	"libarchive_test-test_write_disk_secure-absolute_symlink_path.tmp";
+#endif
+	const char *pname =
+	"libarchive_test-test_write_disk_secure-absolute_path.tmp";
 #if defined(HAVE_LCHMOD) && defined(HAVE_SYMLINK) && \
 defined(S_IRUSR) && defined(S_IWUSR) && defined(S_IXUSR)
 	int working_lchmod;



CVS commit: src/external/bsd/libarchive/dist/libarchive/test

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 23:58:23 UTC 2024

Modified Files:
src/external/bsd/libarchive/dist/libarchive/test:
test_write_disk_secure.c

Log Message:
libarchive test_write_disk_secure.c: Restore hunk of local change.

This was part of a change added in revision 1.4 in order to avoid
cluttering /tmp (PR 55612), and lost in the 3.7.4 merge:

https://mail-index.netbsd.org/source-changes/2020/08/28/msg121149.html


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/bsd/libarchive/dist/libarchive/test/test_write_disk_secure.c

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



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

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 22:35:47 UTC 2024

Modified Files:
src/sys/arch/arm/include: asm.h

Log Message:
arm/asm.h: Respect NETBSD_REVISIONID.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/arm/include/asm.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/arm/include/asm.h
diff -u src/sys/arch/arm/include/asm.h:1.34 src/sys/arch/arm/include/asm.h:1.35
--- src/sys/arch/arm/include/asm.h:1.34	Thu Apr 23 23:22:41 2020
+++ src/sys/arch/arm/include/asm.h	Sun Jun  9 22:35:47 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.34 2020/04/23 23:22:41 jakllsch Exp $	*/
+/*	$NetBSD: asm.h,v 1.35 2024/06/09 22:35:47 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -224,10 +224,33 @@
 #define	PIC_SYM(x,y)	x
 #endif	/* __PIC__ */
 
-#define RCSID(x)	.pushsection ".ident","MS",%progbits,1;		\
-			.asciz x;	\
+/*
+ * Annoyingly, gas on arm seems to generate _two_ NUL-terminated
+ * strings for
+ *
+ *	.asciz "foo" "bar"
+ *
+ * instead of concatenating it into a single NUL-terminated string as
+ * on other architectures.
+ *
+ * To work around this, we concatenate into a single NUL-terminated by:
+ *
+ *	.ascii "foo"
+ *	.asciz "bar"
+ */
+#define _IDENTSTR(x)	.pushsection ".ident","MS",%progbits,1;		\
+			x;		\
 			.popsection
 
+#ifdef _NETBSD_REVISIONID
+#define	RCSID(_s)			\
+	_IDENTSTR(.asciz _s);		\
+	_IDENTSTR(.ascii "$"; .ascii "NetBSD: "; .ascii __FILE__;	\
+	.ascii " "; .ascii _NETBSD_REVISIONID; .asciz " $")
+#else
+#define	RCSID(_s)	_IDENTSTR(.asciz _s)
+#endif
+
 #define	WEAK_ALIAS(alias,sym)		\
 	.weak alias;			\
 	alias = sym



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

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 22:35:47 UTC 2024

Modified Files:
src/sys/arch/arm/include: asm.h

Log Message:
arm/asm.h: Respect NETBSD_REVISIONID.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/arm/include/asm.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/alpha/include

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 22:35:37 UTC 2024

Modified Files:
src/sys/arch/alpha/include: asm.h

Log Message:
alpha/asm.h: Respect _NETBSD_REVISIONID.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/alpha/include/asm.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/alpha/include/asm.h
diff -u src/sys/arch/alpha/include/asm.h:1.45 src/sys/arch/alpha/include/asm.h:1.46
--- src/sys/arch/alpha/include/asm.h:1.45	Thu Feb 23 14:55:10 2023
+++ src/sys/arch/alpha/include/asm.h	Sun Jun  9 22:35:37 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.45 2023/02/23 14:55:10 riastradh Exp $ */
+/* $NetBSD: asm.h,v 1.46 2024/06/09 22:35:37 riastradh Exp $ */
 
 /*
  * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
@@ -649,7 +649,14 @@ label:	ASCIZ msg;		\
 
 #ifdef _KERNEL
 
+#ifdef _NETBSD_REVISIONID
+#define	__KERNEL_RCSID(_n, _s)		  \
+	__SECTIONSTRING(.ident, _s);	  \
+	__SECTIONSTRING(.ident,		  \
+	"$" "NetBSD: " __FILE__ " " _NETBSD_REVISIONID " $")
+#else
 #define	__KERNEL_RCSID(_n, _s)		__SECTIONSTRING(.ident, _s)
+#endif
 #define	__KERNEL_COPYRIGHT(_n, _s)	__SECTIONSTRING(.copyright, _s)
 
 #ifdef NO_KERNEL_RCSIDS
@@ -706,7 +713,16 @@ IMPORT(cpu_info_primary, CPU_INFO_SIZEOF
 stq r, CPU_INFO_CURLWP(v0)
 
 #endif /* MULTIPROCESSOR */
+
+#else /* !_KERNEL */
+
+#ifdef _NETBSD_REVISIONID
+#define	RCSID(_s)			  \
+	__SECTIONSTRING(.ident, _s);	  \
+	__SECTIONSTRING(.ident,		  \
+	"$" "NetBSD: " __FILE__ " " _NETBSD_REVISIONID " $")
 #else
 #define	RCSID(_s)		__SECTIONSTRING(.ident, _s)
+#endif
 
 #endif /* _KERNEL */



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

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 22:35:37 UTC 2024

Modified Files:
src/sys/arch/alpha/include: asm.h

Log Message:
alpha/asm.h: Respect _NETBSD_REVISIONID.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/alpha/include/asm.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/i386/include

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 22:35:28 UTC 2024

Modified Files:
src/sys/arch/i386/include: asm.h

Log Message:
i386/asm.h: Respect _NETBSD_REVISIONID.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/i386/include/asm.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/i386/include/asm.h
diff -u src/sys/arch/i386/include/asm.h:1.44 src/sys/arch/i386/include/asm.h:1.45
--- src/sys/arch/i386/include/asm.h:1.44	Sat Apr 25 15:26:17 2020
+++ src/sys/arch/i386/include/asm.h	Sun Jun  9 22:35:27 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.44 2020/04/25 15:26:17 bouyer Exp $	*/
+/*	$NetBSD: asm.h,v 1.45 2024/06/09 22:35:27 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -181,11 +181,18 @@
 #define	ASMSTR		.asciz
 
 #ifdef __ELF__
-#define RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\
+#define _IDENTSTR(x)	.pushsection ".ident","MS",@progbits,1;		\
 			.asciz x;	\
 			.popsection
 #else
-#define RCSID(x)	.text; .asciz x
+#define _IDENTSTR(x)	.text; .asciz x
+#endif
+#ifdef _NETBSD_REVISIONID
+#define	RCSID(_s)			  \
+	_IDENTSTR(_s);			  \
+	_IDENTSTR("$" "NetBSD: " __FILE__ " " _NETBSD_REVISIONID " $")
+#else
+#define	RCSID(_s)			_IDENTSTR(_s)
 #endif
 
 #ifdef NO_KERNEL_RCSIDS



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

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 22:35:28 UTC 2024

Modified Files:
src/sys/arch/i386/include: asm.h

Log Message:
i386/asm.h: Respect _NETBSD_REVISIONID.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/i386/include/asm.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/amd64/include

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 22:35:17 UTC 2024

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

Log Message:
amd64/asm.h: Respect _NETBSD_REVISIONID.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/amd64/include/asm.h

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

Modified files:

Index: src/sys/arch/amd64/include/asm.h
diff -u src/sys/arch/amd64/include/asm.h:1.22 src/sys/arch/amd64/include/asm.h:1.23
--- src/sys/arch/amd64/include/asm.h:1.22	Sat Apr 17 20:12:55 2021
+++ src/sys/arch/amd64/include/asm.h	Sun Jun  9 22:35:17 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.22 2021/04/17 20:12:55 rillig Exp $	*/
+/*	$NetBSD: asm.h,v 1.23 2024/06/09 22:35:17 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -112,9 +112,16 @@
 
 #define	ASMSTR		.asciz
 
-#define RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\
+#define _IDENTSTR(x)	.pushsection ".ident","MS",@progbits,1;		\
 			.asciz x;	\
 			.popsection
+#ifdef _NETBSD_REVISIONID
+#define	RCSID(_s)			  \
+	_IDENTSTR(_s);			  \
+	_IDENTSTR("$" "NetBSD: " __FILE__ " " _NETBSD_REVISIONID " $")
+#else
+#define	RCSID(_s)			_IDENTSTR(_s)
+#endif
 
 #define	WEAK_ALIAS(alias,sym)		\
 	.weak alias;			\



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

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 22:35:17 UTC 2024

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

Log Message:
amd64/asm.h: Respect _NETBSD_REVISIONID.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/amd64/include/asm.h

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



CVS commit: src/tests/lib/libarchive

2024-06-09 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Jun  9 22:12:46 UTC 2024

Modified Files:
src/tests/lib/libarchive: Makefile

Log Message:
Don't try to build test_compat_pax_libarchive_2x or test_read_pax_schily_xattr

Both of those were removed in the recent libarchive update:

   Removed Files:
src/external/bsd/libarchive/dist: CONTRIBUTING.md
src/external/bsd/libarchive/dist/libarchive/test:
test_compat_pax_libarchive_2x.c
test_compat_pax_libarchive_2x.tar.Z.uu test_read_pax_schily_xattr.c
test_read_pax_schily_xattr.tar.uu


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libarchive/Makefile

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

Modified files:

Index: src/tests/lib/libarchive/Makefile
diff -u src/tests/lib/libarchive/Makefile:1.6 src/tests/lib/libarchive/Makefile:1.7
--- src/tests/lib/libarchive/Makefile:1.6	Sat Jun  3 09:09:15 2023
+++ src/tests/lib/libarchive/Makefile	Sun Jun  9 22:12:46 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2023/06/03 09:09:15 lukem Exp $
+# $NetBSD: Makefile,v 1.7 2024/06/09 22:12:46 kre Exp $
 
 NOMAN=
 
@@ -73,7 +73,6 @@ test_compat_lzip.c \
 test_compat_lzma.c \
 test_compat_lzop.c \
 test_compat_mac.c \
-test_compat_pax_libarchive_2x.c \
 test_compat_perl_archive_tar.c \
 test_compat_plexus_archiver_tar.c \
 test_compat_solaris_pax_sparse.c \
@@ -204,7 +203,6 @@ test_read_format_zip_winzip_aes_large.c 
 test_read_format_zip_with_invalid_traditional_eocd.c \
 test_read_format_zip_zip64.c \
 test_read_large.c \
-test_read_pax_schily_xattr.c \
 test_read_pax_truncated.c \
 test_read_position.c \
 test_read_set_format.c \



CVS commit: src/tests/lib/libarchive

2024-06-09 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Jun  9 22:12:46 UTC 2024

Modified Files:
src/tests/lib/libarchive: Makefile

Log Message:
Don't try to build test_compat_pax_libarchive_2x or test_read_pax_schily_xattr

Both of those were removed in the recent libarchive update:

   Removed Files:
src/external/bsd/libarchive/dist: CONTRIBUTING.md
src/external/bsd/libarchive/dist/libarchive/test:
test_compat_pax_libarchive_2x.c
test_compat_pax_libarchive_2x.tar.Z.uu test_read_pax_schily_xattr.c
test_read_pax_schily_xattr.tar.uu


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libarchive/Makefile

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



CVS commit: src/doc

2024-06-09 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Jun  9 20:47:55 UTC 2024

Modified Files:
src/doc: 3RDPARTY

Log Message:
doc: update 3RDPARTY entry for libarchive update


To generate a diff of this commit:
cvs rdiff -u -r1.2007 -r1.2008 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.2007 src/doc/3RDPARTY:1.2008
--- src/doc/3RDPARTY:1.2007	Thu Jun  6 20:50:49 2024
+++ src/doc/3RDPARTY	Sun Jun  9 20:47:55 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.2007 2024/06/06 20:50:49 wiz Exp $
+#	$NetBSD: 3RDPARTY,v 1.2008 2024/06/09 20:47:55 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -717,12 +717,12 @@ for importation.  Run ./configure before
 Talk to mrg before importing any new version.
 
 Package:	libarchive
-Version:	3.4.0
-Current Vers:	3.7.2
+Version:	3.7.4
+Current Vers:	3.7.4
 Maintainer:	kient...@freebsd.org, jo...@netbsd.org
 Archive Site:	https://github.com/libarchive/libarchive/releases
 Home Page: 	http://www.libarchive.org
-Date:		2021-03-01
+Date:		2024-06-09
 Responsible:	joerg
 License:	BSD (2-clause)
 Location:	external/bsd/libarchive/dist



CVS commit: src/doc

2024-06-09 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Jun  9 20:47:55 UTC 2024

Modified Files:
src/doc: 3RDPARTY

Log Message:
doc: update 3RDPARTY entry for libarchive update


To generate a diff of this commit:
cvs rdiff -u -r1.2007 -r1.2008 src/doc/3RDPARTY

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



CVS commit: src

2024-06-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jun  9 20:30:36 UTC 2024

Modified Files:
src/doc: TODO.smpnet
src/sys/external/bsd/ipf/netinet: ip_fil_netbsd.c

Log Message:
ipfilter(4): mark as MPSAFE.

my testing seems to work fine, and this version was known to work
on solaris with no global locking available.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/doc/TODO.smpnet
cvs rdiff -u -r1.38 -r1.39 src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c

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

Modified files:

Index: src/doc/TODO.smpnet
diff -u src/doc/TODO.smpnet:1.48 src/doc/TODO.smpnet:1.49
--- src/doc/TODO.smpnet:1.48	Wed Apr 24 06:44:18 2024
+++ src/doc/TODO.smpnet	Sun Jun  9 20:30:35 2024
@@ -1,4 +1,4 @@
-$NetBSD: TODO.smpnet,v 1.48 2024/04/24 06:44:18 nia Exp $
+$NetBSD: TODO.smpnet,v 1.49 2024/06/09 20:30:35 mrg Exp $
 
 MP-safe components
 ==
@@ -58,6 +58,7 @@ kernel option.  Some components scale up
- vlan(4)
  - Packet filters
- npf(7)
+   - ipf(4)
  - Others
- bpf(4)
- ipsec(4)
@@ -106,7 +107,6 @@ Unprotected ones
- stf(4)
- if_srt
  - Packet filters
-   - ipf(4)
- pf(4)
  - Others
- AppleTalk (sys/netatalk/)

Index: src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c
diff -u src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c:1.38 src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c:1.39
--- src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c:1.38	Sat Jun 24 05:16:15 2023
+++ src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c	Sun Jun  9 20:30:36 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_fil_netbsd.c,v 1.38 2023/06/24 05:16:15 msaitoh Exp $	*/
+/*	$NetBSD: ip_fil_netbsd.c,v 1.39 2024/06/09 20:30:36 mrg Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -8,7 +8,7 @@
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.38 2023/06/24 05:16:15 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.39 2024/06/09 20:30:36 mrg Exp $");
 #else
 static const char sccsid[] = "@(#)ip_fil.c	2.41 6/5/96 (C) 1993-2000 Darren Reed";
 static const char rcsid[] = "@(#)Id: ip_fil_netbsd.c,v 1.1.1.2 2012/07/22 13:45:17 darrenr Exp";
@@ -159,6 +159,9 @@ const struct cdevsw ipl_cdevsw = {
 	.d_discard = nodiscard,
 #ifdef D_OTHER
 	.d_flag = D_OTHER
+# if __NetBSD_Version__ >= 799003200
+  | D_MPSAFE
+# endif
 #else
 	.d_flag = 0
 #endif
@@ -1346,9 +1349,13 @@ sendorfree:
 		m0 = m->m_act;
 		m->m_act = 0;
 		if (error == 0) {
+# if __NetBSD_Version__ >= 799003200
+			error = if_output_lock(ifp, ifp, m, dst, rt);
+# else
 			KERNEL_LOCK(1, NULL);
 			error = (*ifp->if_output)(ifp, m, dst, rt);
 			KERNEL_UNLOCK_ONE(NULL);
+# endif
 		} else {
 			FREE_MB_T(m);
 		}



CVS commit: src

2024-06-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jun  9 20:30:36 UTC 2024

Modified Files:
src/doc: TODO.smpnet
src/sys/external/bsd/ipf/netinet: ip_fil_netbsd.c

Log Message:
ipfilter(4): mark as MPSAFE.

my testing seems to work fine, and this version was known to work
on solaris with no global locking available.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/doc/TODO.smpnet
cvs rdiff -u -r1.38 -r1.39 src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.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

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 20:07:33 UTC 2024

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

Log Message:
x86/cpu_rng: Fix false alarm rate of CPU RNG health test.

Lower it from 1/2^32 (about one in four billion) to 1/2^256
(approximately not gonna happen squared).

PR port-amd64/58122


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

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 20:07:33 UTC 2024

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

Log Message:
x86/cpu_rng: Fix false alarm rate of CPU RNG health test.

Lower it from 1/2^32 (about one in four billion) to 1/2^256
(approximately not gonna happen squared).

PR port-amd64/58122


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/x86/x86/cpu_rng.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/cpu_rng.c
diff -u src/sys/arch/x86/x86/cpu_rng.c:1.20 src/sys/arch/x86/x86/cpu_rng.c:1.21
--- src/sys/arch/x86/x86/cpu_rng.c:1.20	Thu Oct  7 12:52:27 2021
+++ src/sys/arch/x86/x86/cpu_rng.c	Sun Jun  9 20:07:33 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_rng.c,v 1.20 2021/10/07 12:52:27 msaitoh Exp $ */
+/* $NetBSD: cpu_rng.c,v 1.21 2024/06/09 20:07:33 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -260,8 +260,12 @@ cpu_rng(enum cpu_rng_mode mode, uint64_t
 static void
 cpu_rng_get(size_t nbytes, void *cookie)
 {
-#define N howmany(256, 64)
-	uint64_t buf[2*N];
+	enum {
+		NBITS = 256,
+		NBYTES = howmany(NBITS, 8),
+		NWORDS = howmany(NBITS, 64),
+	};
+	uint64_t buf[2*NWORDS];
 	unsigned i, nbits = 0;
 
 	while (nbytes) {
@@ -273,7 +277,7 @@ cpu_rng_get(size_t nbytes, void *cookie)
 		 */
 		for (i = 0; i < __arraycount(buf); i++)
 			nbits += cpu_rng(cpu_rng_mode, [i]);
-		if (consttime_memequal(buf, buf + N, N)) {
+		if (consttime_memequal(buf, buf + NWORDS, NBYTES)) {
 			printf("cpu_rng %s: failed repetition test\n",
 			cpu_rng_name[cpu_rng_mode]);
 			nbits = 0;
@@ -281,7 +285,6 @@ cpu_rng_get(size_t nbytes, void *cookie)
 		rnd_add_data_sync(_rng_source, buf, sizeof buf, nbits);
 		nbytes -= MIN(MIN(nbytes, sizeof buf), MAX(1, 8*nbits));
 	}
-#undef N
 }
 
 void



CVS commit: src/doc

2024-06-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun  9 19:59:36 UTC 2024

Modified Files:
src/doc: CHANGES

Log Message:
new libarchive


To generate a diff of this commit:
cvs rdiff -u -r1.3062 -r1.3063 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.3062 src/doc/CHANGES:1.3063
--- src/doc/CHANGES:1.3062	Sun Jun  9 14:46:51 2024
+++ src/doc/CHANGES	Sun Jun  9 15:59:36 2024
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.3062 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.3063 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -416,3 +416,4 @@ Changes from NetBSD 10.0 to NetBSD 11.0:
 		ISO9660/HFS hybrid ISO images for mac68k and macppc.
 		[tsutsui 20240531]
 	pthread(3): Fix memory leak in pthread_create(). [hannken 20240608]
+	libarchive: Import libarchive-3.7.4. [christos 20240609]



CVS commit: src/doc

2024-06-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun  9 19:59:36 UTC 2024

Modified Files:
src/doc: CHANGES

Log Message:
new libarchive


To generate a diff of this commit:
cvs rdiff -u -r1.3062 -r1.3063 src/doc/CHANGES

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

2024-06-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun  9 19:56:19 UTC 2024

Modified Files:
src/distrib/sets/lists/base: shl.mi
src/distrib/sets/lists/base32: ad.aarch64 ad.mips64eb ad.mips64el
ad.mipsn64eb ad.mipsn64el ad.powerpc64 ad.riscv64 md.amd64
md.sparc64
src/distrib/sets/lists/base64: ad.mips64eb ad.mips64el
src/distrib/sets/lists/debug: shl.mi
src/distrib/sets/lists/debug32: ad.aarch64 ad.mips64eb ad.mips64el
ad.mipsn64eb ad.mipsn64el ad.powerpc64 ad.riscv64 md.amd64
md.sparc64
src/distrib/sets/lists/debug64: ad.mips64eb ad.mips64el

Log Message:
bump libarchive.


To generate a diff of this commit:
cvs rdiff -u -r1.979 -r1.980 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/base32/ad.aarch64 \
src/distrib/sets/lists/base32/ad.mipsn64eb \
src/distrib/sets/lists/base32/ad.mipsn64el \
src/distrib/sets/lists/base32/ad.riscv64 \
src/distrib/sets/lists/base32/md.sparc64
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/base32/ad.mips64eb
cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/base32/ad.mips64el \
src/distrib/sets/lists/base32/ad.powerpc64
cvs rdiff -u -r1.8 -r1.9 src/distrib/sets/lists/base32/md.amd64
cvs rdiff -u -r1.2 -r1.3 src/distrib/sets/lists/base64/ad.mips64eb \
src/distrib/sets/lists/base64/ad.mips64el
cvs rdiff -u -r1.340 -r1.341 src/distrib/sets/lists/debug/shl.mi
cvs rdiff -u -r1.8 -r1.9 src/distrib/sets/lists/debug32/ad.aarch64 \
src/distrib/sets/lists/debug32/ad.mips64eb \
src/distrib/sets/lists/debug32/ad.mips64el \
src/distrib/sets/lists/debug32/ad.mipsn64eb \
src/distrib/sets/lists/debug32/ad.mipsn64el \
src/distrib/sets/lists/debug32/ad.riscv64 \
src/distrib/sets/lists/debug32/md.sparc64
cvs rdiff -u -r1.7 -r1.8 src/distrib/sets/lists/debug32/ad.powerpc64
cvs rdiff -u -r1.12 -r1.13 src/distrib/sets/lists/debug32/md.amd64
cvs rdiff -u -r1.2 -r1.3 src/distrib/sets/lists/debug64/ad.mips64eb \
src/distrib/sets/lists/debug64/ad.mips64el

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

Modified files:

Index: src/distrib/sets/lists/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.979 src/distrib/sets/lists/base/shl.mi:1.980
--- src/distrib/sets/lists/base/shl.mi:1.979	Tue Apr  9 11:17:22 2024
+++ src/distrib/sets/lists/base/shl.mi	Sun Jun  9 15:56:18 2024
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.979 2024/04/09 15:17:22 nia Exp $
+# $NetBSD: shl.mi,v 1.980 2024/06/09 19:56:18 christos Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -207,7 +207,7 @@
 ./usr/lib/libamu.so.5.0base-amd-shlib
 ./usr/lib/libarchive.sobase-sys-shlib
 ./usr/lib/libarchive.so.5			base-sys-shlib
-./usr/lib/libarchive.so.5.0			base-sys-shlib
+./usr/lib/libarchive..so.5.1			base-sys-shlib
 ./usr/lib/libasan.sobase-sys-shlib		cxx,gcc
 ./usr/lib/libasan.so.5base-sys-shlib		cxx,gcc=10
 ./usr/lib/libasan.so.5.0			base-sys-shlib		cxx,gcc=10

Index: src/distrib/sets/lists/base32/ad.aarch64
diff -u src/distrib/sets/lists/base32/ad.aarch64:1.6 src/distrib/sets/lists/base32/ad.aarch64:1.7
--- src/distrib/sets/lists/base32/ad.aarch64:1.6	Wed Jun  5 10:16:31 2024
+++ src/distrib/sets/lists/base32/ad.aarch64	Sun Jun  9 15:56:18 2024
@@ -1,4 +1,4 @@
-# $NetBSD: ad.aarch64,v 1.6 2024/06/05 14:16:31 riastradh Exp $
+# $NetBSD: ad.aarch64,v 1.7 2024/06/09 19:56:18 christos Exp $
 ./lib/eabi	base-compat-shlib	compat
 ./lib/eabi/npf	base-compat-shlib	compat,npf
 ./lib/eabi/npf/ext_log.so			base-compat-shlib	compat,npf
@@ -98,7 +98,7 @@
 ./usr/lib/eabi/libamu.so.5.0			base-compat-shlib	compat
 ./usr/lib/eabi/libarchive.so			base-compat-shlib	compat
 ./usr/lib/eabi/libarchive.so.5			base-compat-shlib	compat
-./usr/lib/eabi/libarchive.so.5.0		base-compat-shlib	compat
+./usr/lib/eabi/libarchive..so.5.1		base-compat-shlib	compat
 ./usr/lib/eabi/libarm.so			base-compat-shlib	compat,pic
 ./usr/lib/eabi/libarm.so.0			base-compat-shlib	compat,pic
 ./usr/lib/eabi/libarm.so.0.0			base-compat-shlib	compat,pic
@@ -612,7 +612,7 @@
 ./usr/lib/eabihf/libamu.so.5.0			base-compat-shlib	compat
 ./usr/lib/eabihf/libarchive.so			base-compat-shlib	compat
 ./usr/lib/eabihf/libarchive.so.5			base-compat-shlib	compat
-./usr/lib/eabihf/libarchive.so.5.0		base-compat-shlib	compat
+./usr/lib/eabihf/libarchive..so.5.1		base-compat-shlib	compat
 ./usr/lib/eabihf/libarm.so			base-compat-shlib	compat,pic
 ./usr/lib/eabihf/libarm.so.0			base-compat-shlib	compat,pic
 ./usr/lib/eabihf/libarm.so.0.0			base-compat-shlib	compat,pic
Index: src/distrib/sets/lists/base32/ad.mipsn64eb
diff -u src/distrib/sets/lists/base32/ad.mipsn64eb:1.6 src/distrib/sets/lists/base32/ad.mipsn64eb:1.7
--- src/distrib/sets/lists/base32/ad.mipsn64eb:1.6	Mon May  6 04:38:51 2024
+++ src/distrib/sets/lists/base32/ad.mipsn64eb	Sun Jun  

CVS commit: src/distrib/sets/lists

2024-06-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun  9 19:56:19 UTC 2024

Modified Files:
src/distrib/sets/lists/base: shl.mi
src/distrib/sets/lists/base32: ad.aarch64 ad.mips64eb ad.mips64el
ad.mipsn64eb ad.mipsn64el ad.powerpc64 ad.riscv64 md.amd64
md.sparc64
src/distrib/sets/lists/base64: ad.mips64eb ad.mips64el
src/distrib/sets/lists/debug: shl.mi
src/distrib/sets/lists/debug32: ad.aarch64 ad.mips64eb ad.mips64el
ad.mipsn64eb ad.mipsn64el ad.powerpc64 ad.riscv64 md.amd64
md.sparc64
src/distrib/sets/lists/debug64: ad.mips64eb ad.mips64el

Log Message:
bump libarchive.


To generate a diff of this commit:
cvs rdiff -u -r1.979 -r1.980 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/base32/ad.aarch64 \
src/distrib/sets/lists/base32/ad.mipsn64eb \
src/distrib/sets/lists/base32/ad.mipsn64el \
src/distrib/sets/lists/base32/ad.riscv64 \
src/distrib/sets/lists/base32/md.sparc64
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/base32/ad.mips64eb
cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/base32/ad.mips64el \
src/distrib/sets/lists/base32/ad.powerpc64
cvs rdiff -u -r1.8 -r1.9 src/distrib/sets/lists/base32/md.amd64
cvs rdiff -u -r1.2 -r1.3 src/distrib/sets/lists/base64/ad.mips64eb \
src/distrib/sets/lists/base64/ad.mips64el
cvs rdiff -u -r1.340 -r1.341 src/distrib/sets/lists/debug/shl.mi
cvs rdiff -u -r1.8 -r1.9 src/distrib/sets/lists/debug32/ad.aarch64 \
src/distrib/sets/lists/debug32/ad.mips64eb \
src/distrib/sets/lists/debug32/ad.mips64el \
src/distrib/sets/lists/debug32/ad.mipsn64eb \
src/distrib/sets/lists/debug32/ad.mipsn64el \
src/distrib/sets/lists/debug32/ad.riscv64 \
src/distrib/sets/lists/debug32/md.sparc64
cvs rdiff -u -r1.7 -r1.8 src/distrib/sets/lists/debug32/ad.powerpc64
cvs rdiff -u -r1.12 -r1.13 src/distrib/sets/lists/debug32/md.amd64
cvs rdiff -u -r1.2 -r1.3 src/distrib/sets/lists/debug64/ad.mips64eb \
src/distrib/sets/lists/debug64/ad.mips64el

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



CVS commit: src/external/bsd/libarchive

2024-06-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun  9 19:47:56 UTC 2024

Modified Files:
src/external/bsd/libarchive: prepare-import.sh
src/external/bsd/libarchive/dist/cpio/test: test_basic.c
test_format_newc.c
src/external/bsd/libarchive/dist/libarchive: archive.h
archive_check_magic.c archive_entry.3 archive_openssl_evp_private.h
archive_openssl_hmac_private.h archive_pack_dev.c
archive_pack_dev.h archive_private.h archive_read.3 archive_read.c
archive_read_disk.3 archive_read_disk_entry_from_file.c
archive_read_disk_posix.c archive_read_open_filename.c
archive_read_support_format_iso9660.c
archive_read_support_format_mtree.c
archive_read_support_format_warc.c
archive_read_support_format_xar.c archive_util.3 archive_util.c
archive_write.3 archive_write_disk.3 archive_write_disk_posix.c
archive_write_set_format_ar.c archive_write_set_format_shar.c
archive_write_set_format_ustar.c libarchive-formats.5 libarchive.3
libarchive_internals.3 tar.5
src/external/bsd/libarchive/dist/libarchive/test:
test_acl_platform_nfs4.c test_acl_platform_posix1e.c
test_archive_write_set_format_filter_by_ext.c test_compat_zip.c
test_fuzz.c test_read_disk_directory_traversals.c
test_read_extract.c test_read_format_7zip.c
test_read_format_gtar_sparse.c test_read_format_zip.c
test_read_format_zip_7075_utf8_paths.c
test_read_format_zip_comment_stored.c
test_read_format_zip_high_compression.c test_read_format_zip_jar.c
test_read_format_zip_mac_metadata.c
test_read_format_zip_malformed.c test_read_format_zip_nested.c
test_read_format_zip_nofiletype.c test_read_format_zip_padded.c
test_read_format_zip_sfx.c
test_read_format_zip_with_invalid_traditional_eocd.c
test_read_format_zip_zip64.c test_read_pax_truncated.c
test_read_truncated_filter.c test_sparse_basic.c test_write_disk.c
test_write_disk_secure.c test_write_disk_secure744.c
test_write_disk_secure746.c test_write_format_cpio_empty.c
test_write_format_shar_empty.c test_write_format_tar.c
test_write_format_tar_sparse.c test_write_format_zip_file.c
test_write_format_zip_file_zip64.c
src/external/bsd/libarchive/dist/libarchive_fe: err.c err.h
src/external/bsd/libarchive/dist/tar: bsdtar.c write.c
src/external/bsd/libarchive/dist/tar/test: test_basic.c test_copy.c
test_option_C_upper.c test_option_U_upper.c test_option_s.c
test_symlink_dir.c
src/external/bsd/libarchive/dist/test_utils: test_common.h test_main.c
test_utils.c test_utils.h
src/external/bsd/libarchive/include: config_netbsd.h
src/external/bsd/libarchive/lib/libarchive: Makefile shlib_version
Removed Files:
src/external/bsd/libarchive/dist: CONTRIBUTING.md
src/external/bsd/libarchive/dist/libarchive/test:
test_compat_pax_libarchive_2x.c
test_compat_pax_libarchive_2x.tar.Z.uu test_read_pax_schily_xattr.c
test_read_pax_schily_xattr.tar.uu

Log Message:
Merge conflicts from 3.4.0 to 3.7.4


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/libarchive/prepare-import.sh
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/libarchive/dist/CONTRIBUTING.md
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/libarchive/dist/cpio/test/test_basic.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/libarchive/dist/cpio/test/test_format_newc.c
cvs rdiff -u -r1.5 -r1.6 \
src/external/bsd/libarchive/dist/libarchive/archive.h \
src/external/bsd/libarchive/dist/libarchive/archive_entry.3 \
src/external/bsd/libarchive/dist/libarchive/archive_read_disk.3 \
src/external/bsd/libarchive/dist/libarchive/archive_write_disk.3
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/libarchive/dist/libarchive/archive_check_magic.c \
src/external/bsd/libarchive/dist/libarchive/archive_openssl_evp_private.h \
src/external/bsd/libarchive/dist/libarchive/archive_pack_dev.c \
src/external/bsd/libarchive/dist/libarchive/archive_pack_dev.h \
src/external/bsd/libarchive/dist/libarchive/archive_read_disk_posix.c \
src/external/bsd/libarchive/dist/libarchive/archive_util.3 \
src/external/bsd/libarchive/dist/libarchive/libarchive-formats.5 \
src/external/bsd/libarchive/dist/libarchive/libarchive.3 \
src/external/bsd/libarchive/dist/libarchive/libarchive_internals.3 \
src/external/bsd/libarchive/dist/libarchive/tar.5
cvs rdiff -u -r1.4 -r1.5 \
src/external/bsd/libarchive/dist/libarchive/archive_openssl_hmac_private.h \

src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_iso9660.c
 \

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

2024-06-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun  9 19:36:11 UTC 2024

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

Log Message:
Import libarchive-3.7.4 previous was 3.4.0

Changes:
Apr 26, 2024: libarchive 3.7.4 released

Apr 08, 2024: libarchive 3.7.3 released

Sep 12, 2023: libarchive 3.7.2 released

Jul 29, 2023: libarchive 3.7.1 released

Jul 18, 2023: libarchive 3.7.0 released

Jul 14, 2023: bsdunzip port from FreeBSD

Dec 07, 2022: libarchive 3.6.2 released

Apr 08, 2022: libarchive 3.6.1 released

Feb 09, 2022: libarchive 3.6.0 released

Feb 08, 2022: libarchive 3.5.3 released

Aug 22, 2021: libarchive 3.5.2 released

Dec 26, 2020: libarchive 3.5.1 released

Dec 01, 2020: libarchive 3.5.0 released

Oct 14, 2020: Support for system extended attributes

May 20, 2020: libarchive 3.4.3 released

Apr 30, 2020: Support for pzstd compressed files

Apr 16, 2020: Support for RHT.security.selinux tar extended attribute

Feb 11, 2020: libarchive 3.4.2 released

Jan 23, 2020: Important fixes for writing XAR archives

Jan 20, 2020: New tar option: --safe-writes (atomical file extraction)

Jan 03, 2020: Support mbed TLS (PolarSSL) as optional crypto provider

Dec 30, 2019: libarchive 3.4.1 released

Dec 11, 2019: New pax write option "xattrhdr"

Nov 17, 2019: Unicode filename support for reading lha/lzh archives

Status:

Vendor Tag: KIENTZLE
Release Tags:   libarchive-3-7-4

U src/external/bsd/libarchive/dist/README.md
U src/external/bsd/libarchive/dist/COPYING
U src/external/bsd/libarchive/dist/NEWS
U src/external/bsd/libarchive/dist/tar/creation_set.c
U src/external/bsd/libarchive/dist/tar/bsdtar.1
C src/external/bsd/libarchive/dist/tar/bsdtar.c
U src/external/bsd/libarchive/dist/tar/subst.c
U src/external/bsd/libarchive/dist/tar/read.c
C src/external/bsd/libarchive/dist/tar/write.c
U src/external/bsd/libarchive/dist/tar/util.c
U src/external/bsd/libarchive/dist/tar/cmdline.c
U src/external/bsd/libarchive/dist/tar/bsdtar_platform.h
U src/external/bsd/libarchive/dist/tar/bsdtar_windows.h
U src/external/bsd/libarchive/dist/tar/bsdtar_windows.c
U src/external/bsd/libarchive/dist/tar/bsdtar.h
U src/external/bsd/libarchive/dist/tar/test/test_option_n.c
U src/external/bsd/libarchive/dist/tar/test/test_missing_file.c
U src/external/bsd/libarchive/dist/tar/test/test_option_keep_newer_files.c
U src/external/bsd/libarchive/dist/tar/test/test_extract_tar_lrz.c
U src/external/bsd/libarchive/dist/tar/test/test_leading_slash.tar.uu
U src/external/bsd/libarchive/dist/tar/test/test_option_lz4.c
U src/external/bsd/libarchive/dist/tar/test/test_version.c
U src/external/bsd/libarchive/dist/tar/test/test_option_passphrase.zip.uu
U src/external/bsd/libarchive/dist/tar/test/test_extract.tar.gz.uu
U src/external/bsd/libarchive/dist/tar/test/test_option_r.c
U src/external/bsd/libarchive/dist/tar/test/test_extract_tar_xz.c
U src/external/bsd/libarchive/dist/tar/test/test_option_k.c
U src/external/bsd/libarchive/dist/tar/test/test_extract_tar_lzma.c
U src/external/bsd/libarchive/dist/tar/test/test_extract_tar_lz4.c
U src/external/bsd/libarchive/dist/tar/test/test_option_O_upper.c
U src/external/bsd/libarchive/dist/tar/test/test_option_q.c
U src/external/bsd/libarchive/dist/tar/test/test.h
U src/external/bsd/libarchive/dist/tar/test/test_option_passphrase.c
U src/external/bsd/libarchive/dist/tar/test/test_option_s.tar.Z.uu
U src/external/bsd/libarchive/dist/tar/test/test_patterns.c
U src/external/bsd/libarchive/dist/tar/test/test_format_newc.c
U src/external/bsd/libarchive/dist/tar/test/test_extract.tar.lrz.uu
U src/external/bsd/libarchive/dist/tar/test/test_option_xattrs.c
U src/external/bsd/libarchive/dist/tar/test/test_leading_slash.c
U src/external/bsd/libarchive/dist/tar/test/test_option_H_upper.c
U src/external/bsd/libarchive/dist/tar/test/test_option_fflags.c
C src/external/bsd/libarchive/dist/tar/test/test_basic.c
U src/external/bsd/libarchive/dist/tar/test/test_extract_tar_lzo.c
U src/external/bsd/libarchive/dist/tar/test/test_strip_components.c
U src/external/bsd/libarchive/dist/tar/test/test_extract.tar.grz.uu
U src/external/bsd/libarchive/dist/tar/test/test_stdio.c
U src/external/bsd/libarchive/dist/tar/test/test_extract.tar.lzma.uu
U src/external/bsd/libarchive/dist/tar/test/test_extract.tar.xz.uu
U src/external/bsd/libarchive/dist/tar/test/test_option_L_upper.c
U src/external/bsd/libarchive/dist/tar/test/test_option_uuencode.c
U src/external/bsd/libarchive/dist/tar/test/test_option_acls.c
U 
src/external/bsd/libarchive/dist/tar/test/test_option_keep_newer_files.tar.Z.uu
U src/external/bsd/libarchive/dist/tar/test/test_extract.tar.zst.uu
U src/external/bsd/libarchive/dist/tar/test/test_option_newer_than.c
N src/external/bsd/libarchive/dist/tar/test/test_option_owner.c
U src/external/bsd/libarchive/dist/tar/test/test_option_X_upper.c
U src/external/bsd/libarchive/dist/tar/test/test_extract_tar_grz.c
U 

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

2024-06-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun  9 19:36:11 UTC 2024

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

Log Message:
Import libarchive-3.7.4 previous was 3.4.0

Changes:
Apr 26, 2024: libarchive 3.7.4 released

Apr 08, 2024: libarchive 3.7.3 released

Sep 12, 2023: libarchive 3.7.2 released

Jul 29, 2023: libarchive 3.7.1 released

Jul 18, 2023: libarchive 3.7.0 released

Jul 14, 2023: bsdunzip port from FreeBSD

Dec 07, 2022: libarchive 3.6.2 released

Apr 08, 2022: libarchive 3.6.1 released

Feb 09, 2022: libarchive 3.6.0 released

Feb 08, 2022: libarchive 3.5.3 released

Aug 22, 2021: libarchive 3.5.2 released

Dec 26, 2020: libarchive 3.5.1 released

Dec 01, 2020: libarchive 3.5.0 released

Oct 14, 2020: Support for system extended attributes

May 20, 2020: libarchive 3.4.3 released

Apr 30, 2020: Support for pzstd compressed files

Apr 16, 2020: Support for RHT.security.selinux tar extended attribute

Feb 11, 2020: libarchive 3.4.2 released

Jan 23, 2020: Important fixes for writing XAR archives

Jan 20, 2020: New tar option: --safe-writes (atomical file extraction)

Jan 03, 2020: Support mbed TLS (PolarSSL) as optional crypto provider

Dec 30, 2019: libarchive 3.4.1 released

Dec 11, 2019: New pax write option "xattrhdr"

Nov 17, 2019: Unicode filename support for reading lha/lzh archives

Status:

Vendor Tag: KIENTZLE
Release Tags:   libarchive-3-7-4

U src/external/bsd/libarchive/dist/README.md
U src/external/bsd/libarchive/dist/COPYING
U src/external/bsd/libarchive/dist/NEWS
U src/external/bsd/libarchive/dist/tar/creation_set.c
U src/external/bsd/libarchive/dist/tar/bsdtar.1
C src/external/bsd/libarchive/dist/tar/bsdtar.c
U src/external/bsd/libarchive/dist/tar/subst.c
U src/external/bsd/libarchive/dist/tar/read.c
C src/external/bsd/libarchive/dist/tar/write.c
U src/external/bsd/libarchive/dist/tar/util.c
U src/external/bsd/libarchive/dist/tar/cmdline.c
U src/external/bsd/libarchive/dist/tar/bsdtar_platform.h
U src/external/bsd/libarchive/dist/tar/bsdtar_windows.h
U src/external/bsd/libarchive/dist/tar/bsdtar_windows.c
U src/external/bsd/libarchive/dist/tar/bsdtar.h
U src/external/bsd/libarchive/dist/tar/test/test_option_n.c
U src/external/bsd/libarchive/dist/tar/test/test_missing_file.c
U src/external/bsd/libarchive/dist/tar/test/test_option_keep_newer_files.c
U src/external/bsd/libarchive/dist/tar/test/test_extract_tar_lrz.c
U src/external/bsd/libarchive/dist/tar/test/test_leading_slash.tar.uu
U src/external/bsd/libarchive/dist/tar/test/test_option_lz4.c
U src/external/bsd/libarchive/dist/tar/test/test_version.c
U src/external/bsd/libarchive/dist/tar/test/test_option_passphrase.zip.uu
U src/external/bsd/libarchive/dist/tar/test/test_extract.tar.gz.uu
U src/external/bsd/libarchive/dist/tar/test/test_option_r.c
U src/external/bsd/libarchive/dist/tar/test/test_extract_tar_xz.c
U src/external/bsd/libarchive/dist/tar/test/test_option_k.c
U src/external/bsd/libarchive/dist/tar/test/test_extract_tar_lzma.c
U src/external/bsd/libarchive/dist/tar/test/test_extract_tar_lz4.c
U src/external/bsd/libarchive/dist/tar/test/test_option_O_upper.c
U src/external/bsd/libarchive/dist/tar/test/test_option_q.c
U src/external/bsd/libarchive/dist/tar/test/test.h
U src/external/bsd/libarchive/dist/tar/test/test_option_passphrase.c
U src/external/bsd/libarchive/dist/tar/test/test_option_s.tar.Z.uu
U src/external/bsd/libarchive/dist/tar/test/test_patterns.c
U src/external/bsd/libarchive/dist/tar/test/test_format_newc.c
U src/external/bsd/libarchive/dist/tar/test/test_extract.tar.lrz.uu
U src/external/bsd/libarchive/dist/tar/test/test_option_xattrs.c
U src/external/bsd/libarchive/dist/tar/test/test_leading_slash.c
U src/external/bsd/libarchive/dist/tar/test/test_option_H_upper.c
U src/external/bsd/libarchive/dist/tar/test/test_option_fflags.c
C src/external/bsd/libarchive/dist/tar/test/test_basic.c
U src/external/bsd/libarchive/dist/tar/test/test_extract_tar_lzo.c
U src/external/bsd/libarchive/dist/tar/test/test_strip_components.c
U src/external/bsd/libarchive/dist/tar/test/test_extract.tar.grz.uu
U src/external/bsd/libarchive/dist/tar/test/test_stdio.c
U src/external/bsd/libarchive/dist/tar/test/test_extract.tar.lzma.uu
U src/external/bsd/libarchive/dist/tar/test/test_extract.tar.xz.uu
U src/external/bsd/libarchive/dist/tar/test/test_option_L_upper.c
U src/external/bsd/libarchive/dist/tar/test/test_option_uuencode.c
U src/external/bsd/libarchive/dist/tar/test/test_option_acls.c
U 
src/external/bsd/libarchive/dist/tar/test/test_option_keep_newer_files.tar.Z.uu
U src/external/bsd/libarchive/dist/tar/test/test_extract.tar.zst.uu
U src/external/bsd/libarchive/dist/tar/test/test_option_newer_than.c
N src/external/bsd/libarchive/dist/tar/test/test_option_owner.c
U src/external/bsd/libarchive/dist/tar/test/test_option_X_upper.c
U src/external/bsd/libarchive/dist/tar/test/test_extract_tar_grz.c
U 

CVS commit: src/external/gpl3/gcc

2024-06-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jun  9 19:35:25 UTC 2024

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

Log Message:
various updates to gcc 12 status.

- many ports are ready to switch
- various work arounds and fixes commited
- powerpc now builds (waiting on run-test results)


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/gpl3/gcc/README.gcc12

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

Modified files:

Index: src/external/gpl3/gcc/README.gcc12
diff -u src/external/gpl3/gcc/README.gcc12:1.20 src/external/gpl3/gcc/README.gcc12:1.21
--- src/external/gpl3/gcc/README.gcc12:1.20	Sun Oct 22 00:09:20 2023
+++ src/external/gpl3/gcc/README.gcc12	Sun Jun  9 19:35:25 2024
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc12,v 1.20 2023/10/22 00:09:20 mrg Exp $
+$NetBSD: README.gcc12,v 1.21 2024/06/09 19:35:25 mrg Exp $
 
 
 new stuff:
@@ -31,8 +31,8 @@ switched:	has port switched?  y (yes), n
 
 architecture	tools	kernels	libgcc	native-gcc/sani	make release	runs	atf	switched
 	-	---	--	---			---	
-aarch64		y	y	y	y	y[17]	y		y	y	?
-aarch64eb	y	y	y	y	y[17]	y		y	y	?
+aarch64		y	y	y	y	y[17]	y		y	y	n
+aarch64eb	y	y	y	y	y[17]	y		y	y	n
 alpha		y	y	y	y	b	y		y	y	?
 earmv4		y	b	?	y	?	?		?	?	?
 earmv4eb	y	b	?	y	?	?		?	?	?
@@ -49,34 +49,29 @@ earmv7eb	y	b	?	y	?	?		?	?	?
 earmv7hf	y	y	y	y	b	y		y	y	?
 earmv7hfeb	y	y	y	y	b	y		y	y	?
 hppa		y	y	y	y	?	y		?	?	?
-i386		y	y	y	y	n[18]	y		y	n[19]	?
-ia64		y	b	y	y	y	y		y[3]	n	?
-m68000		y	y	y	y	n[11]	n		y[14]	?	?
+i386		y	y	y	y	y[18]	y		y	n[19]	n
+ia64		y	b	y	y	y	y		y[3]	n	n
+m68000		y	y	y	y	b	n		y[14]	?	?
 m68k		y	y	y	y	b	y		y[14]	y[14]	?
 mipseb		y	b	y	y	b	y		?	?	?
 mipsel		y	b	y	y	b	y		?	?	?
 mips64eb	y	b	y	y	b	y		?	?	?
 mips64el	y	b	y	y	b	y		?	?	?
-powerpc		y	y	y	y	?	n[4]		?	?	?
-powerpc64	y	?	?	y	?	?		?	?	?
+powerpc		y	y	y	y	y	b		?	?	?
+powerpc64	y	?	?	y	b	b		?	?	?
 sh3eb		y	?	y	y	b	y		?	?	?
 sh3el		y	n[20]	y	y	b	y		n[22]	?	?
-sparc		y	y	y	y	n[21]	y		y	y	?
-sparc64		y	b	y	y	n[16]	y		y	?	?
+sparc		y	y	y	y	n[21]	y		y	y	n
+sparc64		y	b	y	y	n[16]	y		y	?	n
 vax		y	y	y	y	n[23]	n		n[24,25] ?	?
-x86_64		y	y	y	y	y[13]	y		y	y	?
-riscv32		y	y	y	y	b	y		n[2]	?	?
-riscv64		y	y	y	y	b	y		y	y	?
+x86_64		y	y	y	y	y[13]	y		y	y	n
+riscv32		y	y	y	y	b	y		n[2]	?	n
+riscv64		y	y	y	y	b	y		y	y	n
 	-	---	--	---			---
 architecture	tools	kernels	libgcc	native-gcc/sani	make release	runs	atf
 
 [2]: riscv32 kernels are not really implemented yet, not GCC 12 issue.
 [3]: GENERIC.SKI boots just as well as GCC 10.
-[4]: rs6000 has a new generator for rs6000-builtins.cc and rs6000-builtins.h rs6000-vecdefines.h
-[7]: fails to build kernels:
- In file included from sys/arch/powerpc/oea/pmap64.c:4:
- sys/arch/powerpc/oea/pmap.c:2186:2: error: #error PPC_OEA64 not supported
-[11]: sanitizers don't build yet.
 [13]: on amd64, with very basic test, lsan, ubsan, and asan work, but tsan crashes at start up:
   ThreadSanitizer: CHECK failed: tsan_rtl.cpp:149 "((reinterpret_cast(this) % 64)) == ((0))" (0x10, 0x0) (tid=21499)
   ThreadSanitizer:DEADLYSIGNAL
@@ -87,17 +82,17 @@ architecture	tools	kernels	libgcc	native
   ThreadSanitizer: nested bug in the same thread, aborting.
 [14]: "dd count=1", "env LC_CTYPE=en_US.UTF-8 locale", and "tests/crypto/libcrypto/h_evp_test evpmd_blake.txt" abort.
   adding -fno-stack-protector to strsuftoll.c, citrus_module.c, and blake2_prov.c, respectively, works around the problem.
+  -- workarounds commited.
 [16]: sanitizers crash early:
   Program received signal SIGSEGV, Segmentation fault.
   (gdb) bt
   #0  0x4064265c in __sanitizer::CheckASLR () at /usr/src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cpp:2181
   #1  0xc704 in ?? ()
   Backtrace stopped: previous frame identical to this frame (corrupt stack?)
+  -- some wip patches make this less bad
 [17]: (NOT A REGRESSION) libtsan is newly introduced, which fails with:
   FATAL: ThreadSanitizer: unexpected memory mapping 0x20010-0x200101000
-[18]: *san requires 64-bit atomic ops:
-  ld: /usr/lib/libasan.so: undefined reference to `__sync_val_compare_and_swap_8'
-  If lib*san is compiled with -march=i586, all tests in usr.bin/{cc,c++} successfully pass.
+[18]: lib*san is compiled with -march=i586 to ensure required atomic ops are present
 [19]: kernel freezes with garbage parmanently output to console, after lib/libc/sys/t_ptrace_wait:syscall_signal_on_sce fails:
   syscall_signal_on_sce: [[ 3013.0266693] sorry pid 1847 was killed: orphanes
   ss
@@ -116,6 +111,7 @@ architecture	tools	kernels	libgcc	native
 	U __sync_val_compare_and_swap_1
 	U __sync_val_compare_and_swap_4
   liblsan and libubsan are mssing the _4 and _8 versions, too.
+  -- they're not really 

CVS commit: src/external/gpl3/gcc

2024-06-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jun  9 19:35:25 UTC 2024

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

Log Message:
various updates to gcc 12 status.

- many ports are ready to switch
- various work arounds and fixes commited
- powerpc now builds (waiting on run-test results)


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/gpl3/gcc/README.gcc12

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



CVS commit: src/sys/arch/sparc64/dev

2024-06-09 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Sun Jun  9 19:13:54 UTC 2024

Modified Files:
src/sys/arch/sparc64/dev: vdsk.c

Log Message:
sun4v: fix vdsk so an iso image exported by the ldom virtual disk service is 
correctly detected as a cd device + some whitespace fixes


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sparc64/dev/vdsk.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/sparc64/dev

2024-06-09 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Sun Jun  9 19:13:54 UTC 2024

Modified Files:
src/sys/arch/sparc64/dev: vdsk.c

Log Message:
sun4v: fix vdsk so an iso image exported by the ldom virtual disk service is 
correctly detected as a cd device + some whitespace fixes


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sparc64/dev/vdsk.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/sparc64/dev/vdsk.c
diff -u src/sys/arch/sparc64/dev/vdsk.c:1.11 src/sys/arch/sparc64/dev/vdsk.c:1.12
--- src/sys/arch/sparc64/dev/vdsk.c:1.11	Tue Dec 12 21:34:34 2023
+++ src/sys/arch/sparc64/dev/vdsk.c	Sun Jun  9 19:13:54 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: vdsk.c,v 1.11 2023/12/12 21:34:34 andvar Exp $	*/
+/*	$NetBSD: vdsk.c,v 1.12 2024/06/09 19:13:54 palle Exp $	*/
 /*	$OpenBSD: vdsk.c,v 1.46 2015/01/25 21:42:13 kettenis Exp $	*/
 /*
  * Copyright (c) 2009, 2011 Mark Kettenis
@@ -788,7 +788,6 @@ vdsk_rx_vio_dring_data(struct vdsk_softc
 void
 vdsk_ldc_reset(struct ldc_conn *lc)
 {
-
 	struct vdsk_softc *sc = lc->lc_sc;
 
 	sc->sc_vio_state = 0;
@@ -797,7 +796,6 @@ vdsk_ldc_reset(struct ldc_conn *lc)
 void
 vdsk_ldc_start(struct ldc_conn *lc)
 {
-
 	struct vdsk_softc *sc = lc->lc_sc;
 
 	vdsk_send_ver_info(sc, VDSK_MAJOR, VDSK_MINOR);
@@ -806,7 +804,6 @@ vdsk_ldc_start(struct ldc_conn *lc)
 void
 vdsk_sendmsg(struct vdsk_softc *sc, void *msg, size_t len)
 {
-
 	struct ldc_conn *lc = >sc_lc;
 	int err;
 
@@ -818,7 +815,6 @@ vdsk_sendmsg(struct vdsk_softc *sc, void
 void
 vdsk_send_ver_info(struct vdsk_softc *sc, uint16_t major, uint16_t minor)
 {
-
 	struct vio_ver_info vi;
 
 	/* Allocate new session ID. */
@@ -1255,14 +1251,12 @@ vdsk_complete_cmd(struct vdsk_softc *sc,
 void
 vdsk_scsi_inq(struct vdsk_softc *sc, struct scsipi_xfer *xs)
 {
-
 	vdsk_scsi_inquiry(sc, xs);
 }
 
 void
 vdsk_scsi_inquiry(struct vdsk_softc *sc, struct scsipi_xfer *xs)
 {
-
 	struct scsipi_inquiry_data inq;
 	char buf[5];
 
@@ -1272,20 +1266,21 @@ vdsk_scsi_inquiry(struct vdsk_softc *sc,
 		case VD_MEDIA_TYPE_CD:
 		case VD_MEDIA_TYPE_DVD:
 			inq.device = T_CDROM;
+			inq.dev_qual2 = SID_REMOVABLE;
+			bcopy("Virtual CDROM", inq.product, sizeof(inq.product));
 			break;
-
 		case VD_MEDIA_TYPE_FIXED:
-		default:
 			inq.device = T_DIRECT;
+			bcopy("Virtual Disk", inq.product, sizeof(inq.product));
 			break;
+		default:
+			panic("Unhandled media type %d\n", sc->sc_vd_mtype);
 	}
-
 	inq.version = 0x05; /* SPC-3 */
 	inq.response_format = 2;
 	inq.additional_length = 32;
 	inq.flags3 |= SID_CmdQue;
 	bcopy("SUN ", inq.vendor, sizeof(inq.vendor));
-	bcopy("Virtual Disk", inq.product, sizeof(inq.product));
 	snprintf(buf, sizeof(buf), "%u.%u ", sc->sc_major, sc->sc_minor);
 	bcopy(buf, inq.revision, sizeof(inq.revision));
 
@@ -1297,7 +1292,6 @@ vdsk_scsi_inquiry(struct vdsk_softc *sc,
 void
 vdsk_scsi_capacity(struct vdsk_softc *sc, struct scsipi_xfer *xs)
 {
-
 	struct scsipi_read_capacity_10_data rcd;
 	uint64_t capacity;
 
@@ -1321,7 +1315,6 @@ vdsk_scsi_capacity(struct vdsk_softc *sc
 void
 vdsk_scsi_capacity16(struct vdsk_softc *sc, struct scsipi_xfer *xs)
 {
-
 	struct scsipi_read_capacity_16_data rcd;
 	uint64_t capacity;
 
@@ -1349,7 +1342,6 @@ vdsk_scsi_report_luns(struct vdsk_softc 
 void
 vdsk_scsi_done(struct scsipi_xfer *xs, int error)
 {
-
 	xs->error = error;
 
 	scsipi_done(xs);



CVS commit: src/doc

2024-06-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jun  9 18:55:40 UTC 2024

Modified Files:
src/doc: HACKS

Log Message:
document recent m68k vs GCC 12 hacks.


To generate a diff of this commit:
cvs rdiff -u -r1.244 -r1.245 src/doc/HACKS

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

Modified files:

Index: src/doc/HACKS
diff -u src/doc/HACKS:1.244 src/doc/HACKS:1.245
--- src/doc/HACKS:1.244	Sun May 12 23:55:57 2024
+++ src/doc/HACKS	Sun Jun  9 18:55:40 2024
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.244 2024/05/12 23:55:57 msaitoh Exp $
+# $NetBSD: HACKS,v 1.245 2024/06/09 18:55:40 mrg Exp $
 #
 # This file is intended to document workarounds for currently unsolved
 # (mostly) compiler bugs.
@@ -1135,3 +1135,18 @@ descr
 	/tmp//ccJayu9g.s:2793: Warning: Only the first path encountering the conflict is reported
 	/tmp//ccJayu9g.s:2757: Warning: This is the location of the conflicting usage
 kcah
+
+hack	m68k: work around stack protector m68k compiler bug
+cdate	Thu Jun  6 15:53:21 PDT 2024
+port	m68k
+who	mrg
+file	lib/libc/stdlib/strsuftoll.c : 1.10
+file	lib/libc/citrus/citrus_module.c : 1.14
+file	crypto/external/bsd/openssl/lib/libcrypto/blake2.inc : 1.3
+descr
+	With GCC 12, strsuftoll() triggers an stack protector issue
+	that does not appear to be valid.  _citrus_find_getops() does
+	the same.  They both have minimal stack usage themselves and
+	I suspect a GCC bug.
+	The blake2 version is less well studied.
+kcah



CVS commit: src/doc

2024-06-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jun  9 18:55:40 UTC 2024

Modified Files:
src/doc: HACKS

Log Message:
document recent m68k vs GCC 12 hacks.


To generate a diff of this commit:
cvs rdiff -u -r1.244 -r1.245 src/doc/HACKS

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



CVS commit: src

2024-06-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jun  9 18:55:00 UTC 2024

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: blake2.inc
src/lib/libc/citrus: citrus_module.c
src/lib/libc/stdlib: strsuftoll.c

Log Message:
m68k vs GCC 12: apply -fno-stack-protector to a few things.

i've looked at the C code here and i can't see any real problems,
and in at least the strsuftoll.c case, i'm convinced it is not a
real problem for the reported case, and indicates a GCC bug.

for strsuftoll.c, this fixes basic parsing of almost any input.
the simple test case is "dd count=1".  in my testing, it was only
the front-end strsuftoll() that needs the checking removed, the
sub-functions are fine.

for citrus_module.c, this fixes "env LC_CTYPE=en_US.UTF-8 locale",
and i was able to reduce to only _citrus_find_getops().

for blake2_prov.c, i chose to apply to the whole file to avoid
editing a 3rd-party source.

these issues and their source-file fixes were discovered by rin@.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/blake2.inc
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/citrus/citrus_module.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/stdlib/strsuftoll.c

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/blake2.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/blake2.inc:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/blake2.inc:1.3
--- src/crypto/external/bsd/openssl/lib/libcrypto/blake2.inc:1.2	Sat May  6 17:07:22 2023
+++ src/crypto/external/bsd/openssl/lib/libcrypto/blake2.inc	Sun Jun  9 18:55:00 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: blake2.inc,v 1.2 2023/05/06 17:07:22 christos Exp $
+#	$NetBSD: blake2.inc,v 1.3 2024/06/09 18:55:00 mrg Exp $
 #
 #	@(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -19,3 +19,7 @@ SRCS += ${BLAKE2_SRCS}
 .for cryptosrc in ${BLAKE2_SRCS}
 CPPFLAGS.${cryptosrc} = -I${OPENSSLSRC}/crypto/blake2
 .endfor
+
+.if ${MACHINE_ARCH} == "m68k"
+COPTS.blake2_prov.c += -fno-stack-protector
+.endif

Index: src/lib/libc/citrus/citrus_module.c
diff -u src/lib/libc/citrus/citrus_module.c:1.13 src/lib/libc/citrus/citrus_module.c:1.14
--- src/lib/libc/citrus/citrus_module.c:1.13	Thu Jan  4 20:57:28 2018
+++ src/lib/libc/citrus/citrus_module.c	Sun Jun  9 18:55:00 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: citrus_module.c,v 1.13 2018/01/04 20:57:28 kamil Exp $	*/
+/*	$NetBSD: citrus_module.c,v 1.14 2024/06/09 18:55:00 mrg Exp $	*/
 
 /*-
  * Copyright (c)1999, 2000, 2001, 2002 Citrus Project,
@@ -89,7 +89,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_module.c,v 1.13 2018/01/04 20:57:28 kamil Exp $");
+__RCSID("$NetBSD: citrus_module.c,v 1.14 2024/06/09 18:55:00 mrg Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -275,6 +275,9 @@ _findshlib(char *name, int *majorp, int 
 	return path[0] ? path : NULL;
 }
 
+#ifdef __m68k__	/* See doc/HACKS. */
+__attribute((__optimize__("-fno-stack-protector")))
+#endif
 void *
 _citrus_find_getops(_citrus_module_t handle, const char *modname,
 		const char *ifname)

Index: src/lib/libc/stdlib/strsuftoll.c
diff -u src/lib/libc/stdlib/strsuftoll.c:1.9 src/lib/libc/stdlib/strsuftoll.c:1.10
--- src/lib/libc/stdlib/strsuftoll.c:1.9	Sat Oct 22 22:08:47 2011
+++ src/lib/libc/stdlib/strsuftoll.c	Sun Jun  9 18:55:00 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: strsuftoll.c,v 1.9 2011/10/22 22:08:47 christos Exp $	*/
+/*	$NetBSD: strsuftoll.c,v 1.10 2024/06/09 18:55:00 mrg Exp $	*/
 /*-
  * Copyright (c) 2001-2002,2004 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -67,7 +67,7 @@
 #include 
 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: strsuftoll.c,v 1.9 2011/10/22 22:08:47 christos Exp $");
+__RCSID("$NetBSD: strsuftoll.c,v 1.10 2024/06/09 18:55:00 mrg Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #ifdef _LIBC
@@ -111,6 +111,9 @@ __weak_alias(strsuftollx, _strsuftollx)
  * appropriate error.
  * 
  */
+#ifdef __m68k__	/* See doc/HACKS. */
+__attribute((__optimize__("-fno-stack-protector")))
+#endif
 /* LONGLONG */
 long long
 strsuftoll(const char *desc, const char *val,



CVS commit: src

2024-06-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jun  9 18:55:00 UTC 2024

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: blake2.inc
src/lib/libc/citrus: citrus_module.c
src/lib/libc/stdlib: strsuftoll.c

Log Message:
m68k vs GCC 12: apply -fno-stack-protector to a few things.

i've looked at the C code here and i can't see any real problems,
and in at least the strsuftoll.c case, i'm convinced it is not a
real problem for the reported case, and indicates a GCC bug.

for strsuftoll.c, this fixes basic parsing of almost any input.
the simple test case is "dd count=1".  in my testing, it was only
the front-end strsuftoll() that needs the checking removed, the
sub-functions are fine.

for citrus_module.c, this fixes "env LC_CTYPE=en_US.UTF-8 locale",
and i was able to reduce to only _citrus_find_getops().

for blake2_prov.c, i chose to apply to the whole file to avoid
editing a 3rd-party source.

these issues and their source-file fixes were discovered by rin@.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/blake2.inc
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/citrus/citrus_module.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/stdlib/strsuftoll.c

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

2024-06-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jun  9 18:49:03 UTC 2024

Modified Files:
src/distrib/sets/lists/base32: ad.powerpc64
src/distrib/sets/lists/comp: ad.powerpc

Log Message:
support powerpc and powerpc64 GCC 12 builds.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/base32/ad.powerpc64
cvs rdiff -u -r1.103 -r1.104 src/distrib/sets/lists/comp/ad.powerpc

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/base32/ad.powerpc64
diff -u src/distrib/sets/lists/base32/ad.powerpc64:1.4 src/distrib/sets/lists/base32/ad.powerpc64:1.5
--- src/distrib/sets/lists/base32/ad.powerpc64:1.4	Mon May  6 08:38:51 2024
+++ src/distrib/sets/lists/base32/ad.powerpc64	Sun Jun  9 18:49:03 2024
@@ -1,4 +1,4 @@
-# $NetBSD: ad.powerpc64,v 1.4 2024/05/06 08:38:51 mrg Exp $
+# $NetBSD: ad.powerpc64,v 1.5 2024/06/09 18:49:03 mrg Exp $
 ./lib/powerpc	base-compat-shlib	compat
 ./lib/powerpc/npf	base-compat-shlib	compat,npf
 ./lib/powerpc/npf/ext_log.so			base-compat-shlib	compat,npf
@@ -88,8 +88,10 @@
 ./usr/lib/powerpc/libarchive.so.5			base-compat-shlib	compat
 ./usr/lib/powerpc/libarchive.so.5.0		base-compat-shlib	compat
 ./usr/lib/powerpc/libasan.so			base-compat-shlib	compat,gcc,cxx
-./usr/lib/powerpc/libasan.so.5			base-compat-shlib	compat,gcc,cxx
-./usr/lib/powerpc/libasan.so.5.0			base-compat-shlib	compat,gcc,cxx
+./usr/lib/powerpc/libasan.so.5			base-compat-shlib	compat,gcc=10,cxx
+./usr/lib/powerpc/libasan.so.5.0			base-compat-shlib	compat,gcc=10,cxx
+./usr/lib/powerpc/libasan.so.6			base-compat-shlib	compat,gcc=12,cxx
+./usr/lib/powerpc/libasan.so.6.0			base-compat-shlib	compat,gcc=12,cxx
 ./usr/lib/powerpc/libasn1.so			base-compat-shlib	compat,kerberos
 ./usr/lib/powerpc/libasn1.so.10			base-compat-shlib	compat,kerberos
 ./usr/lib/powerpc/libasn1.so.10.0			base-compat-shlib	compat,kerberos
@@ -199,7 +201,8 @@
 ./usr/lib/powerpc/libgnumalloc.so.1.0		base-compat-shlib	compat
 ./usr/lib/powerpc/libgomp.so			base-compat-shlib	compat,gcc
 ./usr/lib/powerpc/libgomp.so.2			base-compat-shlib	compat,gcc
-./usr/lib/powerpc/libgomp.so.2.1			base-compat-shlib	compat,gcc
+./usr/lib/powerpc/libgomp.so.2.1			base-compat-shlib	compat,gcc=10
+./usr/lib/powerpc/libgomp.so.2.2			base-compat-shlib	compat,gcc=12
 ./usr/lib/powerpc/libgssapi.so			base-compat-shlib	compat,kerberos
 ./usr/lib/powerpc/libgssapi.so.12			base-compat-shlib	compat,kerberos
 ./usr/lib/powerpc/libgssapi.so.12.0		base-compat-shlib	compat,kerberos
@@ -270,8 +273,10 @@
 ./usr/lib/powerpc/libldap_r.so.6			base-compat-shlib	compat,ldap
 ./usr/lib/powerpc/libldap_r.so.6.0		base-compat-shlib	compat,ldap
 ./usr/lib/powerpc/liblsan.so			base-compat-shlib	compat,cxx,gcc
-./usr/lib/powerpc/liblsan.so.2			base-compat-shlib	compat,cxx,gcc
-./usr/lib/powerpc/liblsan.so.2.0			base-compat-shlib	compat,cxx,gcc
+./usr/lib/powerpc/liblsan.so.2			base-compat-shlib	compat,cxx,gcc=10
+./usr/lib/powerpc/liblsan.so.2.0			base-compat-shlib	compat,cxx,gcc=10
+./usr/lib/powerpc/liblsan.so.3			base-compat-shlib	compat,cxx,gcc=12
+./usr/lib/powerpc/liblsan.so.3.0			base-compat-shlib	compat,cxx,gcc=12
 ./usr/lib/powerpc/liblua.so			base-compat-shlib	compat
 ./usr/lib/powerpc/liblua.so.6			base-compat-shlib	compat
 ./usr/lib/powerpc/liblua.so.6.1			base-compat-shlib	compat
@@ -418,7 +423,8 @@
 ./usr/lib/powerpc/libssl.so.15.0			base-compat-shlib	compat
 ./usr/lib/powerpc/libstdc++.so			base-compat-shlib	compat,gcc,cxx,libstdcxx
 ./usr/lib/powerpc/libstdc++.so.9			base-compat-shlib	compat,gcc,cxx,libstdcxx
-./usr/lib/powerpc/libstdc++.so.9.0		base-compat-shlib	compat,gcc,cxx,libstdcxx
+./usr/lib/powerpc/libstdc++.so.9.0		base-compat-shlib	compat,gcc=10,cxx,libstdcxx
+./usr/lib/powerpc/libstdc++.so.9.1		base-compat-shlib	compat,gcc=12,cxx,libstdcxx
 ./usr/lib/powerpc/libtermcap.so			base-compat-shlib	compat
 ./usr/lib/powerpc/libtermcap.so.0			base-compat-shlib	compat
 ./usr/lib/powerpc/libtermcap.so.0.6		base-compat-shlib	compat
@@ -432,8 +438,10 @@
 ./usr/lib/powerpc/libtre.so.0			base-compat-shlib	compat
 ./usr/lib/powerpc/libtre.so.0.8			base-compat-shlib	compat
 ./usr/lib/powerpc/libubsan.so			base-compat-shlib	compat,gcc,cxx
-./usr/lib/powerpc/libubsan.so.4			base-compat-shlib	compat,gcc,cxx
-./usr/lib/powerpc/libubsan.so.4.0			base-compat-shlib	compat,gcc,cxx
+./usr/lib/powerpc/libubsan.so.4			base-compat-shlib	compat,gcc=10,cxx
+./usr/lib/powerpc/libubsan.so.4.0			base-compat-shlib	compat,gcc=10,cxx
+./usr/lib/powerpc/libubsan.so.5			base-compat-shlib	compat,gcc=12,cxx
+./usr/lib/powerpc/libubsan.so.5.0			base-compat-shlib	compat,gcc=12,cxx
 ./usr/lib/powerpc/libukfs.so			base-compat-shlib	compat
 ./usr/lib/powerpc/libukfs.so.1			base-compat-shlib	compat
 ./usr/lib/powerpc/libukfs.so.1.0			base-compat-shlib	compat

Index: src/distrib/sets/lists/comp/ad.powerpc
diff -u 

CVS commit: src/distrib/sets/lists

2024-06-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jun  9 18:49:03 UTC 2024

Modified Files:
src/distrib/sets/lists/base32: ad.powerpc64
src/distrib/sets/lists/comp: ad.powerpc

Log Message:
support powerpc and powerpc64 GCC 12 builds.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/base32/ad.powerpc64
cvs rdiff -u -r1.103 -r1.104 src/distrib/sets/lists/comp/ad.powerpc

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



CVS commit: src/doc

2024-06-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Jun  9 18:46:51 UTC 2024

Modified Files:
src/doc: CHANGES

Log Message:
note Juergen's pthread memory leak fix in CHANGES

PR lib/57831


To generate a diff of this commit:
cvs rdiff -u -r1.3061 -r1.3062 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.3061 src/doc/CHANGES:1.3062
--- src/doc/CHANGES:1.3061	Fri May 31 21:07:40 2024
+++ src/doc/CHANGES	Sun Jun  9 18:46:51 2024
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.3061 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.3062 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -415,3 +415,4 @@ Changes from NetBSD 10.0 to NetBSD 11.0:
 	mkhybrid: Import mkhybrid from OpenBSD 7.3 as a tool to create
 		ISO9660/HFS hybrid ISO images for mac68k and macppc.
 		[tsutsui 20240531]
+	pthread(3): Fix memory leak in pthread_create(). [hannken 20240608]



CVS commit: src/doc

2024-06-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Jun  9 18:46:51 UTC 2024

Modified Files:
src/doc: CHANGES

Log Message:
note Juergen's pthread memory leak fix in CHANGES

PR lib/57831


To generate a diff of this commit:
cvs rdiff -u -r1.3061 -r1.3062 src/doc/CHANGES

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



CVS commit: src/tests/lib/libm

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 16:53:25 UTC 2024

Modified Files:
src/tests/lib/libm: t_pow.c

Log Message:
tests/lib/libm/t_pow: Revamp.

1. Avoid the broken idiom

if (condition) {
atf_tc_expect_fail(...);
atf_tc_fail(...);
}

2. Sprinkle volatile and ATF_CHECK_MSG.


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

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

Modified files:

Index: src/tests/lib/libm/t_pow.c
diff -u src/tests/lib/libm/t_pow.c:1.5 src/tests/lib/libm/t_pow.c:1.6
--- src/tests/lib/libm/t_pow.c:1.5	Fri Jan 20 21:15:56 2017
+++ src/tests/lib/libm/t_pow.c	Sun Jun  9 16:53:25 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: t_pow.c,v 1.5 2017/01/20 21:15:56 maya Exp $ */
+/* $NetBSD: t_pow.c,v 1.6 2024/06/09 16:53:25 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_pow.c,v 1.5 2017/01/20 21:15:56 maya Exp $");
+__RCSID("$NetBSD: t_pow.c,v 1.6 2024/06/09 16:53:25 riastradh Exp $");
 
 #include 
 #include 
@@ -45,9 +45,10 @@ ATF_TC_HEAD(pow_nan_x, tc)
 
 ATF_TC_BODY(pow_nan_x, tc)
 {
-	const double x = 0.0L / 0.0L;
+	const volatile double x = 0.0 / 0.0;
+	const double z = pow(x, 2.0);
 
-	ATF_CHECK(isnan(pow(x, 2.0)) != 0);
+	ATF_CHECK_MSG(isnan(z), "z=%a", z);
 }
 
 ATF_TC(pow_nan_y);
@@ -58,9 +59,10 @@ ATF_TC_HEAD(pow_nan_y, tc)
 
 ATF_TC_BODY(pow_nan_y, tc)
 {
-	const double y = 0.0L / 0.0L;
+	const volatile double y = 0.0 / 0.0;
+	const double z = pow(2.0, y);
 
-	ATF_CHECK(isnan(pow(2.0, y)) != 0);
+	ATF_CHECK_MSG(isnan(z), "z=%a", z);
 }
 
 ATF_TC(pow_inf_neg_x);
@@ -71,7 +73,7 @@ ATF_TC_HEAD(pow_inf_neg_x, tc)
 
 ATF_TC_BODY(pow_inf_neg_x, tc)
 {
-	const double x = -1.0L / 0.0L;
+	const volatile double x = -1.0 / 0.0;
 	double z;
 
 	/*
@@ -79,28 +81,24 @@ ATF_TC_BODY(pow_inf_neg_x, tc)
 	 * If y is even, y > 0, and x is -Inf, +Inf is returned.
 	 */
 	z = pow(x, 3.0);
-
-	if (isinf(z) == 0 || signbit(z) == 0)
-		atf_tc_fail_nonfatal("pow(-Inf, 3.0) != -Inf");
+	ATF_CHECK_MSG(isinf(z), "x=%a z=%s=%a", x, "pow(x, 3.0)", z);
+	ATF_CHECK_MSG(signbit(z) != 0, "x=%a z=%s=%a", x, "pow(x, 3.0)", z);
 
 	z = pow(x, 4.0);
-
-	if (isinf(z) == 0 || signbit(z) != 0)
-		atf_tc_fail_nonfatal("pow(-Inf, 4.0) != +Inf");
+	ATF_CHECK_MSG(isinf(z), "x=%a z=%s=%a", x, "pow(x, 4.0)", z);
+	ATF_CHECK_MSG(signbit(z) == 0, "x=%a z=%s=%a", x, "pow(x, 4.0)", z);
 
 	/*
 	 * If y is odd, y < 0, and x is -Inf, -0.0 is returned.
 	 * If y is even, y < 0, and x is -Inf, +0.0 is returned.
 	 */
 	z = pow(x, -3.0);
-
-	if (fabs(z) > 0.0 || signbit(z) == 0)
-		atf_tc_fail_nonfatal("pow(-Inf, -3.0) != -0.0");
+	ATF_CHECK_MSG(fabs(z) == 0.0, "x=%a z=%s=%a", x, "pow(x, -3.0)", z);
+	ATF_CHECK_MSG(signbit(z) != 0, "x=%a z=%s=%a", x, "pow(x, -3.0)", z);
 
 	z = pow(x, -4.0);
-
-	if (fabs(z) > 0.0 || signbit(z) != 0)
-		atf_tc_fail_nonfatal("pow(-Inf -4.0) != +0.0");
+	ATF_CHECK_MSG(fabs(z) == 0.0, "x=%a z=%s=%a", x, "pow(x, -4.0)", z);
+	ATF_CHECK_MSG(signbit(z) == 0, "x=%a z=%s=%a", x, "pow(x, -4.0)", z);
 }
 
 ATF_TC(pow_inf_neg_y);
@@ -111,7 +109,7 @@ ATF_TC_HEAD(pow_inf_neg_y, tc)
 
 ATF_TC_BODY(pow_inf_neg_y, tc)
 {
-	const double y = -1.0L / 0.0L;
+	const volatile double y = -1.0 / 0.0;
 	double z;
 
 	/*
@@ -119,14 +117,12 @@ ATF_TC_BODY(pow_inf_neg_y, tc)
 	 * If |x| > 1 and y is -Inf, +0.0 is returned.
 	 */
 	z = pow(0.1, y);
-
-	if (isinf(z) == 0 || signbit(z) != 0)
-		atf_tc_fail_nonfatal("pow(0.1, -Inf) != +Inf");
+	ATF_CHECK_MSG(isinf(z), "y=%a z=%s=%a", y, "pow(0.1, y)", z);
+	ATF_CHECK_MSG(signbit(z) == 0, "y=%a z=%s=%a", y, "pow(0.1, y)", z);
 
 	z = pow(1.1, y);
-
-	if (fabs(z) > 0.0 || signbit(z) != 0)
-		atf_tc_fail_nonfatal("pow(1.1, -Inf) != +0.0");
+	ATF_CHECK_MSG(fabs(z) == 0.0, "y=%a z=%s=%a", y, "pow(1.1, y)", z);
+	ATF_CHECK_MSG(signbit(z) == 0, "y=%a z=%s=%a", y, "pow(1.1, y)", z);
 }
 
 ATF_TC(pow_inf_pos_x);
@@ -137,7 +133,7 @@ ATF_TC_HEAD(pow_inf_pos_x, tc)
 
 ATF_TC_BODY(pow_inf_pos_x, tc)
 {
-	const double x = 1.0L / 0.0L;
+	const volatile double x = 1.0 / 0.0;
 	double z;
 
 	/*
@@ -145,14 +141,12 @@ ATF_TC_BODY(pow_inf_pos_x, tc)
 	 * For y > 0, if x is +Inf, +Inf is returned.
 	 */
 	z = pow(x, -2.0);
-
-	if (fabs(z) > 0.0 || signbit(z) != 0)
-		atf_tc_fail_nonfatal("pow(+Inf, -2.0) != +0.0");
+	ATF_CHECK_MSG(fabs(z) == 0.0, "x=%a z=%s=%a", x, "pow(x, -2.0)", z);
+	ATF_CHECK_MSG(signbit(z) == 0, "x=%a z=%s=%a", x, "pow(x, -2.0)", z);
 
 	z = pow(x, 2.0);
-
-	if (isinf(z) == 0 || signbit(z) != 0)
-		atf_tc_fail_nonfatal("pow(+Inf, 2.0) != +Inf");
+	ATF_CHECK_MSG(isinf(z), "x=%a z=%s=%a", x, "pow(x, 2.0)", z);
+	ATF_CHECK_MSG(signbit(z) == 0, "x=%a z=%s=%a", x, "pow(x, 2.0)", z);
 }
 
 ATF_TC(pow_inf_pos_y);
@@ -163,7 +157,7 @@ ATF_TC_HEAD(pow_inf_pos_y, tc)
 
 ATF_TC_BODY(pow_inf_pos_y, tc)
 

CVS commit: src/tests/lib/libm

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 16:53:25 UTC 2024

Modified Files:
src/tests/lib/libm: t_pow.c

Log Message:
tests/lib/libm/t_pow: Revamp.

1. Avoid the broken idiom

if (condition) {
atf_tc_expect_fail(...);
atf_tc_fail(...);
}

2. Sprinkle volatile and ATF_CHECK_MSG.


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

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



CVS commit: src/tests/lib/libm

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 16:53:12 UTC 2024

Modified Files:
src/tests/lib/libm: t_cos.c t_log.c t_scalbn.c t_sin.c t_tan.c

Log Message:
tests/lib/libm: Fix various xfails related to PR lib/45362.

Writing

if (condition) {
atf_tc_expect_fail(...);
atf_tc_fail(...);
}

in order to paper over a bug in qemu renders the test nearly useless
because it will never actually fail in the event that something
unexpected is broken.

atf_tc_expect_fail only makes senes _before_ doing the test.  If we
want to paper over a bug in qemu, we can do:

if (isQEMU)
atf_tc_expect_fail("qemu is broken, PR lib/...");
ATF_CHECK(condition);

That way, we are still doing the test in non-qemu circumstances, and
if the qemu bug is fixed the test will give the feedback of an
unexpected pass.

While here: Use `volatile double x = ...' as input so the compiler
doesn't optimize calls like sin(x) away at build-time, and print the
bad values with ATF_CHECK_MSG on failure in case anything goes wrong.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/lib/libm/t_cos.c
cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libm/t_log.c
cvs rdiff -u -r1.17 -r1.18 src/tests/lib/libm/t_scalbn.c
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libm/t_sin.c \
src/tests/lib/libm/t_tan.c

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

Modified files:

Index: src/tests/lib/libm/t_cos.c
diff -u src/tests/lib/libm/t_cos.c:1.11 src/tests/lib/libm/t_cos.c:1.12
--- src/tests/lib/libm/t_cos.c:1.11	Mon May  6 15:45:20 2024
+++ src/tests/lib/libm/t_cos.c	Sun Jun  9 16:53:12 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: t_cos.c,v 1.11 2024/05/06 15:45:20 riastradh Exp $ */
+/* $NetBSD: t_cos.c,v 1.12 2024/06/09 16:53:12 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -114,9 +114,10 @@ ATF_TC_HEAD(cosl_inf_neg, tc)
 
 ATF_TC_BODY(cosl_inf_neg, tc)
 {
-	const long double x = -1.0L / 0.0L;
+	const volatile long double x = -1.0L / 0.0L;
+	const long double y = cosl(x);
 
-	ATF_CHECK(isnan(cosl(x)) != 0);
+	ATF_CHECK_MSG(isnan(y), "y=%La", y);
 }
 
 ATF_TC(cosl_inf_pos);
@@ -127,9 +128,10 @@ ATF_TC_HEAD(cosl_inf_pos, tc)
 
 ATF_TC_BODY(cosl_inf_pos, tc)
 {
-	const long double x = 1.0L / 0.0L;
+	const volatile long double x = 1.0L / 0.0L;
+	const long double y = cosl(x);
 
-	ATF_CHECK(isnan(cosl(x)) != 0);
+	ATF_CHECK_MSG(isnan(y), "y=%La", y);
 }
 
 ATF_TC(cosl_zero_neg);
@@ -208,9 +210,10 @@ ATF_TC_HEAD(cos_inf_neg, tc)
 
 ATF_TC_BODY(cos_inf_neg, tc)
 {
-	const double x = -1.0L / 0.0L;
+	const volatile double x = -1.0 / 0.0;
+	const double y = cos(x);
 
-	ATF_CHECK(isnan(cos(x)) != 0);
+	ATF_CHECK_MSG(isnan(y), "y=%a", y);
 }
 
 ATF_TC(cos_inf_pos);
@@ -221,9 +224,10 @@ ATF_TC_HEAD(cos_inf_pos, tc)
 
 ATF_TC_BODY(cos_inf_pos, tc)
 {
-	const double x = 1.0L / 0.0L;
+	const volatile double x = 1.0 / 0.0;
+	const double y = cos(x);
 
-	ATF_CHECK(isnan(cos(x)) != 0);
+	ATF_CHECK_MSG(isnan(y), "y=%a", y);
 }
 
 ATF_TC(cos_zero_neg);
@@ -316,12 +320,10 @@ ATF_TC_HEAD(cosf_inf_neg, tc)
 
 ATF_TC_BODY(cosf_inf_neg, tc)
 {
-	const float x = -1.0L / 0.0L;
+	const volatile float x = -1.0f / 0.0f;
+	const float y = cosf(x);
 
-	if (isnan(cosf(x)) == 0) {
-		atf_tc_expect_fail("PR lib/45362");
-		atf_tc_fail("cosf(-Inf) != NaN");
-	}
+	ATF_CHECK_MSG(isnan(y), "y=%a", y);
 }
 
 ATF_TC(cosf_inf_pos);
@@ -332,12 +334,10 @@ ATF_TC_HEAD(cosf_inf_pos, tc)
 
 ATF_TC_BODY(cosf_inf_pos, tc)
 {
-	const float x = 1.0L / 0.0L;
+	const volatile float x = 1.0f / 0.0f;
+	const float y = cosf(x);
 
-	if (isnan(cosf(x)) == 0) {
-		atf_tc_expect_fail("PR lib/45362");
-		atf_tc_fail("cosf(+Inf) != NaN");
-	}
+	ATF_CHECK_MSG(isnan(y), "y=%a", y);
 }
 
 

Index: src/tests/lib/libm/t_log.c
diff -u src/tests/lib/libm/t_log.c:1.14 src/tests/lib/libm/t_log.c:1.15
--- src/tests/lib/libm/t_log.c:1.14	Wed Nov  7 03:59:36 2018
+++ src/tests/lib/libm/t_log.c	Sun Jun  9 16:53:12 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: t_log.c,v 1.14 2018/11/07 03:59:36 riastradh Exp $ */
+/* $NetBSD: t_log.c,v 1.15 2024/06/09 16:53:12 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_log.c,v 1.14 2018/11/07 03:59:36 riastradh Exp $");
+__RCSID("$NetBSD: t_log.c,v 1.15 2024/06/09 16:53:12 riastradh Exp $");
 
 #include 
 
@@ -257,13 +257,10 @@ ATF_TC_HEAD(log1p_inf_neg, tc)
 
 ATF_TC_BODY(log1p_inf_neg, tc)
 {
-	const double x = -1.0L / 0.0L;
+	const volatile double x = -1.0 / 0.0;
 	const double y = log1p(x);
 
-	if (isnan(y) == 0) {
-		atf_tc_expect_fail("PR lib/45362");
-		atf_tc_fail("log1p(-Inf) != NaN");
-	}
+	ATF_CHECK_MSG(isnan(y), "y=%a", y);
 }
 
 ATF_TC(log1p_inf_pos);
@@ -287,12 +284,10 @@ ATF_TC_HEAD(log1p_one_neg, tc)
 
 ATF_TC_BODY(log1p_one_neg, tc)
 {
-	const double x = 

CVS commit: src/tests/lib/libm

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 16:53:12 UTC 2024

Modified Files:
src/tests/lib/libm: t_cos.c t_log.c t_scalbn.c t_sin.c t_tan.c

Log Message:
tests/lib/libm: Fix various xfails related to PR lib/45362.

Writing

if (condition) {
atf_tc_expect_fail(...);
atf_tc_fail(...);
}

in order to paper over a bug in qemu renders the test nearly useless
because it will never actually fail in the event that something
unexpected is broken.

atf_tc_expect_fail only makes senes _before_ doing the test.  If we
want to paper over a bug in qemu, we can do:

if (isQEMU)
atf_tc_expect_fail("qemu is broken, PR lib/...");
ATF_CHECK(condition);

That way, we are still doing the test in non-qemu circumstances, and
if the qemu bug is fixed the test will give the feedback of an
unexpected pass.

While here: Use `volatile double x = ...' as input so the compiler
doesn't optimize calls like sin(x) away at build-time, and print the
bad values with ATF_CHECK_MSG on failure in case anything goes wrong.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/lib/libm/t_cos.c
cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libm/t_log.c
cvs rdiff -u -r1.17 -r1.18 src/tests/lib/libm/t_scalbn.c
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libm/t_sin.c \
src/tests/lib/libm/t_tan.c

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



CVS commit: src

2024-06-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jun  9 16:53:07 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: emit.exp-ln
src/usr.bin/xlint/lint1: tree.c

Log Message:
lint: fix usage marker for nested function calls


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tests/usr.bin/xlint/lint1/emit.exp-ln
cvs rdiff -u -r1.646 -r1.647 src/usr.bin/xlint/lint1/tree.c

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/emit.exp-ln
diff -u src/tests/usr.bin/xlint/lint1/emit.exp-ln:1.14 src/tests/usr.bin/xlint/lint1/emit.exp-ln:1.15
--- src/tests/usr.bin/xlint/lint1/emit.exp-ln:1.14	Sun Jun  9 16:49:40 2024
+++ src/tests/usr.bin/xlint/lint1/emit.exp-ln	Sun Jun  9 16:53:07 2024
@@ -87,6 +87,5 @@ S emit.c
 319 d 0.319 e 14used_and_using F1 I I
 320 d 0.320 e 9only_used F0 I
 325 c 0.325 u 14used_and_using f1 I I
-# FIXME: only_used's result is actually used, the 'i' for 'ignored' is wrong.
-325 c 0.325 i 9only_used f0 I
+325 c 0.325 u 9only_used f0 I
 323 d 0.323 dr 10only_using F0 I

Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.646 src/usr.bin/xlint/lint1/tree.c:1.647
--- src/usr.bin/xlint/lint1/tree.c:1.646	Sun Jun  9 10:27:39 2024
+++ src/usr.bin/xlint/lint1/tree.c	Sun Jun  9 16:53:06 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: tree.c,v 1.646 2024/06/09 10:27:39 rillig Exp $	*/
+/*	$NetBSD: tree.c,v 1.647 2024/06/09 16:53:06 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: tree.c,v 1.646 2024/06/09 10:27:39 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.647 2024/06/09 16:53:06 rillig Exp $");
 #endif
 
 #include 
@@ -4649,7 +4649,7 @@ check_expr_misc(const tnode_t *tn, bool 
 		discard, szof);
 		for (size_t i = 0, n = call->args_len; i < n; i++)
 			check_expr_misc(call->args[i],
-			false, false, false, false, false, szof);
+			true, false, false, false, false, szof);
 		return;
 	}
 



CVS commit: src

2024-06-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jun  9 16:53:07 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: emit.exp-ln
src/usr.bin/xlint/lint1: tree.c

Log Message:
lint: fix usage marker for nested function calls


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tests/usr.bin/xlint/lint1/emit.exp-ln
cvs rdiff -u -r1.646 -r1.647 src/usr.bin/xlint/lint1/tree.c

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



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

2024-06-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jun  9 16:49:41 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: emit.c emit.exp-ln

Log Message:
tests/lint: demonstrate wrong result for nested function calls


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/tests/usr.bin/xlint/lint1/emit.c
cvs rdiff -u -r1.13 -r1.14 src/tests/usr.bin/xlint/lint1/emit.exp-ln

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/emit.c
diff -u src/tests/usr.bin/xlint/lint1/emit.c:1.17 src/tests/usr.bin/xlint/lint1/emit.c:1.18
--- src/tests/usr.bin/xlint/lint1/emit.c:1.17	Mon May 22 17:53:27 2023
+++ src/tests/usr.bin/xlint/lint1/emit.c	Sun Jun  9 16:49:40 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: emit.c,v 1.17 2023/05/22 17:53:27 rillig Exp $	*/
+/*	$NetBSD: emit.c,v 1.18 2024/06/09 16:49:40 rillig Exp $	*/
 # 3 "emit.c"
 
 /*
@@ -315,3 +315,12 @@ struct compound_expression_in_initialize
  * initializer.
  */
 const char array_of_unknown_size[] = "unknown";
+
+int used_and_using(int);
+int only_used(void);
+
+int
+only_using(void)
+{
+	return used_and_using(only_used());
+}

Index: src/tests/usr.bin/xlint/lint1/emit.exp-ln
diff -u src/tests/usr.bin/xlint/lint1/emit.exp-ln:1.13 src/tests/usr.bin/xlint/lint1/emit.exp-ln:1.14
--- src/tests/usr.bin/xlint/lint1/emit.exp-ln:1.13	Mon May 22 20:11:24 2023
+++ src/tests/usr.bin/xlint/lint1/emit.exp-ln	Sun Jun  9 16:49:40 2024
@@ -83,3 +83,10 @@ S emit.c
 286 d 0.286 d 8use_vars F0 V
 305 d 0.305 d 8compound sT1 34compound_expression_in_initializer
 317 d 0.317 d 21array_of_unknown_size A8cC
+
+319 d 0.319 e 14used_and_using F1 I I
+320 d 0.320 e 9only_used F0 I
+325 c 0.325 u 14used_and_using f1 I I
+# FIXME: only_used's result is actually used, the 'i' for 'ignored' is wrong.
+325 c 0.325 i 9only_used f0 I
+323 d 0.323 dr 10only_using F0 I



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

2024-06-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jun  9 16:49:41 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: emit.c emit.exp-ln

Log Message:
tests/lint: demonstrate wrong result for nested function calls


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/tests/usr.bin/xlint/lint1/emit.c
cvs rdiff -u -r1.13 -r1.14 src/tests/usr.bin/xlint/lint1/emit.exp-ln

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



CVS commit: src/lib/libc/gdtoa

2024-06-09 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sun Jun  9 15:06:07 UTC 2024

Modified Files:
src/lib/libc/gdtoa: hdtoa.c

Log Message:
Fix hdtoa() for VAX D floating point


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/gdtoa/hdtoa.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/gdtoa

2024-06-09 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sun Jun  9 15:06:07 UTC 2024

Modified Files:
src/lib/libc/gdtoa: hdtoa.c

Log Message:
Fix hdtoa() for VAX D floating point


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/gdtoa/hdtoa.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/gdtoa/hdtoa.c
diff -u src/lib/libc/gdtoa/hdtoa.c:1.13 src/lib/libc/gdtoa/hdtoa.c:1.14
--- src/lib/libc/gdtoa/hdtoa.c:1.13	Thu May  9 12:24:24 2024
+++ src/lib/libc/gdtoa/hdtoa.c	Sun Jun  9 15:06:07 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: hdtoa.c,v 1.13 2024/05/09 12:24:24 riastradh Exp $	*/
+/*	$NetBSD: hdtoa.c,v 1.14 2024/06/09 15:06:07 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2004, 2005 David Schultz 
@@ -30,7 +30,7 @@
 #if 0
 __FBSDID("$FreeBSD: src/lib/libc/gdtoa/_hdtoa.c,v 1.4 2007/01/03 04:57:58 das Exp $");
 #else
-__RCSID("$NetBSD: hdtoa.c,v 1.13 2024/05/09 12:24:24 riastradh Exp $");
+__RCSID("$NetBSD: hdtoa.c,v 1.14 2024/06/09 15:06:07 jakllsch Exp $");
 #endif
 
 #include 
@@ -59,8 +59,12 @@ __RCSID("$NetBSD: hdtoa.c,v 1.13 2024/05
 #define	INFSTR	"Infinity"
 #define	NANSTR	"NaN"
 
+#ifndef __vax__
 #define	DBL_ADJ		(DBL_MAX_EXP - 2 + ((DBL_MANT_DIG - 1) % 4))
 #define	LDBL_ADJ	(LDBL_MAX_EXP - 2 + ((LDBL_MANT_DIG - 1) % 4))
+#else /* __vax__ */
+#define	DBL_ADJ		(DBL_MAX_EXP + 4 + ((DBL_MANT_DIG) % 4))
+#endif
 
 /*
  * Round up the given digit string.  If the digit string is fff...f,
@@ -152,6 +156,11 @@ hdtoa(double d, const char *xdigs, int n
 
 	u.dblu_d = d;
 	*sign = u.dblu_dbl.dbl_sign;
+#ifdef __vax__
+	u.dfltu_dflt.dflt_fracl =
+	((u.dfltu_dflt.dflt_fracl >> 16) & 0x) |
+	((u.dfltu_dflt.dflt_fracl & 0x) << 16);
+#endif
 
 	switch (fpclassify(d)) {
 	case FP_NORMAL:
@@ -160,16 +169,11 @@ hdtoa(double d, const char *xdigs, int n
 	case FP_ZERO:
 		*decpt = 1;
 		return (nrv_alloc("0", rve, 1));
+#ifndef __vax__
 	case FP_SUBNORMAL:
-#ifdef __vax__
-		/* (DBL_MAX_EXP=127 / 2) + 2 = 65? */
-		u.dblu_d *= 0x1p65;
-		*decpt = u.dblu_dbl.dbl_exp - (65 + DBL_ADJ);
-#else
 		/* (DBL_MAX_EXP=1024 / 2) + 2 = 514? */
 		u.dblu_d *= 0x1p514;
 		*decpt = u.dblu_dbl.dbl_exp - (514 + DBL_ADJ);
-#endif
 		break;
 	case FP_INFINITE:
 		*decpt = INT_MAX;
@@ -177,6 +181,7 @@ hdtoa(double d, const char *xdigs, int n
 	case FP_NAN:
 		*decpt = INT_MAX;
 		return (nrv_alloc(NANSTR, rve, sizeof(NANSTR) - 1));
+#endif
 	default:
 		abort();
 	}
@@ -210,7 +215,8 @@ hdtoa(double d, const char *xdigs, int n
 		u.dblu_dbl.dbl_fracl >>= 4;
 	}
 #ifdef DBL_FRACMBITS
-	for (; s > s0; s--) {
+	for (; s > s0 + sigfigs - ((DBL_FRACLBITS + DBL_FRACMBITS) / 4) - 1
+&& s > s0; s--) {
 		*s = u.dblu_dbl.dbl_fracm & 0xf;
 		u.dblu_dbl.dbl_fracm >>= 4;
 	}



CVS commit: src/lib/libm

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 14:10:06 UTC 2024

Modified Files:
src/lib/libm: Makefile m.aarch64.expsym m.alpha.expsym m.arm.expsym
m.armhf.expsym m.hppa.expsym m.i386.expsym m.ia64.expsym
m.m68k.expsym m.mips.expsym m.mips64.expsym m.mipshf.expsym
m.powerpc.expsym m.powerpc64.expsym m.riscv.expsym m.sh3.expsym
m.sparc.expsym m.sparc64.expsym m.vax.expsym m.x86_64.expsym
Added Files:
src/lib/libm: m.common.expsym m.fenv.expsym m.ieee754.expsym

Log Message:
libm: Factor out common expected symbol list.

Should substantially reduce the maintenance burden.


To generate a diff of this commit:
cvs rdiff -u -r1.235 -r1.236 src/lib/libm/Makefile
cvs rdiff -u -r1.4 -r1.5 src/lib/libm/m.aarch64.expsym \
src/lib/libm/m.arm.expsym src/lib/libm/m.i386.expsym \
src/lib/libm/m.riscv.expsym src/lib/libm/m.sparc64.expsym \
src/lib/libm/m.x86_64.expsym
cvs rdiff -u -r1.3 -r1.4 src/lib/libm/m.alpha.expsym \
src/lib/libm/m.hppa.expsym src/lib/libm/m.ia64.expsym \
src/lib/libm/m.powerpc.expsym src/lib/libm/m.sparc.expsym
cvs rdiff -u -r1.2 -r1.3 src/lib/libm/m.armhf.expsym \
src/lib/libm/m.mips64.expsym src/lib/libm/m.mipshf.expsym \
src/lib/libm/m.powerpc64.expsym src/lib/libm/m.sh3.expsym
cvs rdiff -u -r0 -r1.1 src/lib/libm/m.common.expsym \
src/lib/libm/m.fenv.expsym src/lib/libm/m.ieee754.expsym
cvs rdiff -u -r1.5 -r1.6 src/lib/libm/m.m68k.expsym \
src/lib/libm/m.mips.expsym
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/m.vax.expsym

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

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.235 src/lib/libm/Makefile:1.236
--- src/lib/libm/Makefile:1.235	Tue May 14 14:34:35 2024
+++ src/lib/libm/Makefile	Sun Jun  9 14:10:05 2024
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.235 2024/05/14 14:34:35 riastradh Exp $
+#  $NetBSD: Makefile,v 1.236 2024/06/09 14:10:05 riastradh Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -59,6 +59,21 @@ LINTFLAGS.s_logl.c+=	-X 161	# constant i
 LINTFLAGS.s_logl.c+=	-X 193	# unreachable statement (due to 161)
 LINTFLAGS.s_logl.c+=	-X 177	# non-constant initializer
 
+EXPSYM_SRCS=	m.common.expsym
+EXPSYM_SRCS+=	m.ieee754.expsym
+EXPSYM_SRCS+=	m.fenv.expsym
+.if exists(${.CURDIR}/m.${LIBC_MACHINE_ARCH}.expsym)
+EXPSYM_SRCS+=	m.${LIBC_MACHINE_ARCH}.expsym
+.elif exists(${.CURDIR}/m.${LIBC_MACHINE_CPU}.expsym)
+EXPSYM_SRCS+=	m.${LIBC_MACHINE_CPU}.expsym
+.endif
+
+# We will build m.expsym with a rule below, by merging all the files
+# listed in EXPSYM_SRCS, which individual architectures can override.
+# (The rule has to be written below after EXPSYM_SRCS has been
+# determined.)
+LIB_EXPSYM=	m.expsym
+
 .if (${LIBC_MACHINE_CPU} == "aarch64")
 .PATH: ${.CURDIR}/arch/aarch64
 ARCH_SRCS = e_sqrt.S e_sqrtf.S s_fabsf.S
@@ -77,6 +92,21 @@ COMMON_SRCS+= fenv.c
 COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
 COPTS+=	-mfloat-ieee -mieee-with-inexact -mfp-trap-mode=sui -mtrap-precision=i
 
+# alpha doesn't have symbols for:
+#
+#	feclearexcept
+#	fegetexceptflag
+#	fegetround
+#	feraiseexcept
+#	fesetexceptflag
+#	fesetround
+#	fetestexcept
+#
+# Instead, they are static inlines in fenv.h.  So we won't use
+# m.fenv.expsym.
+#
+EXPSYM_SRCS=	m.common.expsym m.ieee754.expsym m.alpha.expsym
+
 .elif (${LIBC_MACHINE_CPU} == "arm")
 .PATH.c: ${.CURDIR}/arch/arm
 .if ${MKSOFTFLOAT} == "no"
@@ -179,6 +209,10 @@ COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
 ARCH_SRCS = n_scalbn.S
 WARNS?=5
 
+# No IEEE 754 stuff.  Not all of it is actually specific to IEEE 754,
+# but it's missing anyway: PR port-vax/57881.
+EXPSYM_SRCS=	m.common.expsym m.vax.expsym
+
 .elif (${LIBC_MACHINE_CPU} == "riscv")
 .PATH:	${.CURDIR}/arch/riscv
 
@@ -242,6 +276,12 @@ WARNS?=5
 .PATH:	${.CURDIR}/src
 .PATH:	${.CURDIR}/noieee_src
 
+m.expsym: ${EXPSYM_SRCS}
+	${_MKTARGET_CREATE}
+	LC_ALL=C sort -m ${.ALLSRC} >${.TARGET}.tmp && \
+	${MV} ${.TARGET}.tmp ${.TARGET}
+CLEANFILES+=	m.expsym m.expsym.tmp
+
 .if (${LIBC_MACHINE_ARCH} == "alpha")
 COPTS+= -mfp-rounding-mode=d
 .endif

Index: src/lib/libm/m.aarch64.expsym
diff -u src/lib/libm/m.aarch64.expsym:1.4 src/lib/libm/m.aarch64.expsym:1.5
--- src/lib/libm/m.aarch64.expsym:1.4	Sun Jun  9 13:33:36 2024
+++ src/lib/libm/m.aarch64.expsym	Sun Jun  9 14:10:05 2024
@@ -23,496 +23,25 @@ _ItL_qS8
 _ItL_qS9
 __bss_end__
 __bss_start__
-__c99_cabs
-__c99_cabsf
-__c99_cabsl
-__divdc3
-__divsc3
 __divtc3
 __divxc3
 __end__
-__exp__D
 __fe_dfl_env
-__ieee754_acos
-__ieee754_acosf
-__ieee754_acosh
-__ieee754_acoshf
-__ieee754_asin
-__ieee754_asinf
-__ieee754_atan2
-__ieee754_atan2f
-__ieee754_atanh
-__ieee754_atanhf
-__ieee754_cosh
-__ieee754_coshf
-__ieee754_exp
-__ieee754_expf
-__ieee754_fmod
-__ieee754_fmodf
-__ieee754_fmodl
-__ieee754_hypot
-__ieee754_hypotf
-__ieee754_j0
-__ieee754_j0f
-__ieee754_j1
-__ieee754_j1f
-__ieee754_jn
-__ieee754_jnf

CVS commit: src/lib/libm

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 14:10:06 UTC 2024

Modified Files:
src/lib/libm: Makefile m.aarch64.expsym m.alpha.expsym m.arm.expsym
m.armhf.expsym m.hppa.expsym m.i386.expsym m.ia64.expsym
m.m68k.expsym m.mips.expsym m.mips64.expsym m.mipshf.expsym
m.powerpc.expsym m.powerpc64.expsym m.riscv.expsym m.sh3.expsym
m.sparc.expsym m.sparc64.expsym m.vax.expsym m.x86_64.expsym
Added Files:
src/lib/libm: m.common.expsym m.fenv.expsym m.ieee754.expsym

Log Message:
libm: Factor out common expected symbol list.

Should substantially reduce the maintenance burden.


To generate a diff of this commit:
cvs rdiff -u -r1.235 -r1.236 src/lib/libm/Makefile
cvs rdiff -u -r1.4 -r1.5 src/lib/libm/m.aarch64.expsym \
src/lib/libm/m.arm.expsym src/lib/libm/m.i386.expsym \
src/lib/libm/m.riscv.expsym src/lib/libm/m.sparc64.expsym \
src/lib/libm/m.x86_64.expsym
cvs rdiff -u -r1.3 -r1.4 src/lib/libm/m.alpha.expsym \
src/lib/libm/m.hppa.expsym src/lib/libm/m.ia64.expsym \
src/lib/libm/m.powerpc.expsym src/lib/libm/m.sparc.expsym
cvs rdiff -u -r1.2 -r1.3 src/lib/libm/m.armhf.expsym \
src/lib/libm/m.mips64.expsym src/lib/libm/m.mipshf.expsym \
src/lib/libm/m.powerpc64.expsym src/lib/libm/m.sh3.expsym
cvs rdiff -u -r0 -r1.1 src/lib/libm/m.common.expsym \
src/lib/libm/m.fenv.expsym src/lib/libm/m.ieee754.expsym
cvs rdiff -u -r1.5 -r1.6 src/lib/libm/m.m68k.expsym \
src/lib/libm/m.mips.expsym
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/m.vax.expsym

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



CVS commit: src/lib/libm

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 14:09:27 UTC 2024

Modified Files:
src/lib/libm: m.vax.expsym
src/lib/libm/noieee_src: n_lgamma.c

Log Message:
libm: Define lgamma_r, lgammal, lgammal_r on non-IEEE754.

Missing internal aliases _lgamma_r and _lgammal_r -- TBD.

PR 57881


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

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

Modified files:

Index: src/lib/libm/m.vax.expsym
diff -u src/lib/libm/m.vax.expsym:1.5 src/lib/libm/m.vax.expsym:1.6
--- src/lib/libm/m.vax.expsym:1.5	Sun Jun  9 13:33:36 2024
+++ src/lib/libm/m.vax.expsym	Sun Jun  9 14:09:27 2024
@@ -210,6 +210,9 @@ ldexp
 ldexpf
 ldexpl
 lgamma
+lgamma_r
+lgammal
+lgammal_r
 llrint
 llrintf
 log

Index: src/lib/libm/noieee_src/n_lgamma.c
diff -u src/lib/libm/noieee_src/n_lgamma.c:1.7 src/lib/libm/noieee_src/n_lgamma.c:1.8
--- src/lib/libm/noieee_src/n_lgamma.c:1.7	Mon Feb  4 03:30:20 2019
+++ src/lib/libm/noieee_src/n_lgamma.c	Sun Jun  9 14:09:27 2024
@@ -1,4 +1,4 @@
-/*  $NetBSD: n_lgamma.c,v 1.7 2019/02/04 03:30:20 mrg Exp $ */
+/*  $NetBSD: n_lgamma.c,v 1.8 2024/06/09 14:09:27 riastradh Exp $ */
 /*-
  * Copyright (c) 1992, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -81,7 +81,7 @@ static int endian;
 
 static double small_lgam(double);
 static double large_lgam(double);
-static double neg_lgam(double);
+static double neg_lgam(double, int *);
 static const double one = 1.0;
 int signgam;
 
@@ -137,12 +137,22 @@ int signgam;
 #define pb6	 5.69394463439411649408050664078e-03
 #define pb7	-1.44705562421428915453880392761e-02
 
-__pure double
+__weak_alias(lgammal, lgamma)
+__weak_alias(lgammal_r, lgamma_r)
+
+double
 lgamma(double x)
 {
+
+	return lgamma_r(x, );
+}
+
+double
+lgamma_r(double x, int *signgamp)
+{
 	double r;
 
-	signgam = 1;
+	*signgamp = 1;
 #if _IEEE
 	endian = ((*(int *) )) ? 1 : 0;
 #endif
@@ -160,10 +170,10 @@ lgamma(double x)
 		return (small_lgam(x));
 	else if (x > -1e-16) {
 		if (x < 0)
-			signgam = -1, x = -x;
+			*signgamp = -1, x = -x;
 		return (-log(x));
 	} else
-		return (neg_lgam(x));
+		return (neg_lgam(x, signgamp));
 }
 
 static double
@@ -267,7 +277,7 @@ CONTINUE:
 }
 
 static double
-neg_lgam(double x)
+neg_lgam(double x, int *signgamp)
 {
 	int xi;
 	double y, z, zero = 0.0;
@@ -283,7 +293,7 @@ neg_lgam(double x)
 		}
 		y = gamma(x);
 		if (y < 0)
-			y = -y, signgam = -1;
+			y = -y, *signgamp = -1;
 		return (log(y));
 	}
 	z = floor(x + .5);
@@ -295,7 +305,7 @@ neg_lgam(double x)
 	}
 	y = .5*ceil(x);
 	if (y == ceil(y))
-		signgam = -1;
+		*signgamp = -1;
 	x = -x;
 	z = fabs(x + z);	/* 0 < z <= .5 */
 	if (z < .25)



CVS commit: src/lib/libm

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 14:09:27 UTC 2024

Modified Files:
src/lib/libm: m.vax.expsym
src/lib/libm/noieee_src: n_lgamma.c

Log Message:
libm: Define lgamma_r, lgammal, lgammal_r on non-IEEE754.

Missing internal aliases _lgamma_r and _lgammal_r -- TBD.

PR 57881


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

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



CVS commit: src/lib/libm

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 13:35:38 UTC 2024

Modified Files:
src/lib/libm/arch/i387: s_atan.S s_atanf.S
src/lib/libm/noieee_src: n_asincos.c n_atan.c
src/lib/libm/src: e_acosl.c e_asinl.c s_atan.c s_atanf.c s_atanl.c
w_acos.c w_acosf.c w_asin.c w_asinf.c

Log Message:
libm: Sprinkle whitespace fixes and rcsids on inverse trig functions.

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libm/arch/i387/s_atan.S
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/arch/i387/s_atanf.S
cvs rdiff -u -r1.10 -r1.11 src/lib/libm/noieee_src/n_asincos.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libm/noieee_src/n_atan.c
cvs rdiff -u -r1.4 -r1.5 src/lib/libm/src/e_acosl.c \
src/lib/libm/src/e_asinl.c
cvs rdiff -u -r1.12 -r1.13 src/lib/libm/src/s_atan.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libm/src/s_atanf.c \
src/lib/libm/src/w_asinf.c
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/src/s_atanl.c
cvs rdiff -u -r1.10 -r1.11 src/lib/libm/src/w_acos.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libm/src/w_acosf.c
cvs rdiff -u -r1.11 -r1.12 src/lib/libm/src/w_asin.c

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

Modified files:

Index: src/lib/libm/arch/i387/s_atan.S
diff -u src/lib/libm/arch/i387/s_atan.S:1.7 src/lib/libm/arch/i387/s_atan.S:1.8
--- src/lib/libm/arch/i387/s_atan.S:1.7	Sun Jun  9 13:33:36 2024
+++ src/lib/libm/arch/i387/s_atan.S	Sun Jun  9 13:35:38 2024
@@ -1,3 +1,5 @@
+/*	$NetBSD: s_atan.S,v 1.8 2024/06/09 13:35:38 riastradh Exp $	*/
+
 /*
  * Written by J.T. Conklin .
  * Public domain.
@@ -7,7 +9,7 @@
 
 #include "abi.h"
 
-RCSID("$NetBSD: s_atan.S,v 1.7 2024/06/09 13:33:36 riastradh Exp $")
+RCSID("$NetBSD: s_atan.S,v 1.8 2024/06/09 13:35:38 riastradh Exp $")
 
 WEAK_ALIAS(atan, _atan)
 

Index: src/lib/libm/arch/i387/s_atanf.S
diff -u src/lib/libm/arch/i387/s_atanf.S:1.6 src/lib/libm/arch/i387/s_atanf.S:1.7
--- src/lib/libm/arch/i387/s_atanf.S:1.6	Sun Jun  9 13:33:36 2024
+++ src/lib/libm/arch/i387/s_atanf.S	Sun Jun  9 13:35:38 2024
@@ -1,3 +1,5 @@
+/*	$NetBSD: s_atanf.S,v 1.7 2024/06/09 13:35:38 riastradh Exp $	*/
+
 /*
  * Written by J.T. Conklin .
  * Public domain.
@@ -7,7 +9,7 @@
 
 #include "abi.h"
 
-RCSID("$NetBSD: s_atanf.S,v 1.6 2024/06/09 13:33:36 riastradh Exp $")
+RCSID("$NetBSD: s_atanf.S,v 1.7 2024/06/09 13:35:38 riastradh Exp $")
 
 WEAK_ALIAS(atanf, _atanf)
 

Index: src/lib/libm/noieee_src/n_asincos.c
diff -u src/lib/libm/noieee_src/n_asincos.c:1.10 src/lib/libm/noieee_src/n_asincos.c:1.11
--- src/lib/libm/noieee_src/n_asincos.c:1.10	Sun Jun  9 13:33:36 2024
+++ src/lib/libm/noieee_src/n_asincos.c	Sun Jun  9 13:35:38 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: n_asincos.c,v 1.10 2024/06/09 13:33:36 riastradh Exp $	*/
+/*	$NetBSD: n_asincos.c,v 1.11 2024/06/09 13:35:38 riastradh Exp $	*/
 /*
  * Copyright (c) 1985, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -27,8 +27,9 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
+
 #include 
-__RCSID("$NetBSD: n_asincos.c,v 1.10 2024/06/09 13:33:36 riastradh Exp $");
+__RCSID("$NetBSD: n_asincos.c,v 1.11 2024/06/09 13:35:38 riastradh Exp $");
 
 #ifndef lint
 #if 0

Index: src/lib/libm/noieee_src/n_atan.c
diff -u src/lib/libm/noieee_src/n_atan.c:1.7 src/lib/libm/noieee_src/n_atan.c:1.8
--- src/lib/libm/noieee_src/n_atan.c:1.7	Sun Jun  9 13:33:36 2024
+++ src/lib/libm/noieee_src/n_atan.c	Sun Jun  9 13:35:38 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: n_atan.c,v 1.7 2024/06/09 13:33:36 riastradh Exp $	*/
+/*	$NetBSD: n_atan.c,v 1.8 2024/06/09 13:35:38 riastradh Exp $	*/
 /*
  * Copyright (c) 1985, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -28,6 +28,9 @@
  * SUCH DAMAGE.
  */
 
+#include 
+__RCSID("$NetBSD: n_atan.c,v 1.8 2024/06/09 13:35:38 riastradh Exp $");
+
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)atan.c	8.1 (Berkeley) 6/4/93";

Index: src/lib/libm/src/e_acosl.c
diff -u src/lib/libm/src/e_acosl.c:1.4 src/lib/libm/src/e_acosl.c:1.5
--- src/lib/libm/src/e_acosl.c:1.4	Sun Jun  9 13:33:36 2024
+++ src/lib/libm/src/e_acosl.c	Sun Jun  9 13:35:38 2024
@@ -1,3 +1,4 @@
+/*	$NetBSD: e_acosl.c,v 1.5 2024/06/09 13:35:38 riastradh Exp $	*/
 
 /* FreeBSD: head/lib/msun/src/e_acos.c 176451 2008-02-22 02:30:36Z das */
 /*
@@ -6,16 +7,19 @@
  *
  * Developed at SunSoft, a Sun Microsystems, Inc. business.
  * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
+ * software is freely granted, provided that this notice
  * is preserved.
  * 
  */
 
 #include 
+__RCSID("$NetBSD: e_acosl.c,v 1.5 2024/06/09 13:35:38 riastradh Exp $");
+
 /*
  * See comments in e_acos.c.
  * Converted to long double by David Schultz .
  */
+
 #include "namespace.h"
 
 #include 
Index: 

CVS commit: src/lib/libm

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 13:35:38 UTC 2024

Modified Files:
src/lib/libm/arch/i387: s_atan.S s_atanf.S
src/lib/libm/noieee_src: n_asincos.c n_atan.c
src/lib/libm/src: e_acosl.c e_asinl.c s_atan.c s_atanf.c s_atanl.c
w_acos.c w_acosf.c w_asin.c w_asinf.c

Log Message:
libm: Sprinkle whitespace fixes and rcsids on inverse trig functions.

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libm/arch/i387/s_atan.S
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/arch/i387/s_atanf.S
cvs rdiff -u -r1.10 -r1.11 src/lib/libm/noieee_src/n_asincos.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libm/noieee_src/n_atan.c
cvs rdiff -u -r1.4 -r1.5 src/lib/libm/src/e_acosl.c \
src/lib/libm/src/e_asinl.c
cvs rdiff -u -r1.12 -r1.13 src/lib/libm/src/s_atan.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libm/src/s_atanf.c \
src/lib/libm/src/w_asinf.c
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/src/s_atanl.c
cvs rdiff -u -r1.10 -r1.11 src/lib/libm/src/w_acos.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libm/src/w_acosf.c
cvs rdiff -u -r1.11 -r1.12 src/lib/libm/src/w_asin.c

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



CVS commit: src/lib/libm

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 13:33:36 UTC 2024

Modified Files:
src/lib/libm: m.aarch64.expsym m.alpha.expsym m.arm.expsym
m.armhf.expsym m.hppa.expsym m.i386.expsym m.ia64.expsym
m.m68k.expsym m.mips.expsym m.mips64.expsym m.mipshf.expsym
m.powerpc.expsym m.powerpc64.expsym m.riscv.expsym m.sh3.expsym
m.sparc.expsym m.sparc64.expsym m.vax.expsym m.x86_64.expsym
src/lib/libm/arch/i387: s_atan.S s_atanf.S
src/lib/libm/arch/mc68881: s_atan.S
src/lib/libm/noieee_src: n_asincos.c n_atan.c
src/lib/libm/src: e_acosl.c e_asinl.c namespace.h s_atan.c s_atanf.c
s_atanl.c w_acos.c w_acosf.c w_asin.c w_asinf.c

Log Message:
libm: Do the weak alias dance for asin, acos, atan.

These are used internally by the complex trig functions, so they need
weak aliases.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libm/m.aarch64.expsym \
src/lib/libm/m.arm.expsym src/lib/libm/m.i386.expsym \
src/lib/libm/m.riscv.expsym src/lib/libm/m.sparc64.expsym \
src/lib/libm/m.x86_64.expsym
cvs rdiff -u -r1.2 -r1.3 src/lib/libm/m.alpha.expsym \
src/lib/libm/m.hppa.expsym src/lib/libm/m.ia64.expsym \
src/lib/libm/m.powerpc.expsym src/lib/libm/m.sparc.expsym
cvs rdiff -u -r1.1 -r1.2 src/lib/libm/m.armhf.expsym \
src/lib/libm/m.mips64.expsym src/lib/libm/m.mipshf.expsym \
src/lib/libm/m.powerpc64.expsym src/lib/libm/m.sh3.expsym
cvs rdiff -u -r1.4 -r1.5 src/lib/libm/m.m68k.expsym \
src/lib/libm/m.mips.expsym src/lib/libm/m.vax.expsym
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/arch/i387/s_atan.S
cvs rdiff -u -r1.5 -r1.6 src/lib/libm/arch/i387/s_atanf.S
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/arch/mc68881/s_atan.S
cvs rdiff -u -r1.9 -r1.10 src/lib/libm/noieee_src/n_asincos.c
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/noieee_src/n_atan.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libm/src/e_acosl.c \
src/lib/libm/src/e_asinl.c
cvs rdiff -u -r1.22 -r1.23 src/lib/libm/src/namespace.h
cvs rdiff -u -r1.11 -r1.12 src/lib/libm/src/s_atan.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libm/src/s_atanf.c \
src/lib/libm/src/w_asinf.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libm/src/s_atanl.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libm/src/w_acos.c
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/src/w_acosf.c
cvs rdiff -u -r1.10 -r1.11 src/lib/libm/src/w_asin.c

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

Modified files:

Index: src/lib/libm/m.aarch64.expsym
diff -u src/lib/libm/m.aarch64.expsym:1.3 src/lib/libm/m.aarch64.expsym:1.4
--- src/lib/libm/m.aarch64.expsym:1.3	Wed May  8 01:42:23 2024
+++ src/lib/libm/m.aarch64.expsym	Sun Jun  9 13:33:36 2024
@@ -102,15 +102,19 @@ __muldc3
 __mulsc3
 __multc3
 __mulxc3
+_acos
+_acosf
 _acoshl
 _acosl
 _asin
 _asinf
 _asinhl
 _asinl
+_atan
 _atan2
 _atan2f
 _atan2l
+_atanf
 _atanhl
 _atanl
 _bss_end__
Index: src/lib/libm/m.arm.expsym
diff -u src/lib/libm/m.arm.expsym:1.3 src/lib/libm/m.arm.expsym:1.4
--- src/lib/libm/m.arm.expsym:1.3	Wed May  8 23:28:07 2024
+++ src/lib/libm/m.arm.expsym	Sun Jun  9 13:33:36 2024
@@ -69,15 +69,19 @@ __log__D
 __muldc3
 __mulsc3
 __mulxc3
+_acos
+_acosf
 _acoshl
 _acosl
 _asin
 _asinf
 _asinhl
 _asinl
+_atan
 _atan2
 _atan2f
 _atan2l
+_atanf
 _atanhl
 _atanl
 _casin
Index: src/lib/libm/m.i386.expsym
diff -u src/lib/libm/m.i386.expsym:1.3 src/lib/libm/m.i386.expsym:1.4
--- src/lib/libm/m.i386.expsym:1.3	Wed May  8 01:40:26 2024
+++ src/lib/libm/m.i386.expsym	Sun Jun  9 13:33:36 2024
@@ -90,15 +90,19 @@ __log__D
 __muldc3
 __mulsc3
 __mulxc3
+_acos
+_acosf
 _acoshl
 _acosl
 _asin
 _asinf
 _asinhl
 _asinl
+_atan
 _atan2
 _atan2f
 _atan2l
+_atanf
 _atanhl
 _atanl
 _casin
Index: src/lib/libm/m.riscv.expsym
diff -u src/lib/libm/m.riscv.expsym:1.3 src/lib/libm/m.riscv.expsym:1.4
--- src/lib/libm/m.riscv.expsym:1.3	Wed May  8 01:42:23 2024
+++ src/lib/libm/m.riscv.expsym	Sun Jun  9 13:33:36 2024
@@ -97,15 +97,19 @@ __log__D
 __muldc3
 __mulsc3
 __mulxc3
+_acos
+_acosf
 _acoshl
 _acosl
 _asin
 _asinf
 _asinhl
 _asinl
+_atan
 _atan2
 _atan2f
 _atan2l
+_atanf
 _atanhl
 _atanl
 _casin
Index: src/lib/libm/m.sparc64.expsym
diff -u src/lib/libm/m.sparc64.expsym:1.3 src/lib/libm/m.sparc64.expsym:1.4
--- src/lib/libm/m.sparc64.expsym:1.3	Wed May  8 01:42:23 2024
+++ src/lib/libm/m.sparc64.expsym	Sun Jun  9 13:33:36 2024
@@ -98,15 +98,19 @@ __muldc3
 __mulsc3
 __multc3
 __mulxc3
+_acos
+_acosf
 _acoshl
 _acosl
 _asin
 _asinf
 _asinhl
 _asinl
+_atan
 _atan2
 _atan2f
 _atan2l
+_atanf
 _atanhl
 _atanl
 _casin
Index: src/lib/libm/m.x86_64.expsym
diff -u src/lib/libm/m.x86_64.expsym:1.3 src/lib/libm/m.x86_64.expsym:1.4
--- src/lib/libm/m.x86_64.expsym:1.3	Wed May  8 01:40:27 2024
+++ src/lib/libm/m.x86_64.expsym	Sun Jun  9 13:33:36 2024
@@ -90,15 +90,19 @@ __log__D
 __muldc3
 __mulsc3
 __mulxc3
+_acos
+_acosf
 _acoshl
 _acosl
 _asin
 _asinf
 _asinhl
 _asinl
+_atan
 _atan2
 _atan2f
 

CVS commit: src/lib/libm

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 13:33:36 UTC 2024

Modified Files:
src/lib/libm: m.aarch64.expsym m.alpha.expsym m.arm.expsym
m.armhf.expsym m.hppa.expsym m.i386.expsym m.ia64.expsym
m.m68k.expsym m.mips.expsym m.mips64.expsym m.mipshf.expsym
m.powerpc.expsym m.powerpc64.expsym m.riscv.expsym m.sh3.expsym
m.sparc.expsym m.sparc64.expsym m.vax.expsym m.x86_64.expsym
src/lib/libm/arch/i387: s_atan.S s_atanf.S
src/lib/libm/arch/mc68881: s_atan.S
src/lib/libm/noieee_src: n_asincos.c n_atan.c
src/lib/libm/src: e_acosl.c e_asinl.c namespace.h s_atan.c s_atanf.c
s_atanl.c w_acos.c w_acosf.c w_asin.c w_asinf.c

Log Message:
libm: Do the weak alias dance for asin, acos, atan.

These are used internally by the complex trig functions, so they need
weak aliases.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libm/m.aarch64.expsym \
src/lib/libm/m.arm.expsym src/lib/libm/m.i386.expsym \
src/lib/libm/m.riscv.expsym src/lib/libm/m.sparc64.expsym \
src/lib/libm/m.x86_64.expsym
cvs rdiff -u -r1.2 -r1.3 src/lib/libm/m.alpha.expsym \
src/lib/libm/m.hppa.expsym src/lib/libm/m.ia64.expsym \
src/lib/libm/m.powerpc.expsym src/lib/libm/m.sparc.expsym
cvs rdiff -u -r1.1 -r1.2 src/lib/libm/m.armhf.expsym \
src/lib/libm/m.mips64.expsym src/lib/libm/m.mipshf.expsym \
src/lib/libm/m.powerpc64.expsym src/lib/libm/m.sh3.expsym
cvs rdiff -u -r1.4 -r1.5 src/lib/libm/m.m68k.expsym \
src/lib/libm/m.mips.expsym src/lib/libm/m.vax.expsym
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/arch/i387/s_atan.S
cvs rdiff -u -r1.5 -r1.6 src/lib/libm/arch/i387/s_atanf.S
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/arch/mc68881/s_atan.S
cvs rdiff -u -r1.9 -r1.10 src/lib/libm/noieee_src/n_asincos.c
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/noieee_src/n_atan.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libm/src/e_acosl.c \
src/lib/libm/src/e_asinl.c
cvs rdiff -u -r1.22 -r1.23 src/lib/libm/src/namespace.h
cvs rdiff -u -r1.11 -r1.12 src/lib/libm/src/s_atan.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libm/src/s_atanf.c \
src/lib/libm/src/w_asinf.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libm/src/s_atanl.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libm/src/w_acos.c
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/src/w_acosf.c
cvs rdiff -u -r1.10 -r1.11 src/lib/libm/src/w_asin.c

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



CVS commit: src/lib/libm/src

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 13:33:11 UTC 2024

Modified Files:
src/lib/libm/src: namespace.h

Log Message:
libm/src/namespace.h: Delete duplicates.

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/lib/libm/src/namespace.h

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

Modified files:

Index: src/lib/libm/src/namespace.h
diff -u src/lib/libm/src/namespace.h:1.21 src/lib/libm/src/namespace.h:1.22
--- src/lib/libm/src/namespace.h:1.21	Sun Jun  9 13:33:03 2024
+++ src/lib/libm/src/namespace.h	Sun Jun  9 13:33:11 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: namespace.h,v 1.21 2024/06/09 13:33:03 riastradh Exp $ */
+/* $NetBSD: namespace.h,v 1.22 2024/06/09 13:33:11 riastradh Exp $ */
 
 #define acoshl _acoshl
 #define acosl _acosl
@@ -25,7 +25,6 @@
 #define cosh _cosh
 #define coshf _coshf
 #define coshl _coshl
-#define coshl _coshl
 #define cosl _cosl
 #define cospi _cospi
 #define cospif _cospif
@@ -86,7 +85,6 @@
 #define sinh _sinh
 #define sinhf _sinhf
 #define sinhl _sinhl
-#define sinhl _sinhl
 #define sinl _sinl
 #define sinpi _sinpi
 #define sinpif _sinpif



CVS commit: src/lib/libm/src

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 13:33:11 UTC 2024

Modified Files:
src/lib/libm/src: namespace.h

Log Message:
libm/src/namespace.h: Delete duplicates.

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/lib/libm/src/namespace.h

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



CVS commit: src/lib/libm/src

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 13:33:03 UTC 2024

Modified Files:
src/lib/libm/src: namespace.h

Log Message:
libm/src/namespace.h: Sort.

No functional change intended.

Grouping vaguely by functionality makes this painful to update.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libm/src/namespace.h

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

Modified files:

Index: src/lib/libm/src/namespace.h
diff -u src/lib/libm/src/namespace.h:1.20 src/lib/libm/src/namespace.h:1.21
--- src/lib/libm/src/namespace.h:1.20	Wed May  8 01:40:27 2024
+++ src/lib/libm/src/namespace.h	Sun Jun  9 13:33:03 2024
@@ -1,109 +1,47 @@
-/* $NetBSD: namespace.h,v 1.20 2024/05/08 01:40:27 riastradh Exp $ */
+/* $NetBSD: namespace.h,v 1.21 2024/06/09 13:33:03 riastradh Exp $ */
 
-#define atan2 _atan2
-#define atan2f _atan2f
-#define atan2l _atan2l
-#define hypot _hypot
-#define hypotf _hypotf
-#define hypotl _hypotl
-
-#define exp _exp
-#define expf _expf
-#define expl _expl
-#define expm1l _expm1l
-#define log _log
-#define logf _logf
-#define logl _logl
-
-#define sin _sin
-#define sinf _sinf
-#define cos _cos
-#define cosf _cosf
-#define tan _tan
-#define tanf _tanf
-
-#define finite _finite
-#define finitef _finitef
-
-#define sincos _sincos
-#define sincosf _sincosf
-#define sincosl _sincosl
-#define sinh _sinh
-#define sinhf _sinhf
-#define sinhl _sinhl
-#define cosh _cosh
-#define coshf _coshf
-#define coshl _coshl
+#define acoshl _acoshl
+#define acosl _acosl
 #define asin _asin
 #define asinf _asinf
+#define asinhl _asinhl
 #define asinl _asinl
-
-#define remquo _remquo
-#define remquof _remquof
-#define remquol _remquol
-
+#define atan2 _atan2
+#define atan2f _atan2f
+#define atan2l _atan2l
+#define atanhl _atanhl
+#define atanl _atanl
 #define casin _casin
 #define casinf _casinf
 #define casinl _casinl
 #define catan _catan
 #define catanf _catanf
 #define catanl _catanl
-
-#define scalbn _scalbn
-#define scalbnf _scalbnf
-#define scalbnl _scalbnl
-#define scalbln _scalbln
-#define scalblnf _scalblnf
-#define scalblnl _scalblnl
-
-#define copysignl _copysignl
-#define sqrtl _sqrtl
 #define cbrtl _cbrtl
 #define ceill _ceill
-#define floorl _floorl
-#define roundl _roundl
-#define fmodl _fmodl
-#define modfl _modfl
-#define truncl _truncl
-
-#define exp2l _exp2l
-#define cosl _cosl
-#define sinl _sinl
-#define tanl _tanl
-#define powl _powl
+#define copysignl _copysignl
+#define cos _cos
+#define cosf _cosf
+#define cosh _cosh
+#define coshf _coshf
 #define coshl _coshl
-#define sinhl _sinhl
-#define acosl _acosl
-#define atanl _atanl
-#define asinhl _asinhl
-#define acoshl _acoshl
-#define tanhl _tanhl
-#define atanhl _atanhl
-#define log10l _log10l
-#define log1pl _log1pl
-#define log2l _log2l
-
+#define coshl _coshl
+#define cosl _cosl
 #define cospi _cospi
 #define cospif _cospif
 #define cospil _cospil
-
-#define sinpi _sinpi
-#define sinpif _sinpif
-#define sinpil _sinpil
-
-#define tanpi _tanpi
-#define tanpif _tanpif
-#define tanpil _tanpil
-
-#define erfl _erfl
 #define erfcl _erfcl
-
-#define lgammal _lgammal
-#define lgammal_r _lgammal_r
-#define tgammal _tgammal
-
+#define erfl _erfl
+#define exp _exp
+#define exp2l _exp2l
+#define expf _expf
+#define expl _expl
+#define expm1l _expm1l
 #define feclearexcept _feclearexcept
+#define fedisableexcept _fedisableexcept
+#define feenableexcept _feenableexcept
 #define fegetenv _fegetenv
+#define fegetexcept _fegetexcept
 #define fegetexceptflag _fegetexceptflag
 #define fegetround _fegetround
 #define feholdexcept _feholdexcept
@@ -113,7 +51,53 @@
 #define fesetround _fesetround
 #define fetestexcept _fetestexcept
 #define feupdateenv _feupdateenv
-
-#define fedisableexcept _fedisableexcept
-#define feenableexcept _feenableexcept
-#define fegetexcept _fegetexcept
+#define finite _finite
+#define finitef _finitef
+#define floorl _floorl
+#define fmodl _fmodl
+#define hypot _hypot
+#define hypotf _hypotf
+#define hypotl _hypotl
+#define lgammal _lgammal
+#define lgammal_r _lgammal_r
+#define log _log
+#define log10l _log10l
+#define log1pl _log1pl
+#define log2l _log2l
+#define logf _logf
+#define logl _logl
+#define modfl _modfl
+#define powl _powl
+#define remquo _remquo
+#define remquof _remquof
+#define remquol _remquol
+#define roundl _roundl
+#define scalbln _scalbln
+#define scalblnf _scalblnf
+#define scalblnl _scalblnl
+#define scalbn _scalbn
+#define scalbnf _scalbnf
+#define scalbnl _scalbnl
+#define sin _sin
+#define sincos _sincos
+#define sincosf _sincosf
+#define sincosl _sincosl
+#define sinf _sinf
+#define sinh _sinh
+#define sinhf _sinhf
+#define sinhl _sinhl
+#define sinhl _sinhl
+#define sinl _sinl
+#define sinpi _sinpi
+#define sinpif _sinpif
+#define sinpil _sinpil
+#define sqrtl _sqrtl
+#define tan _tan
+#define tanf _tanf
+#define tanhl _tanhl
+#define tanl _tanl
+#define tanpi _tanpi
+#define tanpif 

CVS commit: src/lib/libm/src

2024-06-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun  9 13:33:03 UTC 2024

Modified Files:
src/lib/libm/src: namespace.h

Log Message:
libm/src/namespace.h: Sort.

No functional change intended.

Grouping vaguely by functionality makes this painful to update.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libm/src/namespace.h

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



CVS commit: src/lib/libcurses

2024-06-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jun  9 13:02:24 UTC 2024

Modified Files:
src/lib/libcurses: ctrace.c

Log Message:
libcurses: fix lint warning about function without header prototype


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libcurses/ctrace.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/libcurses/ctrace.c
diff -u src/lib/libcurses/ctrace.c:1.23 src/lib/libcurses/ctrace.c:1.24
--- src/lib/libcurses/ctrace.c:1.23	Mon Oct 29 00:31:57 2018
+++ src/lib/libcurses/ctrace.c	Sun Jun  9 13:02:24 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: ctrace.c,v 1.23 2018/10/29 00:31:57 uwe Exp $	*/
+/*	$NetBSD: ctrace.c,v 1.24 2024/06/09 13:02:24 rillig Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -30,13 +30,11 @@
  */
 
 #include 
-#ifndef lint
 #if 0
 static char sccsid[] = "@(#)ctrace.c	8.2 (Berkeley) 10/5/93";
 #else
-__RCSID("$NetBSD: ctrace.c,v 1.23 2018/10/29 00:31:57 uwe Exp $");
+__RCSID("$NetBSD: ctrace.c,v 1.24 2024/06/09 13:02:24 rillig Exp $");
 #endif
-#endif/* not lint */
 
 #ifdef DEBUG
 #include 
@@ -106,13 +104,6 @@ __CTRACE(int area, const char *fmt,...)
 	(void)fflush(tracefp);
 }
 #else
-/* this kills the empty translation unit message from lint... */
-void
-__cursesi_make_lint_shut_up_if_debug_not_defined(void);
-
-void
-__cursesi_make_lint_shut_up_if_debug_not_defined(void)
-{
-	return;
-}
+/* Prevent an 'empty translation unit' message from lint. */
+typedef int dummy;
 #endif



CVS commit: src/lib/libcurses

2024-06-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jun  9 13:02:24 UTC 2024

Modified Files:
src/lib/libcurses: ctrace.c

Log Message:
libcurses: fix lint warning about function without header prototype


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libcurses/ctrace.c

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



CVS commit: src

2024-06-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jun  9 10:27:39 UTC 2024

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/usr.bin/xlint/lint1: init_c99.c msg_259.c msg_298.c
t_usage.sh
src/usr.bin/xlint/lint1: err.c tree.c
Added Files:
src/tests/usr.bin/xlint/lint1: msg_380.c msg_381.c

Log Message:
lint: warn about lossy floating point constant to integer conversions


To generate a diff of this commit:
cvs rdiff -u -r1.1318 -r1.1319 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/init_c99.c
cvs rdiff -u -r1.24 -r1.25 src/tests/usr.bin/xlint/lint1/msg_259.c
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_298.c
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/msg_380.c \
src/tests/usr.bin/xlint/lint1/msg_381.c
cvs rdiff -u -r1.21 -r1.22 src/tests/usr.bin/xlint/lint1/t_usage.sh
cvs rdiff -u -r1.245 -r1.246 src/usr.bin/xlint/lint1/err.c
cvs rdiff -u -r1.645 -r1.646 src/usr.bin/xlint/lint1/tree.c

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



CVS commit: src

2024-06-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jun  9 10:27:39 UTC 2024

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/usr.bin/xlint/lint1: init_c99.c msg_259.c msg_298.c
t_usage.sh
src/usr.bin/xlint/lint1: err.c tree.c
Added Files:
src/tests/usr.bin/xlint/lint1: msg_380.c msg_381.c

Log Message:
lint: warn about lossy floating point constant to integer conversions


To generate a diff of this commit:
cvs rdiff -u -r1.1318 -r1.1319 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/init_c99.c
cvs rdiff -u -r1.24 -r1.25 src/tests/usr.bin/xlint/lint1/msg_259.c
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_298.c
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/msg_380.c \
src/tests/usr.bin/xlint/lint1/msg_381.c
cvs rdiff -u -r1.21 -r1.22 src/tests/usr.bin/xlint/lint1/t_usage.sh
cvs rdiff -u -r1.245 -r1.246 src/usr.bin/xlint/lint1/err.c
cvs rdiff -u -r1.645 -r1.646 src/usr.bin/xlint/lint1/tree.c

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.1318 src/distrib/sets/lists/tests/mi:1.1319
--- src/distrib/sets/lists/tests/mi:1.1318	Sat Jun  8 13:50:47 2024
+++ src/distrib/sets/lists/tests/mi	Sun Jun  9 10:27:39 2024
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1318 2024/06/08 13:50:47 rillig Exp $
+# $NetBSD: mi,v 1.1319 2024/06/09 10:27:39 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -7515,6 +7515,8 @@
 ./usr/tests/usr.bin/xlint/lint1/msg_377.c			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/msg_378.c			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/msg_379.c			tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/xlint/lint1/msg_380.c			tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/xlint/lint1/msg_381.c			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/op_colon.c			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/op_colon.exp			tests-obsolete		obsolete,atf
 ./usr/tests/usr.bin/xlint/lint1/op_shl_lp64.c			tests-usr.bin-tests	compattestfile,atf

Index: src/tests/usr.bin/xlint/lint1/init_c99.c
diff -u src/tests/usr.bin/xlint/lint1/init_c99.c:1.1 src/tests/usr.bin/xlint/lint1/init_c99.c:1.2
--- src/tests/usr.bin/xlint/lint1/init_c99.c:1.1	Sat Jun  8 13:50:47 2024
+++ src/tests/usr.bin/xlint/lint1/init_c99.c	Sun Jun  9 10:27:39 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_c99.c,v 1.1 2024/06/08 13:50:47 rillig Exp $	*/
+/*	$NetBSD: init_c99.c,v 1.2 2024/06/09 10:27:39 rillig Exp $	*/
 # 3 "init_c99.c"
 
 // Tests for initialization in C99 or later, mainly for designators.
@@ -290,6 +290,7 @@ struct ten ten = {
  * covering all tricky edge cases.
  */
 
+/* expect+1: warning: lossy conversion of 3.5 to 'int' [381] */
 int c99_6_7_8_p24_example1_i = 3.5;
 double _Complex c99_6_7_8_p24_example1_c = 5 + 3 * 1.0fi;
 

Index: src/tests/usr.bin/xlint/lint1/msg_259.c
diff -u src/tests/usr.bin/xlint/lint1/msg_259.c:1.24 src/tests/usr.bin/xlint/lint1/msg_259.c:1.25
--- src/tests/usr.bin/xlint/lint1/msg_259.c:1.24	Sat Jun  8 13:50:47 2024
+++ src/tests/usr.bin/xlint/lint1/msg_259.c	Sun Jun  9 10:27:39 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_259.c,v 1.24 2024/06/08 13:50:47 rillig Exp $	*/
+/*	$NetBSD: msg_259.c,v 1.25 2024/06/09 10:27:39 rillig Exp $	*/
 # 3 "msg_259.c"
 
 // Test for message: argument %d is converted from '%s' to '%s' due to prototype [259]
@@ -236,7 +236,8 @@ constants(void)
 	/* expect+2: warning: argument 1 is converted from 'long long' to 'unsigned int' due to prototype [259] */
 	/* expect+1: warning: conversion of 'long long' to 'unsigned int' is out of range, arg #1 [295] */
 	unsigned_int(0x7fffLL);
-	/* expect+1: warning: argument 1 is converted from 'double' to 'unsigned int' due to prototype [259] */
+	/* expect+2: warning: argument 1 is converted from 'double' to 'unsigned int' due to prototype [259] */
+	/* expect+1: warning: lossy conversion of 2.1 to 'unsigned int', arg #1 [380] */
 	unsigned_int(2.1);
 }
 

Index: src/tests/usr.bin/xlint/lint1/msg_298.c
diff -u src/tests/usr.bin/xlint/lint1/msg_298.c:1.6 src/tests/usr.bin/xlint/lint1/msg_298.c:1.7
--- src/tests/usr.bin/xlint/lint1/msg_298.c:1.6	Sat Jun  8 13:50:47 2024
+++ src/tests/usr.bin/xlint/lint1/msg_298.c	Sun Jun  9 10:27:39 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_298.c,v 1.6 2024/06/08 13:50:47 rillig Exp $	*/
+/*	$NetBSD: msg_298.c,v 1.7 2024/06/09 10:27:39 rillig Exp $	*/
 # 3 "msg_298.c"
 
 // Test for message: conversion from '%s' to '%s' may lose accuracy, arg #%d [298]
@@ -22,9 +22,4 @@ convert_bit_and(long l)
 	take_schar(l & 0x7F);
 }
 
-void
-convert_floating_to_integer(void)
-{
-	// TODO: warn about lossy conversion.
-	take_uint(2.1);
-}
+// For lossy floating-to-integer