From 4c7e7cb362a1589b1a326f3f69bc918430e82bfd Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 6 May 2015 12:27:35 +0100 Subject: Some pcre distributions are brain damaged. --- src/libutil/regexp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libutil') diff --git a/src/libutil/regexp.c b/src/libutil/regexp.c index c3b542fd9..6f7d07f6f 100644 --- a/src/libutil/regexp.c +++ b/src/libutil/regexp.c @@ -327,7 +327,7 @@ rspamd_regexp_search (rspamd_regexp_t *re, const gchar *text, gsize len, { pcre *r; pcre_extra *ext; -#if defined(HAVE_PCRE_JIT) && (PCRE_MAJOR == 8 && PCRE_MINOR >= 32) +#if defined(HAVE_PCRE_JIT) && defined(HAVE_PCRE_JIT_FAST) pcre_jit_stack *st = NULL; #endif const gchar *mt; @@ -362,7 +362,7 @@ rspamd_regexp_search (rspamd_regexp_t *re, const gchar *text, gsize len, if ((re->flags & RSPAMD_REGEXP_FLAG_RAW) || raw) { r = re->raw_re; ext = re->raw_extra; -#if defined(HAVE_PCRE_JIT) && (PCRE_MAJOR == 8 && PCRE_MINOR >= 32) +#if defined(HAVE_PCRE_JIT) && defined(HAVE_PCRE_JIT_FAST) st = re->raw_jstack; #endif } @@ -370,7 +370,7 @@ rspamd_regexp_search (rspamd_regexp_t *re, const gchar *text, gsize len, match_flags |= PCRE_NO_UTF8_CHECK; r = re->re; ext = re->extra; -#if defined(HAVE_PCRE_JIT) && (PCRE_MAJOR == 8 && PCRE_MINOR >= 32) +#if defined(HAVE_PCRE_JIT) && defined(HAVE_PCRE_JIT_FAST) st = re->jstack; #endif } @@ -379,7 +379,7 @@ rspamd_regexp_search (rspamd_regexp_t *re, const gchar *text, gsize len, if (!(re->flags & RSPAMD_REGEXP_FLAG_NOOPT)) { #ifdef HAVE_PCRE_JIT -# if (PCRE_MAJOR == 8 && PCRE_MINOR >= 32) +# ifdef HAVE_PCRE_JIT_FAST /* XXX: flags seems to be broken with jit fast path */ g_assert (remain > 0); g_assert (mt != NULL); -- cgit v1.2.3