From bf4934e8a907b00cb9197b8c8d4edb463d897843 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Tue, 30 Apr 2019 18:33:26 +0200
Subject: gcc2 fix


diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c
index db2ce65..f3b049f 100644
--- a/src/pcre2_jit_compile.c
+++ b/src/pcre2_jit_compile.c
@@ -3759,6 +3759,8 @@ static void peek_char_back(compiler_common *common, sljit_u32 max, jump_list **b
 contain the start of the subject buffer. Affects TMP1, TMP2, and RETURN_ADDR. */
 DEFINE_COMPILER;
 
+{
+
 #if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
 struct sljit_jump *jump;
 #endif /* SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 */
@@ -3820,6 +3822,7 @@ if (common->invalid_utf)
 #endif /* PCRE2_CODE_UNIT_WIDTH == [8|16|32] */
 #endif /* SUPPORT_UNICODE */
 }
+}
 
 #define READ_CHAR_UPDATE_STR_PTR 0x1
 #define READ_CHAR_UTF8_NEWLINE 0x2
-- 
2.30.2


From 3a4670bf68c77ad68c67b7c044aae99d01c627d1 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sun, 24 Nov 2019 11:14:44 +0100
Subject: workaround broken setrlimit on Haiku.


diff --git a/src/pcre2test.c b/src/pcre2test.c
index 84987d7..ca7c3fa 100644
--- a/src/pcre2test.c
+++ b/src/pcre2test.c
@@ -8717,7 +8717,9 @@ while (argc > 1 && argv[op][0] == '-' && argv[op][1] != 0)
       {
       fprintf(stderr, "pcre2test: setting stack size %luMiB failed: %s\n",
         (unsigned long int)stack_size, strerror(errno));
+#ifndef __HAIKU__
       exit(1);
+#endif
       }
     op++;
     argc--;
-- 
2.30.2

