Extend the syntax of syslog.conf to allow selections of log destinations
by program name.

From FreeBSD.
Add the ability to pipe selected messages through an arbitrary filtering
command.

From FreeBSD, who in turn took the idea from IRIX.
Suppress logging of SIGCHLDs while shutting down a little differently.
Accept !* as a wild-card program name as documented.
Update to the pipe-to-filter code from FreeBSD: Fix a race condition
between the SIGHUP handler and the SIGCHLD handler that could lead to
random processes on the system being killed by mistake.
Yet another fix from FreeBSD for the pipe-to-filter code: Set SA_RESTART on
SIGHUP and SIGCHLD.
Further elaborate on the pipe-to-filter support.
Extend the syslog.conf syntax to allow selecting messages based on
the originating host.  "+hostname" selects messages from the specified
host, and "-hostname" selects messages from hosts other than the specified
host.

From FreeBSD.
MAXHOSTNAMELEN includes the NUL.  From FreeBSD.
Use case-insensitive comparisons for host names and domain names.
When parsing the program name from the incoming log message,
accept all printable characters except ':' and '[' as being
part of the program name.

From FreeBSD.
Extend the !prog syntax to allow !+prog and !-prog, similar to the +hostname
and -hostname functionality.

From FreeBSD.
Extend the program and hostname specification syntax to allow comma-separated
lists of programs and hostnames.

Inspired by a similar change in FreeBSD, but implemented differently.
Oops, need to allow commas in the hostname specifications for last change.
Improve the handling of the local domain name in hostname matching.
Inspired by a similar change in FreeBSD, but implemented slightly
differently.
Make sure f_lasttime gets updated on the consfile, too.
From FreeBSD.
If an error occurs while trying to log an error that has already occurred,
avoid recursion.
Make the parsing of kernel syslog messages more careful so that they
match only "<%d>message goes here".  Avoids problems with kernel printfs
that begin with "<" but are not actually kernel syslog messages.

From FreeBSD.
Use strtol() to parse the priority/facility in printline(), too.
From FreeBSD.
Fix an error in printline(): LOG_FAC() generates an index into the
facilities name array, and is not suitable for comparing to an
actual facility value; mask with LOG_FACMASK instead.  Also make a
note that since LOG_KERN is 0, the check for this will also match
log messages that have no specified facility.

From FreeBSD.