aboutsummaryrefslogtreecommitdiffstats
path: root/main/musl/0006-remove-unused-and-invalid-C-version-of-sigsetjmp.patch
blob: 88b6f9f6e8de5a2ea4d9c89f868ab29257d1e76e (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
From deb85ab44dbe784ba6174b8cf376d35aeacbe309 Mon Sep 17 00:00:00 2001
From: Rich Felker <dalias@aerifal.cx>
Date: Wed, 9 Sep 2015 06:59:45 +0000
Subject: [PATCH] remove unused (and invalid) C version of sigsetjmp

originally, the comment in this code was correct and it would likely
work if the compiler generated a tail call to setjmp. however, commit
583e55122e767b1586286a0d9c35e2a4027998ab redesigned sigsetjmp and
siglongjmp such that the old C implementation (which was not intended
to be used) is not even conceptually correct. remove it in the
interest of avoiding confusion when porting to new archs.
---
 src/signal/sigsetjmp.c | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/src/signal/sigsetjmp.c b/src/signal/sigsetjmp.c
index 1bbe1a0..e69de29 100644
--- a/src/signal/sigsetjmp.c
+++ b/src/signal/sigsetjmp.c
@@ -1,17 +0,0 @@
-#include <setjmp.h>
-#include <signal.h>
-#include "libc.h"
-
-/* !!! This function will not work unless the compiler performs
- * tail call optimization. Machine-specific asm versions should
- * be created instead even though the workaround (tail call)
- * is entirely non-machine-specific... */
-
-int sigsetjmp(sigjmp_buf buf, int save)
-{
-	if ((buf->__fl = save))
-		pthread_sigmask(SIG_SETMASK, 0, (sigset_t *)buf->__ss);
-	return setjmp(buf);
-}
-
-weak_alias(sigsetjmp, __sigsetjmp);
-- 
2.5.1