CVS commit: src/usr.bin/make

2023-01-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 17 21:35:19 UTC 2023

Modified Files:
src/usr.bin/make: compat.c job.c

Log Message:
Accept whitespace between command specifiers @+- like gmake does. New binutils
does this.


To generate a diff of this commit:
cvs rdiff -u -r1.243 -r1.244 src/usr.bin/make/compat.c
cvs rdiff -u -r1.456 -r1.457 src/usr.bin/make/job.c

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

Modified files:

Index: src/usr.bin/make/compat.c
diff -u src/usr.bin/make/compat.c:1.243 src/usr.bin/make/compat.c:1.244
--- src/usr.bin/make/compat.c:1.243	Wed Dec  7 05:28:48 2022
+++ src/usr.bin/make/compat.c	Tue Jan 17 16:35:19 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat.c,v 1.243 2022/12/07 10:28:48 rillig Exp $	*/
+/*	$NetBSD: compat.c,v 1.244 2023/01/17 21:35:19 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -91,7 +91,7 @@
 #include "pathnames.h"
 
 /*	"@(#)compat.c	8.2 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: compat.c,v 1.243 2022/12/07 10:28:48 rillig Exp $");
+MAKE_RCSID("$NetBSD: compat.c,v 1.244 2023/01/17 21:35:19 christos Exp $");
 
 static GNode *curTarg = NULL;
 static pid_t compatChild;
@@ -280,7 +280,8 @@ Compat_RunCommand(const char *cmdp, GNod
 			doIt = true;
 			if (shellName == NULL)	/* we came here from jobs */
 Shell_Init();
-		} else
+		} else if (!ch_isspace(*cmd))
+			/* Ignore whitespace for compatibility with gnu make */
 			break;
 		cmd++;
 	}

Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.456 src/usr.bin/make/job.c:1.457
--- src/usr.bin/make/job.c:1.456	Mon Oct 10 17:17:25 2022
+++ src/usr.bin/make/job.c	Tue Jan 17 16:35:19 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.456 2022/10/10 21:17:25 rillig Exp $	*/
+/*	$NetBSD: job.c,v 1.457 2023/01/17 21:35:19 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -142,7 +142,7 @@
 #include "trace.h"
 
 /*	"@(#)job.c	8.2 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: job.c,v 1.456 2022/10/10 21:17:25 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.457 2023/01/17 21:35:19 christos Exp $");
 
 /*
  * A shell defines how the commands are run.  All commands for a target are
@@ -732,7 +732,8 @@ ParseCommandFlags(char **pp, CommandFlag
 			out_cmdFlags->ignerr = true;
 		else if (*p == '+')
 			out_cmdFlags->always = true;
-		else
+		else if (!ch_isspace(*p))
+			/* Ignore whitespace for compatibility with gnu make */
 			break;
 		p++;
 	}



CVS commit: src/usr.bin/make

2023-01-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 17 21:35:19 UTC 2023

Modified Files:
src/usr.bin/make: compat.c job.c

Log Message:
Accept whitespace between command specifiers @+- like gmake does. New binutils
does this.


To generate a diff of this commit:
cvs rdiff -u -r1.243 -r1.244 src/usr.bin/make/compat.c
cvs rdiff -u -r1.456 -r1.457 src/usr.bin/make/job.c

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



CVS commit: src/usr.bin/make/unit-tests

2023-01-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Jan 17 19:42:47 UTC 2023

Modified Files:
src/usr.bin/make/unit-tests: varname-dot-newline.exp
varname-dot-newline.mk

Log Message:
tests/make: test backslash-newline after macro expansion in command


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/varname-dot-newline.exp
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/varname-dot-newline.mk

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

Modified files:

Index: src/usr.bin/make/unit-tests/varname-dot-newline.exp
diff -u src/usr.bin/make/unit-tests/varname-dot-newline.exp:1.2 src/usr.bin/make/unit-tests/varname-dot-newline.exp:1.3
--- src/usr.bin/make/unit-tests/varname-dot-newline.exp:1.2	Wed Aug 19 05:51:18 2020
+++ src/usr.bin/make/unit-tests/varname-dot-newline.exp	Tue Jan 17 19:42:47 2023
@@ -1,4 +1,6 @@
-make: "varname-dot-newline.mk" line 16: The .newline variable can be overwritten.  Just don't do that.
+make: "varname-dot-newline.mk" line 30: The .newline variable can be overwritten.  Just don't do that.
 first
 second
+backslash newline: <\
+>
 exit status 0

