summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-11-21 14:05:30 +0900
committerJunio C Hamano <gitster@pobox.com>2017-11-21 14:05:30 +0900
commit8e3e51a3a791074110ab1946d8da3430c65d435c (patch)
treebe2ded3ce4fa8c2f2bf689e9beb5e550578c4e6e
parentb77b96e29b9429a6cf10dd6fad15f9a220977029 (diff)
parent2fff1e196d9cf03a868e99da39ea21b7c18c65c5 (diff)
downloadgit-8e3e51a3a791074110ab1946d8da3430c65d435c.tar.gz
Merge branch 'ab/pcre-v2' into maint
Building with NO_LIBPCRE1_JIT did not disable it, which has been fixed. * ab/pcre-v2: grep: fix NO_LIBPCRE1_JIT to fully disable JIT
-rw-r--r--grep.c2
-rw-r--r--grep.h5
2 files changed, 4 insertions, 3 deletions
diff --git a/grep.c b/grep.c
index ce6a48e634..d0b9b6cdfa 100644
--- a/grep.c
+++ b/grep.c
@@ -387,7 +387,7 @@ static void compile_pcre1_regexp(struct grep_pat *p, const struct grep_opt *opt)
if (!p->pcre1_regexp)
compile_regexp_failed(p, error);
- p->pcre1_extra_info = pcre_study(p->pcre1_regexp, PCRE_STUDY_JIT_COMPILE, &error);
+ p->pcre1_extra_info = pcre_study(p->pcre1_regexp, GIT_PCRE_STUDY_JIT_COMPILE, &error);
if (!p->pcre1_extra_info && error)
die("%s", error);
diff --git a/grep.h b/grep.h
index 52aecfab6e..399381c908 100644
--- a/grep.h
+++ b/grep.h
@@ -7,11 +7,12 @@
#if PCRE_MAJOR >= 8 && PCRE_MINOR >= 32
#ifndef NO_LIBPCRE1_JIT
#define GIT_PCRE1_USE_JIT
+#define GIT_PCRE_STUDY_JIT_COMPILE PCRE_STUDY_JIT_COMPILE
#endif
#endif
#endif
-#ifndef PCRE_STUDY_JIT_COMPILE
-#define PCRE_STUDY_JIT_COMPILE 0
+#ifndef GIT_PCRE_STUDY_JIT_COMPILE
+#define GIT_PCRE_STUDY_JIT_COMPILE 0
#endif
#if PCRE_MAJOR <= 8 && PCRE_MINOR < 20
typedef int pcre_jit_stack;