summaryrefslogtreecommitdiff
path: root/grep.h
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2017-05-25 20:05:27 +0000
committerJunio C Hamano <gitster@pobox.com>2017-05-26 12:59:05 +0900
commitc30cf827a8a3d9e85b2459418599ae874b3e4787 (patch)
tree5cf2149fce8e8dfb4ceaa5bd92dcabeee2de9ecd /grep.h
parente87de7cab4f4e3a8ebf4cc588d26636c3d828e4c (diff)
downloadgit-c30cf827a8a3d9e85b2459418599ae874b3e4787.tar.gz
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 <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'grep.h')
-rw-r--r--grep.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/grep.h b/grep.h
index 3b948d9155..ce90969736 100644
--- a/grep.h
+++ b/grep.h
@@ -11,6 +11,9 @@
#ifndef PCRE_STUDY_JIT_COMPILE
#define PCRE_STUDY_JIT_COMPILE 0
#endif
+#if PCRE_MAJOR <= 8 && PCRE_MINOR < 20
+typedef int pcre_jit_stack;
+#endif
#else
typedef int pcre;
typedef int pcre_extra;