Index: src/usr.bin/make/unit-tests/varname-dot-newline.mk
diff -u src/usr.bin/make/unit-tests/varname-dot-newline.mk:1.4 src/usr.bin/make/unit-tests/varname-dot-newline.mk:1.5
--- src/usr.bin/make/unit-tests/varname-dot-newline.mk:1.4	Sat Oct 24 08:46:08 2020
+++ src/usr.bin/make/unit-tests/varname-dot-newline.mk	Tue Jan 17 19:42:47 2023
@@ -1,7 +1,21 @@
-# $NetBSD: varname-dot-newline.mk,v 1.4 2020/10/24 08:46:08 rillig Exp $
+# $NetBSD: varname-dot-newline.mk,v 1.5 2023/01/17 19:42:47 rillig Exp $
 #
-# Tests for the special .newline variable.
+# Tests for the special .newline variable, which contains a single newline
+# character (U+000A).
+
+
+# https://austingroupbugs.net/view.php?id=1549 proposes:
+# > After all macro expansion is complete, when an escaped  is
+# > found in a command line in a makefile, the command line that is executed
+# > shall contain the , the , and the next line, except
+# > that the first character of the next line shall not be included if it is
+# > a .
 #
+# The above quote assumes that each resulting  character has a "next
+# line", but that's not how the .newline variable works.
+BACKSLASH_NEWLINE:=	\${.newline}
+
+
 # Contrary to the special variable named "" that is used in expressions like
 # ${:Usome-value}, the variable ".newline" is not protected against
 # modification.  Nobody exploits that though.
@@ -21,3 +35,4 @@ NEWLINE:=	${.newline}
 
 all:
 	@echo 'first${.newline}second'
+	@echo 'backslash newline: <${BACKSLASH_NEWLINE}>'



CVS commit: src/usr.bin/make/unit-tests

2023-01-17 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Jan 17 19:42:47 UTC 2023

Modified Files:
src/usr.bin/make/unit-tests: varname-dot-newline.exp
varname-dot-newline.mk

Log Message:
tests/make: test backslash-newline after macro expansion in command


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/varname-dot-newline.exp
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/varname-dot-newline.mk

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



Re: CVS commit: xsrc/external/mit/xorg-cf-files/dist

2023-01-17 Thread Valery Ushakov
On Tue, Jan 17, 2023 at 05:37:05 +, matthew green wrote:

> Module Name:  xsrc
> Committed By: mrg
> Date: Tue Jan 17 05:37:05 UTC 2023
> 
> Modified Files:
>   xsrc/external/mit/xorg-cf-files/dist: Imake.tmpl
> 
> Log Message:
> pull over fix from pkgsrc xorg-cf-files and avoid ar's "l" flag.

That doesn't seem to handle all the cases where "l" flag is used
(ArAddCmd, ArExtCmd).

Might be easier to either define HasLargeTmp which seems to be *the*
knob to control "l" flag to ar to begin with, or to factor out the
test for "supports l flag" so that the unwieldy 

  SystemV4 || LinuxBinUtilsMajorVersion || defined(NetBSDArchitecture)

is not repeated multiple times.

-uwe


CVS commit: src/lib/libcrypt

2023-01-17 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jan 17 14:27:11 UTC 2023

Modified Files:
src/lib/libcrypt: crypt.3

Log Message:
crypt(3): Minor markup tweaks


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/lib/libcrypt/crypt.3

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



CVS commit: src/lib/libcrypt

2023-01-17 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jan 17 14:27:11 UTC 2023

Modified Files:
src/lib/libcrypt: crypt.3

Log Message:
crypt(3): Minor markup tweaks


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/lib/libcrypt/crypt.3

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

Modified files:

Index: src/lib/libcrypt/crypt.3
diff -u src/lib/libcrypt/crypt.3:1.34 src/lib/libcrypt/crypt.3:1.35
--- src/lib/libcrypt/crypt.3:1.34	Tue Jan 17 01:56:43 2023
+++ src/lib/libcrypt/crypt.3	Tue Jan 17 14:27:11 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: crypt.3,v 1.34 2023/01/17 01:56:43 riastradh Exp $
+.\"	$NetBSD: crypt.3,v 1.35 2023/01/17 14:27:11 uwe Exp $
 .\"
 .\" Copyright (c) 1989, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -62,7 +62,7 @@ performs password hashing.
 The password hashing scheme used by
 .Fn crypt
 is dependent upon the contents of the
-.Dv NUL Ns -terminated
+.Tn NUL Ns -terminated
 string
 .Ar setting .
 If it begins
@@ -78,19 +78,27 @@ If
 .Ar setting
 begins with the
 .Ql _
-character, DES password hashing with a user specified number of
+character,
+.Tn DES
+password hashing with a user specified number of
 perturbations is selected.
 If
 .Ar setting
-begins with any other character, DES password hashing with a fixed
+begins with any other character,
+.Tn DES
+password hashing with a fixed
 number of perturbations is selected.
 .Ss DES password hashing
