CVS commit: src/tests/usr.bin/mtree

2024-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri May 10 03:29:47 UTC 2024

Modified Files:
src/tests/usr.bin/mtree: t_sets.sh

Log Message:
tests/usr.bin/mtree/t_sets: Add base32, base64, debug32, debug64.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/mtree/t_sets.sh

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/mtree

2024-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri May 10 03:29:47 UTC 2024

Modified Files:
src/tests/usr.bin/mtree: t_sets.sh

Log Message:
tests/usr.bin/mtree/t_sets: Add base32, base64, debug32, debug64.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/mtree/t_sets.sh

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

Modified files:

Index: src/tests/usr.bin/mtree/t_sets.sh
diff -u src/tests/usr.bin/mtree/t_sets.sh:1.8 src/tests/usr.bin/mtree/t_sets.sh:1.9
--- src/tests/usr.bin/mtree/t_sets.sh:1.8	Tue May  7 14:53:59 2024
+++ src/tests/usr.bin/mtree/t_sets.sh	Fri May 10 03:29:47 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: t_sets.sh,v 1.8 2024/05/07 14:53:59 martin Exp $
+#	$NetBSD: t_sets.sh,v 1.9 2024/05/10 03:29:47 riastradh Exp $
 #
 # Copyright (c) 2024 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -44,8 +44,12 @@ set_case()
 }
 
 set_case base
+set_case base32
+set_case base64
 set_case comp
 set_case debug
+set_case debug32
+set_case debug64
 set_case dtb
 #set_case etc
 set_case games



Re: CVS commit: src/distrib/common

2024-05-09 Thread Robert Elz
Date:Thu, 9 May 2024 17:44:16 -0400
From:Christos Zoulas 
Message-ID:  <9c618434-9d7b-4f1c-97ed-3260b7f36...@zoulas.com>

  | I am not sure either but the resulting cd does not boot anymore.

Which version?   It has been a long time since I needed to boot
from an optical drive, but I could try it.

Its a little hard to believe that the uid/gid settings could make
any difference, though the m9de settings might.

kre


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

2024-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May  9 22:38:29 UTC 2024

Modified Files:
src/tests/lib/libc/stdio: t_printf.c

Log Message:
tests/lib/libc/stdio/t_printf: Fix another rounding error.

Noted by kre.

This doesn't break a passing test or fix a failed test, at least on
x86 -- our printf produces `0x1.533p+3' for the double case and
`0xa.99ap+0' for the long double case.  But of the hexadecimal number
literals that that start with 0x5 having three hexadigits to the
right of the fractional point, 0x5.4cdp+1 closest to the IEEE 754
binary64, VAX D, x86 extended precision, and IEEE 754 binary128
floating-point numbers closest to 10.6.

The reason is that the number 10.6 (or the nearest floating-point
number in any format with enough precision) is:

101.0100 1100 1100|1100... * 2^1 = 0x5.4cc|c...p+1

If we round at the vertical bar to the _nearest_ output with three
hexadigits of precision, the result is:

101.0100 1100 1101 * 2^1 = 0x5.4cdp+1


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/tests/lib/libc/stdio/t_printf.c

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

Modified files:

Index: src/tests/lib/libc/stdio/t_printf.c
diff -u src/tests/lib/libc/stdio/t_printf.c:1.15 src/tests/lib/libc/stdio/t_printf.c:1.16
--- src/tests/lib/libc/stdio/t_printf.c:1.15	Thu May  9 12:24:24 2024
+++ src/tests/lib/libc/stdio/t_printf.c	Thu May  9 22:38:29 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: t_printf.c,v 1.15 2024/05/09 12:24:24 riastradh Exp $ */
+/* $NetBSD: t_printf.c,v 1.16 2024/05/09 22:38:29 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -195,7 +195,7 @@ ATF_TC_BODY(snprintf_double_a, tc)
 	snprintf(buf, sizeof buf, "%.3a", (double)10.6);
 	ATF_CHECK_MSG((strcmp(buf, "0x1.533p+3") == 0 ||
 		strcmp(buf, "0x2.a66p+2") == 0 ||
-		strcmp(buf, "0x5.4ccp+1") == 0 ||
+		strcmp(buf, "0x5.4cdp+1") == 0 ||
 		strcmp(buf, "0xa.99ap+0") == 0),
 	"buf=%s", buf);
 
@@ -220,7 +220,7 @@ ATF_TC_BODY(snprintf_long_double_a, tc)
 	snprintf(buf, sizeof buf, "%.3La", 10.6L);
 	ATF_CHECK_MSG((strcmp(buf, "0x1.533p+3") == 0 ||
 		strcmp(buf, "0x2.a66p+2") == 0 ||
-		strcmp(buf, "0x5.4ccp+1") == 0 ||
+		strcmp(buf, "0x5.4cdp+1") == 0 ||
 		strcmp(buf, "0xa.99ap+0") == 0),
 	"buf=%s", buf);
 



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

2024-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May  9 22:38:29 UTC 2024

Modified Files:
src/tests/lib/libc/stdio: t_printf.c

Log Message:
tests/lib/libc/stdio/t_printf: Fix another rounding error.

Noted by kre.

This doesn't break a passing test or fix a failed test, at least on
x86 -- our printf produces `0x1.533p+3' for the double case and
`0xa.99ap+0' for the long double case.  But of the hexadecimal number
literals that that start with 0x5 having three hexadigits to the
right of the fractional point, 0x5.4cdp+1 closest to the IEEE 754
binary64, VAX D, x86 extended precision, and IEEE 754 binary128
floating-point numbers closest to 10.6.

The reason is that the number 10.6 (or the nearest floating-point
number in any format with enough precision) is:

101.0100 1100 1100|1100... * 2^1 = 0x5.4cc|c...p+1

If we round at the vertical bar to the _nearest_ output with three
hexadigits of precision, the result is:

101.0100 1100 1101 * 2^1 = 0x5.4cdp+1


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/tests/lib/libc/stdio/t_printf.c

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



Re: CVS commit: src/distrib/common

2024-05-09 Thread Christos Zoulas



> On May 9, 2024, at 5:37 PM, Robert Elz  wrote:
> 
> Date:Thu, 9 May 2024 12:09:03 -0400
>From:"Christos Zoulas" 
>Message-ID:  <20240509160903.6e41bf...@cvs.netbsd.org>
> 
>  | Instead of augmenting the platform spec with an autogenerated one,
>  | we should understand why we have missing entries in the first place.
> 
> Is it really important?   Everything was fine without it previously,
> except that reproducible builds, weren't (as local info was being
> used in the CD images).
> 
> As long as the "augmenting" is just providing info for files that
> weren't otherwise specified (an issue I admit to not checking in the
> change I made) - that is, as long as makefs takes the first entry in
> the spec file it is given, should there be more than one for a file
> (if it prefers to use the last, then that would just change the order
> in which the augmentation file is included, no need to change makefs)
> then I'm not really sure what the problem is.

I am not sure either but the resulting cd does not boot anymore. I am trying to 
understand why. If augmenting works as you describe, there is more problem...

christos
> 
> That is, I don't see we need to add yet another manual maintenance step
> that we need to make in order to add or remove a file from a CD image
> (or whatever the image is destined for) when the information being added
> isn't really important - but just needs to be consistent.
> 
> kre



Re: CVS commit: src/distrib/common

2024-05-09 Thread Robert Elz
Date:Thu, 9 May 2024 12:09:03 -0400
From:"Christos Zoulas" 
Message-ID:  <20240509160903.6e41bf...@cvs.netbsd.org>

  | Instead of augmenting the platform spec with an autogenerated one,
  | we should understand why we have missing entries in the first place.

Is it really important?   Everything was fine without it previously,
except that reproducible builds, weren't (as local info was being
used in the CD images).

As long as the "augmenting" is just providing info for files that
weren't otherwise specified (an issue I admit to not checking in the
change I made) - that is, as long as makefs takes the first entry in
the spec file it is given, should there be more than one for a file
(if it prefers to use the last, then that would just change the order
in which the augmentation file is included, no need to change makefs)
then I'm not really sure what the problem is.

That is, I don't see we need to add yet another manual maintenance step
that we need to make in order to add or remove a file from a CD image
(or whatever the image is destined for) when the information being added
isn't really important - but just needs to be consistent.

kre



CVS commit: src/lib/libc/net

2024-05-09 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu May  9 21:28:00 UTC 2024

Modified Files:
src/lib/libc/net: getaddrinfo.3

Log Message:
Document that freeaddrinfo(NULL) dumps core.

A source code comment already said this, but it's easier to
find in a man page.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/lib/libc/net/getaddrinfo.3

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



CVS commit: src

2024-05-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu May  9 20:56:41 UTC 2024

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

Log Message:
lint: in C23 mode, allow storage classes in compound literals


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/usr.bin/xlint/lint1/c23.c
cvs rdiff -u -r1.498 -r1.499 src/usr.bin/xlint/lint1/cgram.y

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



CVS commit: src

2024-05-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu May  9 20:56:41 UTC 2024

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

Log Message:
lint: in C23 mode, allow storage classes in compound literals


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/usr.bin/xlint/lint1/c23.c
cvs rdiff -u -r1.498 -r1.499 src/usr.bin/xlint/lint1/cgram.y

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/c23.c
diff -u src/tests/usr.bin/xlint/lint1/c23.c:1.11 src/tests/usr.bin/xlint/lint1/c23.c:1.12
--- src/tests/usr.bin/xlint/lint1/c23.c:1.11	Thu May  9 11:08:07 2024
+++ src/tests/usr.bin/xlint/lint1/c23.c	Thu May  9 20:56:41 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: c23.c,v 1.11 2024/05/09 11:08:07 rillig Exp $	*/
+/*	$NetBSD: c23.c,v 1.12 2024/05/09 20:56:41 rillig Exp $	*/
 # 3 "c23.c"
 
 // Tests for the option -Ac23, which allows features from C23 and all earlier
@@ -42,6 +42,29 @@ null_pointer_constant(const char *p, dou
 }
 
 
