General code cleanup. No operational change intended.
Mostly fix quoting, some missing quotes added, lots of meaningless
quotes removed (no guarantee of completeness in either of those).
Also get rid of one use of the obsolete test -o operator, and several
less than ideal uses of the test ! operator ... replace all that by
shell || and ! uses.
Don't use $@ in any context where field splitting cannot occur (also
avoid it in a couple of places where it would be defined, but isn't
actually wanted:
echo "whatever: $@"
is technically OK, but is generally just a waste of everyone's time,
the shell passing a whole set of args to echo for it to combine
back into one line is pointless. But X="$@" and using $@ in a
here doc are simply wrong.
The 80-column police visited during the update (just a couple of
[11 lines not shown]
carp_join_multicast: Stop allocating ip_moptions on stack
It was just a waste of memory. NFC otherwise, and no regression
observed for full ATF run on amd64.
Partially taken from OpenBSD:
https://github.com/openbsd/src/commit/1f237790b75
XXX
Seems like OpenBSD has some fixes to carp, that may improve our
implementation...
timerfd_settime(2): Return relative duration remaining.
Not absolute time of next event.
PR kern/58917: timer_settime and timerfd_settime return absolute time
of next event
timer_settime(2): Return relative duration remaining.
Not absolute time of next event.
PR kern/58917: timer_settime and timerfd_settime return absolute time
of next event
build.sh: Use X11_TYPE=modular for build.sh pkg=... by default.
You can override it in your MAKECONF if you want to debug issues in
pkgsrc with cross-building X11_TYPE=native, but let's try to make
things work out of the box here if you don't go out of your way.
t_timer_create: Fix up tests for edge cases.
While here, save and restore errno in signal handler.
PR kern/58919: timer_settime fails to trigger for past times
PR kern/58920: timer_settime fails ETIMEDOUT on negative interval, not
EINVAL
t_getitimer: Test invalid itimerval arguments.
Use sig_atomic_t while here.
Ex-POSIX (POSIX.1-2008; the interface was removed in POSIX.1-2024)
prescribes EINVAL for all of these cases:
SYNOPSIS
#include <sys/time.h>
int getitimer(int which, struct itimerval *value);
int setitimer(int which, const struct itimerval *restrict value,
struct itimerval *restrict ovalue);
[...]
ERRORS
The setitimer() function shall fail if:
[7 lines not shown]