-The DES password hashing scheme is derived from the
+The
+.Tn DES
+password hashing scheme is derived from the
 .Tn NBS
 Data Encryption Standard.
 Additional code has been added to deter key search attempts and to use
 stronger hashing algorithms.
-In the DES case, the second argument to
+In the
+.Tn DES
+case, the second argument to
 .Fn crypt
 is a character array, 9 bytes in length, consisting of an underscore
 .Pq Ql _
@@ -127,16 +135,24 @@ The
 .Ar key
 is divided into groups of 8 characters (a short final group is null-padded)
 and the low-order 7 bits of each character (56 bits per group) are
-used to form the DES key as follows: the first group of 56 bits becomes the
-initial DES key.
-For each additional group, the XOR of the group bits and the encryption of
-the DES key with itself becomes the next DES key.
-Then the final DES key is used to perform
+used to form the
+.Tn DES
+key as follows: the first group of 56 bits becomes the initial
+.Tn DES
+key.
+For each additional group, the XOR of the group bits and the encryption of the
+.Tn DES
+key with itself becomes the next
+.Tn DES
+key.
+Then the final
+.Tn DES
+key is used to perform
 .Ar count
 cumulative encryptions of a 64-bit constant yielding a
 .Sq ciphertext .
 The value returned is a
-.Dv NUL Ns -terminated
+.Tn NUL Ns -terminated
 string, 20 bytes in length, consisting
 of the
 .Ar setting
@@ -156,7 +172,7 @@ are available, at most 8
 characters of
 .Ar key
 are used, and the returned value is a
-.Dv NUL Ns -terminated
+.Tn NUL Ns -terminated
 string 13 bytes in length.
 .Pp
 The
@@ -174,7 +190,7 @@ The
 argument to
 .Fn setkey
 is a 64 character array of
-binary values (numeric 0 or 1).
+binary values (numeric 0 or\~1).
 A 56-bit key is derived from this array by dividing the array
 into groups of 8 and ignoring the last bit in each group.
 .Pp
@@ -245,6 +261,7 @@ by the
 .Ql $
 character.
 An encoded password hash looks like:
+.Pp
 .Dl "$1$2qGr5PPQ$eT08WBFev3RPLNChixg0H"
 .Pp
 The entire encoded MD5 password hash is passed as
@@ -258,15 +275,23 @@ It is recommended to use argon2id, which
 using argon2i on the first pass, and argon2d on the remaining
 passes.
 We parameterize on three variables.
-First, m_cost (m), specifies the memory usage in KB.
-Second, t_cost (t), specifies the number of iterations.
-Third, parallelism (p) specifies the number of threads.
+First,
+.Va m_cost ( Li m ) ,
+specifies the memory usage in
+.Tn KB .
+Second,
+.Va t_cost ( Li t ) ,
+specifies the number of iterations.
+Third,
+.Va parallelism ( Li p )
+specifies the number of threads.
 This is currently ignored and one thread will always be used.
 An encoded Argon2 password hash looks like:
-.Bd -literal
-$argon2id$v=19$m=4096,t=6,p=1$qCatF9a1s/6TgcYB$ \
+.Bd -literal -offset indent
+$argon2id$v=19$m=4096,t=6,p=1$qCatF9a1s/6TgcYB$ \e
yeYYrU/rh7E+LI2CAeHTSHVB3iO+OXiNIUHu6NPeTfo
 .Ed
+.Pp
 containing five fields delimited by
 .Ql $ .
 The fields, in order, are variant name, version, parameter set,
@@ -292,7 +317,7 @@ the password hash.
 The maximum password length is 72.
 The final Blowfish password output is created by encrypting the string
 .Pp
-.Dq OrpheanBeholderScryDoubt
+.Dl OrpheanBeholderScryDoubt
 .Pp
 with the
 .Tn Blowfish
@@ -306,7 +331,8 @@ An encoded
 .Sq 8
 would specify 256 rounds.
 An encoded Blowfish password hash looks like:
-.Dl $2a$12$eIAq8PR8sIUnJ1HaohxX2O9x9Qlm2vK97LJ5dsXdmB.eXF42qjchC
+.Pp
+.Dl 

CVS commit: src

2023-01-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jan 17 14:13:48 UTC 2023

Modified Files:
src/lib/libskey: skeysubr.c
src/sys/dev/ppbus: ppbus_base.c

