libpcre2: tests: workaround for setrlimit

tests fail on gcc2.
This commit is contained in:
Jerome Duval
2019-11-24 17:05:13 +01:00
parent 088cf202d4
commit e4f5b45262

View File

@@ -1,14 +1,14 @@
From e1812512ada6e350a2f0fd63d874e8eee31a309e Mon Sep 17 00:00:00 2001
From 03c1ce3a7e4d136494802d35162ce0b9635b6fdc 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 1f21bfb..f107883 100644
index f564127..35c8930 100644
--- a/src/pcre2_jit_compile.c
+++ b/src/pcre2_jit_compile.c
@@ -3873,6 +3873,8 @@ DEFINE_COMPILER;
@@ -3952,6 +3952,8 @@ DEFINE_COMPILER;
SLJIT_UNUSED_ARG(backtracks);
SLJIT_UNUSED_ARG(must_be_valid);
@@ -17,7 +17,7 @@ index 1f21bfb..f107883 100644
#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
struct sljit_jump *jump;
#endif
@@ -3948,6 +3950,7 @@ if (common->invalid_utf && !must_be_valid)
@@ -4027,6 +4029,7 @@ if (common->invalid_utf && !must_be_valid)
#endif /* SUPPORT_UNICODE */
OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
}
@@ -26,5 +26,29 @@ index 1f21bfb..f107883 100644
static void check_newlinechar(compiler_common *common, int nltype, jump_list **backtracks, BOOL jumpifmatch)
{
--
2.21.0
2.24.0
From f3c74ee6806efba2623d5b0b2e36053fc22a4dd9 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 57bd110..5c219cf 100644
--- a/src/pcre2test.c
+++ b/src/pcre2test.c
@@ -8632,7 +8632,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.24.0