tests/input.at: Tiny cosmetic change
Fix tests if directory contains special chars
lib/pidfile/pidfile.c: Make Clang happy

Silence two "implicit conversion loses integer precision" warnings.
src/common/tls.c: Include <errno.h>

Include <errno.h>, as the "errno" variable is used by the
check_tls_error() function.
Don't stumble over CRLF in send_nsca.cfg(5) files

The client failed at coping with CRLF-terminated lines in
send_nsca.cfg(5) files.

Thanks to Paul Richards for noting this bug.
src/client/send_nsca.c: Remove nonsensical cast

Our xasprintf() returns no value.
Don't specify "unused" attribute in declaration

Specify __attribute__((__unused__)) only in function definitions, not in
function declarations.  The latter is unnecessary, and we didn't do that
elswehere in the code.
src/common/log.c: Flush stderr stream

Log output should not be buffered.
Add optional systemd(1) support to nsca-ng(8)

Make the server play nicely with systemd(1) (or any compatible init
system) by adding optional support for

- socket activation,
- the "notify" process startup type (see systemd.service(5)),
- the "WatchdogSec" feature (see systemd.service(5)), and
- systemd(1)-style logging to the standard error output (see daemon(7)
  and sd-daemon(3)).

No new nsca-ng(8) option has been added.  When compiled with systemd(1)
support, the server enables these features automatically if it was
socket activated.

The systemd(1) integration will remain completely optional.
etc/nsca-ng.cfg: Update comment

These days, users may specify "hosts" expressions.
etc/nsca-ng.service: Use title case in description

The unit files provided with systemd(1) use title case for their
descriptions, so let's do that as well.
etc/nsca-ng.socket: Add a description

... and pointers to the NSCA-ng server man pages.
src/common/util.c: Simplify an overflow check

Thanks go to Marc Espie for pointing out (in a discussion unrelated to
NSCA-ng) that the size_t overflow check in our string concatenation
function was unnecessarily complex.
src/common/util.c: Fix the overflow fix

There was a typo in our simplified size_t overflow check.  It wouldn't
have caught the len2 == SIZE_T_MAX case.

Thanks to Christian Siefkes for noting this.
etc/nsca-ng.service: Make sure socket is installed

| Usually you also want to make sure that when your service is installed
| your socket is installed too, hence add Also=foo.socket in your
| service file foo.service, for a hypothetical program foo.

[ daemon(7) ]
etc/nsca-ng.service: Depend on socket activation

The nsca-ng(8) server currently has no proper support for running under
systemd(1) without socket activation.  Therefore, the systemd.service(5)
should explicitly depend on the systemd.socket(5):

| If you want to make sure your service never tries to start without
| socket activation, it should have Requires=foo.socket; none of the
| default relations are strong enough to strictly prohibit starting
| without a socket.  I think at least the case where creating the socket
| fails and admin manually says "systemctl start foo.service" would
| always start the service without a socket otherwise.

[ http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=1689;bug=727708 ]
Add Travis CI configuration

See:

	http://docs.travis-ci.com/user/getting-started/
	http://docs.travis-ci.com/user/build-configuration/
	http://docs.travis-ci.com/user/languages/c/
src/server/fifo.c: Fix fstat(2) error handling

Properly handle the case where fstat(2) returns -1 while looking at the
FIFO descriptor.  We got this wrong due to missing parenthesis.

Discovered by Coverity Scan.
src/common/util.c: Fix out-of-bounds write error

Our get_openssl_version() function copies the OpenSSL version string
into a buffer.  This commit fixes the issue that the nul-termination of
that copy would've overflowed the buffer if the version string was
overlong (which won't happen in practice).

Discovered by Coverity Scan.
tests/test_nsca.c: Check open(2)'s return value

Make Coverity Scan happy.