blob: 5ee636bc522ad7dc8480bc1ada0f2246dfcb47cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
https://git.savannah.gnu.org/cgit/rcs.git/commit/?h=p&id=10fb2a018f320ff3c1615baa5af491410d9f8d09
https://bugs.gentoo.org/806356
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Mon, 5 Apr 2021 10:13:49 -0700
Subject: =?UTF-8?q?Don=E2=80=99t=20use=20SIGSTKSZ=20in=20#if?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Problem reported by Christoph Karl in:
https://lists.gnu.org/r/bug-rcs/2021-04/msg00000.html
* b-isr.c (ISR_STACK_SIZE): Remove.
(isr_init): Don’t assume SIGSTKSZ is a preprocessor constant.
--- a/src/b-isr.c
+++ b/src/b-isr.c
@@ -198,22 +198,17 @@ setup_catchsig (size_t count, int const set[VLA_ELEMS (count)])
#undef MUST
}
-#if defined HAVE_SIGALTSTACK && defined SIGSTKSZ
-#define ISR_STACK_SIZE (10 * SIGSTKSZ)
-#else
-#define ISR_STACK_SIZE 0
-#endif
-
struct isr_scratch *
isr_init (bool *be_quiet)
{
struct isr_scratch *scratch = ZLLOC (1, struct isr_scratch);
-#if ISR_STACK_SIZE
+#if defined HAVE_SIGALTSTACK && defined SIGSTKSZ
+ size_t stack_size = 10 * SIGSTKSZ;
stack_t ss =
{
- .ss_sp = alloc (PLEXUS, ISR_STACK_SIZE),
- .ss_size = ISR_STACK_SIZE,
+ .ss_sp = alloc (PLEXUS, stack_size),
+ .ss_size = stack_size,
.ss_flags = 0
};
cgit v1.2.1
|