CVS commit: src/sys/modules

2021-08-17 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Aug 17 21:39:32 UTC 2021

Modified Files:
src/sys/modules: Makefile

Log Message:
s/blake2s/blakes2s/ to match the directory that exists


To generate a diff of this commit:
cvs rdiff -u -r1.252 -r1.253 src/sys/modules/Makefile

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



CVS commit: src/bin/sh

2021-08-09 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Aug  9 11:29:30 UTC 2021

Modified Files:
src/bin/sh: var.c

Log Message:
Fix the fix to a typo in one of the comments.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/bin/sh/var.c

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



CVS commit: src/sbin/devpubd/hooks

2021-08-05 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Aug  5 12:52:47 UTC 2021

Modified Files:
src/sbin/devpubd/hooks: 02-wedgenames

Log Message:
Obliterate bogus $@ usage.

While here, fix some quoting, change some style, and attempt
to properly handle wedge names with embedded newlines, and those
that end with a '/' character (not particularly happy with the
solution to that last one, but it is better than it was).

Is there a reason that characters that need encoding in wedge names
(white space, and more) are encoded as %%XX (XX is the hex value of
the char - but 2 % chars?  Why?).   That remains unchanged, but as
the script already relied upon sh's $'...' quoting, I think we can rely
upon printf as well, so replace the old (very elegant, but slow) encoding
function with a much simpler one (does the same thing).


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sbin/devpubd/hooks/02-wedgenames

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



CVS commit: src/sbin/devpubd

2021-08-05 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Aug  5 12:45:33 UTC 2021

Modified Files:
src/sbin/devpubd: devpubd-run-hooks.in
src/sbin/devpubd/hooks: 01-makedev

Log Message:
Expunge bogus (implementation defined / unspecified) uses of $@ in
scripts.   $@ is unspecified except when used in a place where
field splitting can occur (which is never in an assignment),
X=$@ (with or without double quotes) is simply wrong.

Use $* instead of $@ in such places, or as here, simply change
the way things are done (very very slightly) and DTRT.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sbin/devpubd/devpubd-run-hooks.in
cvs rdiff -u -r1.2 -r1.3 src/sbin/devpubd/hooks/01-makedev

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



CVS commit: src/usr.sbin/sysinst

2021-07-12 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Jul 12 19:03:20 UTC 2021

Modified Files:
src/usr.sbin/sysinst: msg_xlat.sh

Log Message:
Revert 1.4, that just trades one problem for a different one
(splitting the message on % instead of white space, which affects
less messages, but makes a bigger mess of them when it happens).

The real problem is that the expansion of the message was unquoted,
which allowed the field splitting to happen at all (which was mitigated
by the way printf rescans its format string for each arg when there are
more args than conversions in the format) otherwise it would have been
a much bigger mess (both times).

Just add quotes where quotes are needed, no more splitting, all good.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/msg_xlat.sh

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



CVS commit: src/lib/libc/gen

2021-07-11 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Jul 11 16:30:41 UTC 2021

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

Log Message:
Make sure dd_size is init'd, even when nothing has been read (so it
will be 0).   Reported on tech-userlevel by Mouse 20210711T044753+


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/gen/initdir.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/stdio

2021-07-09 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Jul  9 20:00:26 UTC 2021

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

Log Message:
Make opts.cmd const char * rather than char * -- nothing ever modifies
the string it points to, it is never passed to a function not taking a
const char * arg, and this allows "" (or other literal strings if ever
needed) to be assigned to it - which should fix the build.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/stdio/h_intr.c

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



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

2021-05-19 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed May 19 22:45:49 UTC 2021

Modified Files:
src/tests/usr.bin/printf: printf.sh

Log Message:
With the (very) recent changes to printf(1), a numeric conversion from data
of the form '+1 (two (or more) characters after the quote) will now generate
an error message, and cause printf(1) to exit(1) when it is done.

Adapt the test cases which use that data form to handle that.


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

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



CVS commit: src/tests/bin/sh

2021-05-19 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed May 19 22:43:18 UTC 2021

Modified Files:
src/tests/bin/sh: t_redir.sh

Log Message:
Handle the (very) recent change to printf(1) - when writing to a closed
stdout printf(1) now issues an error message, hence stderr in such cases
should not be empty, rather than should be empty.   Adapt to that.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/bin/sh/t_redir.sh

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



CVS commit: src/usr.bin/printf

2021-05-19 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed May 19 22:41:19 UTC 2021

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

Log Message:
Changes for POSIX conformance.

1.  exit(1) with an error message on stderr if an I/O error occurs.
1a. To work properly when built into /bin/sh sprinkle clearerr() at
appropriate places.

2.  Verify that when a 'X data value is used with one of the numeric
conversions, that nothing follows the 'X'.   It used to be unclear
in the standard whether this was required or not, it is clear that
with numeric conversions the entire data value must be used, or an
error must result.   But with string conversions, that isn't the case
and unused parts are simply ignored.   This one is a numeric conversion
with a string value, so which applies?   The standard used to contain
an example of '+3 being converted, producing the same as '+ ignoring
the '3' with no mention of any error, so that's the approach we adopted,
The forthcoming version now explicitly states that an error would also
be generated from that case, as the '3' was not used by the numeric
conversion.

2a. We support those conversions with floating as well as integer conversions,
as the standard used to suggest that was required (but it makes no sense,
the values are always integers, printing them in a floating format is
dumb).  The standard has been revised to make it clear that only the
integer numeric conversions %d %u %x (etc) are supposed to handle the 'X
form of data value.   We still allow it with the floating formats as an
extension, for backward compat, just in case someone (other than the ATF
tests) is using it.   It might go away.

