configure.ac: Improved the linux capability check

The Linux capabilities check was dependent only on the existence of
<sys/capability.h>. While there was a check performed for -lcap and its
usability, if that check failed, linux capability support was never
turned off.

This caused problems on recent FreeBSDs, where the header exists, but -
naturally - the library does not. This patch fixes #175, by modifying
the check to turn off the feature if the library is not available.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
logmsg: log_msg_ack() code refactored little bit

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
logmsg: log_msg_cached abort type is a boolean value (and not an integer)

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
logqueue: the way we determine whether a queue is empty or not is racy

at this time we just use this racy function but we have to know about it:
this is why we rename it to is_empty_racy()

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
logwriter: pending_proto re-established (we need it)

A pending proto can be set to null while it is present.
[see: log_writer_reopen_deferred]

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
logqueue: ack_backlog checking is moved to the superclass

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
logqueue: is_empty() fixed

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
logwriter: flush modes refactored

only two modes left: one for normal flush (LW_FLUSH_NORMAL)
and one for force mode (LW_FLUSH_FORCE)

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
Preparations for syslog-ng 3.6.0alpha1

Bumped VERSION to 3.6.0alpha1; renamed NEWS to NEWS.md, and added
noteworthy changes since 3.5.5.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
configure.ac: Fix --enable-linux-caps

While fixing the auto-detection of Linux capabilities,
--enable-linux-caps got broken. This patch corrects that, so that both
work now.

Reported-by: Peter Czanik <czanik@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
configure.ac: Bump the libmongo-client dependency to >= 0.1.8

The MongoDB destination requires functionality from libmongo-client >=
0.1.8, bump the minimum library version. This fixes #181.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
afsocket: Implement UNIX credentials support for FreeBSD

FreeBSD supports passing UNIX credentials over UNIX sockets, but in a
different way than Linux. This patch adds auto-detection and a little
wrapping, and ports the functionality to FreeBSD, and with that,
closes #182.

Reported-by: Peter Czanik <czanik@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
transport-aux: #include <string.h>

Since we're using memcpy(), include <string.h> to make Clang on FreeBSD
happy.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
configure.ac: Fix the struct ucred detection

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
tests: Silence a compiler warning

Do #include <string.h> in tests/unit/test_ringbuffer.c, for the sake of
basename(), to silence a compiler warning.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
ack: use the correct LMAck signature

Signed-off-by: Laszlo Budai <stentor.bgyk@gmail.com>
Merge pull request #179 from lbudai/f/merge-proto-fix

F/merge proto fix