]> git.ipfire.org Git - thirdparty/git.git/blobdiff - grep.h
grep: un-break building with PCRE < 8.32
[thirdparty/git.git] / grep.h
diff --git a/grep.h b/grep.h
index 267534ca24df532505854e1af31c53ed01bab24e..3b948d91553142b8e3e9c52c2e4a5cd1a66a497a 100644 (file)
--- a/grep.h
+++ b/grep.h
@@ -1,11 +1,20 @@
 #ifndef GREP_H
 #define GREP_H
 #include "color.h"
-#ifdef USE_LIBPCRE
+#ifdef USE_LIBPCRE1
 #include <pcre.h>
+#ifdef PCRE_CONFIG_JIT
+#if PCRE_MAJOR >= 8 && PCRE_MINOR >= 32
+#define GIT_PCRE1_USE_JIT
+#endif
+#endif
+#ifndef PCRE_STUDY_JIT_COMPILE
+#define PCRE_STUDY_JIT_COMPILE 0
+#endif
 #else
 typedef int pcre;
 typedef int pcre_extra;
+typedef int pcre_jit_stack;
 #endif
 #include "kwset.h"
 #include "thread-utils.h"
@@ -46,9 +55,11 @@ struct grep_pat {
        size_t patternlen;
        enum grep_header_field field;
        regex_t regexp;
-       pcre *pcre_regexp;
-       pcre_extra *pcre_extra_info;
-       const unsigned char *pcre_tables;
+       pcre *pcre1_regexp;
+       pcre_extra *pcre1_extra_info;
+       pcre_jit_stack *pcre1_jit_stack;
+       const unsigned char *pcre1_tables;
+       int pcre1_jit_on;
        kwset_t kws;
        unsigned fixed:1;
        unsigned ignore_case:1;
@@ -111,7 +122,7 @@ struct grep_opt {
        int allow_textconv;
        int extended;
        int use_reflog_filter;
-       int pcre;
+       int pcre1;
        int relative;
        int pathname;
        int null_following_name;