Skip to content

Commit c30cf82

Browse files
avargitster
authored andcommitted
grep: un-break building with PCRE < 8.20
Amend my change earlier in this series ("grep: add support for the PCRE v1 JIT API", 2017-04-11) to un-break the build on PCRE v1 versions earlier than 8.20. The 8.20 release was the first release to have JIT & pcre_jit_stack in the headers, so a mock type needs to be provided for it on those releases. Now git should compile with all PCRE versions that it supported before my JIT change. I've tested it as far back as version 7.5 released on 2008-01-10, once I got down to version 7.0 it wouldn't build anymore with GCC 7.1.1, and I couldn't be bothered to anything older than 7.5 as I'm confident that if the build breaks on those older versions it's not because of my JIT change. See the "un-break" change in this series ("grep: un-break building with PCRE < 8.32", 2017-05-10) for why this isn't squashed into the main PCRE JIT commit. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e87de7c commit c30cf82

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

grep.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
#ifndef PCRE_STUDY_JIT_COMPILE
1212
#define PCRE_STUDY_JIT_COMPILE 0
1313
#endif
14+
#if PCRE_MAJOR <= 8 && PCRE_MINOR < 20
15+
typedef int pcre_jit_stack;
16+
#endif
1417
#else
1518
typedef int pcre;
1619
typedef int pcre_extra;

0 commit comments

Comments
 (0)