Log Message:
s/charater/character/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/lib/libskey/skeysubr.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/ppbus/ppbus_base.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/libskey/skeysubr.c
diff -u src/lib/libskey/skeysubr.c:1.28 src/lib/libskey/skeysubr.c:1.29
--- src/lib/libskey/skeysubr.c:1.28	Thu Mar 22 22:59:43 2012
+++ src/lib/libskey/skeysubr.c	Tue Jan 17 14:13:48 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: skeysubr.c,v 1.28 2012/03/22 22:59:43 joerg Exp $	*/
+/*	$NetBSD: skeysubr.c,v 1.29 2023/01/17 14:13:48 msaitoh Exp $	*/
 
 /* S/KEY v1.1b (skeysubr.c)
  *
@@ -15,7 +15,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: skeysubr.c,v 1.28 2012/03/22 22:59:43 joerg Exp $");
+__RCSID("$NetBSD: skeysubr.c,v 1.29 2023/01/17 14:13:48 msaitoh Exp $");
 
 #include 
 #include 
@@ -432,7 +432,7 @@ const char *skipspace(const char *cp)
 		return cp;
 }
 
-/* Remove backspaced over charaters from the string */
+/* Remove backspaced over characters from the string */
 void backspace(char *buf)
 {
 	char bs = 0x8;

Index: src/sys/dev/ppbus/ppbus_base.c
diff -u src/sys/dev/ppbus/ppbus_base.c:1.21 src/sys/dev/ppbus/ppbus_base.c:1.22
--- src/sys/dev/ppbus/ppbus_base.c:1.21	Tue Sep 29 02:58:52 2020
+++ src/sys/dev/ppbus/ppbus_base.c	Tue Jan 17 14:13:48 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ppbus_base.c,v 1.21 2020/09/29 02:58:52 msaitoh Exp $ */
+/* $NetBSD: ppbus_base.c,v 1.22 2023/01/17 14:13:48 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998, 1999 Nicolas Souchu
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ppbus_base.c,v 1.21 2020/09/29 02:58:52 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ppbus_base.c,v 1.22 2023/01/17 14:13:48 msaitoh Exp $");
 
 #include "opt_ppbus_1284.h"
 #include "opt_ppbus.h"
@@ -219,7 +219,7 @@ ppbus_set_mode(device_t dev, int mode, i
 	return error;
 }
 
-/* Write charaters to the port */
+/* Write characters to the port */
 int
 ppbus_write(device_t dev, char * buf, int len, int how, size_t * cnt)
 {



CVS commit: src

2023-01-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jan 17 14:13:48 UTC 2023

Modified Files:
src/lib/libskey: skeysubr.c
src/sys/dev/ppbus: ppbus_base.c

Log Message:
s/charater/character/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/lib/libskey/skeysubr.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/ppbus/ppbus_base.c

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



CVS commit: src/lib/libc/time

2023-01-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 17 13:18:03 UTC 2023

Modified Files:
src/lib/libc/time: zic.c

Log Message:
put attributes first for c23 compliance.


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/lib/libc/time/zic.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/time/zic.c
diff -u src/lib/libc/time/zic.c:1.88 src/lib/libc/time/zic.c:1.89
--- src/lib/libc/time/zic.c:1.88	Sun Jan 15 13:12:37 2023
+++ src/lib/libc/time/zic.c	Tue Jan 17 08:18:03 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: zic.c,v 1.88 2023/01/15 18:12:37 christos Exp $	*/
+/*	$NetBSD: zic.c,v 1.89 2023/01/17 13:18:03 christos Exp $	*/
 /*
 ** This file is in the public domain, so clarified as of
 ** 2006-07-17 by Arthur David Olson.
@@ -11,7 +11,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: zic.c,v 1.88 2023/01/15 18:12:37 christos Exp $");
+__RCSID("$NetBSD: zic.c,v 1.89 2023/01/17 13:18:03 christos Exp $");
 #endif /* !defined lint */
 
 /* Use the system 'time' function, instead of any private replacement.
@@ -3754,14 +3754,14 @@ getfields(char *cp, char **array, int ar
 	return nsubs;
 }
 
-static ATTRIBUTE_NORETURN void
+ATTRIBUTE_NORETURN static void
 time_overflow(void)
 {
 	error(_("time overflow"));
 	exit(EXIT_FAILURE);
 }
 
-static ATTRIBUTE_REPRODUCIBLE zic_t
+ATTRIBUTE_REPRODUCIBLE static zic_t
 oadd(zic_t t1, zic_t t2)
 {
 #ifdef ckd_add



CVS commit: src/lib/libc/time

2023-01-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 17 13:18:03 UTC 2023

Modified Files:
src/lib/libc/time: zic.c

Log Message:
put attributes first for c23 compliance.


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/lib/libc/time/zic.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/amd64

2023-01-17 Thread Robert Elz
Date:Tue, 17 Jan 2023 08:13:12 +0100
From:Martin Husemann 
Message-ID:  <20230117071312.ga18...@mail.duskware.de>

  | what is missing in this
  | environment so it does not work by default?

The shell started this way is not a login shell, so does
not read any of the standard login scripts, and I assume
also does not have ENV set to a suitable startup script
either. 

kre