2b. These formats are sypposed to convert 'X where 'X' is a character
(perhaps multibyte encoded) in the current LC_CTYPE locale category.
We don't handle that, only 1 byte characters are handled currently.
However the framework is now there to allow code to (one hopes, easily)
be added to handle multi-byte locales.   (Note that for the purposes of
#2 above, 'X' must be a single character, not a single byte.)


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/usr.bin/printf/printf.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/printf

2021-05-19 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed May 19 22:29:18 UTC 2021

Modified Files:
src/usr.bin/printf: printf.1

Log Message:
Don't describe "%%: in the format as a format conversion, it isn't,
it is an escaped literal '%' character.   None of what applies to
format conversions applies to this.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/printf/printf.1

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

2021-05-19 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed May 19 22:20:34 UTC 2021

Modified Files:
src/tests/usr.bin/printf: printf.sh

Log Message:
Fix a truly embarrassing quoting screwup.   There is an explanation as
to why this didn't cause any failures, but I won't go into it here.
This was detected by the about to be committed printf changes.

While here also correct a couple of minor comment layout issues.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/printf/printf.sh

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



CVS commit: src/bin/echo

2021-05-19 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed May 19 22:12:36 UTC 2021

Modified Files:
src/bin/echo: echo.c

Log Message:
Catch up with /bin/sh built-in echo ... if a write error occurs,
don't just exit(1), write an error message to stderr as well
(required for POSIX conformance).


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/bin/echo/echo.c

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



CVS commit: src/bin/sh/bltin

2021-05-18 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue May 18 21:39:06 UTC 2021

Modified Files:
src/bin/sh/bltin: bltin.h echo.c

Log Message:
Fix a bug in the built-in echo in /bin/sh reported in private mail by
Oguz 

If echo detects an I/O error, it does exit(1) (that's fine) but then
the next echo also does exit(1) even without any errors of its own,
and every following echo writing to stdout does the same thing.

eg:

echo foo >&- ; echo $?; echo $?; ( echo $( echo $?; echo $?) ; echo $? )
1
1
1 1
1

The first echo writes nothing (stdout is closed) but does exit(1).
The second echo writes "1" (correct, the exit status of the previous
echo) and should exit(0) - but doesn't.  This pattern continues...

While here, conform to the POSIX requirement on echo (and many other
standard utilities, but definitely not all) that when the utility
does exit(>0) a message must be written to stderr (and vice versa
in many cases).   Our echo (as shown above) did the exit(1) part
when it detected the I/O error, but no message is sent to stderr.
Fix that while we're here.

Similar changes are required for /bin/echo (coming soon), and
/usr/bin/printf (which is also the sh builtin printf) - except
currently that one kind of conforms, as it ignores errors writing
to stdout (as do large numbers of other utilities).  For many
programs that's kind of acceptable, but where the sole purpose of
the program is to write to stdout, it really isn't.   Also to be
fixed soon.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/bin/sh/bltin/bltin.h
cvs rdiff -u -r1.14 -r1.15 src/bin/sh/bltin/echo.c

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



CVS commit: src/tests/bin/sh

2021-05-18 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue May 18 21:37:56 UTC 2021

Modified Files:
src/tests/bin/sh: t_builtins.sh

Log Message:
Add two new sub-tests to the echo test case of the t_builtins shell ATF test.

The first verifies that echo exits >0 when it encounters an I/O error on
its output (this part would have succeeded for a long time).  It also
verifies the POSIX requirement that when most standard utilities (or
perhaps many rather than most) exit(>0) they must write a message to stderr.
Our sh's built in echo did not do that (nor does /bin/echo but that's not
relevant here).

The second demonstrates (on an unfixed built-in echo) a bug reported in
private e-mail by Oguz  where once an instance of
the built-in echo has detected an I/O error, all later invocations of
the built-in echo, with no I/O errors of their own, also exit(1) (the error
status on stdout is not cleared, each echo sees the "I/O error occurred" and
does exit(1)).

In this second sub-test, the "2>&-" on the first echo command is simply
an artifact caused by the test harness - the "check" function verifies
that exit((>0) requires a message on stderr (and vice versa), but that
only applies to most (or many) utilities, echo is one, but sh is not.
In the second test, the exit status comes from sh - sh is permitted to
write to stderr (via the echo command it runs in this case) and still
exit(0).   But the check function in the test does not understand that
subtlety.   So, we simply suppress the stderr message by closing stderr
(the first of these two new sub-tests has verified that the message exists)..


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/bin/sh/t_builtins.sh

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



CVS commit: src/lib/libutil

2021-05-16 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun May 16 19:42:35 UTC 2021

Modified Files:
src/lib/libutil: parsedate.3

Log Message:
PR bin/56042

Fix typos (2nd acst should have been acdt), 0550 for ist should be 0530
(5.5 hours is not 5 hours and 50 minutes...).

Comment out the zp4 zp5 and zp6 zone names.   They are supposedly supported
by the source (they're in the table) but cannot work, as the parsedate
lexer doesn't allow a "word" to start with an alpha and also contain
digits.   Maybe (just maybe) that could be fixed sometime, but since these
have never worked, and no-one has ever seemed to miss them, and they're the
only words which are of that form, for now, just stop pretending they work.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/lib/libutil/parsedate.3

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



CVS commit: src/games/snake/snscore

2021-05-12 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed May 12 15:26:44 UTC 2021

Modified Files:
src/games/snake/snscore: snscore.c

Log Message:
Adapt to recent change to ../snake/pathnames.h


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/games/snake/snscore/snscore.c

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



CVS commit: src/bin/sh

2021-04-04 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Apr  4 13:24:07 UTC 2021

Modified Files:
src/bin/sh: eval.c jobs.c jobs.h

Log Message:
Related to PR bin/48875

Correct an issue found by Oguz  and reported
in e-mail (on the bug-bash list initially!) with the code changed to deal
with PR bin/48875

With:

 sh -c 'echo start at $SECONDS;
(sleep 3 & (sleep 1& wait) );
echo end at $SECONDS'

The shell should say "start at 0\nend at 1\n", but instead (before
this fix, in -9 and HEAD, but not -8) does "start at 0\nend at 3\n"
(Not in -8 as the 48875 changes were never pulled up)>

There was an old problem, fixed years ago, which cause the same symptom,
related to the way the jobs table was cleared (or not) in subshells, and
it seemed like that might have resurfaced.

But not so, the issue here is the sub-shell elimination, which was part
of the 48875 "fix" (not really, it wasn't really a bug, just sub-optimal
and unexpected behaviour).

What the shell actually has been running in this case is:

 sh -c 'echo start at $SECONDS;
(sleep 3 & sleep 1& wait );
echo end at $SECONDS'

as the inner subshell was deemed unnecessary - all its parent would
do is wait for its exit status, and then exit with that status - we
may as well simply replace the current sub-shell with the new one,
let it do its thing, and we're done...

But not here, the running "sleep 3" will remain a child of that merged
sub-shell, and the "wait" will thus wait for it, along with the sleep 1
which is all it should be seeing.

For now, fix this by not eliminating a sub-shell if there are existing
unwaited upon children in the current one.  It might be possible to
simply disregard the old child for the purposes of wait (and "jobs", etc,
all cmds which look at the jobs table) but the bookkeeping required to
make that work reliably is likely to take some time to get correct...

Along with this fix comes a fix to DEBUG mode shells, which, in situations
like this, could dump core in the debug code if the relevant tracing was
enabled, and add a new trace for when the jobs table is cleared (which was
added predating the discovery of the actual cause of this issue, but seems
worth keeping.)   Neither of these changes have any effect on shells
compiled normally.

XXX pullup -9


To generate a diff of this commit:
cvs rdiff -u -r1.181 -r1.182 src/bin/sh/eval.c
cvs rdiff -u -r1.109 -r1.110 src/bin/sh/jobs.c
cvs rdiff -u -r1.23 -r1.24 src/bin/sh/jobs.h

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



CVS commit: src/bin/sh

2021-02-16 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Feb 16 15:30:26 UTC 2021

Modified Files:
src/bin/sh: input.c

Log Message:
PR bin/55979

Correctly handle (ie: ignore completely) \0 chars (nuls) in the
shell command input stream (script, dot file, or stdin).

Previously nul chars were ignored correctly in the line in which
they occurred, but would cause trailing chars of that line to reappear
as the start of the following line.   If there was just one \0 skipped,
this would generally result in an extra \n in the sh input, which in
most cases has no effect.   With multiple \0's in a single line, more
of the end of that line was duplicated into the following one.  This
usually manifested as a weird "command not found" error.

Note that any \0 chars in the sh input make the script non-conforming,
so fixing this is not crucial (no \0's should really ever be seen) but
it was an obvious bug in the code, which was attempting to ignore nul
chars (as do many other shells), so let it be fixed.

XXX pullup -9


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/bin/sh/input.c

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



CVS commit: src/bin/sh

2021-02-16 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Feb 16 15:30:12 UTC 2021

Modified Files:
src/bin/sh: exec.c

Log Message:
PR bin/55979

This fixes the MSAN detected reference to an unitialised variable
(an unitialised field in a struct) which happens when a command is
not found after a PATH search.

Aside from skipping some known to be going to fail exec*() calls
in some cases, the setting of the relevant field is irrelevant,
so this problem makes no practical difference to the shell, or any
shell script.

XXX (maybe) pullup -9


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/bin/sh/exec.c

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



CVS commit: src

2021-02-16 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Feb 16 09:46:24 UTC 2021

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/bin/sh: Makefile
Added Files:
src/tests/bin/sh: t_input.sh

Log Message:
PR bin/55979

Add a sh ATF test to demonstrate a bug in the way that \0 characters
are dropped from scripts.   This test will eventually be extended to
test other potential sh script input related issues.

When initially committed, this test should fail.  It should succeed
when the fix for the PR is committed (soon).

Nb: this tests only the \0 related issues from the PR, the MSAN
detected uninitialised variable (struct field) can only be detected
by MSAN, as it has no visible impact on the operation of the shell
when running on any real (or even emulated) hardware.
(It will, however, also be fixed).


To generate a diff of this commit:
cvs rdiff -u -r1.1018 -r1.1019 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.14 -r1.15 src/tests/bin/sh/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/bin/sh/t_input.sh

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



CVS commit: src/sys/sys

2021-02-15 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Feb 15 09:29:57 UTC 2021

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

Log Message:
Don't compare int against size_t .. since mbuf lengths should never
be negative, cast it from int to size_t (rather than the other way
around).   Hopefully fix build.


To generate a diff of this commit:
cvs rdiff -u -r1.229 -r1.230 src/sys/sys/mbuf.h

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



CVS commit: src/doc

2021-01-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Jan 24 22:08:37 UTC 2021

Modified Files:
src/doc: CHANGES

Log Message:
Correct date for previous (tzdata 2021a update) - seems I cannot read
the output of the date(1) command any more...


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

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



CVS commit: src/doc

2021-01-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Jan 24 22:02:47 UTC 2021

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note update of tzdata to 2021a


To generate a diff of this commit:
cvs rdiff -u -r1.1773 -r1.1774 src/doc/3RDPARTY
cvs rdiff -u -r1.2775 -r1.2776 src/doc/CHANGES

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



CVS commit: src/external/public-domain/tz/dist

2021-01-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Jan 24 21:59:37 UTC 2021

Modified Files:
src/external/public-domain/tz/dist: TZDATA_VERSION

Log Message:
Merge tzdata2021a


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/external/public-domain/tz/dist/TZDATA_VERSION

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



CVS import: src/external/public-domain/tz/dist

2021-01-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Jan 24 21:59:15 UTC 2021

Update of /cvsroot/src/external/public-domain/tz/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv19196

Log Message:
Import tzdata2021a from ftp://ftp.iana.org/tz/releases/tzdata2021a.tar.gz

Summary of changes in tzdata2021a (2021-01-24 10:54:57 -0800):

South Sudan changes from +03 to +02 on 2021-02-01 at 00:00.

Status:

Vendor Tag: TZDATA
Release Tags:   TZDATA2021A

U src/external/public-domain/tz/dist/leap-seconds.list
U src/external/public-domain/tz/dist/calendars
U src/external/public-domain/tz/dist/CONTRIBUTING
U src/external/public-domain/tz/dist/LICENSE
U src/external/public-domain/tz/dist/Makefile
U src/external/public-domain/tz/dist/NEWS
U src/external/public-domain/tz/dist/README
U src/external/public-domain/tz/dist/theory.html
U src/external/public-domain/tz/dist/version
U src/external/public-domain/tz/dist/africa
U src/external/public-domain/tz/dist/antarctica
U src/external/public-domain/tz/dist/asia
U src/external/public-domain/tz/dist/australasia
U src/external/public-domain/tz/dist/europe
U src/external/public-domain/tz/dist/northamerica
U src/external/public-domain/tz/dist/southamerica
U src/external/public-domain/tz/dist/etcetera
U src/external/public-domain/tz/dist/factory
U src/external/public-domain/tz/dist/backward
U src/external/public-domain/tz/dist/backzone
U src/external/public-domain/tz/dist/iso3166.tab
U src/external/public-domain/tz/dist/checklinks.awk
U src/external/public-domain/tz/dist/leapseconds
U src/external/public-domain/tz/dist/zone1970.tab
U src/external/public-domain/tz/dist/zone.tab
U src/external/public-domain/tz/dist/leapseconds.awk
U src/external/public-domain/tz/dist/checktab.awk
U src/external/public-domain/tz/dist/zoneinfo2tdf.pl
U src/external/public-domain/tz/dist/ziguard.awk
U src/external/public-domain/tz/dist/zishrink.awk

No conflicts created by this import



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

2021-01-21 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Jan 21 09:50:37 UTC 2021

Modified Files:
src/sys/arch/x86/include: bus_defs.h

Log Message:
PRIx (etc) definitions should not include the %

Will fix anything this ends up breaking later.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/include/bus_defs.h

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



CVS commit: src/share/man/man4

2021-01-06 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Jan  6 17:13:23 UTC 2021

Modified Files:
src/share/man/man4: dk.4

Log Message:
Minor grammar fix, more markup, and update date (Dd).


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man4/dk.4

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

2021-01-01 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Jan  1 13:43:34 UTC 2021

Modified Files:
src/usr.bin/xlint/lint1: decl.c

Log Message:
Build breakage fix (hopefully) - brain dead gcc.   NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/usr.bin/xlint/lint1/decl.c

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



CVS commit: src/doc

2020-12-30 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Dec 31 07:54:13 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note update of tzdata to 2020f


To generate a diff of this commit:
cvs rdiff -u -r1.1771 -r1.1772 src/doc/3RDPARTY
cvs rdiff -u -r1.2772 -r1.2773 src/doc/CHANGES

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



CVS commit: src/external/public-domain/tz/dist

2020-12-30 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Dec 31 07:50:44 UTC 2020

Modified Files:
src/external/public-domain/tz/dist: TZDATA_VERSION

Log Message:
Merge tzdata2020f


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/external/public-domain/tz/dist/TZDATA_VERSION

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



CVS import: src/external/public-domain/tz/dist

2020-12-30 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Dec 31 07:50:15 UTC 2020

Update of /cvsroot/src/external/public-domain/tz/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv337

Log Message:
Import tzdata2020f from ftp://ftp.iana.org/tz/releases/tzdata2020f.tar.gz

Release 2020f - 2020-12-29 00:17:46 -0800

No changes to tzdata, just to a part of the build procedure
not used on NetBSD

Release 2020e - 2020-12-22 15:14:34 -0800

Volgograd switched to Moscow time on 2020-12-27 at 02:00.

Correct many pre-1986 transitions, fixing entries originally
derived from Shanks.  The fixes include changes to:
  Australia, Bahamas, Bermuda, Belize, Ghana, Israel and Palestine,
  Kenya and adjacent, Nigeria and adjacent, Seychelles, Vanuatu

Australia/Currie has been moved to the 'backward' file and its
corrected data moved to the 'backzone' file.

To better match legislation in Turks and Caicos, the 2015 shift to
year-round observance of -04 is now modeled as AST throughout before
returning to Eastern Time with US DST in 2018, rather than as
maintaining EDT until 2015-11-01.

Status:

Vendor Tag: TZDATA
Release Tags:   TZDATA2020F

U src/external/public-domain/tz/dist/leap-seconds.list
U src/external/public-domain/tz/dist/calendars
U src/external/public-domain/tz/dist/CONTRIBUTING
U src/external/public-domain/tz/dist/LICENSE
U src/external/public-domain/tz/dist/Makefile
U src/external/public-domain/tz/dist/NEWS
U src/external/public-domain/tz/dist/README
U src/external/public-domain/tz/dist/theory.html
U src/external/public-domain/tz/dist/version
U src/external/public-domain/tz/dist/africa
U src/external/public-domain/tz/dist/antarctica
U src/external/public-domain/tz/dist/asia
U src/external/public-domain/tz/dist/australasia
U src/external/public-domain/tz/dist/europe
U src/external/public-domain/tz/dist/northamerica
U src/external/public-domain/tz/dist/southamerica
U src/external/public-domain/tz/dist/etcetera
U src/external/public-domain/tz/dist/factory
U src/external/public-domain/tz/dist/backward
U src/external/public-domain/tz/dist/backzone
U src/external/public-domain/tz/dist/iso3166.tab
U src/external/public-domain/tz/dist/checklinks.awk
U src/external/public-domain/tz/dist/leapseconds
U src/external/public-domain/tz/dist/zone1970.tab
U src/external/public-domain/tz/dist/zone.tab
U src/external/public-domain/tz/dist/leapseconds.awk
U src/external/public-domain/tz/dist/checktab.awk
U src/external/public-domain/tz/dist/zoneinfo2tdf.pl
U src/external/public-domain/tz/dist/ziguard.awk
U src/external/public-domain/tz/dist/zishrink.awk

No conflicts created by this import



CVS commit: src/include

2020-12-04 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Dec  4 23:04:58 UTC 2020

Modified Files:
src/include: unistd.h

Log Message:
Correct typo in previous.


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/include/unistd.h

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



CVS commit: src/sbin/dump

2020-12-03 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Dec  3 08:25:57 UTC 2020

Modified Files:
src/sbin/dump: dump.h main.c

Log Message:
PR bin/55834

count blocks written in unsigned 64 bit counter
rather than signed int which overflows after 2^31-1
blocks (2TiB) after which neither the 5 minute
status updates or SIGINFO (^T) reports are issued
until the negative numbers increase past 0 and
wildly inaccurate reports would be written.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sbin/dump/dump.h
cvs rdiff -u -r1.77 -r1.78 src/sbin/dump/main.c

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



CVS commit: src/tests/bin/date

2020-10-30 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Oct 30 22:03:36 UTC 2020

Modified Files:
src/tests/bin/date: t_date.sh

Log Message:
Update the test a little so that is possible to pass
(if date fails, because of bad or out of range input
to parsedate, it cannot be expected to output the
expected result).

Remove the atf-expect-fail now that parsedate() should
detect overflows, and fail, causing date to fail, rather
than simply producing bogus results.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/date/t_date.sh

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



CVS commit: src/lib/libutil

2020-10-30 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Oct 30 22:03:11 UTC 2020

Modified Files:
src/lib/libutil: parsedate.y

Log Message:
PR lib/46542

Add checks to detect overflow, and also detect other invalid
(out of range) inputs for parsedate().

There could be more, and some of what is being added is not
perfect, but many calculation overflows will be detected now
(and cause an error return) and some of the most bizarre
inputs that were previously accepted no longer will be.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/lib/libutil/parsedate.y

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



CVS commit: src/doc

2020-10-22 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Oct 22 08:26:00 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note update to tzdata 2020d


To generate a diff of this commit:
cvs rdiff -u -r1.1755 -r1.1756 src/doc/3RDPARTY
cvs rdiff -u -r1.2749 -r1.2750 src/doc/CHANGES

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



CVS commit: src/external/public-domain/tz/dist

2020-10-22 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Oct 22 08:24:04 UTC 2020

Modified Files:
src/external/public-domain/tz/dist: TZDATA_VERSION

Log Message:
Merge tzdata2020d


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/public-domain/tz/dist/TZDATA_VERSION

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



CVS import: src/external/public-domain/tz/dist

2020-10-22 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Oct 22 08:23:45 UTC 2020

Update of /cvsroot/src/external/public-domain/tz/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv1984

Log Message:
Import tzdata2020d from ftp://ftp.iana.org/tz/releases/tzdata2020d.tar.gz

Summary of changes in tzdata2020d (2020-10-21 11:24:13 -0700):

Palestine ends DST earlier than predicted, on 2020-10-24.

Status:

Vendor Tag: TZDATA
Release Tags:   TZDATA2020D

U src/external/public-domain/tz/dist/leap-seconds.list
U src/external/public-domain/tz/dist/calendars
U src/external/public-domain/tz/dist/CONTRIBUTING
U src/external/public-domain/tz/dist/LICENSE
U src/external/public-domain/tz/dist/Makefile
U src/external/public-domain/tz/dist/NEWS
U src/external/public-domain/tz/dist/README
U src/external/public-domain/tz/dist/theory.html
U src/external/public-domain/tz/dist/version
U src/external/public-domain/tz/dist/africa
U src/external/public-domain/tz/dist/antarctica
U src/external/public-domain/tz/dist/asia
U src/external/public-domain/tz/dist/australasia
U src/external/public-domain/tz/dist/europe
U src/external/public-domain/tz/dist/northamerica
U src/external/public-domain/tz/dist/southamerica
U src/external/public-domain/tz/dist/etcetera
U src/external/public-domain/tz/dist/factory
U src/external/public-domain/tz/dist/backward
U src/external/public-domain/tz/dist/backzone
U src/external/public-domain/tz/dist/iso3166.tab
U src/external/public-domain/tz/dist/checklinks.awk
U src/external/public-domain/tz/dist/leapseconds
U src/external/public-domain/tz/dist/zone1970.tab
U src/external/public-domain/tz/dist/zone.tab
U src/external/public-domain/tz/dist/leapseconds.awk
U src/external/public-domain/tz/dist/checktab.awk
U src/external/public-domain/tz/dist/zoneinfo2tdf.pl
U src/external/public-domain/tz/dist/ziguard.awk
U src/external/public-domain/tz/dist/zishrink.awk

No conflicts created by this import



CVS commit: src/lib/libutil

2020-10-19 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Oct 19 17:47:45 UTC 2020

Modified Files:
src/lib/libutil: parsedate.y

Log Message:
Check the year field of a tentative ISO-8601 date format for overflow
before committing to it being an 8601 format date, rather than after
(or the fall back grammar parser doesn't start with a clean slate).

This isn't likely to ever bother anyone, the chances of encountering
something that looks just like an 8601 format date, but with a year
field so large it overflows a long are kind of slim.   If it did happen
the chances that the string could be correctly parsed (into something
different) by the grammar are even slimmer. But better to do it properly.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/lib/libutil/parsedate.y

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



CVS commit: src/lib/libutil

2020-10-19 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Oct 19 15:08:39 UTC 2020

Modified Files:
src/lib/libutil: parsedate.3

Log Message:
Catch the parsedate man page up with recent updates, ans also include
some general improvements I've had kicking around for a long time, but
never got around to committing.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/lib/libutil/parsedate.3

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



CVS commit: src/lib/libutil

2020-10-19 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Oct 19 15:08:17 UTC 2020

Modified Files:
src/lib/libutil: parsedate.y

Log Message:
For touch -d (which uses parsedate()) POSIX specifies that the
ISO-8601 format -mm-ddTHH:MM:SS[radix_and+frac][Z]
be accepted.

We didn't handle that, as in parsedate(), 'T' represents the
military timezone designator, not a padding separator between
date & time as POSIX specified it.

The way parsedate() is written, fixing this in the grammar/lexer
would be hard without deleting support for T as a zone indicator
(it is *my* timezone!).

So, instead of doing that, parse an ISO-8901 string which occurs
right at the start of the input (not even any preceding white space)
by hand, before invoking the grammar, and so not involving the lexer.
This is sufficient to make touch -d conform.

After doing that, we still need to allow earlier valid inputs,
where an ISO-8601 format (using space as the separator, but without
the 'Z' (Zulu, or UTC) suffix) followed by an arbitrary timezone
designation, and other modifiers (eg: "+5 minutes" work.  So we
call the grammar on whatever is left of the input after the 8601
string has been consumed.   This all "just works" with one exception,
a format like "-mm-dd hh:mm:ss +0700" would have the grammar parse
just "+0700" which by itself would be meaningless, and so wasn't
handled.Add a grammar rule & processing to Handle it.

Also note that while POSIX specifies "at least 4" digits in the 
field, we implement "at least one" so years from 0-999 continue to be
parsed as they always have (nb: these were, and continue to be, treated
as absolute year numbers, year 10 is year 10, not 2010).  Years > 2 billion
(give or take) cannot be represented in the tm_year field of a struct tm,
so there's a limit on the max number of digits as well.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/lib/libutil/parsedate.y

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



CVS commit: src/tests/lib/libutil

2020-10-19 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Oct 19 15:06:49 UTC 2020

Modified Files:
src/tests/lib/libutil: t_parsedate.c

Log Message:
Adapt for change to parsedate() which now follows POSIX and altered the
dividing line between 21st and 20th century conversions from 69/70 to
68/69.   Adapt the tests for this to conform.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/tests/lib/libutil/t_parsedate.c

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



CVS commit: src/lib/libutil

2020-10-19 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Oct 19 15:05:53 UTC 2020

Modified Files:
src/lib/libutil: parsedate.y

Log Message:
POSIX requires that when converting 2 digit year representations to
actual specific years, values from 69-99 be treated as 20th century,
and values from 0-68 be treated as 21st century.  This allows for those
unfortunate enough to reside in a timezone west of Greenwich to convert
the epoch (or a time very close to it) to text, write that with just two
digits, and correctly convert it back to a time near the epoch, rather
than to something in 2069.

We used to split things so 0-69 were 21st century, and 70-99 were 20th.
Change that (this requires a change in the parsedate ATF tests which
test this specific boundary).

While here, add support for another POSIX requirement, that the radix
char before fractional seconds can be either a ',' or a '.'.  We used
to allow only '.', add support for ','.   This is something of a meaningless
change, as parsedate() returns a time_t in which there is no way to
represent fractional seconds, so there's little point in ever specifying
them regardless of what char is used for the "decimal point" - they will
be ignored anyway.But at least fractional seconds using a ',' as the
radix char will no longer cause the conversion to fail (or do something else
bizarre).


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/lib/libutil/parsedate.y

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



CVS commit: src/doc

2020-10-17 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Oct 17 08:29:48 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note update of tzdata from 2020b to 2020c


To generate a diff of this commit:
cvs rdiff -u -r1.1753 -r1.1754 src/doc/3RDPARTY
cvs rdiff -u -r1.2746 -r1.2747 src/doc/CHANGES

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



CVS commit: src/external/public-domain/tz/dist

2020-10-17 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Oct 17 08:27:56 UTC 2020

Modified Files:
src/external/public-domain/tz/dist: TZDATA_VERSION

Log Message:
Merge tzdata2020c


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/public-domain/tz/dist/TZDATA_VERSION

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



CVS import: src/external/public-domain/tz/dist

2020-10-17 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Oct 17 08:27:35 UTC 2020

Update of /cvsroot/src/external/public-domain/tz/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv5564

Log Message:
Import tzdata2020c from ftp://ftp.iana.org/tz/releases/tzdata2020c.tar.gz

News for the tz database

Release 2020c - 2020-10-16 11:15:53 -0700

Fiji starts DST later than usual, on 2020-12-20.

Status:

Vendor Tag: TZDATA
Release Tags:   TZDATA2020C

U src/external/public-domain/tz/dist/leap-seconds.list
U src/external/public-domain/tz/dist/calendars
U src/external/public-domain/tz/dist/CONTRIBUTING
U src/external/public-domain/tz/dist/LICENSE
U src/external/public-domain/tz/dist/Makefile
U src/external/public-domain/tz/dist/NEWS
U src/external/public-domain/tz/dist/README
U src/external/public-domain/tz/dist/theory.html
U src/external/public-domain/tz/dist/version
U src/external/public-domain/tz/dist/africa
U src/external/public-domain/tz/dist/antarctica
U src/external/public-domain/tz/dist/asia
U src/external/public-domain/tz/dist/australasia
U src/external/public-domain/tz/dist/europe
U src/external/public-domain/tz/dist/northamerica
U src/external/public-domain/tz/dist/southamerica
U src/external/public-domain/tz/dist/etcetera
U src/external/public-domain/tz/dist/factory
U src/external/public-domain/tz/dist/backward
U src/external/public-domain/tz/dist/backzone
U src/external/public-domain/tz/dist/iso3166.tab
U src/external/public-domain/tz/dist/checklinks.awk
U src/external/public-domain/tz/dist/leapseconds
U src/external/public-domain/tz/dist/zone1970.tab
U src/external/public-domain/tz/dist/zone.tab
U src/external/public-domain/tz/dist/leapseconds.awk
U src/external/public-domain/tz/dist/checktab.awk
U src/external/public-domain/tz/dist/zoneinfo2tdf.pl
U src/external/public-domain/tz/dist/ziguard.awk
U src/external/public-domain/tz/dist/zishrink.awk

No conflicts created by this import



CVS commit: src/external/public-domain/tz/share/zoneinfo

2020-10-08 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Oct  8 13:44:36 UTC 2020

Modified Files:
src/external/public-domain/tz/share/zoneinfo: Makefile

Log Message:
tzdata 2020b: the ancient systemv and pacificnew zone files are gone,
as is the yearistype.sh script (2020b zic, if/when that gets included
in NetBSD won't support it).,


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/public-domain/tz/share/zoneinfo/Makefile

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



CVS commit: src/doc

2020-10-07 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Oct  8 04:30:04 UTC 2020

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note update to tzdata 2020b


To generate a diff of this commit:
cvs rdiff -u -r1.1749 -r1.1750 src/doc/3RDPARTY
cvs rdiff -u -r1.2743 -r1.2744 src/doc/CHANGES

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



CVS commit: src/external/public-domain/tz/dist

2020-10-07 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Oct  8 04:28:00 UTC 2020

Modified Files:
src/external/public-domain/tz/dist: TZDATA_VERSION
Removed Files:
src/external/public-domain/tz/dist: pacificnew systemv yearistype.sh

Log Message:
Merge tzdata2020b


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/external/public-domain/tz/dist/TZDATA_VERSION
cvs rdiff -u -r1.1.1.3 -r0 src/external/public-domain/tz/dist/pacificnew \
src/external/public-domain/tz/dist/systemv
cvs rdiff -u -r1.1.1.2 -r0 src/external/public-domain/tz/dist/yearistype.sh

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



CVS import: src/external/public-domain/tz/dist

2020-10-07 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Oct  8 04:27:36 UTC 2020

Update of /cvsroot/src/external/public-domain/tz/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv16741

Log Message:
Import tzdata2020b from ftp://ftp.iana.org/tz/releases/tzdata2020b.tar.gz

Summary of changes in tzdata2020b (2020-10-06 18:35:04 -0700):

 Revised predictions for Morocco's changes starting in 2023.
 Canada's Yukon changes to -07 on 2020-11-01, not 2020-03-08.
 Macquarie Island has stayed in sync with Tasmania since 2011.
 Casey, Antarctica is at +08 in winter and +11 in summer.

Status:

Vendor Tag: TZDATA
Release Tags:   TZDATA2020B

U src/external/public-domain/tz/dist/leap-seconds.list
U src/external/public-domain/tz/dist/calendars
U src/external/public-domain/tz/dist/CONTRIBUTING
U src/external/public-domain/tz/dist/LICENSE
U src/external/public-domain/tz/dist/Makefile
U src/external/public-domain/tz/dist/NEWS
U src/external/public-domain/tz/dist/README
U src/external/public-domain/tz/dist/theory.html
U src/external/public-domain/tz/dist/version
U src/external/public-domain/tz/dist/africa
U src/external/public-domain/tz/dist/antarctica
U src/external/public-domain/tz/dist/asia
U src/external/public-domain/tz/dist/australasia
U src/external/public-domain/tz/dist/europe
U src/external/public-domain/tz/dist/northamerica
U src/external/public-domain/tz/dist/southamerica
U src/external/public-domain/tz/dist/etcetera
U src/external/public-domain/tz/dist/factory
U src/external/public-domain/tz/dist/backward
U src/external/public-domain/tz/dist/backzone
U src/external/public-domain/tz/dist/iso3166.tab
U src/external/public-domain/tz/dist/checklinks.awk
U src/external/public-domain/tz/dist/leapseconds
U src/external/public-domain/tz/dist/zone1970.tab
U src/external/public-domain/tz/dist/zone.tab
U src/external/public-domain/tz/dist/leapseconds.awk
U src/external/public-domain/tz/dist/checktab.awk
U src/external/public-domain/tz/dist/zoneinfo2tdf.pl
U src/external/public-domain/tz/dist/ziguard.awk
U src/external/public-domain/tz/dist/zishrink.awk

No conflicts created by this import



CVS commit: src/games/factor

2020-10-04 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Oct  4 14:22:52 UTC 2020

Modified Files:
src/games/factor: factor.6

Log Message:
Fix a typo (s/int/in/)


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/games/factor/factor.6

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



CVS commit: src/bin/sh

2020-09-17 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Sep 18 06:48:28 UTC 2020

Modified Files:
src/bin/sh: sh.1

Log Message:
Correct an incorrectly quoted (unquoted, but should be) example used in
the "local" built-in command description (pointed out by mrg@ via uwe@ in
private e-mail).

Add a description to the export command of why this quoting is required,
and then refer to it from local and readonly (explained in export as that
one comes first).

Note that some shells parse export/local/readonly (and often more) as
"declarative" commands, and this quoting isn't needed (provided the
command name is literal and not the result of an expansion) making
X=$Y type args not require quoting, as they often don't in a regular
variable assignment (preceding, or not part of, another command).
POSIX is going to allow, but not require, that behaviour.  We do not
implement it.


To generate a diff of this commit:
cvs rdiff -u -r1.227 -r1.228 src/bin/sh/sh.1

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



CVS commit: src/external/bsd/atf/dist/atf-sh

2020-09-10 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Sep 10 22:51:11 UTC 2020

Modified Files:
src/external/bsd/atf/dist/atf-sh: libatf-sh.subr

Log Message:
Replace a pipe into tr to normalise a var name (convert '.' or '-'
into '_' to meet sh variable name rules) into a shell string processing
loop.

On my test system, this reduces the total elapsed time for the bin/sh ATF
tests from about 109 secs to about 102 (user cpu from 24.5 to 21, sys cpu
from 34 to 30) and the usr.bin/make tests elapsed time from 42.5 to 40
secs (user from a bit over 15 to a bit over 13, and sys from 16+ to 13+).
(Recorded on an AMD64 domU).

These probably exaggerate the effect, as there are a bunch of quite small
tests, which means the ATF overhead (which this change affects) is a greater
proportion of the total test time than for some other tests where most of
the time is spent actually testing.

But I am fairly confident that there will be at least some improvement.

This could be further improved by removing the cmdsub invocation method,
and instead passing the name of a variable containing the string to
normalise (with the result returned in that same var) - but that would
mean altering all the callers as well.   Some other time maybe.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/atf-sh/libatf-sh.subr

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

2020-09-10 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Sep 10 17:40:34 UTC 2020

Modified Files:
src/tests/usr.bin/make: t_make.sh

Log Message:
Whitespace.  NFC.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/make/t_make.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/make

2020-09-10 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Sep 10 17:33:17 UTC 2020

Modified Files:
src/tests/usr.bin/make: t_make.sh

Log Message:
Replace use of tr to translate '-' in test names into '_' to satisfy ATF
requirements (correct sh variable/function name syntax).  Use a sh
loop instead, and save one fork() one vfork() and one exec of tr for
each test case (many of which don't need anything done to them at all).

This might partially mitigate PR misc/55595


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/usr.bin/make/t_make.sh

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



CVS commit: src/bin/sh

2020-08-30 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Aug 30 19:45:05 UTC 2020

Modified Files:
src/bin/sh: jobs.c

Log Message:
Since "struct job" gained a pgrp member some time ago now, use it
instead of simply assuming that the pid of the first (leftmost) process
in a pipeline is the pgrp - someday we may switch things around and
create pipelines right to left instead, which has several advantages,
but which would invalidate the assumption which was being made here.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/bin/sh/jobs.c

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



CVS commit: src/bin/kill

2020-08-30 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Aug 30 19:41:39 UTC 2020

Modified Files:
src/bin/kill: kill.1

Log Message:
Note that negative pid args are permitted (indicating to send to the pgrp
abs(pid)) and indicate that -- is (strictly) needed if the first pid arg
(there often is only one) is negative - though this implementation works
without it if a signal to send has been explicitly given, but whereas
'kill 1234" is valid (send SIGTERM to pid 1234) "kill -1234" will generate
a usage error from the attempt to send signal 1234 to nothing, to send
SIGTERM to pgrp 1234 it needs to be "kill -- -1234" (or "kill -s term -1234").

While here do a couple of markup improvements, and allow for the
possibility that users might be running the builtin kill from some
shell other than csh or sh.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/bin/kill/kill.1

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



CVS commit: src/bin/kill

2020-08-30 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Aug 30 19:35:10 UTC 2020

Modified Files:
src/bin/kill: kill.c

Log Message:
Every integer that fits within a pid_t is a potential "pid" arg to kill.
That means we cannot use (pid_t)-1 as an error indicator, as that's a
valid pid to use (described as working in kill(1) - yet it wasn't working
in /bin/kill (nor sh's builtin kill, which is essentially the same code).
This is even required to work by POSIX.

So change processnum() (the parser/validator for the pid args) to take
a pointer to a pid_t and return the pid that way, leaving the return value
of the (now int) function to indicate just ok/error.  While here, fix
the validation a little ('' is no longer an accepted alias for 0) and in
case of an error from kill(2) have the error message indicate whether the
kill was targeted at a pid of a pgrp.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/bin/kill/kill.c

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



CVS commit: src/bin/kill

2020-08-30 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Aug 30 16:10:40 UTC 2020

Modified Files:
src/bin/kill: kill.1 kill.c

Log Message:
Use the POSIX specified format if POSIXLY_CORRECT is set in the
environment, rather than the nicer layout that is normally used.

Note this applies to /bin/kill only, the builtin kill in sh uses its
"posix" option for the same purpose, the one in csh only ever uses
POSIX format.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/bin/kill/kill.1 src/bin/kill/kill.c

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



CVS commit: src/bin/sh

2020-08-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Aug 25 19:42:02 UTC 2020

Modified Files:
src/bin/sh: sh.1

Log Message:
Idiot typo, generated by an idiot, fixed by the same one.


To generate a diff of this commit:
cvs rdiff -u -r1.226 -r1.227 src/bin/sh/sh.1

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



CVS commit: src/bin/sh

2020-08-20 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Aug 20 23:19:34 UTC 2020

Modified Files:
src/bin/sh: sh.1

Log Message:
Man page enhancements.

Better describe the command search procedure.
Document "trap -P"
Describe what works as a function name.
More accurate description of reserved word recognition.
Be more accurate about when field splittng happens after
expansions (and in particular note that tilde expansions are
not subject to field splitting).   Be clear that "$@" is
not field split, it simply produces multiple fields as part
of its expansion (hence IFS is irrelevant to this), but if
used as $@ (unquoted) each field produced is potentially subject
to field splitting.   Other minor wording changes.


To generate a diff of this commit:
cvs rdiff -u -r1.224 -r1.225 src/bin/sh/sh.1

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



CVS commit: src/bin/sh

2020-08-20 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Aug 20 23:09:56 UTC 2020

Modified Files:
src/bin/sh: eval.c trap.c

Log Message:
Be less conservative about when we do clear_traps() when we have
traps_invalid (that is, when we actually nuke the parent shell's
caught traps in a subshell).  This allows more reasonable use of
"trap -p" (and similar) in subshells than existed before (and in
particular, that command can be in a function now - there can also
be several related commands like
traps=$(trap -p INT; trap -p QUIT; trap -p HUP)
A side effect of all of this is that
(eval "$(trap -p)"; ...)
now allows copying caught traps into a subshell environment, if desired.

Also att the ksh93 variant (the one not picked by POSIX as it isn't
generally as useful) of "trap -p" (but call it "trap -P" which extracts
just the trap action for named signals (giving more than one is usually
undesirable).   This allows
eval "$(trap -P INT)"
to run the action for SIGINT traps, without needing to attempt to parse
the "trap -p" output.


To generate a diff of this commit:
cvs rdiff -u -r1.180 -r1.181 src/bin/sh/eval.c
cvs rdiff -u -r1.54 -r1.55 src/bin/sh/trap.c

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



CVS commit: src/bin/sh

2020-08-20 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Aug 20 23:03:17 UTC 2020

Modified Files:
src/bin/sh: jobs.c

Log Message:
Add lots of comments explaining what is happening in here.

Also enhance some of the DEBUG mode trace output (nothing visible
in a normal shell build).

A couple of very minor code changes that no-one should ever notice
(eg: one less wait() call in the case that there is nothing pending).


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/bin/sh/jobs.c

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



CVS commit: src/lib/libc/gen

2020-08-20 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Aug 20 22:56:56 UTC 2020

Modified Files:
src/lib/libc/gen: signalname.3 signalnumber.c

Log Message:
When not compiling -DSMALL permit use of names RTMIN[+n] and RTMAX[-n]
(where n is a decimal integer in the range [0 .. SIGRTMAX-SIGRTMIN].
As usual a leading "sig" is ignored and the strings are case independent.

Some implementations do not name the real time signals, and using
labels like RTMIN+3 can be the only way they can be manipulated,
so allow that technique (we still return the RTnn names on the inverse
translation though).

Because this is used by both kill(1) and sh(1) the kill and trap
commands both gain access to the new notation (when !SMALL).


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/gen/signalname.3 \
src/lib/libc/gen/signalnumber.c

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



CVS commit: src/bin/sh

2020-08-20 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Aug 20 16:15:50 UTC 2020

Modified Files:
src/bin/sh: trap.c

Log Message:
Whitespace.   NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/bin/sh/trap.c

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



CVS commit: src/bin/sh

2020-08-19 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Aug 19 22:41:47 UTC 2020

Modified Files:
src/bin/sh: parser.c

Log Message:
For now, probably forever, prohibit unquoted $ and ` in the names of
functions being defined (they can still be included if quoted).

If we parsed the way POSIX specifies (leaving the exact input text of
$ and ` expansions unaltered, until required to be expanded) this would
not be needed, as the name of a function being defined does not underbo
parameter, command, or arith expansions, so xxx$3() { : ; } would just
work.   But for many reasons we don't do that (and are unlikely to ever,
though maintaing both forms might be an option someday) - which led to
very obscure behaviour (if sh were compiled in DEBUG mode, even an abort())
and certainly nothing useful.   So just prohibit these uses for now.
(A portable function name must be a "name" so this makes no difference
at all to posix compat applications/scripts).

A doc update is pending (the updated sh.1 also contains updates in other
areas not yet appropriate to commit).


To generate a diff of this commit:
cvs rdiff -u -r1.170 -r1.171 src/bin/sh/parser.c

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



CVS commit: src/bin/sh

2020-08-01 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Aug  1 17:56:56 UTC 2020

Modified Files:
src/bin/sh: expand.c

Log Message:
Remove a redundant set of parentheses that were added (along with a
extra && or || or something ... forgotten now) as part a failed attempt
to fix an earlier bug (later fixed a better way) - when the extra
test (never committed) was removed, the now-redundant parentheses got
forgotten...

NFC.


To generate a diff of this commit:
cvs rdiff -u -r1.137 -r1.138 src/bin/sh/expand.c

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



CVS commit: src/bin/sh

2020-08-01 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Aug  1 17:51:18 UTC 2020

Modified Files:
src/bin/sh: exec.c

Log Message:
PR bin/55526

Fix a bug that has existed since the "command" command was added in
2003.   "command foo" would cause the definition of a function "foo"
to be lost (not freed, simply discarded) if "foo" is (in addition to
being a function) a filesystem command.   The case where "foo" is
a builtin was handled.

For now, when a function exists with the same name as a filesystem
command, the latter can never appear in the command hash table, and
when used (which can only be via "command foo", just "foo" finds
the function) will always result in a full PATH search.

XXX pullup everything (from NetBSD 2.0 onwards).   (really -8 and -9)


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/bin/sh/exec.c

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



CVS commit: src/lib/libc/gen

2020-05-11 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon May 11 14:54:34 UTC 2020

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

Log Message:
Do as the manual says, and use _PATH_DEFPATH if PATH is not present in
the environment rather than simply turning into posix_spawn() in that case.

Also, we cannot use strtok() to parse PATH, the semantics don't fit the API.
Borrow the guts of execvp for the PATH search.

We still simply check for a file with 'x' permission, and assume that one
will do, whatever it is, which isn't really correct, but ...


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

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



CVS commit: src/bin/kill

2020-05-06 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed May  6 13:13:50 UTC 2020

Modified Files:
src/bin/kill: kill.1

Log Message:
Bump date for previous change...  I frequently forget that bit.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/bin/kill/kill.1

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



CVS commit: src/bin/kill

2020-05-06 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed May  6 09:07:15 UTC 2020

Modified Files:
src/bin/kill: kill.1

Log Message:
kill is built-in to more than just csh(1).
While here, add missing Xr sh 1 (which was previously needed, moreso now)
and also include STOP and CONT in the list of common signals.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/bin/kill/kill.1

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



CVS commit: src

2020-04-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Apr 25 12:18:48 UTC 2020

Modified Files:
src/distrib/sets/lists/base: mi
src/doc: 3RDPARTY CHANGES

Log Message:
Update to tzdata2020a (new zone file America/Nuuk)

XXX pullup -8 -9


To generate a diff of this commit:
cvs rdiff -u -r1.1240 -r1.1241 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.1714 -r1.1715 src/doc/3RDPARTY
cvs rdiff -u -r1.2680 -r1.2681 src/doc/CHANGES

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



CVS commit: src/external/public-domain/tz/dist

2020-04-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Apr 25 12:17:17 UTC 2020

Modified Files:
src/external/public-domain/tz/dist: TZDATA_VERSION

Log Message:
Merge tzdata2020a


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/external/public-domain/tz/dist/TZDATA_VERSION

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



CVS import: src/external/public-domain/tz/dist

2020-04-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Apr 25 12:17:00 UTC 2020

Update of /cvsroot/src/external/public-domain/tz/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv24977

Log Message:
Import tzdata2020a from ftp://ftp.iana.org/tz/releases/tzdata2020a.tar.gz

Summary of changes in tzdata2020a (2020-04-23 16:03:47 -0700):

Morocco resumes summer time on 2020-05-31, not 2020-05-24.
Canada's Yukon advanced to -07 year-round on 2020-03-08 (summer time
  will not end this year)..
America/Nuuk renamed from America/Godthab (both names now exist).

Status:

Vendor Tag: TZDATA
Release Tags:   TZDATA2020A

U src/external/public-domain/tz/dist/leap-seconds.list
U src/external/public-domain/tz/dist/calendars
U src/external/public-domain/tz/dist/CONTRIBUTING
U src/external/public-domain/tz/dist/LICENSE
U src/external/public-domain/tz/dist/Makefile
U src/external/public-domain/tz/dist/NEWS
U src/external/public-domain/tz/dist/README
U src/external/public-domain/tz/dist/theory.html
U src/external/public-domain/tz/dist/version
U src/external/public-domain/tz/dist/africa
U src/external/public-domain/tz/dist/antarctica
U src/external/public-domain/tz/dist/asia
U src/external/public-domain/tz/dist/australasia
U src/external/public-domain/tz/dist/europe
U src/external/public-domain/tz/dist/northamerica
U src/external/public-domain/tz/dist/southamerica
U src/external/public-domain/tz/dist/etcetera
U src/external/public-domain/tz/dist/systemv
U src/external/public-domain/tz/dist/factory
U src/external/public-domain/tz/dist/backward
U src/external/public-domain/tz/dist/pacificnew
U src/external/public-domain/tz/dist/backzone
U src/external/public-domain/tz/dist/iso3166.tab
U src/external/public-domain/tz/dist/checklinks.awk
U src/external/public-domain/tz/dist/zone.tab
U src/external/public-domain/tz/dist/leapseconds
U src/external/public-domain/tz/dist/yearistype.sh
U src/external/public-domain/tz/dist/zone1970.tab
U src/external/public-domain/tz/dist/leapseconds.awk
U src/external/public-domain/tz/dist/checktab.awk
U src/external/public-domain/tz/dist/zoneinfo2tdf.pl
U src/external/public-domain/tz/dist/ziguard.awk
U src/external/public-domain/tz/dist/zishrink.awk

No conflicts created by this import



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

2020-04-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Apr 24 14:29:19 UTC 2020

Modified Files:
src/tests/usr.bin/printf: printf.sh

Log Message:
ATF runs shell script tests with "sh -e" (WHY???)

Compensate for that by adding an explicit test to a command so
-e will not kill the shell when the command (expectedly) fails.

Previously this was saved by /bin/sh disabling -e in command subs.


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

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



CVS commit: src/usr.bin/units

2020-04-23 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Apr 23 09:38:17 UTC 2020

Modified Files:
src/usr.bin/units: units.lib

Log Message:
If we're having Thai units, make them correct.  A tarangwah is a square wah,
which is ~4m^2 but not exactly (just as a wah is not exactly 2m, but close).
(wah apparently comes from the width of a person with hands outstretched...)


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/units/units.lib

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



CVS commit: src/bin/sh

2020-04-23 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Apr 23 09:01:33 UTC 2020

Modified Files:
src/bin/sh: eval.c

Log Message:
Stop forcing the -e option off in the subshell createds for a command
substitution.  This was inherited in the big "-e" fixup patch set (rev 1.50)
of Jan 2000, which came from dash.   dash no longer acts this way.


To generate a diff of this commit:
cvs rdiff -u -r1.178 -r1.179 src/bin/sh/eval.c

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



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

2020-04-19 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Apr 19 19:36:49 UTC 2020

Modified Files:
src/sys/arch/arm/arm32: pmap.c

Log Message:
Give UVMHIST_LOG() the 6 args it requires.   Unbreak builds.


To generate a diff of this commit:
cvs rdiff -u -r1.409 -r1.410 src/sys/arch/arm/arm32/pmap.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/libi386

2020-04-19 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Apr 19 18:07:00 UTC 2020

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

Log Message:
Define TESTSDIR even when not amd64 so the Atffile will be
installed in the correct location.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libi386/Makefile

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



CVS commit: src/sys/dev/onewire

2020-04-14 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Apr 14 15:36:02 UTC 2020

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

Log Message:
Only include opt_xxx.h headers when _KERNEL_OPT is defined.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/onewire/onewire.c

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



CVS commit: src

2020-04-13 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Apr 14 03:16:27 UTC 2020

Modified Files:
src/distrib/sets/lists/base: mi
src/external/bsd/dhcpcd/libexec/dhcpcd-hooks: Makefile

Log Message:
Since dhcpcd-hools/02-dump seems to have been removed from the
repository, don't attempt to install it, and don't expect it to
be installed.If a better fix is to return 02-dump, then this
change can be reverted (by anyone, just go ahead and do it).

dhcpcd(8) should also have mention of 02-dump removed, if removing
it was intentional.


To generate a diff of this commit:
cvs rdiff -u -r1.1239 -r1.1240 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.5 -r1.6 \
src/external/bsd/dhcpcd/libexec/dhcpcd-hooks/Makefile

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



CVS commit: src/usr.sbin/makefs/ffs

2020-03-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Mar 26 04:25:28 UTC 2020

Modified Files:
src/usr.sbin/makefs/ffs: mkfs.c

Log Message:
Fix the build, use %jd and (intmax_t) cast for big numbers, off_t
and ptrdiff_t aren't always the same size.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/makefs/ffs/mkfs.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/string

2020-03-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Mar 25 16:15:41 UTC 2020

Modified Files:
src/lib/libc/string: strerror_r.c

Log Message:
Arrange that strerror(-1) prints "Unknown error: -1" and not the
unsigned equivalent of -1.

While here, guarantee, even when !NLS, that nothing here (not even
snprintf deciding to complain about EILSEQ or something) can ever
alter errno (ie: always save and restore it, not only in the NLS case).
The functions here must never alter errno, whatever happens.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/string/strerror_r.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/string

2020-03-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Mar 25 16:10:17 UTC 2020

Modified Files:
src/lib/libc/string: strerror.c

Log Message:
Protect against malloc failure corrupting errno, which is not
permitted of these functions.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/libc/string/strerror.c

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



CVS commit: src

2020-03-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Mar 25 18:45:42 UTC 2020

Modified Files:
src/distrib/sets/lists/comp: mi
src/lib/libc/string: Makefile.inc strerror.3

Log Message:
Document strerror_l()

While here also document (but comment it out since it isn't
available - yet) strerror_lr().   To include that, simply
uncomment the relevant lines, and (twice I think) s/returns/return/
on lines just after currently commented out lines (that is, it
currently says, "A returns" after the comments are returned, we
need it to be "A and B return" - the "and B" appears when the comment
markers are removed, removing the 's' from returns must be done manually.

In addition to adding strerror_l() some additional enhancements were
made to the general strerror() doc.


To generate a diff of this commit:
cvs rdiff -u -r1.2315 -r1.2316 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.83 -r1.84 src/lib/libc/string/Makefile.inc
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/string/strerror.3

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



CVS commit: src/lib/libc/string

2020-03-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Mar 25 18:50:47 UTC 2020

Modified Files:
src/lib/libc/string: strerror.3

Log Message:
Delete the BUGS paragraph about the "missing" const qualifier for the
result type of strerror() (and strerror_l()).   While that once should
really have been present, when strerror() was invented, there was no
"const" qualifier in C to apply, and now the way the code is writtem
(really needs to be because of NLS support) the const is no longer
really appropriate.

Applications still shouldn't attempt to modify the result however.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libc/string/strerror.3

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



CVS commit: src/lib/librumpuser

2020-03-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Mar 24 14:56:32 UTC 2020

Modified Files:
src/lib/librumpuser: rumpuser_sp.c

Log Message:
If we're going to loop, pausing and then retrying malloc() after it
has failed, in the hope that some other thread has free'd some memory,
but we want to bound the number of attempts, it helps if we actually
count them - otherwise we never get nearer to the limit.

In practice, malloc() for a reasonable application on a modern system
almost never fails, so the code containing this bug has probably never
been, and never will be, executed, but just in case, someday.

For this, it isn't clear if the intent was to have 10 retries (ie: 11
attempts) or 10 tries, but as the code said "retries > 10", I am
assuming the former (not that it matters, if the malloc() has failed
10 times in a row, with 10 second pauses between, the chances of an
11th succeeding aren't great).


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/lib/librumpuser/rumpuser_sp.c

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



CVS commit: src/sys/dev/usb

2020-03-18 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Mar 18 11:33:32 UTC 2020

Modified Files:
src/sys/dev/usb: if_aue.c

Log Message:
This was still not correct,. USB_DEBUG is what mattered, not AUE_DEBUG,
the two are orthogonal.

Just do it the way that should work, rather than trying to work out
what magic will allow a new variable to be defined so that it appears
exactly when it is needed and not otherwise.   The var isn't required,
just do without it.


To generate a diff of this commit:
cvs rdiff -u -r1.170 -r1.171 src/sys/dev/usb/if_aue.c

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



CVS commit: src/sys/arch/xen/xen

2020-03-16 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Mar 17 05:04:11 UTC 2020

Modified Files:
src/sys/arch/xen/xen: xennetback_xenbus.c

Log Message:
#if 0 the declaration and definition of xennetback_tx_free()

Since it is never otherwise referenced, this cannot make any
current operational difference, but should fix the build.
(-Werror=unused-function)

The added #if/#endif lines are /* XXX */ commented, so they will be
easy to remove when needed.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/xen/xen/xennetback_xenbus.c

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



CVS commit: src/bin/sh

2020-02-12 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Feb 13 05:19:05 UTC 2020

Modified Files:
src/bin/sh: expand.c expand.h

Log Message:
When expanding a here-doc (NXHERE - the type with an unquoted end delim)
the output will not be further processed (at all) so there is no need
to escape magic chars in the output, and doing so leaves stray CTLESC
chars in the here doc text.  Not good.   So don't do that...

To save a strlen() of the result, to determine the size of the here doc,
make rmescapes() return the length of the resulting string (this isn't
needed for other uses, so didn't happen previously).

Reported on current-users@ (2020-02-06) by Jun Ebihara

XXX pullup -9


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.137 src/bin/sh/expand.c
cvs rdiff -u -r1.24 -r1.25 src/bin/sh/expand.h

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



CVS commit: src/bin/sh

2020-02-06 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Feb  7 02:06:13 UTC 2020

Modified Files:
src/bin/sh: jobs.c

Log Message:
Avoid a core dump if a child process that is not one of our
children happens to exit while we are waiting for another child
to exit.

This can happen with code like

sh -c '
sleep 5 &
exec sh -c "sleep 10 & wait !$"
  '

when the inner "sh" is waiting for the 10 second sleep to be
done, the 5 second sleep started earlier terminates.   It is
a child of our process, as the inner shell is the same process
as the outer one, but not a known child (the inner shell has no
idea what the outer one did before it started).

This was observed in the wild by Martijn Dekker (where the outer
shell was bash but that's irrelevant).

XXX pullup -9


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/bin/sh/jobs.c

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



CVS commit: src/bin/sh

2020-02-06 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Feb  6 20:08:28 UTC 2020

Modified Files:
src/bin/sh: main.c

Log Message:
Actually, the issue with bash (in previous) is more likely that the
SIGCHLD is blocked rather than ignored.   We want neither.   Make sure
SIGCHLD is unblocked as well as SIG_DFL.

XXX pullup -9


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/bin/sh/main.c

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



CVS commit: src/bin/sh

2020-02-06 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Feb  6 19:51:59 UTC 2020

Modified Files:
src/bin/sh: main.c

Log Message:
If we are invoked with SIGCHLD ignored, we fail badly, as we assume
that we can always wait(2) for our children, and an ignored SIGCHLD
prevents that.   Recent versions of bash can be convinced (due to a
bug most likely) to invoke us that way.   Always return SIGCHLD to
SIG_DFL during init - we already prevent scripts from fiddling it.

All ash derived shells apparently have this problem (observed by
Martijn Dekker, and notified on the bash-bug list).  Actual issue
diagnosed by Harald van Dijk (same list).


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/bin/sh/main.c

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



CVS commit: src/bin/sh

2020-02-05 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Feb  5 14:56:26 UTC 2020

Modified Files:
src/bin/sh: options.c

Log Message:
Oops, the previous didn't do what was promised.  Rather that ignoring
just "--" for exec & "." it ignored any first arg starting '-'.
Do it properly.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/bin/sh/options.c

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



CVS commit: src/bin/sh

2020-02-04 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Feb  4 16:06:59 UTC 2020

Modified Files:
src/bin/sh: eval.c options.c

Log Message:
After bug report 262 (from 2010)
https://austingroupbugs.net/view.php?id=252
the Austin Group decided to require processing of "--" by the "."
and "exec" commands to solve a problem where some shells did
option processing for those commands (permitted) and others did
not (also permitted) which left no safe way to process a file
with a name beginning with "-".

This has finally made its way into what will be the next version of
the POSIX standard.

Since this shell did no option processing at all for those commands,
we need to update.   This is that update.

The sole effect is that a "--" 'option' (to "." or "exec") is ignored.
This means that if you want to use "--" as the arg to one of those
commands, it needs to be given twice ". -- --".   Apart from that there
should be no difference at all (though the "--" can now be used in other
situations, where we did not require it before, and still do not).


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 src/bin/sh/eval.c
cvs rdiff -u -r1.53 -r1.54 src/bin/sh/options.c

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



CVS commit: src/sys/conf

2020-02-03 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Feb  3 13:28:11 UTC 2020

Modified Files:
src/sys/conf: majors.usb

Log Message:
urio has gone.   Comment it out (remaining visible to hold the number)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/conf/majors.usb

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



CVS commit: src/sys/dev/usb

2020-02-03 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Feb  3 12:56:27 UTC 2020

Modified Files:
src/sys/dev/usb: files.usb

Log Message:
urio(4) has gone - remove it from here as well, so any kernel config
files that reference it will fail to configure, rather than later
failing to build.


To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 src/sys/dev/usb/files.usb

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



CVS commit: src/distrib/miniroot

2020-01-18 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Jan 19 00:57:00 UTC 2020

Modified Files:
src/distrib/miniroot: install.sub

Log Message:
test ! -n "$foo"   is just a quaint way of saying test -z "$foo"
and test ! -z "$foo" is really just test -n "$foo"  so let's just
use the simple (and more obvious) forms.

NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/distrib/miniroot/install.sub

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



CVS commit: src/distrib/miniroot

2020-01-18 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Jan 19 00:50:25 UTC 2020

Modified Files:
src/distrib/miniroot: install.sub

Log Message:
The idiom

set $whatever
while [ $# - gt 10 ]; do shift 10; done
eval echo \$$#

fails when $# turns out to be 10 (or any multiple), it would need
to be instead

while [ $# -ge 10 ]; do shift 9; done

but there hasn't been a shell that cannot handle ${10} (etc) correctly
in a very long time, so let's just use that instead (properly quoted,
in case IFS happens to contain a digit for some bizarre reason).

We should also "set -f" / "set +f" (or better, restore the prev setting of -f)
around the "set $whatever" part, but if that was ever going to cause a problem
here, it would have already, so leave that for now.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/distrib/miniroot/install.sub

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



  1   2   3   4   5   6   7   8   9   10   >