path: root/grep.h
diff options
authorÆvar Arnfjörð Bjarmason <>2017-05-25 20:05:27 (GMT)
committerJunio C Hamano <>2017-05-26 03:59:05 (GMT)
commitc30cf827a8a3d9e85b2459418599ae874b3e4787 (patch)
tree5cf2149fce8e8dfb4ceaa5bd92dcabeee2de9ecd /grep.h
parente87de7cab4f4e3a8ebf4cc588d26636c3d828e4c (diff)
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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'grep.h')
1 files changed, 3 insertions, 0 deletions
diff --git a/grep.h b/grep.h
index 3b948d9..ce90969 100644
--- a/grep.h
+++ b/grep.h
@@ -11,6 +11,9 @@
+#if PCRE_MAJOR <= 8 && PCRE_MINOR < 20
+typedef int pcre_jit_stack;
typedef int pcre;
typedef int pcre_extra;