summaryrefslogtreecommitdiffstats
path: root/src/libutil/regexp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-05-06 12:27:35 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-05-06 12:27:35 +0100
commit4c7e7cb362a1589b1a326f3f69bc918430e82bfd (patch)
tree5f0c43c30eaaa7c769b852ca3bcc18ae6f7b12f0 /src/libutil/regexp.c
parent918e08f278c23d83497d30d0dd8485cbfd01181e (diff)
downloadrspamd-4c7e7cb362a1589b1a326f3f69bc918430e82bfd.tar.gz
rspamd-4c7e7cb362a1589b1a326f3f69bc918430e82bfd.zip
Some pcre distributions are brain damaged.
Diffstat (limited to 'src/libutil/regexp.c')
-rw-r--r--src/libutil/regexp.c8
1 files changed, 4 insertions, 4 deletions
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);