summaryrefslogtreecommitdiff
path: root/libguile/_scm.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-05-15 12:28:55 +0200
committerAndy Wingo <wingo@pobox.com>2011-05-15 15:34:15 +0200
commit04245bb72ff6f59ddd0a293a1cbf2a1a2fb643bb (patch)
tree3979c7ace2ca2dad67a9b512926232bca7d9e05c /libguile/_scm.h
parent2acdd822fb2fa788eec06938415e3b0348ea815b (diff)
downloadguile-04245bb72ff6f59ddd0a293a1cbf2a1a2fb643bb.tar.gz
make SCM_I_SETJMP and SCM_I_LONGJMP private
* libguile/_scm.h (SCM_I_SETJMP, SCM_I_LONGJMP): Move to this private header. * libguile/__scm.h (scm_i_jmp_buf): Only define the scm_i_jmp_buf type in this public header.
Diffstat (limited to 'libguile/_scm.h')
-rw-r--r--libguile/_scm.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/libguile/_scm.h b/libguile/_scm.h
index 284213032..d685f9736 100644
--- a/libguile/_scm.h
+++ b/libguile/_scm.h
@@ -191,6 +191,41 @@
#define scm_from_off64_t scm_from_int64
+
+
+#if defined (vms)
+/* VMS: Implement SCM_I_SETJMP in terms of setjump. */
+extern int setjump(scm_i_jmp_buf env);
+extern int longjump(scm_i_jmp_buf env, int ret);
+#define SCM_I_SETJMP setjump
+#define SCM_I_LONGJMP longjump
+
+#elif defined (_CRAY1)
+/* Cray: Implement SCM_I_SETJMP in terms of setjump. */
+extern int setjump(scm_i_jmp_buf env);
+extern int longjump(scm_i_jmp_buf env, int ret);
+#define SCM_I_SETJMP setjump
+#define SCM_I_LONGJMP longjump
+
+#elif defined (__ia64__)
+/* IA64: Implement SCM_I_SETJMP in terms of getcontext. */
+# define SCM_I_SETJMP(JB) \
+ ( (JB).fresh = 1, \
+ getcontext (&((JB).ctx)), \
+ ((JB).fresh ? ((JB).fresh = 0, 0) : 1) )
+# define SCM_I_LONGJMP(JB,VAL) scm_ia64_longjmp (&(JB), VAL)
+void scm_ia64_longjmp (scm_i_jmp_buf *, int);
+
+#else
+/* All other systems just use setjmp and longjmp. */
+
+#define SCM_I_SETJMP setjmp
+#define SCM_I_LONGJMP longjmp
+#endif
+
+
+
+
/* The endianness marker in objcode. */
#ifdef WORDS_BIGENDIAN
# define SCM_OBJCODE_ENDIANNESS "BE"