+void *
+storage_class_in_compound_literal(void)
+{
+	typedef struct node node;
+	struct node {
+		node *left;
+		int value;
+		node *right;
+	};
+
+	node *tree;
+	tree = &(static node){
+	&(static node){
+		nullptr,
+		3,
+		nullptr,
+	},
+	5,
+	nullptr,
+	};
+	return tree->left;
+}
+
 int
 empty_initializer_braces(void)
 {

Index: src/usr.bin/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.498 src/usr.bin/xlint/lint1/cgram.y:1.499
--- src/usr.bin/xlint/lint1/cgram.y:1.498	Thu May  9 20:22:20 2024
+++ src/usr.bin/xlint/lint1/cgram.y	Thu May  9 20:56:41 2024
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.498 2024/05/09 20:22:20 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.499 2024/05/09 20:56:41 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: cgram.y,v 1.498 2024/05/09 20:22:20 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.499 2024/05/09 20:56:41 rillig Exp $");
 #endif
 
 #include 
@@ -306,6 +306,7 @@ is_either(const char *s, const char *a, 
 %type		gcc_statement_expr_item
 %type			point_or_arrow
 %type		argument_expression_list
+%type			storage_class_specifiers
 %type		unary_expression
 %type		cast_expression
 %type		expression_opt
@@ -332,6 +333,7 @@ is_either(const char *s, const char *a, 
 /* No type for type_init_declarator_list. */
 /* No type for notype_init_declarator. */
 /* No type for type_init_declarator. */
+%type			storage_class_specifier
 %type		type_specifier
 %type		notype_type_specifier
 %type		struct_or_union_specifier
@@ -606,6 +608,19 @@ postfix_expression:
 		$$ = build_name(current_initsym(), false);
 		end_initialization();
 	}
+	/* Rule 'compound_literal' with storage classes from C23 6.5.3.6. */
+|	T_LPAREN storage_class_specifiers type_name T_RPAREN {
+		sym_t *tmp = mktempsym($3);
+		tmp->s_scl = $2;
+		begin_initialization(tmp);
+		cgram_declare(tmp, true, NULL);
+	} braced_initializer {
+		if (!allow_c99)
+			 /* compound literals are a C99/GCC extension */
+			 gnuism(319);
+		$$ = build_name(current_initsym(), false);
+		end_initialization();
+	}
 |	T_LPAREN compound_statement_lbrace {
 		begin_statement_expr();
 	} gcc_statement_expr_list {
@@ -682,7 +697,14 @@ argument_expression_list:
 /* C23 6.5.3.6 */
 /* The rule 'compound_literal' is inlined into 'postfix_expression'. */
 
-/* TODO: Implement 'storage_class_specifiers' from C23 6.5.3.6. */
+/* C23 6.5.3.6 */
+storage_class_specifiers:
+	storage_class_specifier
+|	storage_class_specifiers storage_class_specifier {
+		// TODO C23: maybe merge multiple storage class specifiers
+		$$ = $1;
+	}
+;
 
 /* K 7.2, C90 ???, C99 6.5.3, C11 6.5.3, C23 6.5.4 */
 unary_expression:
@@ -1048,7 +1070,10 @@ type_init_declarator:
 
 /* TODO: Implement 'attribute_declaration' from C23 6.7.1. */
 
-/* TODO: Implement 'storage_class_specifier' from C23 6.7.2. */
+/* K ???, C90 ???, C99 ???, C11 ???, C23 6.7.2 */
+storage_class_specifier:
+	T_SCLASS
+;
 
 /* C99 6.7.2, C23 6.7.3.1 */
 type_specifier:



CVS commit: src

2024-05-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu May  9 20:53:13 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: d_c99_init.c msg_174.c
src/usr.bin/xlint/lint1: err.c init.c

Log Message:
lint: add details to message about too many initializers


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/tests/usr.bin/xlint/lint1/d_c99_init.c
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_174.c
cvs rdiff -u -r1.241 -r1.242 src/usr.bin/xlint/lint1/err.c
cvs rdiff -u -r1.268 -r1.269 src/usr.bin/xlint/lint1/init.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/d_c99_init.c
diff -u src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.48 src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.49
--- src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.48	Sat Mar 30 16:47:45 2024
+++ src/tests/usr.bin/xlint/lint1/d_c99_init.c	Thu May  9 20:53:13 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: d_c99_init.c,v 1.48 2024/03/30 16:47:45 rillig Exp $	*/
+/*	$NetBSD: d_c99_init.c,v 1.49 2024/05/09 20:53:13 rillig Exp $	*/
 # 3 "d_c99_init.c"
 
 /*
@@ -23,7 +23,7 @@ typedef struct any {
 int scalar_without_braces = 3;
 int scalar_with_optional_braces = { 3 };
 int scalar_with_too_many_braces = {{ 3 }};
-/* expect+1: error: too many initializers [174] */
+/* expect+1: error: too many initializers for 'int' [174] */
 int scalar_with_too_many_initializers = { 3, 5 };
 
 

Index: src/tests/usr.bin/xlint/lint1/msg_174.c
diff -u src/tests/usr.bin/xlint/lint1/msg_174.c:1.6 src/tests/usr.bin/xlint/lint1/msg_174.c:1.7
--- src/tests/usr.bin/xlint/lint1/msg_174.c:1.6	Fri Jul  7 19:45:22 2023
+++ src/tests/usr.bin/xlint/lint1/msg_174.c	Thu May  9 20:53:13 2024
@@ -1,7 +1,7 @@
-/*	$NetBSD: msg_174.c,v 1.6 2023/07/07 19:45:22 rillig Exp $	*/
+/*	$NetBSD: msg_174.c,v 1.7 2024/05/09 20:53:13 rillig Exp $	*/
 # 3 "msg_174.c"
 
-// Test for message: too many initializers [174]
+// Test for message: too many initializers for '%s' [174]
 
 /* lint1-extra-flags: -X 351 */
 
@@ -11,7 +11,7 @@ example(void)
 	/* A single pair of braces is always allowed. */
 	int n = { 13 };
 
-	/* expect+1: error: too many initializers [174] */
+	/* expect+1: error: too many initializers for 'int' [174] */
 	int too_many = { 17, 19 };
 
 	/*

Index: src/usr.bin/xlint/lint1/err.c
diff -u src/usr.bin/xlint/lint1/err.c:1.241 src/usr.bin/xlint/lint1/err.c:1.242
--- src/usr.bin/xlint/lint1/err.c:1.241	Sat Apr 27 10:08:54 2024
+++ src/usr.bin/xlint/lint1/err.c	Thu May  9 20:53:13 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: err.c,v 1.241 2024/04/27 10:08:54 rillig Exp $	*/
+/*	$NetBSD: err.c,v 1.242 2024/05/09 20:53:13 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: err.c,v 1.241 2024/04/27 10:08:54 rillig Exp $");
+__RCSID("$NetBSD: err.c,v 1.242 2024/05/09 20:53:13 rillig Exp $");
 #endif
 
 #include 
@@ -229,7 +229,7 @@ static const char *const msgs[] = {
 	"cannot assign to '%s' from '%s'",// 171
 	"too many struct/union initializers",// 172
 	"too many array initializers, expected %d",			// 173
-	"too many initializers",	// 174
+	"too many initializers for '%s'",// 174
 	"initialization of incomplete type '%s'",			// 175
 	"",			/* no longer used */			// 176
 	"non-constant initializer",	// 177

Index: src/usr.bin/xlint/lint1/init.c
diff -u src/usr.bin/xlint/lint1/init.c:1.268 src/usr.bin/xlint/lint1/init.c:1.269
--- src/usr.bin/xlint/lint1/init.c:1.268	Sat Mar 30 17:12:26 2024
+++ src/usr.bin/xlint/lint1/init.c	Thu May  9 20:53:13 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: init.c,v 1.268 2024/03/30 17:12:26 rillig Exp $	*/
+/*	$NetBSD: init.c,v 1.269 2024/05/09 20:53:13 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -38,7 +38,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: init.c,v 1.268 2024/03/30 17:12:26 rillig Exp $");
+__RCSID("$NetBSD: init.c,v 1.269 2024/05/09 20:53:13 rillig Exp $");
 #endif
 
 #include 
@@ -530,8 +530,8 @@ warn_too_many_initializers(designator_ki
 		/* too many array initializers, expected %d */
 		error(173, tp->u.dimension);
 	} else
-		/* too many initializers */
-		error(174);
+		/* too many initializers for '%s' */
+		error(174, type_name(tp));
 }
 
 static bool



CVS commit: src

2024-05-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu May  9 20:53:13 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: d_c99_init.c msg_174.c
src/usr.bin/xlint/lint1: err.c init.c

Log Message:
lint: add details to message about too many initializers


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/tests/usr.bin/xlint/lint1/d_c99_init.c
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_174.c
cvs rdiff -u -r1.241 -r1.242 src/usr.bin/xlint/lint1/err.c
cvs rdiff -u -r1.268 -r1.269 src/usr.bin/xlint/lint1/init.c

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



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

2024-05-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu May  9 20:22:20 UTC 2024

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

Log Message:
lint: sync grammar rule names with C11 and C23


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

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



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

2024-05-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu May  9 20:22:20 UTC 2024

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

Log Message:
lint: sync grammar rule names with C11 and C23


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

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

Modified files:

Index: src/usr.bin/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.497 src/usr.bin/xlint/lint1/cgram.y:1.498
--- src/usr.bin/xlint/lint1/cgram.y:1.497	Thu May  9 20:15:05 2024
+++ src/usr.bin/xlint/lint1/cgram.y	Thu May  9 20:22:20 2024
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.497 2024/05/09 20:15:05 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.498 2024/05/09 20:22:20 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: cgram.y,v 1.497 2024/05/09 20:15:05 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.498 2024/05/09 20:22:20 rillig Exp $");
 #endif
 
 #include 
@@ -328,8 +328,8 @@ is_either(const char *s, const char *a, 
 /* No type for type_attribute. */
 /* No type for begin_type. */
 /* No type for end_type. */
-/* No type for notype_init_declarators. */
-/* No type for type_init_declarators. */
+/* No type for notype_init_declarator_list. */
+/* No type for type_init_declarator_list. */
 /* No type for notype_init_declarator. */
 /* No type for type_init_declarator. */
 %type		type_specifier
@@ -340,8 +340,8 @@ is_either(const char *s, const char *a, 
 %type			member_declaration_list_with_rbrace
 %type			member_declaration_list
 %type			member_declaration
-%type			notype_member_declarators
-%type			type_member_declarators
+%type			notype_member_declarator_list
+%type			type_member_declarator_list
 %type			notype_member_declarator
 %type			type_member_declarator
 %type		enum_specifier
@@ -852,7 +852,7 @@ declaration:
 			/* empty declaration */
 			warning(2);
 	}
-|	begin_type_declmods end_type notype_init_declarators T_SEMI {
+|	begin_type_declmods end_type notype_init_declarator_list T_SEMI {
 		if (dcs->d_scl == TYPEDEF)
 			/* syntax error '%s' */
 			error(249, "missing base type for typedef");
@@ -869,7 +869,7 @@ declaration:
 			warning(2);
 	}
 |	begin_type_declaration_specifiers end_type
-	type_init_declarators T_SEMI
+	type_init_declarator_list T_SEMI
 |	static_assert_declaration
 ;
 
@@ -1004,14 +1004,14 @@ end_type:
 /* C23 6.7.1 */
 /* The rule 'init_declarator_list' is split into the 'notype' and 'type' variants. */
 
-notype_init_declarators:
+notype_init_declarator_list:
 	notype_init_declarator
-|	notype_init_declarators T_COMMA type_init_declarator
+|	notype_init_declarator_list T_COMMA type_init_declarator
 ;
 
-type_init_declarators:
+type_init_declarator_list:
 	type_init_declarator
-|	type_init_declarators T_COMMA type_init_declarator
+|	type_init_declarator_list T_COMMA type_init_declarator
 ;
 
 /* C23 6.7.1 */
@@ -1149,13 +1149,13 @@ member_declaration:
 		/* ^^ There is no check for the missing type-specifier. */
 		/* too late, i know, but getsym() compensates it */
 		set_sym_kind(SK_MEMBER);
-	} notype_member_declarators T_SEMI {
+	} notype_member_declarator_list T_SEMI {
 		set_sym_kind(SK_VCFT);
 		$$ = $4;
 	}
 |	begin_type_specifier_qualifier_list end_type {
 		set_sym_kind(SK_MEMBER);
-	} type_member_declarators T_SEMI {
+	} type_member_declarator_list T_SEMI {
 		set_sym_kind(SK_VCFT);
 		$$ = $4;
 	}
@@ -1194,24 +1194,24 @@ member_declaration:
 /* C23 6.7.3.2 */
 /* The rule 'member_declarator_list' is split into the 'type' and 'notype' variants. */
 
-/* Was named struct_declarators until C11. */
-notype_member_declarators:
+/* Was named struct_declarator_list until C11. */
+notype_member_declarator_list:
 	notype_member_declarator {
 		$$ = declare_member($1);
 	}
-|	notype_member_declarators {
+|	notype_member_declarator_list {
 		set_sym_kind(SK_MEMBER);
 	} T_COMMA type_member_declarator {
 		$$ = concat_symbols($1, declare_member($4));
 	}
 ;
 
-/* Was named struct_declarators until C11. */
-type_member_declarators:
+/* Was named struct_declarator_list until C11. */
+type_member_declarator_list:
 	type_member_declarator {
 		$$ = declare_member($1);
 	}
-|	type_member_declarators {
+|	type_member_declarator_list {
 		set_sym_kind(SK_MEMBER);
 	} T_COMMA type_member_declarator {
 		$$ = concat_symbols($1, declare_member($4));
@@ -2098,7 +2098,7 @@ for_start:			/* see C99 6.8.5 */
 for_exprs:			/* see C99 6.8.5 */
 	for_start
 	begin_type_declaration_specifiers end_type
-	notype_init_declarators T_SEMI
+	notype_init_declarator_list T_SEMI
 	expression_opt T_SEMI
 	expression_opt T_RPAREN {
 		/* variable declaration in for loop */
@@ -2200,7 +2200,7 @@ external_declaration:
  * See 'declaration' for all other declarations.
  */
 top_level_declaration:		/* C99 6.9 calls this 

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

2024-05-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu May  9 20:15:05 UTC 2024

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

Log Message:
lint: sort grammar rules according to the order they appear in C23


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

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



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

2024-05-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu May  9 20:15:05 UTC 2024

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

Log Message:
lint: sort grammar rules according to the order they appear in C23


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

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

Modified files:

Index: src/usr.bin/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.496 src/usr.bin/xlint/lint1/cgram.y:1.497
--- src/usr.bin/xlint/lint1/cgram.y:1.496	Thu May  9 11:08:07 2024
+++ src/usr.bin/xlint/lint1/cgram.y	Thu May  9 20:15:05 2024
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.496 2024/05/09 11:08:07 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.497 2024/05/09 20:15:05 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: cgram.y,v 1.496 2024/05/09 11:08:07 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.497 2024/05/09 20:15:05 rillig Exp $");
 #endif
 
 #include 
@@ -328,9 +328,12 @@ is_either(const char *s, const char *a, 
 /* No type for type_attribute. */
 /* No type for begin_type. */
 /* No type for end_type. */
+/* No type for notype_init_declarators. */
+/* No type for type_init_declarators. */
+/* No type for notype_init_declarator. */
+/* No type for type_init_declarator. */
 %type		type_specifier
 %type		notype_type_specifier
-%type		atomic_type_specifier
 %type		struct_or_union_specifier
 %type		struct_or_union
 %type			braced_member_declaration_list
@@ -347,19 +350,17 @@ is_either(const char *s, const char *a, 
 %type			enums_with_opt_comma
 %type			enumerator_list
 %type			enumerator
-%type		type_qualifier
+%type		atomic_type_specifier
 /* No type for atomic. */
-%type		pointer
-%type		type_qualifier_list_opt
-%type		type_qualifier_list
-/* No type for notype_init_declarators. */
-/* No type for type_init_declarators. */
-/* No type for notype_init_declarator. */
-/* No type for type_init_declarator. */
+%type		type_qualifier
 %type			notype_declarator
 %type			type_declarator
 %type			notype_direct_declarator
 %type			type_direct_declarator
+%type		pointer
+%type		type_qualifier_list_opt
+%type		type_qualifier_list
+%type			parameter_declaration
 %type			type_param_declarator
 %type			notype_param_declarator
 %type			direct_param_declarator
@@ -369,13 +370,12 @@ is_either(const char *s, const char *a, 
 %type			identifier_list
 %type		type_name
 %type			abstract_declaration
-%type			abstract_declarator
-%type			direct_abstract_declarator
 %type		abstract_decl_param_list
 /* No type for abstract_decl_lparen. */
 %type		vararg_parameter_type_list
 %type		parameter_type_list
-%type			parameter_declaration
+%type			abstract_declarator
+%type			direct_abstract_declarator
 /* No type for braced_initializer. */
 /* No type for initializer. */
 /* No type for initializer_list. */
@@ -391,8 +391,8 @@ is_either(const char *s, const char *a, 
 /* No type for no_attr_statement. */
 /* No type for non_expr_statement. */
 /* No type for no_attr_non_expr_statement. */
-/* No type for labeled_statement. */
 /* No type for label. */
+/* No type for labeled_statement. */
 /* No type for compound_statement. */
 /* No type for compound_statement_lbrace. */
 /* No type for compound_statement_rbrace. */
@@ -472,7 +472,7 @@ string:
 	}
 ;
 
-/* K 7.1, C90 ???, C99 6.5.1, C11 6.5.1 */
+/* K 7.1, C90 ???, C99 6.5.1, C11 6.5.1, C23 6.5.2 */
 primary_expression:
 	T_NAME {
 		bool sys_name, sys_next;
@@ -541,7 +541,7 @@ member_designator:
 	}
 ;
 
-/* K ---, C90 ---, C99 ---, C11 6.5.1.1 */
+/* K ---, C90 ---, C99 ---, C11 6.5.1.1, C23 6.5.2.1 */
 generic_selection:
 	T_GENERIC T_LPAREN assignment_expression T_COMMA
 	generic_assoc_list T_RPAREN {
@@ -551,7 +551,7 @@ generic_selection:
 	}
 ;
 
-/* K ---, C90 ---, C99 ---, C11 6.5.1.1 */
+/* K ---, C90 ---, C99 ---, C11 6.5.1.1, C23 6.5.2.1 */
 generic_assoc_list:
 	generic_association
 |	generic_assoc_list T_COMMA generic_association {
@@ -560,7 +560,7 @@ generic_assoc_list:
 	}
 ;
 
-/* K ---, C90 ---, C99 ---, C11 6.5.1.1 */
+/* K ---, C90 ---, C99 ---, C11 6.5.1.1, C23 6.5.2.1 */
 generic_association:
 	type_name T_COLON assignment_expression {
 		$$ = block_zero_alloc(sizeof(*$$), "generic");
@@ -574,7 +574,7 @@ generic_association:
 	}
 ;
 
-/* K 7.1, C90 ???, C99 6.5.2, C11 6.5.2, C23 6.5.2 */
+/* K 7.1, C90 ???, C99 6.5.2, C11 6.5.2, C23 6.5.3.1 */
 postfix_expression:
 	primary_expression
 |	postfix_expression T_LBRACK sys expression T_RBRACK {
@@ -594,7 +594,8 @@ postfix_expression:
 |	postfix_expression T_INCDEC sys {
 		$$ = build_unary($2 ? INCAFT : DECAFT, $3, $1);
 	}
-|	T_LPAREN type_name T_RPAREN {	/* C99 6.5.2.5 "Compound literals" */
+	/* Rule 'compound_literal' from C99 6.5.2.5. */
+|	T_LPAREN type_name T_RPAREN {
 		sym_t *tmp = mktempsym($2);
 		begin_initialization(tmp);
 		

CVS commit: src/lib/libm/compiler_rt

2024-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May  9 19:54:38 UTC 2024

Modified Files:
src/lib/libm/compiler_rt: Makefile.inc

Log Message:
libm: No divtc3.c or multc3.c in sparc64's compat sparc library.

compat/sparc64/sparc/bsd.sparc.mk doesn't define LIBC_MACHINE_CPU,
only LIBC_MACHINE_ARCH, so when the compat build gets to this
conditional, LIBC_MACHINE_CPU is just MACHINE_CPU, i.e., sparc64.

Since there's no `sparc64el' or `sparc64hf-el' that we need to
canonicalize by MACHINE_ARCH -> MACHINE_CPU, just use
LIBC_MACHINE_ARCH here.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libm/compiler_rt/Makefile.inc

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

Modified files:

Index: src/lib/libm/compiler_rt/Makefile.inc
diff -u src/lib/libm/compiler_rt/Makefile.inc:1.11 src/lib/libm/compiler_rt/Makefile.inc:1.12
--- src/lib/libm/compiler_rt/Makefile.inc:1.11	Wed Jun 16 05:21:08 2021
+++ src/lib/libm/compiler_rt/Makefile.inc	Thu May  9 19:54:38 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.11 2021/06/16 05:21:08 rin Exp $
+# $NetBSD: Makefile.inc,v 1.12 2024/05/09 19:54:38 riastradh Exp $
 
 COMPILER_RT_DIR=	${NETBSDSRCDIR}/sys/external/bsd/compiler_rt
 COMPILER_RT_SRCDIR=	${COMPILER_RT_DIR}/dist
@@ -24,7 +24,7 @@ GENERIC_SRCS+= \
 	divsc3.c \
 	divxc3.c
 
-.if ${MACHINE_CPU} == "powerpc" || ${LIBC_MACHINE_CPU:U} == "sparc64" || ${LIBC_MACHINE_CPU:U} == "aarch64"
+.if ${MACHINE_CPU} == "powerpc" || ${LIBC_MACHINE_ARCH:U} == "sparc64" || ${LIBC_MACHINE_CPU:U} == "aarch64"
 GENERIC_SRCS+= \
 	divtc3.c \
 	multc3.c



CVS commit: src/lib/libm/compiler_rt

2024-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May  9 19:54:38 UTC 2024

Modified Files:
src/lib/libm/compiler_rt: Makefile.inc

Log Message:
libm: No divtc3.c or multc3.c in sparc64's compat sparc library.

compat/sparc64/sparc/bsd.sparc.mk doesn't define LIBC_MACHINE_CPU,
only LIBC_MACHINE_ARCH, so when the compat build gets to this
conditional, LIBC_MACHINE_CPU is just MACHINE_CPU, i.e., sparc64.

Since there's no `sparc64el' or `sparc64hf-el' that we need to
canonicalize by MACHINE_ARCH -> MACHINE_CPU, just use
LIBC_MACHINE_ARCH here.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libm/compiler_rt/Makefile.inc

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



CVS commit: src/distrib/common

2024-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu May  9 16:09:03 UTC 2024

Modified Files:
src/distrib/common: Makefile.bootcd

Log Message:
Remove the -xx, now we have the list of 20 platforms that have incomplete
fspecs. Instead of augmenting the platform spec with an autogenerated one,
we should understand why we have missing entries in the first place.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/distrib/common/Makefile.bootcd

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



CVS commit: src/distrib/common

2024-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu May  9 16:09:03 UTC 2024

Modified Files:
src/distrib/common: Makefile.bootcd

Log Message:
Remove the -xx, now we have the list of 20 platforms that have incomplete
fspecs. Instead of augmenting the platform spec with an autogenerated one,
we should understand why we have missing entries in the first place.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/distrib/common/Makefile.bootcd

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

Modified files:

Index: src/distrib/common/Makefile.bootcd
diff -u src/distrib/common/Makefile.bootcd:1.51 src/distrib/common/Makefile.bootcd:1.52
--- src/distrib/common/Makefile.bootcd:1.51	Wed May  8 23:41:05 2024
+++ src/distrib/common/Makefile.bootcd	Thu May  9 12:09:03 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.51 2024/05/09 03:41:05 kre Exp $
+#	$NetBSD: Makefile.bootcd,v 1.52 2024/05/09 16:09:03 christos Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -285,7 +285,7 @@ copy-releasedir:
 	fi;\
 	${CDSETSCMD} ./maketars -i "${CUROBJDIR}/cdrom"			\
 	${CD_METALOG.unpriv} ${mtunpriv} -N ${NETBSDSRCDIR}/etc	\
-	-F "${CUROBJDIR}/cdrom/etc/mtree" -xx			\
+	-F "${CUROBJDIR}/cdrom/etc/mtree" \
 	-d "${DESTDIR:S,^$,/,}" ${set}
 .endfor
 	if [ -d "${CUROBJDIR}/cdrom/var/spool/ftp/hidden" ]; then	\
@@ -322,8 +322,8 @@ image:
 .if defined(SPEC_EXTRA)
 	cat ${SPEC_EXTRA} >> ${WORKSPEC}
 .endif
-	${MAKESPEC} cdrom >> ${WORKSPEC}
-	${TOOL_MAKEFS} -N ${NETBSDSRCDIR}/etc -t cd9660 -F ${WORKSPEC} -xx \
+	if [ ! -s ${WORKSPEC} ]; then ${MAKESPEC} cdrom > ${WORKSPEC}; fi
+	${TOOL_MAKEFS} -N ${NETBSDSRCDIR}/etc -t cd9660 -F ${WORKSPEC} \
 	${MAKEFS_TIMESTAMP} ${CDMAKEFSEXTRAOPTS} -o ${_CDMAKEFSOPTIONS:Q} \
 	${CDIMAGE} cdrom
 



CVS commit: src/distrib/sets/lists

2024-05-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu May  9 15:54:58 UTC 2024

Modified Files:
src/distrib/sets/lists/base32: ad.riscv64
src/distrib/sets/lists/debug32: ad.riscv64

Log Message:
fix gcc 12 builds.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/base32/ad.riscv64
cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/debug32/ad.riscv64

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.riscv64
diff -u src/distrib/sets/lists/base32/ad.riscv64:1.5 src/distrib/sets/lists/base32/ad.riscv64:1.6
--- src/distrib/sets/lists/base32/ad.riscv64:1.5	Mon May  6 08:38:51 2024
+++ src/distrib/sets/lists/base32/ad.riscv64	Thu May  9 15:54:58 2024
@@ -1,4 +1,4 @@
-# $NetBSD: ad.riscv64,v 1.5 2024/05/06 08:38:51 mrg Exp $
+# $NetBSD: ad.riscv64,v 1.6 2024/05/09 15:54:58 mrg Exp $
 ./lib/rv32	base-compat-shlib	compat
 ./lib/rv32/npf	base-compat-shlib	compat,npf
 ./lib/rv32/npf/ext_log.so			base-compat-shlib	compat,npf
@@ -88,8 +88,10 @@
 ./usr/lib/rv32/libarchive.so.5			base-compat-shlib	compat
 ./usr/lib/rv32/libarchive.so.5.0		base-compat-shlib	compat
 ./usr/lib/rv32/libasan.so			base-compat-shlib	compat,gcc,cxx
-./usr/lib/rv32/libasan.so.5			base-compat-shlib	compat,gcc,cxx
-./usr/lib/rv32/libasan.so.5.0			base-compat-shlib	compat,gcc,cxx
+./usr/lib/rv32/libasan.so.5			base-compat-shlib	compat,gcc=10,cxx
+./usr/lib/rv32/libasan.so.5.0			base-compat-shlib	compat,gcc=10,cxx
+./usr/lib/rv32/libasan.so.6			base-compat-shlib	compat,gcc=12,cxx
+./usr/lib/rv32/libasan.so.6.0			base-compat-shlib	compat,gcc=12,cxx
 ./usr/lib/rv32/libasn1.so			base-compat-shlib	compat,kerberos
 ./usr/lib/rv32/libasn1.so.10			base-compat-shlib	compat,kerberos
 ./usr/lib/rv32/libasn1.so.10.0			base-compat-shlib	compat,kerberos
@@ -198,8 +200,10 @@
 ./usr/lib/rv32/libgnumalloc.so.1		base-compat-shlib	compat
 ./usr/lib/rv32/libgnumalloc.so.1.0		base-compat-shlib	compat
 ./usr/lib/rv32/libgomp.so			base-compat-shlib	compat,gcc
-./usr/lib/rv32/libgomp.so.2			base-compat-shlib	compat,gcc
-./usr/lib/rv32/libgomp.so.2.1			base-compat-shlib	compat,gcc
+./usr/lib/rv32/libgomp.so.2			base-compat-shlib	compat,gcc=10
+./usr/lib/rv32/libgomp.so.2.1			base-compat-shlib	compat,gcc=10
+./usr/lib/rv32/libgomp.so.2			base-compat-shlib	compat,gcc=12
+./usr/lib/rv32/libgomp.so.2.2			base-compat-shlib	compat,gcc=12
 ./usr/lib/rv32/libgssapi.so			base-compat-shlib	compat,kerberos
 ./usr/lib/rv32/libgssapi.so.12			base-compat-shlib	compat,kerberos
 ./usr/lib/rv32/libgssapi.so.12.0		base-compat-shlib	compat,kerberos
@@ -270,8 +274,10 @@
 ./usr/lib/rv32/libldap_r.so.6			base-compat-shlib	compat,ldap
 ./usr/lib/rv32/libldap_r.so.6.0		base-compat-shlib	compat,ldap
 ./usr/lib/rv32/liblsan.so			base-compat-shlib	compat,cxx,gcc
-./usr/lib/rv32/liblsan.so.2			base-compat-shlib	compat,cxx,gcc
-./usr/lib/rv32/liblsan.so.2.0			base-compat-shlib	compat,cxx,gcc
+./usr/lib/rv32/liblsan.so.2			base-compat-shlib	compat,cxx,gcc=10
+./usr/lib/rv32/liblsan.so.2.0			base-compat-shlib	compat,cxx,gcc=10
+./usr/lib/rv32/liblsan.so.3			base-compat-shlib	compat,cxx,gcc=12
+./usr/lib/rv32/liblsan.so.3.0			base-compat-shlib	compat,cxx,gcc=12
 ./usr/lib/rv32/liblua.so			base-compat-shlib	compat
 ./usr/lib/rv32/liblua.so.6			base-compat-shlib	compat
 ./usr/lib/rv32/liblua.so.6.1			base-compat-shlib	compat
@@ -418,7 +424,8 @@
 ./usr/lib/rv32/libssl.so.15.0			base-compat-shlib	compat
 ./usr/lib/rv32/libstdc++.so			base-compat-shlib	compat,gcc,cxx,libstdcxx
 ./usr/lib/rv32/libstdc++.so.9			base-compat-shlib	compat,gcc,cxx,libstdcxx
-./usr/lib/rv32/libstdc++.so.9.0		base-compat-shlib	compat,gcc,cxx,libstdcxx
+./usr/lib/rv32/libstdc++.so.9.0			base-compat-shlib	compat,gcc=10,cxx,libstdcxx
+./usr/lib/rv32/libstdc++.so.9.1			base-compat-shlib	compat,gcc=12,cxx,libstdcxx
 ./usr/lib/rv32/libtermcap.so			base-compat-shlib	compat
 ./usr/lib/rv32/libtermcap.so.0			base-compat-shlib	compat
 ./usr/lib/rv32/libtermcap.so.0.6		base-compat-shlib	compat
@@ -432,8 +439,10 @@
 ./usr/lib/rv32/libtre.so.0			base-compat-shlib	compat
 ./usr/lib/rv32/libtre.so.0.8			base-compat-shlib	compat
 ./usr/lib/rv32/libubsan.so			base-compat-shlib	compat,gcc,cxx
-./usr/lib/rv32/libubsan.so.4			base-compat-shlib	compat,gcc,cxx
-./usr/lib/rv32/libubsan.so.4.0			base-compat-shlib	compat,gcc,cxx
+./usr/lib/rv32/libubsan.so.4			base-compat-shlib	compat,gcc=10,cxx
+./usr/lib/rv32/libubsan.so.4.0			base-compat-shlib	compat,gcc=10,cxx
+./usr/lib/rv32/libubsan.so.5			base-compat-shlib	compat,gcc=12,cxx
+./usr/lib/rv32/libubsan.so.5.0			base-compat-shlib	compat,gcc=12,cxx
 ./usr/lib/rv32/libukfs.so			base-compat-shlib	compat
 ./usr/lib/rv32/libukfs.so.1			base-compat-shlib	compat
 ./usr/lib/rv32/libukfs.so.1.0			base-compat-shlib	compat

Index: src/distrib/sets/lists/debug32/ad.riscv64
diff -u src/distrib/sets/lists/debug32/ad.riscv64:1.5 

CVS commit: src/distrib/sets/lists

2024-05-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu May  9 15:54:58 UTC 2024

Modified Files:
src/distrib/sets/lists/base32: ad.riscv64
src/distrib/sets/lists/debug32: ad.riscv64

Log Message:
fix gcc 12 builds.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/base32/ad.riscv64
cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/debug32/ad.riscv64

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



CVS commit: src/sys/arch/hp300/stand/common

2024-05-09 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu May  9 15:11:11 UTC 2024

Modified Files:
src/sys/arch/hp300/stand/common: conf.c conf.h devopen.c scsi.c
scsireg.h scsivar.h sd.c

Log Message:
Add a preliminary CD boot support to uboot for preparation of PR/54455.

Briefly tested on mame, but not enalbed yet.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/hp300/stand/common/conf.c \
src/sys/arch/hp300/stand/common/devopen.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hp300/stand/common/conf.h
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hp300/stand/common/scsi.c \
src/sys/arch/hp300/stand/common/sd.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hp300/stand/common/scsireg.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hp300/stand/common/scsivar.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/hp300/stand/common/conf.c
diff -u src/sys/arch/hp300/stand/common/conf.c:1.14 src/sys/arch/hp300/stand/common/conf.c:1.15
--- src/sys/arch/hp300/stand/common/conf.c:1.14	Sun Dec 11 07:39:30 2022
+++ src/sys/arch/hp300/stand/common/conf.c	Thu May  9 15:11:11 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: conf.c,v 1.14 2022/12/11 07:39:30 tsutsui Exp $	*/
+/*	$NetBSD: conf.c,v 1.15 2024/05/09 15:11:11 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -41,6 +41,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -138,13 +139,16 @@ int	npunit = __arraycount(punitsw);
  * Filesystem configuration
  */
 struct fs_ops file_system_rawfs[1] = { FS_OPS(rawfs) };
-struct fs_ops file_system_ufs[NFSYS_UFS] = {
+struct fs_ops file_system_ufs[NFSYS_FS] = {
 	FS_OPS(ffsv1),
 #ifdef SUPPORT_UFS2
 	FS_OPS(ffsv2),
 #endif
+#ifdef SUPPORT_CD
+	FS_OPS(cd9660),
+#endif
 };
 struct fs_ops file_system_nfs[1] = { FS_OPS(nfs) };
 
-struct fs_ops file_system[NFSYS_UFS];
+struct fs_ops file_system[NFSYS_FS];
 int	nfsys = 1;		/* default value; should be overrieded */
Index: src/sys/arch/hp300/stand/common/devopen.c
diff -u src/sys/arch/hp300/stand/common/devopen.c:1.14 src/sys/arch/hp300/stand/common/devopen.c:1.15
--- src/sys/arch/hp300/stand/common/devopen.c:1.14	Sun Jan 15 06:19:46 2023
+++ src/sys/arch/hp300/stand/common/devopen.c	Thu May  9 15:11:11 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: devopen.c,v 1.14 2023/01/15 06:19:46 tsutsui Exp $	*/
+/*	$NetBSD: devopen.c,v 1.15 2024/05/09 15:11:11 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -105,7 +105,7 @@ devlookup(const char *d, int len)
 			case 4:	/* sd */
 memcpy(file_system, file_system_ufs,
 sizeof(file_system_ufs));
-nfsys = NFSYS_UFS;
+nfsys = NFSYS_FS;
 break;
 
 			case 6:	/* le */
@@ -263,7 +263,7 @@ devopen(struct open_file *f, const char 
 	case 4:		/* sd */
 		memcpy(file_system, file_system_ufs,
 		sizeof(file_system_ufs));
-		nfsys = NFSYS_UFS;
+		nfsys = NFSYS_FS;
 		break;
 
 	case 6:		/* le */

Index: src/sys/arch/hp300/stand/common/conf.h
diff -u src/sys/arch/hp300/stand/common/conf.h:1.3 src/sys/arch/hp300/stand/common/conf.h:1.4
--- src/sys/arch/hp300/stand/common/conf.h:1.3	Sun Dec 11 07:39:30 2022
+++ src/sys/arch/hp300/stand/common/conf.h	Thu May  9 15:11:11 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: conf.h,v 1.3 2022/12/11 07:39:30 tsutsui Exp $	*/
+/*	$NetBSD: conf.h,v 1.4 2024/05/09 15:11:11 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990, 1993
@@ -53,10 +53,16 @@ int sdopen(struct open_file *, ...);
 int sdclose(struct open_file *);
 #endif
 #ifdef SUPPORT_UFS2
-#define NFSYS_UFS	2
+#define NFSYS_UFS2	1
 #else
-#define NFSYS_UFS	1
+#define NFSYS_UFS2	0
 #endif
+#ifdef SUPPORT_CD
+#define NFSYS_CD9660	1
+#else
+#define NFSYS_CD9660	0
+#endif
+#define NFSYS_FS	(1 + NFSYS_UFS2 + NFSYS_CD9660)
 
 #ifdef SUPPORT_ETHERNET
 extern struct netif_driver le_driver;
@@ -72,5 +78,5 @@ extern	struct punitsw punitsw[];
 extern	int npunit;
 
 extern	struct fs_ops file_system_rawfs[1];
-extern	struct fs_ops file_system_ufs[NFSYS_UFS];
+extern	struct fs_ops file_system_ufs[NFSYS_FS];
 extern	struct fs_ops file_system_nfs[1];

Index: src/sys/arch/hp300/stand/common/scsi.c
diff -u src/sys/arch/hp300/stand/common/scsi.c:1.12 src/sys/arch/hp300/stand/common/scsi.c:1.13
--- src/sys/arch/hp300/stand/common/scsi.c:1.12	Sun Jan 15 06:19:46 2023
+++ src/sys/arch/hp300/stand/common/scsi.c	Thu May  9 15:11:11 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: scsi.c,v 1.12 2023/01/15 06:19:46 tsutsui Exp $	*/
+/*	$NetBSD: scsi.c,v 1.13 2024/05/09 15:11:11 tsutsui Exp $	*/
 
 /*
  * This is reported to fix some odd failures when disklabeling
@@ -400,6 +400,19 @@ scsi_read_capacity(int ctlr, int slave, 
 	DATA_IN_PHASE);
 }
 
+#ifdef SUPPORT_CD
+int
+scsi_inquiry(int ctlr, int slave, uint8_t *buf, unsigned int len)
+{
+	struct scsi_softc *hs = _softc[ctlr];
+	static struct scsi_cdb6 cdb = { CMD_INQUIRY };
+
+	cdb.len = len;
+	return scsiicmd(hs, slave, (uint8_t *), sizeof(cdb), 

CVS commit: src/sys/arch/hp300/stand/common

2024-05-09 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu May  9 15:11:11 UTC 2024

Modified Files:
src/sys/arch/hp300/stand/common: conf.c conf.h devopen.c scsi.c
scsireg.h scsivar.h sd.c

Log Message:
Add a preliminary CD boot support to uboot for preparation of PR/54455.

Briefly tested on mame, but not enalbed yet.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/hp300/stand/common/conf.c \
src/sys/arch/hp300/stand/common/devopen.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hp300/stand/common/conf.h
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hp300/stand/common/scsi.c \
src/sys/arch/hp300/stand/common/sd.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hp300/stand/common/scsireg.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hp300/stand/common/scsivar.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/libc/gen

2024-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May  9 14:44:40 UTC 2024

Modified Files:
src/tests/lib/libc/gen: t_fpclassify.c

Log Message:
tests/lib/libc/gen/t_fpclassify: Test fpclassify on non-IEEE754 too.

Just exclude the subnormal parts on non-IEEE754 architectures
according to __FLT/DBL/LDBL_HAS_DENORM__.


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

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



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

2024-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May  9 14:44:40 UTC 2024

Modified Files:
src/tests/lib/libc/gen: t_fpclassify.c

Log Message:
tests/lib/libc/gen/t_fpclassify: Test fpclassify on non-IEEE754 too.

Just exclude the subnormal parts on non-IEEE754 architectures
according to __FLT/DBL/LDBL_HAS_DENORM__.


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

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

Modified files:

Index: src/tests/lib/libc/gen/t_fpclassify.c
diff -u src/tests/lib/libc/gen/t_fpclassify.c:1.5 src/tests/lib/libc/gen/t_fpclassify.c:1.6
--- src/tests/lib/libc/gen/t_fpclassify.c:1.5	Thu May  9 14:13:08 2024
+++ src/tests/lib/libc/gen/t_fpclassify.c	Thu May  9 14:44:39 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fpclassify.c,v 1.5 2024/05/09 14:13:08 riastradh Exp $ */
+/* $NetBSD: t_fpclassify.c,v 1.6 2024/05/09 14:44:39 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -33,21 +33,6 @@
 #include 
 #include 
 
-#ifndef _FLOAT_IEEE754
-
-ATF_TC(no_test);
-ATF_TC_HEAD(no_test, tc)
-{
-	atf_tc_set_md_var(tc, "descr", "Dummy test");
-}
-
-ATF_TC_BODY(no_test,tc)
-{
-	atf_tc_skip("Test not available on this architecture");
-}
-
-#else /* defined(_FLOAT_IEEE754) */
-
 ATF_TC(fpclassify_float);
 ATF_TC_HEAD(fpclassify_float, tc)
 {
@@ -75,6 +60,7 @@ ATF_TC_BODY(fpclassify_float, tc)
 	d0, f, e, 0.5, FLT_MIN_EXP);
 	d1 = d0;
 
+#ifdef __FLT_HAS_DENORM__
 	/* shift a "1" bit through the mantissa (skip the implicit bit) */
 	for (i = 1; i < FLT_MANT_DIG; i++) {
 		d1 /= 2;
@@ -108,6 +94,7 @@ ATF_TC_BODY(fpclassify_float, tc)
 		" expected normalized %a, exponent %d",
 		i, d1, f, e, 0.5, FLT_MIN_EXP - i);
 	}
+#endif
 
 	d1 /= 2;
 	ATF_CHECK_EQ_MSG(fpclassify(d1), FP_ZERO,
@@ -151,6 +138,7 @@ ATF_TC_BODY(fpclassify_double, tc)
 	d0, f, e, 0.5, DBL_MIN_EXP);
 	d1 = d0;
 
+#ifdef __DBL_HAS_DENORM__
 	/* shift a "1" bit through the mantissa (skip the implicit bit) */
 	for (i = 1; i < DBL_MANT_DIG; i++) {
 		d1 /= 2;
@@ -184,6 +172,7 @@ ATF_TC_BODY(fpclassify_double, tc)
 		" expected normalized %a, exponent %d",
 		i, d1, f, e, 0.5, DBL_MIN_EXP - i);
 	}
+#endif
 
 	d1 /= 2;
 	ATF_CHECK_EQ_MSG(fpclassify(d1), FP_ZERO,
@@ -227,6 +216,7 @@ ATF_TC_BODY(fpclassify_long_double, tc)
 	d0, f, e, 0.5L, LDBL_MIN_EXP);
 	d1 = d0;
 
+#ifdef __LDBL_HAS_DENORM__
 	/* shift a "1" bit through the mantissa (skip the implicit bit) */
 	for (i = 1; i < LDBL_MANT_DIG; i++) {
 		d1 /= 2;
@@ -260,6 +250,7 @@ ATF_TC_BODY(fpclassify_long_double, tc)
 		" expected normalized %La, exponent %d",
 		i, d1, f, e, 0.5L, LDBL_MIN_EXP - i);
 	}
+#endif
 
 	d1 /= 2;
 	ATF_CHECK_EQ_MSG(fpclassify(d1), FP_ZERO,
@@ -276,18 +267,12 @@ ATF_TC_BODY(fpclassify_long_double, tc)
 	d1, f, e, 0.L, 0);
 }
 
-#endif /* _FLOAT_IEEE754 */
-
 ATF_TP_ADD_TCS(tp)
 {
 
-#ifndef _FLOAT_IEEE754
-	ATF_TP_ADD_TC(tp, no_test);
-#else
 	ATF_TP_ADD_TC(tp, fpclassify_float);
 	ATF_TP_ADD_TC(tp, fpclassify_double);
 	ATF_TP_ADD_TC(tp, fpclassify_long_double);
-#endif /* _FLOAT_IEEE754 */
 
 	return atf_no_error();
 }



CVS commit: src/lib/libm

2024-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May  9 14:42:10 UTC 2024

Modified Files:
src/lib/libm: Makefile m.vax.expsym
Added Files:
src/lib/libm/noieee_src: n_frexpf.c n_frexpl.c

Log Message:
libm: Add frexpf and frexpl on VAX.

These are trivial subroutines, not symbol aliases, for separate
reasons:

- frexpf has a different ABI from frexp (float vs double argument)

- frexp is defined in libc, not libm, so although long double is the
  same as double, frexpl can't be an alias in libm of a symbol
  defined in libc


To generate a diff of this commit:
cvs rdiff -u -r1.233 -r1.234 src/lib/libm/Makefile
cvs rdiff -u -r1.3 -r1.4 src/lib/libm/m.vax.expsym
cvs rdiff -u -r0 -r1.1 src/lib/libm/noieee_src/n_frexpf.c \
src/lib/libm/noieee_src/n_frexpl.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/Makefile
diff -u src/lib/libm/Makefile:1.233 src/lib/libm/Makefile:1.234
--- src/lib/libm/Makefile:1.233	Thu May  9 00:04:23 2024
+++ src/lib/libm/Makefile	Thu May  9 14:42:09 2024
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.233 2024/05/09 00:04:23 riastradh Exp $
+#  $NetBSD: Makefile,v 1.234 2024/05/09 14:42:09 riastradh Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -359,8 +359,9 @@ COPTS.compat_cabsf.c=	${${ACTIVE_CC} == 
 # math routines for non-IEEE architectures.
 NOIEEE_SRCS = n_asincos.c n_acosh.c n_asinh.c n_atan.c n_atanh.c n_atanhf.c \
 	n_cosh.c \
-	n_erf.c n_exp.c n_exp2.c n_exp2f.c n_exp__E.c n_expm1.c n_floor.c \
-	n_fmod.c n_gamma.c n_ilogb.c \
+	n_erf.c n_exp.c n_exp2.c n_exp2f.c n_exp__E.c n_expm1.c \
+	n_floor.c n_fmod.c n_frexpf.c n_frexpl.c \
+	n_gamma.c n_ilogb.c \
 	n_lgamma.c n_j0.c n_j1.c n_jn.c n_log.c n_log10.c n_log1p.c \
 	n_log2.c n_log__L.c n_pow.c n_sinh.c n_tanh.c \
 	n_sincos.c n_sincos1.c n_tan.c \

Index: src/lib/libm/m.vax.expsym
diff -u src/lib/libm/m.vax.expsym:1.3 src/lib/libm/m.vax.expsym:1.4
--- src/lib/libm/m.vax.expsym:1.3	Wed May  8 02:08:11 2024
+++ src/lib/libm/m.vax.expsym	Thu May  9 14:42:09 2024
@@ -188,6 +188,8 @@ fminf
 fmod
 fmodf
 fmodl
+frexpf
+frexpl
 gamma
 hypot
 hypotf

Added files:

Index: src/lib/libm/noieee_src/n_frexpf.c
diff -u /dev/null src/lib/libm/noieee_src/n_frexpf.c:1.1
--- /dev/null	Thu May  9 14:42:10 2024
+++ src/lib/libm/noieee_src/n_frexpf.c	Thu May  9 14:42:10 2024
@@ -0,0 +1,52 @@
+/*	$NetBSD: n_frexpf.c,v 1.1 2024/05/09 14:42:10 riastradh Exp $	*/
+
+/*-
+ * Copyright (c) 2024 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include 
+__RCSID("$NetBSD: n_frexpf.c,v 1.1 2024/05/09 14:42:10 riastradh Exp $");
+
+#include "namespace.h"
+
+#include 
+
+float
+frexpf(float x, int *e)
+{
+
+	/*
+	 * We assume every value representable by float is also
+	 * representable by double.  The normalized result of frexp
+	 * differs only by the exponent, which is set to -1 (result
+	 * lies in [1/2, 1) or is zero), so it is also still
+	 * representable by float.
+	 *
+	 * This can't simply be a symbol alias, however, because the
+	 * ABI of float frexpf(float, int *) is different from the ABI
+	 * of double frexp(double, int *).
+	 */
+	return frexp(x, e);
+}
Index: src/lib/libm/noieee_src/n_frexpl.c
diff -u /dev/null src/lib/libm/noieee_src/n_frexpl.c:1.1
--- /dev/null	Thu May  9 14:42:10 2024
+++ src/lib/libm/noieee_src/n_frexpl.c	Thu May  9 14:42:10 2024
@@ -0,0 +1,50 @@
+/*	$NetBSD: n_frexpl.c,v 1.1 2024/05/09 14:42:10 riastradh Exp $	*/
+
+/*-
+ * Copyright (c) 2024 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or 

CVS commit: src/lib/libm

2024-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May  9 14:42:10 UTC 2024

Modified Files:
src/lib/libm: Makefile m.vax.expsym
Added Files:
src/lib/libm/noieee_src: n_frexpf.c n_frexpl.c

Log Message:
libm: Add frexpf and frexpl on VAX.

These are trivial subroutines, not symbol aliases, for separate
reasons:

- frexpf has a different ABI from frexp (float vs double argument)

- frexp is defined in libc, not libm, so although long double is the
  same as double, frexpl can't be an alias in libm of a symbol
  defined in libc


To generate a diff of this commit:
cvs rdiff -u -r1.233 -r1.234 src/lib/libm/Makefile
cvs rdiff -u -r1.3 -r1.4 src/lib/libm/m.vax.expsym
cvs rdiff -u -r0 -r1.1 src/lib/libm/noieee_src/n_frexpf.c \
src/lib/libm/noieee_src/n_frexpl.c

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



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

2024-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May  9 14:13:09 UTC 2024

Modified Files:
src/tests/lib/libc/gen: t_fpclassify.c

Log Message:
tests/lib/libc/gen/t_fpclassify: Spruce this up a bit.

Provide more useful diagnostics when tests fail.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/gen/t_fpclassify.c

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



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

2024-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May  9 14:13:09 UTC 2024

Modified Files:
src/tests/lib/libc/gen: t_fpclassify.c

Log Message:
tests/lib/libc/gen/t_fpclassify: Spruce this up a bit.

Provide more useful diagnostics when tests fail.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/gen/t_fpclassify.c

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

Modified files:

Index: src/tests/lib/libc/gen/t_fpclassify.c
diff -u src/tests/lib/libc/gen/t_fpclassify.c:1.4 src/tests/lib/libc/gen/t_fpclassify.c:1.5
--- src/tests/lib/libc/gen/t_fpclassify.c:1.4	Tue May  7 21:00:00 2024
+++ src/tests/lib/libc/gen/t_fpclassify.c	Thu May  9 14:13:08 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fpclassify.c,v 1.4 2024/05/07 21:00:00 riastradh Exp $ */
+/* $NetBSD: t_fpclassify.c,v 1.5 2024/05/09 14:13:08 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -61,35 +61,67 @@ ATF_TC_BODY(fpclassify_float, tc)
 	int e, i;
 
 	d0 = FLT_MIN;
-	ATF_REQUIRE_EQ(fpclassify(d0), FP_NORMAL);
+	ATF_CHECK_EQ_MSG(fpclassify(d0), FP_NORMAL,
+	"fpclassify(%a)=%d FP_NORMAL=%d",
+	d0, fpclassify(d0), FP_NORMAL);
 	f = frexpf(d0, );
-	ATF_REQUIRE_EQ(e, FLT_MIN_EXP);
-	ATF_REQUIRE_EQ(f, 0.5);
+	ATF_CHECK_EQ_MSG(e, FLT_MIN_EXP,
+	"frexpf(%a) returned normalized %a, exponent %d;"
+	" expected normalized %a, exponent %d",
+	d0, f, e, 0.5, FLT_MIN_EXP);
+	ATF_CHECK_EQ_MSG(f, 0.5,
+	"frexpf(%a) returned normalized %a, exponent %d;"
+	" expected normalized %a, exponent %d",
+	d0, f, e, 0.5, FLT_MIN_EXP);
 	d1 = d0;
 
 	/* shift a "1" bit through the mantissa (skip the implicit bit) */
 	for (i = 1; i < FLT_MANT_DIG; i++) {
 		d1 /= 2;
-		ATF_REQUIRE_EQ(fpclassify(d1), FP_SUBNORMAL);
-		ATF_REQUIRE(d1 > 0 && d1 < d0);
+		ATF_CHECK_EQ_MSG(fpclassify(d1), FP_SUBNORMAL,
+		"[%d] fpclassify(%a)=%d FP_SUBNORMAL=%d",
+		i, d1, fpclassify(d1), FP_SUBNORMAL);
+		ATF_CHECK_MSG(d1 > 0 && d1 < d0,
+		"[%d] d1=%a d0=%a", i, d1, d0);
 
 		d2 = ldexpf(d0, -i);
-		ATF_REQUIRE_EQ(d2, d1);
+		ATF_CHECK_EQ_MSG(d2, d1, "[%d] ldexpf(%a, -%d)=%a != %a",
+		i, d0, i, d2, d1);
 
 		d2 = modff(d1, );
-		ATF_REQUIRE_EQ(d2, d1);
-		ATF_REQUIRE_EQ(ip, 0);
+		ATF_CHECK_EQ_MSG(d2, d1,
+		"[%d] modff(%a) returned int %a, frac %a;"
+		" expected int %a, frac %a",
+		i, d1, ip, d2, 0., d1);
+		ATF_CHECK_EQ_MSG(ip, 0,
+		"[%d] modff(%a) returned int %a, frac %a;"
+		" expected int %a, frac %a",
+		i, d1, ip, d2, 0., d1);
 
 		f = frexpf(d1, );
-		ATF_REQUIRE_EQ(e, FLT_MIN_EXP - i);
-		ATF_REQUIRE_EQ(f, 0.5);
+		ATF_CHECK_EQ_MSG(e, FLT_MIN_EXP - i,
+		"[%d] frexpf(%a) returned normalized %a, exponent %d;"
+		" expected normalized %a, exponent %d",
+		i, d1, f, e, 0.5, FLT_MIN_EXP - i);
+		ATF_CHECK_EQ_MSG(f, 0.5,
+		"[%d] frexpf(%a) returned normalized %a, exponent %d;"
+		" expected normalized %a, exponent %d",
+		i, d1, f, e, 0.5, FLT_MIN_EXP - i);
 	}
 
 	d1 /= 2;
-	ATF_REQUIRE_EQ(fpclassify(d1), FP_ZERO);
+	ATF_CHECK_EQ_MSG(fpclassify(d1), FP_ZERO,
+	"fpclassify(%a)=%d FP_ZERO=%d",
+	d1, fpclassify(d1), FP_ZERO);
 	f = frexpf(d1, );
-	ATF_REQUIRE_EQ(e, 0);
-	ATF_REQUIRE_EQ(f, 0);
+	ATF_CHECK_EQ_MSG(e, 0,
+	"frexpf(%a) returned normalized %a, exponent %d;"
+	" expected normalized %a, exponent %d",
+	d1, f, e, 0., 0);
+	ATF_CHECK_EQ_MSG(f, 0,
+	"frexpf(%a) returned normalized %a, exponent %d;"
+	" expected normalized %a, exponent %d",
+	d1, f, e, 0., 0);
 }
 
 ATF_TC(fpclassify_double);
@@ -105,35 +137,67 @@ ATF_TC_BODY(fpclassify_double, tc)
 	int e, i;
 
 	d0 = DBL_MIN;
-	ATF_REQUIRE_EQ(fpclassify(d0), FP_NORMAL);
+	ATF_CHECK_EQ_MSG(fpclassify(d0), FP_NORMAL,
+	"fpclassify(%a)=%d FP_NORMAL=%d",
+	d0, fpclassify(d0), FP_NORMAL);
 	f = frexp(d0, );
-	ATF_REQUIRE_EQ(e, DBL_MIN_EXP);
-	ATF_REQUIRE_EQ(f, 0.5);
+	ATF_CHECK_EQ_MSG(e, DBL_MIN_EXP,
+	"frexp(%a) returned normalized %a, exponent %d;"
+	" expected normalized %a, exponent %d",
+	d0, f, e, 0.5, DBL_MIN_EXP);
+	ATF_CHECK_EQ_MSG(f, 0.5,
+	"frexp(%a) returned normalized %a, exponent %d;"
+	" expected normalized %a, exponent %d",
+	d0, f, e, 0.5, DBL_MIN_EXP);
 	d1 = d0;
 
 	/* shift a "1" bit through the mantissa (skip the implicit bit) */
 	for (i = 1; i < DBL_MANT_DIG; i++) {
 		d1 /= 2;
-		ATF_REQUIRE_EQ(fpclassify(d1), FP_SUBNORMAL);
-		ATF_REQUIRE(d1 > 0 && d1 < d0);
+		ATF_CHECK_EQ_MSG(fpclassify(d1), FP_SUBNORMAL,
+		"[%d] fpclassify(%a)=%d FP_SUBNORMAL=%d",
+		i, d1, fpclassify(d1), FP_SUBNORMAL);
+		ATF_CHECK_MSG(d1 > 0 && d1 < d0,
+		"[%d] d1=%a d0=%a", i, d1, d0);
 
 		d2 = ldexp(d0, -i);
-		ATF_REQUIRE_EQ(d2, d1);
+		ATF_CHECK_EQ_MSG(d2, d1, "[%d] ldexp(%a, -%d)=%a != %a",
+		i, d0, i, d2, d1);
 
 		d2 = modf(d1, );
-		ATF_REQUIRE_EQ(d2, d1);
-		ATF_REQUIRE_EQ(ip, 0);
+		ATF_CHECK_EQ_MSG(d2, d1,
+	

CVS commit: src/tests/lib/libm

2024-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May  9 14:00:59 UTC 2024

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

Log Message:
tests/lib/libm/t_infinity: Remove broken long double conditional.

LDBL_MAX is always defined, so this branch is dead.  (If LDBL_MAX is
not defined, that's a bug in the architecture's float.h, not a reason
to skip a test.)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libm/t_infinity.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-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May  9 14:00:59 UTC 2024

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

Log Message:
tests/lib/libm/t_infinity: Remove broken long double conditional.

LDBL_MAX is always defined, so this branch is dead.  (If LDBL_MAX is
not defined, that's a bug in the architecture's float.h, not a reason
to skip a test.)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libm/t_infinity.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_infinity.c
diff -u src/tests/lib/libm/t_infinity.c:1.6 src/tests/lib/libm/t_infinity.c:1.7
--- src/tests/lib/libm/t_infinity.c:1.6	Wed Sep 26 07:24:38 2012
+++ src/tests/lib/libm/t_infinity.c	Thu May  9 14:00:58 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: t_infinity.c,v 1.6 2012/09/26 07:24:38 jruoho Exp $ */
+/* $NetBSD: t_infinity.c,v 1.7 2024/05/09 14:00:58 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_infinity.c,v 1.6 2012/09/26 07:24:38 jruoho Exp $");
+__RCSID("$NetBSD: t_infinity.c,v 1.7 2024/05/09 14:00:58 riastradh Exp $");
 
 #include 
 #include 
@@ -89,11 +89,6 @@ ATF_TC_HEAD(infinity_long_double, tc)
 
 ATF_TC_BODY(infinity_long_double, tc)
 {
-
-#ifndef LDBL_MAX
-	atf_tc_skip("no long double support on this architecture");
-	return;
-#else
 	long double v;
 
 	v = LDBL_MAX;
@@ -105,7 +100,6 @@ ATF_TC_BODY(infinity_long_double, tc)
 	v *= v;
 	ATF_REQUIRE(isinf(v));
 	ATF_REQUIRE(fpclassify(v) == FP_INFINITE);
-#endif
 }
 
 ATF_TP_ADD_TCS(tp)



CVS commit: src

2024-05-09 Thread Masatake Daimon
Module Name:src
Committed By:   pho
Date:   Thu May  9 12:41:08 UTC 2024

Modified Files:
src/share/man/man4: vmt.4
src/sys/arch/aarch64/aarch64: cpu.c
src/sys/arch/arm/acpi: cpu_acpi.c
src/sys/arch/arm/arm32: cpu.c
src/sys/arch/arm/fdt: cpu_fdt.c
src/sys/arch/arm/include: cpuvar.h
src/sys/arch/arm/mainbus: cpu_mainbus.c

Log Message:
kern/58195: arm: Support drvctl -d and -r for cpufeaturebus

This is required for detaching and re-attaching the vmt(4) driver on aarch64.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/vmt.4
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/aarch64/aarch64/cpu.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/acpi/cpu_acpi.c
cvs rdiff -u -r1.153 -r1.154 src/sys/arch/arm/arm32/cpu.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/arm/fdt/cpu_fdt.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/include/cpuvar.h
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/mainbus/cpu_mainbus.c

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

Modified files:

Index: src/share/man/man4/vmt.4
diff -u src/share/man/man4/vmt.4:1.4 src/share/man/man4/vmt.4:1.5
--- src/share/man/man4/vmt.4:1.4	Thu May  9 12:09:58 2024
+++ src/share/man/man4/vmt.4	Thu May  9 12:41:08 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: vmt.4,v 1.4 2024/05/09 12:09:58 pho Exp $
+.\"	$NetBSD: vmt.4,v 1.5 2024/05/09 12:41:08 pho Exp $
 .\"	$OpenBSD: vmt.4,v 1.4 2010/10/26 05:07:31 jmc Exp $
 .\"
 .\" Copyright (c) 2008 Marco Peereboom 
@@ -78,3 +78,41 @@ The
 .Nm
 driver was written by
 .An David Gwynne Aq Mt d...@openbsd.org .
+.Sh BUGS
+.Nm
+is known to cause a conflict with
+.Xr vmtoolsd 8
+from
+.Li open-vm-tools .
+.Nm
+works by establishing an RPC channel called TCLO between VMware guest and
+host to receive controlling messages from the host. The problem is that
+.Nm
+is essentially a subset of
+.Xr vmtoolsd 8 ,
+and they both use the same RPC channel, but TCLO is never meant to be
+simultaneously used by two distinct services in the same VM guest. So when
+.Xr vmtoolsd 8
+is running while also
+.Nm
+is active, they continually fight for the channel, both get rejected by the
+confused VM host, and neither one can establish a stable communication
+line.
+.Pp
+So before launching
+.Xr vmtoolsd 8
+the
+.Nm
+driver should be detached by running:
+.Bd -literal -offset indent
+# drvctl -d vmt0
+.Ed
+.Pp
+And after terminating
+.Xr vmtoolsd 8
+the
+.Nm
+driver should be re-attached by running:
+.Bd -literal -offset indent
+# drvctl -r -a cpufeaturebus cpu0
+.Ed

Index: src/sys/arch/aarch64/aarch64/cpu.c
diff -u src/sys/arch/aarch64/aarch64/cpu.c:1.75 src/sys/arch/aarch64/aarch64/cpu.c:1.76
--- src/sys/arch/aarch64/aarch64/cpu.c:1.75	Thu May  9 12:09:58 2024
+++ src/sys/arch/aarch64/aarch64/cpu.c	Thu May  9 12:41:08 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.75 2024/05/09 12:09:58 pho Exp $ */
+/* $NetBSD: cpu.c,v 1.76 2024/05/09 12:41:08 pho Exp $ */
 
 /*
  * Copyright (c) 2017 Ryo Shimizu
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.75 2024/05/09 12:09:58 pho Exp $");
+__KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.76 2024/05/09 12:41:08 pho Exp $");
 
 #include "locators.h"
 #include "opt_arm_debug.h"
@@ -60,6 +60,7 @@ __KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.75
 #include 
 
 #include 
+#include 
 #include 
 #ifdef FDT
 #include 
@@ -181,10 +182,28 @@ cpu_attach(device_t dv, cpuid_t id)
 	cpu_setup_aes(dv, ci);
 	cpu_setup_chacha(dv, ci);
 
-	struct cpufeature_attach_args cfaa;
-	memset(, 0, sizeof(cfaa));
-	cfaa.ci = ci;
-	config_found(dv, , NULL, CFARGS(.iattr = "cpufeaturebus"));
+	cpu_rescan(dv, NULL, NULL);
+}
+
+int
+cpu_rescan(device_t dv, const char *ifattr, const int *locators)
+{
+	struct cpu_info *ci = device_private(dv);
+
+	if (ifattr_match(ifattr, "cpufeaturebus")) {
+		struct cpufeature_attach_args cfaa = {
+			.ci = ci,
+		};
+		config_found(dv, , NULL, CFARGS(.iattr = "cpufeaturebus"));
+	}
+
+	return 0;
+}
+
+void
+cpu_childdetached(device_t dv, device_t child)
+{
+	/* Nada */
 }
 
 struct cpuidtab {

Index: src/sys/arch/arm/acpi/cpu_acpi.c
diff -u src/sys/arch/arm/acpi/cpu_acpi.c:1.14 src/sys/arch/arm/acpi/cpu_acpi.c:1.15
--- src/sys/arch/arm/acpi/cpu_acpi.c:1.14	Mon May 16 09:42:32 2022
+++ src/sys/arch/arm/acpi/cpu_acpi.c	Thu May  9 12:41:08 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_acpi.c,v 1.14 2022/05/16 09:42:32 jmcneill Exp $ */
+/* $NetBSD: cpu_acpi.c,v 1.15 2024/05/09 12:41:08 pho Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu_acpi.c,v 1.14 2022/05/16 09:42:32 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_acpi.c,v 1.15 2024/05/09 12:41:08 pho Exp $");
 
 #include 
 #include 
@@ -65,7 +65,9 @@ static void	cpu_acpi_attach(device_t, de
 static void	cpu_acpi_tprof_init(device_t);
 #endif
 
-CFATTACH_DECL_NEW(cpu_acpi, 0, cpu_acpi_match, 

CVS commit: src

2024-05-09 Thread Masatake Daimon
Module Name:src
Committed By:   pho
Date:   Thu May  9 12:41:08 UTC 2024

Modified Files:
src/share/man/man4: vmt.4
src/sys/arch/aarch64/aarch64: cpu.c
src/sys/arch/arm/acpi: cpu_acpi.c
src/sys/arch/arm/arm32: cpu.c
src/sys/arch/arm/fdt: cpu_fdt.c
src/sys/arch/arm/include: cpuvar.h
src/sys/arch/arm/mainbus: cpu_mainbus.c

Log Message:
kern/58195: arm: Support drvctl -d and -r for cpufeaturebus

This is required for detaching and re-attaching the vmt(4) driver on aarch64.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/vmt.4
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/aarch64/aarch64/cpu.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/acpi/cpu_acpi.c
cvs rdiff -u -r1.153 -r1.154 src/sys/arch/arm/arm32/cpu.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/arm/fdt/cpu_fdt.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/include/cpuvar.h
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/mainbus/cpu_mainbus.c

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



CVS commit: src

2024-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May  9 12:24:24 UTC 2024

Modified Files:
src/lib/libc/gdtoa: hdtoa.c
src/tests/lib/libc/stdio: t_printf.c

Log Message:
Revert various broken changes to printf %La (hldtoa).

This reverts:

hdtoa.c 1.12 (PR/56247: Greg A. Woods: printf("%La", LDBL_MIN) dumps core)
hdtoa.c 1.11 (fix tyop)
hdtoa.c 1.10 (Via enh at google dot com in tech-userlevel. Fix handling of
EXT_FRAC{H,L}BITS (although we don't need to since we don't have them).)

The underlying motivation for this change was that when ld128 is
decomposed into 4x32 words, this hldtoa logic is broken.

But we don't decompose ld128 into 4x32 words; we decompose it into
6x64 words.

And the change, which was supposed to be a noop in our case of 2x64
words (or similar for x87 80-bit floating-point), broke it to the
point of causing buffer overruns (PR 56247) which when worked around
led to just incorrect output output (PR 56937).

If we want to make the #ifdefs for 4x32 words work, that's fine, but
we absolutely must have automatic test cases to detect this kind of
regression because %La formatting is extremely important for
diagnosing details of floating-point data since it doesn't involve
rounding in binary formats.  For now I've added some trivial tests;
there is a more extensive test suite inside gdtoa that we need to
wire up before anyone tries any other shenanigans in this code.

PR lib/56937: printf(3) long double %a formatting is broken


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/gdtoa/hdtoa.c
cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libc/stdio/t_printf.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.12 src/lib/libc/gdtoa/hdtoa.c:1.13
--- src/lib/libc/gdtoa/hdtoa.c:1.12	Tue Jun 15 10:56:52 2021
+++ src/lib/libc/gdtoa/hdtoa.c	Thu May  9 12:24:24 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: hdtoa.c,v 1.12 2021/06/15 10:56:52 christos Exp $	*/
+/*	$NetBSD: hdtoa.c,v 1.13 2024/05/09 12:24:24 riastradh 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.12 2021/06/15 10:56:52 christos Exp $");
+__RCSID("$NetBSD: hdtoa.c,v 1.13 2024/05/09 12:24:24 riastradh Exp $");
 #endif
 
 #include 
@@ -256,7 +256,7 @@ char *
 hldtoa(long double e, const char *xdigs, int ndigits, int *decpt, int *sign,
 char **rve)
 {
-	static const int sigfigs = (LDBL_MANT_DIG + 3) / 4 + 1;
+	static const int sigfigs = (LDBL_MANT_DIG + 3) / 4;
 	union ieee_ext_u u;
 	char *s, *s0;
 	size_t bufsize;
@@ -310,34 +310,23 @@ hldtoa(long double e, const char *xdigs,
 	 */
 	for (s = s0 + bufsize - 1; s > s0 + sigfigs - 1; s--)
 		*s = 0;
-	for (; s > s0 + sigfigs -
-	(EXT_FRACLBITS / 4) - 1 && s > s0; s--) {
+	for (; s > s0 + sigfigs - (EXT_FRACLBITS / 4) - 1 && s > s0; s--) {
 		*s = u.extu_ext.ext_fracl & 0xf;
 		u.extu_ext.ext_fracl >>= 4;
 	}
 #ifdef EXT_FRACHMBITS
-	for (; s > s0 + sigfigs - 
-	((EXT_FRACLBITS + EXT_FRACHMBITS) / 4) - 1; s--) {
+	for (; s > s0; s--) {
 		*s = u.extu_ext.ext_frachm & 0xf;
 		u.extu_ext.ext_frachm >>= 4;
 	}
-#else
-#define EXT_FRACHMBITS 0
 #endif
-
 #ifdef EXT_FRACLMBITS
-	for (; s > s0 + sigfigs -
-	((EXT_FRACLBITS + EXT_FRACHMBITS + EXT_FRACLMBITS) / 4) - 1; s--) {
-
+	for (; s > s0; s--) {
 		*s = u.extu_ext.ext_fraclm & 0xf;
 		u.extu_ext.ext_fraclm >>= 4;
 	}
-#else
-#define EXT_FRACLMBITS 0
 #endif
-
-	for (; s > s0 + sigfigs -
-	((EXT_FRACLBITS + EXT_FRACHMBITS + EXT_FRACLMBITS + EXT_FRACHBITS) / 4) - 1; s--) {
+	for (; s > s0; s--) {
 		*s = u.extu_ext.ext_frach & 0xf;
 		u.extu_ext.ext_frach >>= 4;
 	}
@@ -348,7 +337,7 @@ hldtoa(long double e, const char *xdigs,
 	 * (partial) nibble, which is dealt with by the next
 	 * statement.  We also tack on the implicit normalization bit.
 	 */
-	*s = (u.extu_ext.ext_frach | (1U << ((LDBL_MANT_DIG - 1) % 4))) & 0xf;
+	*s = u.extu_ext.ext_frach | (1U << ((LDBL_MANT_DIG - 1) % 4));
 
 	/* If ndigits < 0, we are expected to auto-size the precision. */
 	if (ndigits < 0) {

Index: src/tests/lib/libc/stdio/t_printf.c
diff -u src/tests/lib/libc/stdio/t_printf.c:1.14 src/tests/lib/libc/stdio/t_printf.c:1.15
--- src/tests/lib/libc/stdio/t_printf.c:1.14	Wed May  8 20:23:15 2024
+++ src/tests/lib/libc/stdio/t_printf.c	Thu May  9 12:24:24 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: t_printf.c,v 1.14 2024/05/08 20:23:15 riastradh Exp $ */
+/* $NetBSD: t_printf.c,v 1.15 2024/05/09 12:24:24 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -217,9 +217,6 @@ ATF_TC_BODY(snprintf_long_double_a, tc)
 {
 	char buf[1000];
 
-	atf_tc_expect_fail("PR lib/56937:"
-	" printf(3) long double %%a formatting is broken");
-
 	snprintf(buf, sizeof buf, "%.3La", 10.6L);
 	

CVS commit: src

2024-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May  9 12:24:24 UTC 2024

Modified Files:
src/lib/libc/gdtoa: hdtoa.c
src/tests/lib/libc/stdio: t_printf.c

Log Message:
Revert various broken changes to printf %La (hldtoa).

This reverts:

hdtoa.c 1.12 (PR/56247: Greg A. Woods: printf("%La", LDBL_MIN) dumps core)
hdtoa.c 1.11 (fix tyop)
hdtoa.c 1.10 (Via enh at google dot com in tech-userlevel. Fix handling of
EXT_FRAC{H,L}BITS (although we don't need to since we don't have them).)

The underlying motivation for this change was that when ld128 is
decomposed into 4x32 words, this hldtoa logic is broken.

But we don't decompose ld128 into 4x32 words; we decompose it into
6x64 words.

And the change, which was supposed to be a noop in our case of 2x64
words (or similar for x87 80-bit floating-point), broke it to the
point of causing buffer overruns (PR 56247) which when worked around
led to just incorrect output output (PR 56937).

If we want to make the #ifdefs for 4x32 words work, that's fine, but
we absolutely must have automatic test cases to detect this kind of
regression because %La formatting is extremely important for
diagnosing details of floating-point data since it doesn't involve
rounding in binary formats.  For now I've added some trivial tests;
there is a more extensive test suite inside gdtoa that we need to
wire up before anyone tries any other shenanigans in this code.

PR lib/56937: printf(3) long double %a formatting is broken


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/gdtoa/hdtoa.c
cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libc/stdio/t_printf.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-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May  9 12:23:21 UTC 2024

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

Log Message:
tests/lib/libm/t_ilogb: Expand and tidy.

1. Instead of calling out VAX by name, use #ifdef NAN and
   isinf(INFINITY).  (VAX defines INFINITY even though it's not an
   infinity, not sure if there's a better compile-time test.)

2. Verify ilogbl works on long double on all architectures, not just
   those with __HAVE_LONG_DOUBLE which means long double is _larger_
   than double.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libm/t_ilogb.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_ilogb.c
diff -u src/tests/lib/libm/t_ilogb.c:1.9 src/tests/lib/libm/t_ilogb.c:1.10
--- src/tests/lib/libm/t_ilogb.c:1.9	Thu Jun 14 21:57:25 2018
+++ src/tests/lib/libm/t_ilogb.c	Thu May  9 12:23:21 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ilogb.c,v 1.9 2018/06/14 21:57:25 maya Exp $ */
+/* $NetBSD: t_ilogb.c,v 1.10 2024/05/09 12:23:21 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -28,8 +28,9 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
+
 #include 
-__RCSID("$NetBSD: t_ilogb.c,v 1.9 2018/06/14 21:57:25 maya Exp $");
+__RCSID("$NetBSD: t_ilogb.c,v 1.10 2024/05/09 12:23:21 riastradh Exp $");
 
 #include 
 #include 
@@ -38,10 +39,14 @@ __RCSID("$NetBSD: t_ilogb.c,v 1.9 2018/0
 
 #ifndef __HAVE_FENV
 
-# define ATF_CHECK_RAISED_INVALID
-# define ATF_CHECK_RAISED_NOTHING
+# define ATF_CLEAR_EXCEPTS		__nothing
+# define ATF_CHECK_RAISED_INVALID	__nothing
+# define ATF_CHECK_RAISED_NOTHING	__nothing
+
+#else  /* __HAVE_FENV */
+
+# define ATF_CLEAR_EXCEPTS		(void)feclearexcept(FE_ALL_EXCEPT);
 
-#else
 # define ATF_CHECK_RAISED_INVALID do { \
 	int r = fetestexcept(FE_ALL_EXCEPT); \
 	ATF_CHECK_MSG((r & FE_INVALID) != 0, \
@@ -55,72 +60,65 @@ __RCSID("$NetBSD: t_ilogb.c,v 1.9 2018/0
 	ATF_CHECK_MSG(r == 0, "r=%#x != 0\n", r); \
 	(void)feclearexcept(FE_ALL_EXCEPT); \
 } while (/*CONSTCOND*/0)
-#endif
+
+#endif	/* __HAVE_FENV */
 
 ATF_TC(ilogb);
 ATF_TC_HEAD(ilogb, tc)
 {
-	atf_tc_set_md_var(tc, "descr","Check ilogb family");
+	atf_tc_set_md_var(tc, "descr", "Check ilogb family");
 }
 
 ATF_TC_BODY(ilogb, tc)
 {
 
+	ATF_CLEAR_EXCEPTS;
+
 	ATF_CHECK(ilogbf(0) == FP_ILOGB0);
 	ATF_CHECK_RAISED_INVALID;
 	ATF_CHECK(ilogb(0) == FP_ILOGB0);
 	ATF_CHECK_RAISED_INVALID;
-#ifdef __HAVE_LONG_DOUBLE
 	ATF_CHECK(ilogbl(0) == FP_ILOGB0);
 	ATF_CHECK_RAISED_INVALID;
-#endif
 
-	ATF_CHECK(ilogbf(-0) == FP_ILOGB0);
+	ATF_CHECK(ilogbf(-0.) == FP_ILOGB0);
 	ATF_CHECK_RAISED_INVALID;
-	ATF_CHECK(ilogb(-0) == FP_ILOGB0);
+	ATF_CHECK(ilogb(-0.) == FP_ILOGB0);
 	ATF_CHECK_RAISED_INVALID;
-#ifdef __HAVE_LONG_DOUBLE
-	ATF_CHECK(ilogbl(-0) == FP_ILOGB0);
+	ATF_CHECK(ilogbl(-0.) == FP_ILOGB0);
 	ATF_CHECK_RAISED_INVALID;
-#endif
 
-	ATF_CHECK(ilogbf(INFINITY) == INT_MAX);
-	ATF_CHECK_RAISED_INVALID;
-	ATF_CHECK(ilogb(INFINITY) == INT_MAX);
-	ATF_CHECK_RAISED_INVALID;
-#ifdef __HAVE_LONG_DOUBLE
-	ATF_CHECK(ilogbl(INFINITY) == INT_MAX);
-	ATF_CHECK_RAISED_INVALID;
-#endif
-
-	ATF_CHECK(ilogbf(-INFINITY) == INT_MAX);
-	ATF_CHECK_RAISED_INVALID;
-	ATF_CHECK(ilogb(-INFINITY) == INT_MAX);
-	ATF_CHECK_RAISED_INVALID;
-#ifdef __HAVE_LONG_DOUBLE
-	ATF_CHECK(ilogbl(-INFINITY) == INT_MAX);
-	ATF_CHECK_RAISED_INVALID;
-#endif
+	if (isinf(INFINITY)) {
+		ATF_CHECK(ilogbf(INFINITY) == INT_MAX);
+		ATF_CHECK_RAISED_INVALID;
+		ATF_CHECK(ilogb(INFINITY) == INT_MAX);
+		ATF_CHECK_RAISED_INVALID;
+		ATF_CHECK(ilogbl(INFINITY) == INT_MAX);
+		ATF_CHECK_RAISED_INVALID;
+
+		ATF_CHECK(ilogbf(-INFINITY) == INT_MAX);
+		ATF_CHECK_RAISED_INVALID;
+		ATF_CHECK(ilogb(-INFINITY) == INT_MAX);
+		ATF_CHECK_RAISED_INVALID;
+		ATF_CHECK(ilogbl(-INFINITY) == INT_MAX);
+		ATF_CHECK_RAISED_INVALID;
+	}
 
 	ATF_CHECK(ilogbf(1024) == 10);
 	ATF_CHECK_RAISED_NOTHING;
 	ATF_CHECK(ilogb(1024) == 10);
 	ATF_CHECK_RAISED_NOTHING;
-#ifdef __HAVE_LONG_DOUBLE
 	ATF_CHECK(ilogbl(1024) == 10);
 	ATF_CHECK_RAISED_NOTHING;
-#endif
 
-#ifndef __vax__
+#ifdef NAN
 	ATF_CHECK(ilogbf(NAN) == FP_ILOGBNAN);
 	ATF_CHECK_RAISED_INVALID;
 	ATF_CHECK(ilogb(NAN) == FP_ILOGBNAN);
 	ATF_CHECK_RAISED_INVALID;
-#ifdef __HAVE_LONG_DOUBLE
 	ATF_CHECK(ilogbl(NAN) == FP_ILOGBNAN);
 	ATF_CHECK_RAISED_INVALID;
 #endif
-#endif
 }
 
 ATF_TP_ADD_TCS(tp)



CVS commit: src/tests/lib/libm

2024-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May  9 12:23:21 UTC 2024

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

Log Message:
tests/lib/libm/t_ilogb: Expand and tidy.

1. Instead of calling out VAX by name, use #ifdef NAN and
   isinf(INFINITY).  (VAX defines INFINITY even though it's not an
   infinity, not sure if there's a better compile-time test.)

2. Verify ilogbl works on long double on all architectures, not just
   those with __HAVE_LONG_DOUBLE which means long double is _larger_
   than double.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libm/t_ilogb.c

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



CVS commit: src/lib/libm/noieee_src

2024-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May  9 12:18:48 UTC 2024

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

Log Message:
libm: Define ilogbl as alias for ilogb on vax.

PR 57881


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libm/noieee_src/n_ilogb.c

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



CVS commit: src/lib/libm/noieee_src

2024-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May  9 12:18:48 UTC 2024

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

Log Message:
libm: Define ilogbl as alias for ilogb on vax.

PR 57881


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libm/noieee_src/n_ilogb.c

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

Modified files:

Index: src/lib/libm/noieee_src/n_ilogb.c
diff -u src/lib/libm/noieee_src/n_ilogb.c:1.1 src/lib/libm/noieee_src/n_ilogb.c:1.2
--- src/lib/libm/noieee_src/n_ilogb.c:1.1	Wed Aug 24 09:08:50 2016
+++ src/lib/libm/noieee_src/n_ilogb.c	Thu May  9 12:18:48 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: n_ilogb.c,v 1.1 2016/08/24 09:08:50 christos Exp $	*/
+/*	$NetBSD: n_ilogb.c,v 1.2 2024/05/09 12:18:48 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -30,11 +30,15 @@
  */
 #include 
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: n_ilogb.c,v 1.1 2016/08/24 09:08:50 christos Exp $");
+__RCSID("$NetBSD: n_ilogb.c,v 1.2 2024/05/09 12:18:48 riastradh Exp $");
 #endif
 
 #include "math.h"
 
+#ifndef __HAVE_LONG_DOUBLE
+__strong_alias(ilogbl,ilogb)
+#endif
+
 int
 ilogb(double x)
 {



CVS commit: src/tests/lib/libm

2024-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May  9 12:18:28 UTC 2024

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

Log Message:
tests/lib/libm/t_fe_round.c: Tidy.

nextafter/nexttoward tests didn't make much sense, and are now
supplanted by t_next.

PR misc/58054


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/tests/lib/libm/t_fe_round.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_fe_round.c
diff -u src/tests/lib/libm/t_fe_round.c:1.18 src/tests/lib/libm/t_fe_round.c:1.19
--- src/tests/lib/libm/t_fe_round.c:1.18	Wed May  8 22:59:07 2024
+++ src/tests/lib/libm/t_fe_round.c	Thu May  9 12:18:28 2024
@@ -1,3 +1,5 @@
+/*	$NetBSD: t_fe_round.c,v 1.19 2024/05/09 12:18:28 riastradh Exp $	*/
+
 /*
  * Written by Maya Rashish 
  * Public domain.
@@ -5,20 +7,22 @@
  * Testing IEEE-754 rounding modes (and lrint)
  */
 
+#include 
+__RCSID("$NetBSD: t_fe_round.c,v 1.19 2024/05/09 12:18:28 riastradh Exp $");
+
 #include 
 #include 
-#ifdef __HAVE_FENV
 #include 
 #include 
 #include 
 #include 
 
+#ifdef __HAVE_FENV
+
 /*#pragma STDC FENV_ACCESS ON gcc?? */
 
 #define INT 9223L
 
-#define EPSILON 0.001
-
 static const char *
 rmname(int rm)
 {
@@ -36,6 +40,13 @@ rmname(int rm)
 	}
 }
 
+/*
+ * Examples are chosen to fit within the smallest single-precision
+ * format any NetBSD port uses, so that we can write the examples once
+ * in type double, and convert to single without raising inexact-result
+ * exceptions when we're trying to test whether the integer-rounding
+ * functions raise them.
+ */
 static const struct {
 	int round_mode;
 	double input;
@@ -44,15 +55,13 @@ static const struct {
 	{ FE_DOWNWARD,		3.75,		3},
 	{ FE_DOWNWARD,		-3.75,		-4},
 	{ FE_DOWNWARD,		+0.,		0},
+	{ FE_DOWNWARD,		-0.,		0},
 	{ FE_DOWNWARD,		-INT-0.0625,	-INT-1},
 	{ FE_DOWNWARD,		+INT-0.0625,	INT-1},
 	{ FE_DOWNWARD,		-INT+0.0625,	-INT},
 	{ FE_DOWNWARD,		+INT+0.0625,	INT},
-#if 0 /* cpu bugs? */
-	{ FE_DOWNWARD,		-0.,		-1},
 
-	{ FE_UPWARD,		+0.,		1},
-#endif
+	{ FE_UPWARD,		+0.,		0},
 	{ FE_UPWARD,		-0.,		0},
 	{ FE_UPWARD,		-123.75,	-123},
 	{ FE_UPWARD,		123.75,		124},
@@ -432,68 +441,7 @@ ATF_TC_BODY(fe_nearbyintl_rintl, tc)
 	}
 }
 
-#endif
-
-static const struct {
-	double input;
-	double toward;
-	double expected;
-} values2[] = {
-	{ 10.0, 11.0, 10.0 },
-	{ -5.0, -6.0, -5.0 },
-};
-
-ATF_TC(fe_nextafter);
-ATF_TC_HEAD(fe_nextafter, tc)
-{
-	atf_tc_set_md_var(tc, "descr", "Checking IEEE 754 rounding using nextafter()");
-}
-
-ATF_TC_BODY(fe_nextafter, tc)
-{
-	double received;
-	int res;
-
-	for (unsigned int i = 0; i < __arraycount(values2); i++) {
-		received = nextafter(values2[i].input, values2[i].toward);
-		if (values2[i].input < values2[i].toward) {
-			res = (received > values2[i].input);
-		} else {
-			res = (received < values2[i].input);
-		}
-		ATF_CHECK_MSG(
-			res && (fabs(received - values2[i].expected) < EPSILON),
-			"nextafter() rounding wrong, difference too large\n"
-			"input: %f (index %d): got %f, expected %f, res %d\n",
-			values2[i].input, i, received, values2[i].expected, res);
-	}
-}
-
-ATF_TC(fe_nexttoward);
-ATF_TC_HEAD(fe_nexttoward, tc)
-{
-	atf_tc_set_md_var(tc, "descr", "Checking IEEE 754 rounding using nexttoward()");
-}
-
-ATF_TC_BODY(fe_nexttoward, tc)
-{
-	double received;
-	int res;
-
-	for (unsigned int i = 0; i < __arraycount(values2); i++) {
-		received = nexttoward(values2[i].input, values2[i].toward);
-		if (values2[i].input < values2[i].toward) {
-			res = (received > values2[i].input);
-		} else {
-			res = (received < values2[i].input);
-		}
-		ATF_CHECK_MSG(
-			res && (fabs(received - values2[i].expected) < EPSILON),
-			"nexttoward() rounding wrong, difference too large\n"
-			"input: %f (index %d): got %f, expected %f, res %d\n",
-			values2[i].input, i, received, values2[i].expected, res);
-	}
-}
+#endif	/* __HAVE_LONG_DOUBLE */
 
 ATF_TP_ADD_TCS(tp)
 {
@@ -503,71 +451,19 @@ ATF_TP_ADD_TCS(tp)
 #ifdef __HAVE_LONG_DOUBLE
 	ATF_TP_ADD_TC(tp, fe_nearbyintl_rintl);
 #endif
-	ATF_TP_ADD_TC(tp, fe_nextafter);
-	ATF_TP_ADD_TC(tp, fe_nexttoward);
 
 	return atf_no_error();
 }
-#else
-ATF_TC(t_nofe_round);
 
-ATF_TC_HEAD(t_nofe_round, tc)
-{
-	atf_tc_set_md_var(tc, "descr",
-	"dummy test case - no fenv.h support");
-}
-
-ATF_TC_BODY(t_nofe_round, tc)
-{
-	atf_tc_skip("no fenv.h support on this architecture");
-}
-
-ATF_TC(t_nofe_nearbyint);
-
-ATF_TC_HEAD(t_nofe_nearbyint, tc)
-{
-	atf_tc_set_md_var(tc, "descr",
-	"dummy test case - no fenv.h support");
-}
-
-ATF_TC_BODY(t_nofe_nearbyint, tc)
-{
-	atf_tc_skip("no fenv.h support on this architecture");
-}
-
-ATF_TC(t_nofe_nextafter);
-
-ATF_TC_HEAD(t_nofe_nextafter, tc)
-{
-	atf_tc_set_md_var(tc, "descr",
-	"dummy test case - no fenv.h support");
-}
-
-ATF_TC_BODY(t_nofe_nextafter, tc)
-{
-	atf_tc_skip("no fenv.h support on this architecture");
-}
-

CVS commit: src/tests/lib/libm

2024-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May  9 12:18:28 UTC 2024

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

Log Message:
tests/lib/libm/t_fe_round.c: Tidy.

nextafter/nexttoward tests didn't make much sense, and are now
supplanted by t_next.

PR misc/58054


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/tests/lib/libm/t_fe_round.c

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



CVS commit: src

2024-05-09 Thread Masatake Daimon
Module Name:src
Committed By:   pho
Date:   Thu May  9 12:10:00 UTC 2024

Modified Files:
src/distrib/sets/lists/modules: ad.aarch64
src/share/man/man4: vmt.4
src/sys/arch/aarch64/aarch64: cpu.c
src/sys/arch/aarch64/conf: files.aarch64
src/sys/arch/aarch64/include: cpu.h
src/sys/arch/evbarm/conf: GENERIC64
src/sys/arch/x86/x86: vmt.c
src/sys/dev/fdt: files.fdt
src/sys/dev/vmt: vmt_subr.c
src/sys/modules: Makefile
src/sys/modules/vmt: Makefile
Added Files:
src/sys/arch/aarch64/aarch64: vmt.c
Removed Files:
src/sys/dev/fdt: vmt_fdt.c

Log Message:
port-arm/58194: Resurrect vmt(4) from bitrot

On this architecture vmt(4) used to search for a node "/hypervisor" in the
FDT and probed the VMware hypervisor call only when the node was
found. However, things appear to have changed and VMware no longer provides
the FDT node.

Since vmt(4) doesn't actually need to read anything from FDT, and the
hypervisor call logically resides in virtual CPUs themselves, it would be
better to attach it directly to cpu, just like how it's probed on x86.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/distrib/sets/lists/modules/ad.aarch64
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/vmt.4
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/aarch64/aarch64/cpu.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/aarch64/aarch64/vmt.c
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/aarch64/conf/files.aarch64
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/aarch64/include/cpu.h
cvs rdiff -u -r1.214 -r1.215 src/sys/arch/evbarm/conf/GENERIC64
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/x86/x86/vmt.c
cvs rdiff -u -r1.72 -r1.73 src/sys/dev/fdt/files.fdt
cvs rdiff -u -r1.6 -r0 src/sys/dev/fdt/vmt_fdt.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/vmt/vmt_subr.c
cvs rdiff -u -r1.285 -r1.286 src/sys/modules/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/vmt/Makefile

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/modules/ad.aarch64
diff -u src/distrib/sets/lists/modules/ad.aarch64:1.12 src/distrib/sets/lists/modules/ad.aarch64:1.13
--- src/distrib/sets/lists/modules/ad.aarch64:1.12	Tue Apr 11 10:30:41 2023
+++ src/distrib/sets/lists/modules/ad.aarch64	Thu May  9 12:09:58 2024
@@ -1,4 +1,4 @@
-# $NetBSD: ad.aarch64,v 1.12 2023/04/11 10:30:41 riastradh Exp $
+# $NetBSD: ad.aarch64,v 1.13 2024/05/09 12:09:58 pho Exp $
 ./@MODULEDIR@/amdgpumodules-base-kernel	kmod
 ./@MODULEDIR@/amdgpu/amdgpu.kmod		modules-base-kernel	kmod
 ./@MODULEDIR@/bpfjitmodules-base-kernel	kmod,sljit
@@ -77,3 +77,5 @@
 ./@MODULEDIR@/exec_elf64/exec_elf64.kmod	modules-base-kernel	kmod
 ./@MODULEDIR@/sljitmodules-base-kernel	kmod,sljit
 ./@MODULEDIR@/sljit/sljit.kmod			modules-base-kernel	kmod,sljit
+./@MODULEDIR@/vmtmodules-base-kernel	kmod
+./@MODULEDIR@/vmt/vmt.kmod			modules-base-kernel	kmod

Index: src/share/man/man4/vmt.4
diff -u src/share/man/man4/vmt.4:1.3 src/share/man/man4/vmt.4:1.4
--- src/share/man/man4/vmt.4:1.3	Tue Oct 27 08:57:10 2020
+++ src/share/man/man4/vmt.4	Thu May  9 12:09:58 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: vmt.4,v 1.3 2020/10/27 08:57:10 ryo Exp $
+.\"	$NetBSD: vmt.4,v 1.4 2024/05/09 12:09:58 pho Exp $
 .\"	$OpenBSD: vmt.4,v 1.4 2010/10/26 05:07:31 jmc Exp $
 .\"
 .\" Copyright (c) 2008 Marco Peereboom 
@@ -23,7 +23,6 @@
 .Nd VMware Tools driver
 .Sh SYNOPSIS
 .Cd "vmt0 at cpu0"
-.Cd "vmt0 at fdt?"
 .Sh DESCRIPTION
 The
 .Nm

Index: src/sys/arch/aarch64/aarch64/cpu.c
diff -u src/sys/arch/aarch64/aarch64/cpu.c:1.74 src/sys/arch/aarch64/aarch64/cpu.c:1.75
--- src/sys/arch/aarch64/aarch64/cpu.c:1.74	Wed Feb  7 04:20:26 2024
+++ src/sys/arch/aarch64/aarch64/cpu.c	Thu May  9 12:09:58 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.74 2024/02/07 04:20:26 msaitoh Exp $ */
+/* $NetBSD: cpu.c,v 1.75 2024/05/09 12:09:58 pho Exp $ */
 
 /*
  * Copyright (c) 2017 Ryo Shimizu
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.74 2024/02/07 04:20:26 msaitoh Exp $");
+__KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.75 2024/05/09 12:09:58 pho Exp $");
 
 #include "locators.h"
 #include "opt_arm_debug.h"
@@ -180,6 +180,11 @@ cpu_attach(device_t dv, cpuid_t id)
 	cpu_setup_rng(dv, ci);
 	cpu_setup_aes(dv, ci);
 	cpu_setup_chacha(dv, ci);
+
+	struct cpufeature_attach_args cfaa;
+	memset(, 0, sizeof(cfaa));
+	cfaa.ci = ci;
+	config_found(dv, , NULL, CFARGS(.iattr = "cpufeaturebus"));
 }
 
 struct cpuidtab {

Index: src/sys/arch/aarch64/conf/files.aarch64
diff -u src/sys/arch/aarch64/conf/files.aarch64:1.44 src/sys/arch/aarch64/conf/files.aarch64:1.45
--- src/sys/arch/aarch64/conf/files.aarch64:1.44	Sun Feb 18 09:03:44 2024
+++ src/sys/arch/aarch64/conf/files.aarch64	Thu May  9 12:09:58 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: files.aarch64,v 1.44 2024/02/18 09:03:44 andvar Exp $
+#	$NetBSD: files.aarch64,v 1.45 2024/05/09 12:09:58 pho Exp $
 
 defflag 

CVS commit: src

2024-05-09 Thread Masatake Daimon
Module Name:src
Committed By:   pho
Date:   Thu May  9 12:10:00 UTC 2024

Modified Files:
src/distrib/sets/lists/modules: ad.aarch64
src/share/man/man4: vmt.4
src/sys/arch/aarch64/aarch64: cpu.c
src/sys/arch/aarch64/conf: files.aarch64
src/sys/arch/aarch64/include: cpu.h
src/sys/arch/evbarm/conf: GENERIC64
src/sys/arch/x86/x86: vmt.c
src/sys/dev/fdt: files.fdt
src/sys/dev/vmt: vmt_subr.c
src/sys/modules: Makefile
src/sys/modules/vmt: Makefile
Added Files:
src/sys/arch/aarch64/aarch64: vmt.c
Removed Files:
src/sys/dev/fdt: vmt_fdt.c

Log Message:
port-arm/58194: Resurrect vmt(4) from bitrot

On this architecture vmt(4) used to search for a node "/hypervisor" in the
FDT and probed the VMware hypervisor call only when the node was
found. However, things appear to have changed and VMware no longer provides
the FDT node.

Since vmt(4) doesn't actually need to read anything from FDT, and the
hypervisor call logically resides in virtual CPUs themselves, it would be
better to attach it directly to cpu, just like how it's probed on x86.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/distrib/sets/lists/modules/ad.aarch64
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/vmt.4
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/aarch64/aarch64/cpu.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/aarch64/aarch64/vmt.c
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/aarch64/conf/files.aarch64
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/aarch64/include/cpu.h
cvs rdiff -u -r1.214 -r1.215 src/sys/arch/evbarm/conf/GENERIC64
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/x86/x86/vmt.c
cvs rdiff -u -r1.72 -r1.73 src/sys/dev/fdt/files.fdt
cvs rdiff -u -r1.6 -r0 src/sys/dev/fdt/vmt_fdt.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/vmt/vmt_subr.c
cvs rdiff -u -r1.285 -r1.286 src/sys/modules/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/vmt/Makefile

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



CVS commit: src

2024-05-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu May  9 11:08:07 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: c23.c
src/usr.bin/xlint/lint1: cgram.y debug.c externs1.h lex.c lint1.h

Log Message:
lint: in C23 mode, support the nullptr constant


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/c23.c
cvs rdiff -u -r1.495 -r1.496 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.77 -r1.78 src/usr.bin/xlint/lint1/debug.c
cvs rdiff -u -r1.224 -r1.225 src/usr.bin/xlint/lint1/externs1.h \
src/usr.bin/xlint/lint1/lex.c
cvs rdiff -u -r1.225 -r1.226 src/usr.bin/xlint/lint1/lint1.h

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/c23.c
diff -u src/tests/usr.bin/xlint/lint1/c23.c:1.10 src/tests/usr.bin/xlint/lint1/c23.c:1.11
--- src/tests/usr.bin/xlint/lint1/c23.c:1.10	Tue May  7 21:13:27 2024
+++ src/tests/usr.bin/xlint/lint1/c23.c	Thu May  9 11:08:07 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: c23.c,v 1.10 2024/05/07 21:13:27 rillig Exp $	*/
+/*	$NetBSD: c23.c,v 1.11 2024/05/09 11:08:07 rillig Exp $	*/
 # 3 "c23.c"
 
 // Tests for the option -Ac23, which allows features from C23 and all earlier
@@ -28,6 +28,20 @@ c99_bool_is_still_valid_in_c23(void)
 }
 
 
+bool
+null_pointer_constant(const char *p, double dbl)
+{
+	/* expect+1: error: operands of '!=' have incompatible types 'double' and 'pointer to void' [107] */
+	if (dbl != nullptr)
+		p++;
+	if (dbl > 0.0)
+		p++;
+	if (*p == '\0')
+		p = nullptr;
+	return p == nullptr;
+}
+
+
 int
 empty_initializer_braces(void)
 {

Index: src/usr.bin/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.495 src/usr.bin/xlint/lint1/cgram.y:1.496
--- src/usr.bin/xlint/lint1/cgram.y:1.495	Fri May  3 04:04:17 2024
+++ src/usr.bin/xlint/lint1/cgram.y	Thu May  9 11:08:07 2024
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.495 2024/05/03 04:04:17 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.496 2024/05/09 11:08:07 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: cgram.y,v 1.495 2024/05/03 04:04:17 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.496 2024/05/09 11:08:07 rillig Exp $");
 #endif
 
 #include 
@@ -140,6 +140,7 @@ is_either(const char *s, const char *a, 
 	array_size y_array_size;
 	bool	y_in_system_header;
 	designation y_designation;
+	named_constant y_named_constant;
 };
 
 /* for Bison:
@@ -199,6 +200,7 @@ is_either(const char *s, const char *a, 
 			fprintf(yyo, "");
 	}
 } 
+%printer { fprintf(yyo, "%s", named_constant_name($$)); } 
 */
 
 %token			T_LBRACE T_RBRACE T_LBRACK T_RBRACK T_LPAREN T_RPAREN
@@ -287,6 +289,7 @@ is_either(const char *s, const char *a, 
 %token		T_NAME
 %token		T_TYPENAME
 %token			T_CON
+%token	 T_NAMED_CONSTANT
 %token		T_STRING
 
 /* No type for program. */
@@ -484,6 +487,25 @@ primary_expression:
 |	T_CON {
 		$$ = build_constant(gettyp($1->v_tspec), $1);
 	}
+|	T_NAMED_CONSTANT {
+		if ($1 == NC_NULLPTR) {
+			tnode_t *zero = expr_alloc_tnode();
+			zero->tn_op = CON;
+			zero->tn_type = gettyp(INT);
+			zero->u.value.v_tspec = INT;
+
+			type_t *void_ptr = block_derive_type(gettyp(VOID), PTR);
+			$$ = convert(CVT, 0, void_ptr, zero);
+			$$->tn_sys = zero->tn_sys;
+		} else {
+			tnode_t *nc = expr_alloc_tnode();
+			nc->tn_op = CON;
+			nc->tn_type = gettyp(BOOL);
+			nc->u.value.v_tspec = BOOL;
+			nc->u.value.u.integer = $1 == NC_TRUE ? 1 : 0;
+			$$ = nc;
+		}
+	}
 |	string {
 		$$ = build_string($1);
 	}

Index: src/usr.bin/xlint/lint1/debug.c
diff -u src/usr.bin/xlint/lint1/debug.c:1.77 src/usr.bin/xlint/lint1/debug.c:1.78
--- src/usr.bin/xlint/lint1/debug.c:1.77	Fri May  3 04:04:17 2024
+++ src/usr.bin/xlint/lint1/debug.c	Thu May  9 11:08:07 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: debug.c,v 1.77 2024/05/03 04:04:17 rillig Exp $ */
+/* $NetBSD: debug.c,v 1.78 2024/05/09 11:08:07 rillig Exp $ */
 
 /*-
  * Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: debug.c,v 1.77 2024/05/03 04:04:17 rillig Exp $");
+__RCSID("$NetBSD: debug.c,v 1.78 2024/05/09 11:08:07 rillig Exp $");
 #endif
 
 #include 
@@ -361,6 +361,18 @@ function_specifier_name(function_specifi
 	return name[spec];
 }
 
+const char *
+named_constant_name(named_constant nc)
+{
+	static const char *const name[] = {
+	"false",
+	"true",
+	"nullptr",
+	};
+
+	return name[nc];
+}
+
 static void
 debug_word(bool flag, const char *name)
 {

Index: src/usr.bin/xlint/lint1/externs1.h
diff -u src/usr.bin/xlint/lint1/externs1.h:1.224 src/usr.bin/xlint/lint1/externs1.h:1.225
--- src/usr.bin/xlint/lint1/externs1.h:1.224	Fri May  3 04:04:18 2024
+++ src/usr.bin/xlint/lint1/externs1.h	Thu May  9 11:08:07 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: externs1.h,v 1.224 2024/05/03 04:04:18 rillig Exp $	*/
+/*	

CVS commit: src

2024-05-09 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu May  9 11:08:07 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: c23.c
src/usr.bin/xlint/lint1: cgram.y debug.c externs1.h lex.c lint1.h

Log Message:
lint: in C23 mode, support the nullptr constant


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/c23.c
cvs rdiff -u -r1.495 -r1.496 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.77 -r1.78 src/usr.bin/xlint/lint1/debug.c
cvs rdiff -u -r1.224 -r1.225 src/usr.bin/xlint/lint1/externs1.h \
src/usr.bin/xlint/lint1/lex.c
cvs rdiff -u -r1.225 -r1.226 src/usr.bin/xlint/lint1/lint1.h

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



CVS commit: src

2024-05-09 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Thu May  9 06:38:28 UTC 2024

Modified Files:
src/distrib/sets/lists/xbase: shl.mi
src/distrib/sets/lists/xcomp: mi
src/external/mit/xorg/lib: Makefile

Log Message:
unhook libXxf86misc from the build and mark obsolete

library has no users in src or pkgsrc, it's primarily useful for
managing input devices on mid-2000s xfree86 servers


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/distrib/sets/lists/xbase/shl.mi
cvs rdiff -u -r1.241 -r1.242 src/distrib/sets/lists/xcomp/mi
cvs rdiff -u -r1.58 -r1.59 src/external/mit/xorg/lib/Makefile

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

Modified files:

Index: src/distrib/sets/lists/xbase/shl.mi
diff -u src/distrib/sets/lists/xbase/shl.mi:1.103 src/distrib/sets/lists/xbase/shl.mi:1.104
--- src/distrib/sets/lists/xbase/shl.mi:1.103	Mon Sep  4 19:07:58 2023
+++ src/distrib/sets/lists/xbase/shl.mi	Thu May  9 06:38:27 2024
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.103 2023/09/04 19:07:58 riastradh Exp $
+# $NetBSD: shl.mi,v 1.104 2024/05/09 06:38:27 nia Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -142,9 +142,9 @@
 ./usr/X11R7/lib/libXxf86dga.so			xbase-libXxf86dga-lib		xorg,compatx11file
 ./usr/X11R7/lib/libXxf86dga.so.2		xbase-libXxf86dga-lib		xorg,compatx11file
 ./usr/X11R7/lib/libXxf86dga.so.2.0		xbase-libXxf86dga-lib		xorg,compatx11file
-./usr/X11R7/lib/libXxf86misc.so			xbase-libXxf86misc-lib		xorg,compatx11file
-./usr/X11R7/lib/libXxf86misc.so.2		xbase-libXxf86misc-lib		xorg,compatx11file
-./usr/X11R7/lib/libXxf86misc.so.2.0		xbase-libXxf86misc-lib		xorg,compatx11file
+./usr/X11R7/lib/libXxf86misc.so			xbase-obsolete		obsolete
+./usr/X11R7/lib/libXxf86misc.so.2		xbase-obsolete		obsolete
+./usr/X11R7/lib/libXxf86misc.so.2.0		xbase-obsolete		obsolete
 ./usr/X11R7/lib/libXxf86vm.so			xbase-libXxf86vm-lib		xorg,compatx11file
 ./usr/X11R7/lib/libXxf86vm.so.2			xbase-libXxf86vm-lib		xorg,compatx11file
 ./usr/X11R7/lib/libXxf86vm.so.2.0		xbase-libXxf86vm-lib		xorg,compatx11file

Index: src/distrib/sets/lists/xcomp/mi
diff -u src/distrib/sets/lists/xcomp/mi:1.241 src/distrib/sets/lists/xcomp/mi:1.242
--- src/distrib/sets/lists/xcomp/mi:1.241	Fri Jan 26 12:58:51 2024
+++ src/distrib/sets/lists/xcomp/mi	Thu May  9 06:38:27 2024
@@ -1,4 +1,4 @@
-#	 $NetBSD: mi,v 1.241 2024/01/26 12:58:51 tsutsui Exp $
+#	 $NetBSD: mi,v 1.242 2024/05/09 06:38:27 nia Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1214,8 +1214,8 @@
 ./usr/X11R7/lib/libXv_p.axcomp-libXv-lib	profile,xorg,compatx11file
 ./usr/X11R7/lib/libXxf86dga.axcomp-libXxf86dga-lib	xorg,compatx11file
 ./usr/X11R7/lib/libXxf86dga_p.axcomp-libXxf86dga-lib	profile,xorg,compatx11file
-./usr/X11R7/lib/libXxf86misc.axcomp-libXxf86misc-lib	xorg,compatx11file
-./usr/X11R7/lib/libXxf86misc_p.a			xcomp-libXxf86misc-lib	profile,xorg,compatx11file
+./usr/X11R7/lib/libXxf86misc.axcomp-obsolete	obsolete
+./usr/X11R7/lib/libXxf86misc_p.a			xcomp-obsolete	obsolete
 ./usr/X11R7/lib/libXxf86vm.axcomp-libXxf86vm-lib	xorg,compatx11file
 ./usr/X11R7/lib/libXxf86vm_p.axcomp-libXxf86vm-lib	profile,xorg,compatx11file
 ./usr/X11R7/lib/libdrm.axcomp-libdrm-lib	xorg,compatx11file
@@ -1462,7 +1462,7 @@
 ./usr/X11R7/lib/pkgconfig/xvmc.pc			xcomp-libXvMC-lib	xorg
 ./usr/X11R7/lib/pkgconfig/xwaylandproto.pc		xcomp-xorgproto-lib	xorg
 ./usr/X11R7/lib/pkgconfig/xxf86dga.pc			xcomp-libXxf86dga-lib	xorg
-./usr/X11R7/lib/pkgconfig/xxf86misc.pc			xcomp-libXxf86misc-lib	xorg
+./usr/X11R7/lib/pkgconfig/xxf86misc.pc			comp-obsolete	obsolete
 ./usr/X11R7/lib/pkgconfig/xxf86vm.pc			xcomp-libXxf86vm-lib	xorg
 ./usr/X11R7/man/cat1/mergelib.0xcomp-mergelib-catman	.cat,xorg
 ./usr/X11R7/man/cat1/xft-config.0			xcomp-obsolete	obsolete
@@ -1929,15 +1929,15 @@
 ./usr/X11R7/man/cat3/XExtendedMaxRequestSize.0		xcomp-libX11-catman	.cat,xorg
 ./usr/X11R7/man/cat3/XExtentsOfFontSet.0		xcomp-libX11-catman	.cat,xorg
 ./usr/X11R7/man/cat3/XF86DGA.0xcomp-libXxf86dga-catman	.cat,xorg
-./usr/X11R7/man/cat3/XF86Misc.0xcomp-libXxf86misc-catman	.cat,xorg
-./usr/X11R7/man/cat3/XF86MiscGetKbdSettings.0		xcomp-libXxf86misc-catman	.cat,xorg
-./usr/X11R7/man/cat3/XF86MiscGetMouseSettings.0		xcomp-libXxf86misc-catman	.cat,xorg
-./usr/X11R7/man/cat3/XF86MiscGetSaver.0			xcomp-libXxf86misc-catman	.cat,xorg
-./usr/X11R7/man/cat3/XF86MiscQueryExtension.0		xcomp-libXxf86misc-catman	.cat,xorg
-./usr/X11R7/man/cat3/XF86MiscQueryVersion.0		xcomp-libXxf86misc-catman	.cat,xorg
-./usr/X11R7/man/cat3/XF86MiscSetKbdSettings.0		xcomp-libXxf86misc-catman	.cat,xorg
-./usr/X11R7/man/cat3/XF86MiscSetMouseSettings.0		xcomp-libXxf86misc-catman	.cat,xorg
-./usr/X11R7/man/cat3/XF86MiscSetSaver.0			xcomp-libXxf86misc-catman	.cat,xorg
+./usr/X11R7/man/cat3/XF86Misc.0xcomp-obsolete	obsolete

CVS commit: src

2024-05-09 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Thu May  9 06:38:28 UTC 2024

Modified Files:
src/distrib/sets/lists/xbase: shl.mi
src/distrib/sets/lists/xcomp: mi
src/external/mit/xorg/lib: Makefile

Log Message:
unhook libXxf86misc from the build and mark obsolete

library has no users in src or pkgsrc, it's primarily useful for
managing input devices on mid-2000s xfree86 servers


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/distrib/sets/lists/xbase/shl.mi
cvs rdiff -u -r1.241 -r1.242 src/distrib/sets/lists/xcomp/mi
cvs rdiff -u -r1.58 -r1.59 src/external/mit/xorg/lib/Makefile

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



CVS commit: src

2024-05-09 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Thu May  9 06:34:51 UTC 2024

Modified Files:
src/external/mit/xorg/bin/xdpyinfo: Makefile
src/external/mit/xorg/bin/xset: Makefile
src/share/mk: bsd.x11.mk

Log Message:
stop using and linking against libXxf86misc

support for this extension was removed from xorg in 2008,
our xorg-server and our xorg-server.old can't use it.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/mit/xorg/bin/xdpyinfo/Makefile
cvs rdiff -u -r1.7 -r1.8 src/external/mit/xorg/bin/xset/Makefile
cvs rdiff -u -r1.154 -r1.155 src/share/mk/bsd.x11.mk

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



CVS commit: src

2024-05-09 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Thu May  9 06:34:51 UTC 2024

Modified Files:
src/external/mit/xorg/bin/xdpyinfo: Makefile
src/external/mit/xorg/bin/xset: Makefile
src/share/mk: bsd.x11.mk

Log Message:
stop using and linking against libXxf86misc

support for this extension was removed from xorg in 2008,
our xorg-server and our xorg-server.old can't use it.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/mit/xorg/bin/xdpyinfo/Makefile
cvs rdiff -u -r1.7 -r1.8 src/external/mit/xorg/bin/xset/Makefile
cvs rdiff -u -r1.154 -r1.155 src/share/mk/bsd.x11.mk

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

Modified files:

Index: src/external/mit/xorg/bin/xdpyinfo/Makefile
diff -u src/external/mit/xorg/bin/xdpyinfo/Makefile:1.7 src/external/mit/xorg/bin/xdpyinfo/Makefile:1.8
--- src/external/mit/xorg/bin/xdpyinfo/Makefile:1.7	Sun Jul 19 19:49:18 2015
+++ src/external/mit/xorg/bin/xdpyinfo/Makefile	Thu May  9 06:34:50 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2015/07/19 19:49:18 mrg Exp $
+#	$NetBSD: Makefile,v 1.8 2024/05/09 06:34:50 nia Exp $
 
 .include 
 
@@ -9,10 +9,10 @@ PROG=	xdpyinfo
 CPPFLAGS+=-I${X11SRCDIR.${PROG}}/../include -DHAVE_CONFIG_H
 
 LDADD+=	-lXtst -lXi -lXrender -lXinerama -lXcomposite \
-	-lXxf86vm -lXxf86dga -lXxf86misc -lXext -lX11 \
+	-lXxf86vm -lXxf86dga -lXext -lX11 \
 	-lxcb -lX11-xcb
 DPADD+= ${LIBXTST} ${LIBXI} ${LIBXRENDER} ${LIBXINERAMA} ${LIBXCOMPOSITE} \
-	${LIBXXF86VM} ${LIBXXF86DGA} ${LIBXXF86MISC} ${LIBXEXT} ${LIBX11} \
+	${LIBXXF86VM} ${LIBXXF86DGA} ${LIBXEXT} ${LIBX11} \
 	${LIBXCB} ${LIBX11XCB}
 
 .PATH:	${X11SRCDIR.${PROG}}

Index: src/external/mit/xorg/bin/xset/Makefile
diff -u src/external/mit/xorg/bin/xset/Makefile:1.7 src/external/mit/xorg/bin/xset/Makefile:1.8
--- src/external/mit/xorg/bin/xset/Makefile:1.7	Sun Mar 11 08:46:31 2018
+++ src/external/mit/xorg/bin/xset/Makefile	Thu May  9 06:34:51 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2018/03/11 08:46:31 mrg Exp $
+#	$NetBSD: Makefile,v 1.8 2024/05/09 06:34:51 nia Exp $
 
 .include 
 
@@ -6,8 +6,8 @@ PROG=	xset
 
 CPPFLAGS+=${X11FLAGS.EXTENSION} -DXKB -DHAVE_USLEEP
 
-LDADD+=	-lXmuu -lXt -lSM -lICE -lXxf86misc -lXext -lX11
-DPADD+= ${LIBXMUU} ${LIBXT} ${LIBSM} ${LIBICE} ${LIBXXF86MISC}
+LDADD+=	-lXmuu -lXt -lSM -lICE -lXext -lX11
+DPADD+= ${LIBXMUU} ${LIBXT} ${LIBSM} ${LIBICE}
 DPADD+=	${LIBXEXT} ${LIBX11}
 
 .PATH:	${X11SRCDIR.${PROG}}

Index: src/share/mk/bsd.x11.mk
diff -u src/share/mk/bsd.x11.mk:1.154 src/share/mk/bsd.x11.mk:1.155
--- src/share/mk/bsd.x11.mk:1.154	Mon Apr 29 22:09:10 2024
+++ src/share/mk/bsd.x11.mk	Thu May  9 06:34:51 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.x11.mk,v 1.154 2024/04/29 22:09:10 mrg Exp $
+#	$NetBSD: bsd.x11.mk,v 1.155 2024/05/09 06:34:51 nia Exp $
 
 .include 
 
@@ -31,7 +31,7 @@ X11FLAGS.CONNECTION+=	-DIPv6
 #	 EXT_DEFINES
 X11FLAGS.BASE_EXTENSION=	-DMITMISC -DXTEST -DXTRAP -DXSYNC -DXCMISC \
 -DXRECORD -DMITSHM -DBIGREQS -DXF86VIDMODE \
--DXF86MISC -DDPMSExtension -DEVI \
+-DDPMSExtension -DEVI \
 -DSCREENSAVER -DXV -DXVMC -DGLXEXT \
 -DRES
 



CVS commit: xsrc/external/mit/xdpyinfo/include

2024-05-09 Thread Nia Alarie
Module Name:xsrc
Committed By:   nia
Date:   Thu May  9 06:29:32 UTC 2024

Modified Files:
xsrc/external/mit/xdpyinfo/include: config.h

Log Message:
undef HAVE_X11_EXTENSIONS_XF86MISC_H

none of our X servers support this extension since 2008 or so.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/xdpyinfo/include/config.h

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

Modified files:

Index: xsrc/external/mit/xdpyinfo/include/config.h
diff -u xsrc/external/mit/xdpyinfo/include/config.h:1.5 xsrc/external/mit/xdpyinfo/include/config.h:1.6
--- xsrc/external/mit/xdpyinfo/include/config.h:1.5	Mon Jun 19 07:32:08 2023
+++ xsrc/external/mit/xdpyinfo/include/config.h	Thu May  9 06:29:32 2024
@@ -50,7 +50,7 @@
 #define HAVE_X11_EXTENSIONS_XF86DGA_H 1
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_X11_EXTENSIONS_XF86MISC_H 1
+/* #undef HAVE_X11_EXTENSIONS_XF86MISC_H 1 */
 
 /* Define to 1 if you have the  header file. */
 #define HAVE_X11_EXTENSIONS_XF86MSCSTR_H 1



CVS commit: xsrc/external/mit/xdpyinfo/include

2024-05-09 Thread Nia Alarie
Module Name:xsrc
Committed By:   nia
Date:   Thu May  9 06:29:32 UTC 2024

Modified Files:
xsrc/external/mit/xdpyinfo/include: config.h

Log Message:
undef HAVE_X11_EXTENSIONS_XF86MISC_H

none of our X servers support this extension since 2008 or so.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/xdpyinfo/include/config.h

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