~peter-pearse/ubuntu/natty/guile-1.8/prop001

« back to all changes in this revision

Viewing changes to debian/patches/do-not-redefine-jmp-buf.diff

  • Committer: Bazaar Package Importer
  • Author(s): أحمد المحمودي (Ahmed El-Mahmoudy)
  • Date: 2009-07-20 19:39:17 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090720193917-s0985l9wxihwoscl
Tags: 1.8.7+1-1ubuntu1
* Merge from Debian unstable, remaining changes: (LP: #401816)
  - Build with -Wno-error.
  - Build with thread support. Some guile-using programs like autogen need it.
  - Add debian/guile-1.8-libs.shlibs: Thread support breaks ABI, bump the soname.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: sid/libguile/__scm.h
 
2
===================================================================
 
3
--- sid.orig/libguile/__scm.h
 
4
+++ sid/libguile/__scm.h
 
5
@@ -386,21 +386,23 @@
 
6
 
 
7
 #ifdef vms
 
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
 
20
 # else
 
21
 #  include <setjmp.h>
 
22
 # endif
 
23
 #else                          /* ndef vms */
 
24
 # ifdef _CRAY1
 
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. */
 
39
@@ -409,15 +411,19 @@
 
40
     typedef struct {
 
41
       ucontext_t ctx;
 
42
       int fresh;
 
43
-    } jmp_buf;
 
44
-#   define setjmp(JB)                                  \
 
45
+    } scm_jmp_buf;
 
46
+#   define scm_setjmp(JB)                              \
 
47
       ( (JB).fresh = 1,                                        \
 
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__ */
 
56
 #   include <setjmp.h>
 
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 */
 
62
 #endif                         /* ndef vms */
 
63
Index: sid/libguile/_scm.h
 
64
===================================================================
 
65
--- sid.orig/libguile/_scm.h
 
66
+++ sid/libguile/_scm.h
 
67
@@ -60,6 +60,12 @@
 
68
 #include <errno.h>
 
69
 #include "libguile/__scm.h"
 
70
 
 
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)
 
75
+#endif
 
76
+
 
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
 
84
@@ -43,7 +43,7 @@
 
85
 typedef struct 
 
86
 {
 
87
   SCM throw_value;
 
88
-  jmp_buf jmpbuf;
 
89
+  scm_jmp_buf jmpbuf;
 
90
   SCM dynenv;
 
91
 #ifdef __ia64__
 
92
   void *backing_store;
 
93
Index: sid/libguile/threads.h
 
94
===================================================================
 
95
--- sid.orig/libguile/threads.h
 
96
+++ sid/libguile/threads.h
 
97
@@ -107,7 +107,7 @@
 
98
   /* For keeping track of the stack and registers. */
 
99
   SCM_STACKITEM *base;
 
100
   SCM_STACKITEM *top;
 
101
-  jmp_buf regs;
 
102
+  scm_jmp_buf regs;
 
103
 #ifdef __ia64__
 
104
   void *register_backing_store_base;
 
105
   scm_t_contregs *pending_rbs_continuation;