summaryrefslogtreecommitdiff
path: root/devel/ElectricFence/files/patch-longjmp
blob: cafc4c5ef1fa1d9180a89b3c045a2e4fa4ff38e8 (plain) (blame)
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
--- eftest.c	Tue Jun  2 09:25:10 1998
+++ eftest.c	Tue Jun  2 09:24:58 1998
@@ -24,7 +24,7 @@
 extern int	EF_PROTECT_BELOW;
 extern int	EF_ALIGNMENT;
 
-static jmp_buf	env;
+static sigjmp_buf	env;
 
 /*
  * There is still too little standardization of the arguments and return
@@ -40,13 +40,13 @@
 )
  {
 	signal(PAGE_PROTECTION_VIOLATED_SIGNAL, SIG_DFL);
-	longjmp(env, 1);
+	siglongjmp(env, 1);
 }
 
 static int
 gotSegmentationFault(int (*test)(void))
 {
-	if ( setjmp(env) == 0 ) {
+	if ( sigsetjmp(env, 1) == 0 ) {
 		int			status;
 
 		signal(PAGE_PROTECTION_VIOLATED_SIGNAL