fixup! compat: add strtok_r implementation for platforms that lack that
fixup! configure.ac: readd missing test on "modern" utmp database
cfg-grammar: create CHECK_ERROR() variant without error message

In some cases CHECK_ERROR() macro is invoked without an error message,
which simply means it should simply return the grammar without producing
a verbose error message. This happens when a recursive grammar already
produced a meaningful error message.

Instead of overloading CHECK_ERROR() with a NULL errormsg in this case,
introduce a separate macro.

This also fixes a warning when compiling with clang.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
logproto-regexp-multiline-server: avoid defining MultiLineRegexp multiple times

The typedef was already in the header, so no need to define it in the
implementation module too.

This fixes a warning when compiling with clang.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
serialize: use gssize for the result of I/O operations

fread/fwrite returns signed quantity and anything below 0 indicates
a failure. This code errorenously used gsize instead of gssize causing
the error handling never to be triggered.

Fortunately this code is only being used to upgrade a persist-state file
in the older format, and read() rarely if ever fails once the file could
successfully be opened.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
stats: fix format spec for an int variable

The code that formatted the per-facility/severity stats counters used
the guint16 format specifier for an int.

This patch also fixes caused a warning when compiling with clang.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
afsocket: remove an extra parentheses in afsocket_dd_construct_writer_method()

This patch removes an extra set of parentheses as it was unneeded and
clang gave us a warning about that.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
syslog-ng-ctl: use gssize for sizes returned by read()

Read returns signed values and the simplistic syslog-ng-ctl interface
used an unsigned value for that, causing the error handling portion
of the slng_read_response() routine never to trigger.

This patch fixes that.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>