[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and to
From: |
Klaus Treichel |
Subject: |
[dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and tools (pnet) branch, master, updated. 443d1db9241c1c222e225478cdf764526d5c593a |
Date: |
Mon, 07 Sep 2009 10:13:53 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "DotGNU Portable.NET engine, compilers and tools (pnet)".
The branch, master has been updated
via 443d1db9241c1c222e225478cdf764526d5c593a (commit)
from 59d694189026098b4cb888a445254a8b49b91d3e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/pnet.git/commit/?id=443d1db9241c1c222e225478cdf764526d5c593a
commit 443d1db9241c1c222e225478cdf764526d5c593a
Author: Klaus Treichel <address@hidden>
Date: Mon Sep 7 12:13:32 2009 +0200
Fix selecting the correct setjmp function for interrupt based exception
handling.
diff --git a/ChangeLog b/ChangeLog
index 2cfd26a..df3ac93 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2009-09-07 Klaus Treichel <address@hidden>
+
+ * configure.in: Add check for the functions _setjmp, _lingjmp and
+ __sigsetjmp (which is the actual implementation of sigsetjmp on linux).
+
+ * support/interrupt.h: Fix the selection of sigsetjmp where sigsetjmp
+ is actually a macro (using __sigsetjmp) and not found by configure.
+
+ * support/interrupt_posix.c: Remove the definition of __USE_GNU as
+ this is handled by configure now.
+
2009-09-06 Klaus Treichel <address@hidden>
* support/thr_defs.h: Add note for how to change a thread's state.
diff --git a/configure.in b/configure.in
index fdd6133..2398beb 100644
--- a/configure.in
+++ b/configure.in
@@ -639,7 +639,8 @@ AC_CHECK_FUNCS(cygwin_conv_to_win32_path snprintf rename
utime)
AC_CHECK_FUNCS(mkdir ioctl setsockopt getsockopt uname mkstemp mktemp)
AC_CHECK_FUNCS(tcgetattr readlink symlink rmdir strsignal)
AC_CHECK_FUNCS(chmod umask)
-AC_CHECK_FUNCS(setjmp longjmp signal sigaction abort exit _exit siglongjmp
sigsetjmp)
+AC_CHECK_FUNCS(signal sigaction abort exit _exit)
+AC_CHECK_FUNCS(setjmp longjmp _setjmp _longjmp sigsetjmp siglongjmp
__sigsetjmp)
AC_CHECK_FUNCS(sysinfo sysctl)
AC_CHECK_FUNCS(gethostname)
AC_CHECK_FUNC(gettimeofday,
diff --git a/support/interrupt.h b/support/interrupt.h
index e41acf4..b5f5928 100755
--- a/support/interrupt.h
+++ b/support/interrupt.h
@@ -63,29 +63,32 @@ struct _tagILInterruptContext
#endif
#if defined(USE_INTERRUPT_BASED_CHECKS)
-#if (defined(HAVE_SETJMP) || defined(HAVE_SETJMP_H)) \
+#if defined(HAVE_SETJMP_H)
+#include <setjmp.h>
+#endif
+#if (defined(HAVE_SIGSETJMP) || defined(HAVE_SETJMP_H)) && \
+ defined(HAVE_SIGLONGJMP)
+#define IL_SETJMP(buf) sigsetjmp(buf, 1)
+#define IL_LONGJMP(buf, arg) siglongjmp(buf, arg)
+#define IL_JMP_BUFFER sigjmp_buf
+#elif (defined(HAVE_SETJMP) || defined(HAVE_SETJMP_H)) \
&& defined(HAVE_LONGJMP)
+/*
+ * NOTE: Posix doesn't specify if the signal mask is saved and restored
+ * using these functions.
+ * You have to check carefully if the signalmask is saved and restored
+ * because this is needed for using longjump pretty safe from inside of a
+ * signal handler.
+ */
+#define IL_SETJMP(buf) setjmp(buf)
+#define IL_LONGJMP(buf, arg) longjmp(buf, arg)
+#define IL_JMP_BUFFER jmp_buf
+#else
+#undef USE_INTERRUPT_BASED_CHECKS
+#endif
+#endif
- #include <setjmp.h>
-
- #if defined(HAVE_SIGSETJMP) && defined(HAVE_SIGLONGJMP)
- #define IL_SETJMP(buf) \
- sigsetjmp(buf, 1)
-
- #define IL_LONGJMP(buf, arg) \
- siglongjmp(buf, arg)
-
- #define IL_JMP_BUFFER sigjmp_buf
- #else
- #define IL_SETJMP(buf) \
- setjmp(buf)
-
- #define IL_LONGJMP(buf, arg) \
- longjmp(buf, arg)
-
- #define IL_JMP_BUFFER jmp_buf
- #endif
-
+#if defined(USE_INTERRUPT_BASED_CHECKS)
#if defined(WIN32) && !(defined(__CYGWIN32__) || defined(__CYGWIN))
#define IL_INTERRUPT_SUPPORTS 1
#define IL_INTERRUPT_SUPPORTS_ILLEGAL_MEMORY_ACCESS 1
@@ -117,8 +120,6 @@ struct _tagILInterruptContext
#define IL_INTERRUPT_HAVE_X86_CONTEXT 1
#endif
#endif
-
-#endif
#endif
#endif /* _INTERRUPT_H */
diff --git a/support/interrupt_posix.c b/support/interrupt_posix.c
index eeb2b65..1ada568 100755
--- a/support/interrupt_posix.c
+++ b/support/interrupt_posix.c
@@ -31,10 +31,6 @@
extern "C" {
#endif
-#if defined(linux) || defined(__linux) || defined(__linux__)
- #define __USE_GNU
-#endif
-
#if defined(IL_INTERRUPT_HAVE_X86_CONTEXT)
#include <sys/ucontext.h>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 11 ++++++++++
configure.in | 3 +-
support/interrupt.h | 47 +++++++++++++++++++++++----------------------
support/interrupt_posix.c | 4 ---
4 files changed, 37 insertions(+), 28 deletions(-)
hooks/post-receive
--
DotGNU Portable.NET engine, compilers and tools (pnet)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and tools (pnet) branch, master, updated. 443d1db9241c1c222e225478cdf764526d5c593a,
Klaus Treichel <=
- Prev by Date:
[dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and tools (pnet) branch, master, updated. 59d694189026098b4cb888a445254a8b49b91d3e
- Next by Date:
[dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and tools (pnet) branch, master, updated. 6f7a4aaef216dd887992502f386c4e2cbd715173
- Previous by thread:
[dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and tools (pnet) branch, master, updated. 59d694189026098b4cb888a445254a8b49b91d3e
- Next by thread:
[dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and tools (pnet) branch, master, updated. 6f7a4aaef216dd887992502f386c4e2cbd715173
- Index(es):