Skip to content

Commit 8e3e51a

Browse files
committed
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
2 parents b77b96e + 2fff1e1 commit 8e3e51a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

grep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ static void compile_pcre1_regexp(struct grep_pat *p, const struct grep_opt *opt)
387387
if (!p->pcre1_regexp)
388388
compile_regexp_failed(p, error);
389389

390-
p->pcre1_extra_info = pcre_study(p->pcre1_regexp, PCRE_STUDY_JIT_COMPILE, &error);
390+
p->pcre1_extra_info = pcre_study(p->pcre1_regexp, GIT_PCRE_STUDY_JIT_COMPILE, &error);
391391
if (!p->pcre1_extra_info && error)
392392
die("%s", error);
393393

grep.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
#if PCRE_MAJOR >= 8 && PCRE_MINOR >= 32
88
#ifndef NO_LIBPCRE1_JIT
99
#define GIT_PCRE1_USE_JIT
10+
#define GIT_PCRE_STUDY_JIT_COMPILE PCRE_STUDY_JIT_COMPILE
1011
#endif
1112
#endif
1213
#endif
13-
#ifndef PCRE_STUDY_JIT_COMPILE
14-
#define PCRE_STUDY_JIT_COMPILE 0
14+
#ifndef GIT_PCRE_STUDY_JIT_COMPILE
15+
#define GIT_PCRE_STUDY_JIT_COMPILE 0
1516
#endif
1617
#if PCRE_MAJOR <= 8 && PCRE_MINOR < 20
1718
typedef int pcre_jit_stack;

0 commit comments

Comments
 (0)