libutil: Various updates from FreeBSD, esp. pid_* functions
authorJohn Marino <draco@marino.st>
Sun, 9 Feb 2014 14:21:13 +0000 (15:21 +0100)
committerJohn Marino <draco@marino.st>
Sun, 9 Feb 2014 19:07:22 +0000 (20:07 +0100)
commitd316f7c95d4b8b07a5557eb0a39cfa39b7114297
treebe9a0c14be184618e4fbd7897e90c57424d44892
parenta79d775c3bd70d994e4d39cd0f88831bd381fc6c
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
65 files changed:
lib/libutil/Makefile
lib/libutil/_secure_path.3
lib/libutil/_secure_path.c
lib/libutil/auth.c
lib/libutil/dehumanize_number.c
lib/libutil/expand_number.3 [new file with mode: 0644]
lib/libutil/expand_number.c [new file with mode: 0644]
lib/libutil/flopen.3
lib/libutil/flopen.c
lib/libutil/fparseln.3
lib/libutil/fparseln.c
lib/libutil/gr_util.c
lib/libutil/hexdump.3
lib/libutil/hexdump.c
lib/libutil/humanize_number.3
lib/libutil/humanize_number.c
lib/libutil/humanize_unsigned.c
lib/libutil/libutil.h
lib/libutil/login.c
lib/libutil/login.conf.5
lib/libutil/login_auth.3
lib/libutil/login_auth.c
lib/libutil/login_cap.3
lib/libutil/login_cap.c
lib/libutil/login_cap.h
lib/libutil/login_class.c
lib/libutil/login_crypt.c
lib/libutil/login_ok.3
lib/libutil/login_ok.c
lib/libutil/login_times.3
lib/libutil/login_times.c
lib/libutil/login_tty.3
lib/libutil/login_tty.c
lib/libutil/logout.c
lib/libutil/logwtmp.c
lib/libutil/pidfile.3
lib/libutil/pidfile.c
lib/libutil/property.3
lib/libutil/property.c
lib/libutil/pty.3
lib/libutil/pty.c
lib/libutil/pw_util.3 [new file with mode: 0644]
lib/libutil/pw_util.c
lib/libutil/realhostname.3
lib/libutil/realhostname.c
lib/libutil/realhostname_sa.3
lib/libutil/stub.c
lib/libutil/trimdomain.3
lib/libutil/trimdomain.c
lib/libutil/uucplock.3
lib/libutil/uucplock.c
sbin/devd/devd.cc
sbin/devd/devd.hh
usr.sbin/apmd/apmd.c
usr.sbin/authpf/authpf.c
usr.sbin/battd/battd.c
usr.sbin/bthcid/bthcid.c
usr.sbin/pflogd/pflogd.c
usr.sbin/rwhod/rwhod.c
usr.sbin/syslogd/Makefile
usr.sbin/syslogd/pathnames.h
usr.sbin/syslogd/syslog.conf.5
usr.sbin/syslogd/syslogd.8
usr.sbin/syslogd/syslogd.c
usr.sbin/sysvipcd/sysvipcd.c