Add __attribute__((__noreturn__)) to various function prototypes in usr.sbin/. This general cleanup is useful in various ways. It helps the compiler optimize better and it also helps later GCCs detect better when to give -Wimplicit-fallthrough warnings and when not. Found-with: -Wsuggest-attribute=noreturn
rwhod(8): Fix the warning and raise WARNS back up to 6. 'next' is only initialized and referenced (in separate if()'s) when 'quiet_mode' is not set. Unfortunately gcc does not realize this and warns about 'next' being maybe uninitialized. Fix this by initializing 'next', with no functional change.
libutil: Various updates from FreeBSD, esp. pid_* functions It appears that libutil.so is another Frankenstein monster where half of it came from FreeBSD and later it was updated with NetBSD functions. Like libm, this causes problems with syncing later. In order to update the daemon program, the set of pidfile_* functions had to be brought in from FreeBSD. While doing that, I synced with FreeBSD as much as possible. The expand number function was added as well as a dedicated pw_util man page. Specifically ignored were FreeBSD functionality involving kinfo and kld. The login functions are essentially incompatible as the FreeBSD ones require syscntls, so I left the NetBSD versions alone. The various humanize functions that only exist on DragonFly were also left untouched. Collateral damage included: sbin/devd/devd.[ch][ch] (partial sync) usr.sbin/authpf/authpf.c (partial sync) usr.sbin/apmd/apmd.c usr.sbin/battd/battd.c usr.sbin/bthcid/bthcid.c usr.sbin/pflogd/pflogd.c usr.sbin/rwhod/rwhod.c usr.sbin/syslogd/ (full sync) usr.sbin/sysvipcd/sysvipcd.c
rwhod(8): Prevent clobbering the neighboring field by a wrong cast. The time stamps in the rwhod(8) network datagram and, based on that, /var/rwho/whod.* spool files are typed as 32bit int and cannot accept a 64bit time_t. The old code clobbered the first bytes of the adjacent "hostname" field, yielding empty hostnames in local rwho(1) and ruptime(1) output. (Outgoing datagrams to other hosts were not affected.) Re-code to let the compiler do the proper coercion (well, until 2038). Submitted-by: Martin Neitzel Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/2339>