[syslog-ng] [PATCH] support for older PCRE

Balazs Scheidler bazsi at balabit.hu
Sun Feb 6 10:22:12 CET 2011


Thanks Matthew.

Commited as:

commit 141aca6110e64d6b030045cd1db51cfcde2b3ecc
Author: Balazs Scheidler <bazsi at balabit.hu>
Date:   Sun Feb 6 10:21:42 2011 +0100

    configure: allow older pcre versions to be used
    
    This patch allows syslog-ng to be compiled with an old (older than 7.1)
    version of PCRE at the cost of not supporting the "newline" flag for
    regexes. syslog-ng prints a warning at runtime if the user wants to
    use the "newline" flag.
    
    Signed-off-by: Matthew Hall <mhall at mhcomputing.net>
    Signed-off-by: Balazs Scheidler <bazsi at balabit.hu>



On Thu, 2011-02-03 at 16:05 -0800, Matthew Hall wrote:
> Can we get this one added for older PCRE support?
> Bazsi made the old version, I tested and I updated it to apply cleanly on 3.2 master.
> 
> Signed-off-by: Matthew Hall <mhall at mhcomputing.net>
> 
> ---
> 
> diff --git a/configure.in b/configure.in
> index 0c6cef2..f574f48 100644
> --- a/configure.in
> +++ b/configure.in
> @@ -25,6 +25,8 @@ EVTLOG_MIN_VERSION="0.2"
>  OPENSSL_MIN_VERSION="0.9.8"
>  LIBDBI_MIN_VERSION="0.8.0"
>  PCRE_MIN_VERSION="7.3"
> +dnl mhall allow older pcre
> +PCRE_MIN_VERSION="6.1"
>  
>  dnl ***************************************************************************
>  dnl Initial setup
> diff --git a/lib/logmatcher.c b/lib/logmatcher.c
> index f0a822c..d003c58 100644
> --- a/lib/logmatcher.c
> +++ b/lib/logmatcher.c
> @@ -520,8 +520,13 @@ log_matcher_pcre_re_compile(LogMatcher *s, const gchar *re)
>   
>    if (self->super.flags & LMF_ICASE)
>      flags |= PCRE_CASELESS;
> +
> +/* mhall allow older pcre */  
> +#ifdef PCRE_NEWLINE_ANYCRLF
>    if (self->super.flags & LMF_NEWLINE)
>      flags |= PCRE_NEWLINE_ANYCRLF;
> +#endif
> +
>    if (self->super.flags & LMF_UTF8)
>      {
>         gint support;
> 
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.campin.net/syslog-ng/faq.html
> 
> 

-- 
Bazsi




More information about the syslog-ng mailing list