1
Index: sid/libguile/__scm.h
2
===================================================================
3
--- sid.orig/libguile/__scm.h
4
+++ sid/libguile/__scm.h
8
# ifndef CHEAP_CONTINUATIONS
9
- typedef int jmp_buf[17];
10
- extern int setjump(jmp_buf env);
11
- extern int longjump(jmp_buf env, int ret);
12
-# define setjmp setjump
13
-# define longjmp longjump
14
+ typedef int scm_jmp_buf[17];
15
+ extern int setjump(scm_jmp_buf env);
16
+ extern int longjump(scm_jmp_buf env, int ret);
17
+# define scm_setjmp setjump
18
+# define scm_longjmp longjump
19
+# define SCM_DEFINES_JMP_BUF
25
- typedef int jmp_buf[112];
26
- extern int setjump(jmp_buf env);
27
- extern int longjump(jmp_buf env, int ret);
28
-# define setjmp setjump
29
-# define longjmp longjump
30
+ typedef int scm_jmp_buf[112];
31
+ extern int setjump(scm_jmp_buf env);
32
+ extern int longjump(scm_jmp_buf env, int ret);
33
+# define scm_setjmp setjump
34
+# define scm_longjmp longjump
35
+# define SCM_DEFINES_JMP_BUF
36
# else /* ndef _CRAY1 */
37
# if defined (__ia64__)
38
/* For IA64, emulate the setjmp API using getcontext. */
44
-# define setjmp(JB) \
46
+# define scm_setjmp(JB) \
48
getcontext (&((JB).ctx)), \
49
((JB).fresh ? ((JB).fresh = 0, 0) : 1) )
50
-# define longjmp(JB,VAL) scm_ia64_longjmp (&(JB), VAL)
51
- void scm_ia64_longjmp (jmp_buf *, int);
52
+# define scm_longjmp(JB,VAL) scm_ia64_longjmp (&(JB), VAL)
53
+ void scm_ia64_longjmp (scm_jmp_buf *, int);
54
+# define SCM_DEFINES_JMP_BUF
55
# else /* ndef __ia64__ */
57
+ typedef jmp_buf scm_jmp_buf;
58
+# define scm_setjmp setjmp
59
+# define scm_longjmp longjmp
60
# endif /* ndef __ia64__ */
61
# endif /* ndef _CRAY1 */
63
Index: sid/libguile/_scm.h
64
===================================================================
65
--- sid.orig/libguile/_scm.h
66
+++ sid/libguile/_scm.h
69
#include "libguile/__scm.h"
71
+#ifdef SCM_DEFINES_JMP_BUF
72
+typedef scm_jmp_buf jmp_buf;
73
+#define setjmp(JB) scm_setjmp(JB)
74
+#define longjmp(JB,VAL) scm_longjmp(JB,VAL)
77
/* Include headers for those files central to the implementation. The
78
rest should be explicitly #included in the C files themselves. */
79
#include "libguile/error.h" /* Everyone signals errors. */
80
Index: sid/libguile/continuations.h
81
===================================================================
82
--- sid.orig/libguile/continuations.h
83
+++ sid/libguile/continuations.h
93
Index: sid/libguile/threads.h
94
===================================================================
95
--- sid.orig/libguile/threads.h
96
+++ sid/libguile/threads.h
98
/* For keeping track of the stack and registers. */
104
void *register_backing_store_base;
105
scm_t_contregs *pending_rbs_continuation;