Skip to content

Commit 6642fdb

Browse files
committed
packages/cysignals: Add sagemath/cysignals#197 as a patch
1 parent 558eba2 commit 6642fdb

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

packages/cysignals/meta.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ source:
88
sha256: 0f1e321e55a07f901c86a36a1e4497f6ff9dfe700681d0130a38c36e4eb238c3
99
patches:
1010
- patches/193.patch
11+
- patches/0001-src-cysignals-implementation.c-EMSCRIPTEN-Do-not-use.patch
1112
about:
1213
home: https://github.com/sagemath/cysignals
1314
PyPI: https://pypi.org/project/cysignals
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
From b13d2be64ff7f855465002cd507cb830de0d43da Mon Sep 17 00:00:00 2001
2+
From: Matthias Koeppe <[email protected]>
3+
Date: Wed, 24 Jan 2024 23:24:45 -0800
4+
Subject: [PATCH] src/cysignals/implementation.c [EMSCRIPTEN]: Do not use
5+
sigaltstack
6+
7+
---
8+
src/cysignals/implementation.c | 4 +++-
9+
1 file changed, 3 insertions(+), 1 deletion(-)
10+
11+
diff --git a/src/cysignals/implementation.c b/src/cysignals/implementation.c
12+
index 2afd6ad..3088cdf 100644
13+
--- a/src/cysignals/implementation.c
14+
+++ b/src/cysignals/implementation.c
15+
@@ -531,7 +531,7 @@ static void _sig_off_warning(const char* file, int line)
16+
17+
static void setup_alt_stack(void)
18+
{
19+
-#if HAVE_SIGALTSTACK
20+
+#if HAVE_SIGALTSTACK && !defined(__EMSCRIPTEN__)
21+
/* Space for the alternate signal stack. The size should be
22+
* of the form MINSIGSTKSZ + constant. The constant is chosen rather
23+
* ad hoc but sufficiently large.
24+
@@ -576,7 +576,9 @@ static void setup_cysignals_handlers(void)
25+
* After setting up the trampoline, we reset the signal mask. */
26+
sigprocmask(SIG_BLOCK, &sa.sa_mask, &default_sigmask);
27+
#endif
28+
+#if !defined(__EMSCRIPTEN__)
29+
setup_trampoline();
30+
+#endif
31+
#if HAVE_SIGPROCMASK
32+
sigprocmask(SIG_SETMASK, &default_sigmask, &sigmask_with_sigint);
33+
#endif
34+
--
35+
2.42.0
36+

0 commit comments

Comments
 (0)