versioning.h: add 3.6 specific version code, switch default version to 3.6

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
configure.ac: make pcre a hard dependency

This patch removes the ENABLE_PCRE conditional, as well as making the
pcre dependency a requirement.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
logmatcher: added store-matches warning to PCRE LogMatcher

As we are changing the default matcher implementation the warning on the
'store-matches' flag should be triggered by the PCRE matcher too. This
patch does exactly that.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
logmatcher: change the default matcher to PCRE instead of POSIX

This patch changes the default LogMatcher implementation starting
with syslog-ng 3.6. If the configuration indicates an earlier version
using the @version pragma, it still uses the POSIX implementation and
issues a warning to the user to update her config.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
LogProtoREMultiLineServer: use pcre instead of posix regexps

Now as PCRE is a hard dependency, we can prefer using that in our
multi-line implementation. It is faster anyway. The patch also
refactors multi-line regexps to a separate object.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
logmatcher: enable PCRE just-in-time compiler if possible

This patch adds PCRE_STUDY_JIT_COMPILE to the pcre_study() flags in order
to enable the JIT compiler in PCRE.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
apphook: remove unused unregister_application_hook

Signed-off-by: Juhasz Viktor <jviktor@balabit.hu>
crypto: don't cast locking callbacks explicitly

In order to get type safety from the compiler, avoid an explicit cast and
fix the function prototype to match the OpenSSL expectations.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
syslog-ng.h: remove DMALLOC macros

dmalloc has not been support for a long time, its configure.ac counterpart
has already been removed, remove the stuff from syslog-ng.h too.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
configure.ac: break up AC_CHECK_HEADERS to one header per line

To make it easier to extend the list and cause less conflicts.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
configure.ac: break up AC_CHECK_FUNCS to one function per line

To make it easier to extend the list and cause less conflicts.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Makefile.am: change library ordering in TEST_LDADD

Since libsyslog-ng-test.a uses symbols from libsyslog-ng.so, the .a file
should come first. The only reason this didn't cause issues is that so
far all test programs directly referenced the .so file too. If that
doesn't happen, linking errors ensue.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
gsockaddr: constify ip address parameter for GSockAddrInet constructor

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
syslog-ng-ctl: make control_name const

To fix a warning and to indicate that syslog-ng-ctl doesn't own that value.
It's only a borrowed reference, its memory is managed by reloc.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
cfg: free global LogTemplateOptions

This fixes a potential memory leak when global template specific
options were specified, such as local-time-zone(), send-time-zone() etc.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
hostname: factor out hostname related functions from misc
host-resolve: factor out resolver related functions from misc
hostname: refactor, cleanup and test coverage

This is a largish patch that contains multiple changes to the hostname
module.  The intentions of this patch are:

  * port new functionality from PE, which is essentially custom-domain()
  * make the code easier to follow and define clear semantics of all
    functions and test it via a unit test program
  * add the foundations of a custom-domain() option that can be used to
    override the local domain name
  * introduction of global_init/deinit function pairs
  * add two new functions that convert a hostname from fqdn to short and
    vice versa

Although it'd be better to split this patch along these lines, however
splitting it up is not really easy because of the internal dependencies, and
that the original was written as a single iteration. Essentially internal
steps would need to be rewritten from scratch.

Signed-off-by: Viktor Juhasz <jviktor@balabit.hu>
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
host-resolve: use hostname provided functions instead of global variables directly
cfg: implement custom-domain() setting