summaryrefslogtreecommitdiff
path: root/boehm-gc
diff options
context:
space:
mode:
authorbje <bje@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-30 00:23:45 +0000
committerbje <bje@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-30 00:23:45 +0000
commitf090c9d06962930a4a782d0e78d71cababf0fdb7 (patch)
tree9d5d70e132e325c2c358b0f3566007dcf4622867 /boehm-gc
parent3dd6223b949243ed9a67f1a7680c4a3cd883c8c6 (diff)
downloadgcc-f090c9d06962930a4a782d0e78d71cababf0fdb7.tar.gz
* os_dep.c: Use the POSIX signal API in preference to the BSD API.
Generate a compilation error if neither the POSIX nor BSD APIs can be detected. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154747 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc')
-rw-r--r--boehm-gc/ChangeLog6
-rw-r--r--boehm-gc/os_dep.c14
2 files changed, 14 insertions, 6 deletions
diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog
index 9f05a757d69..5b615d956a4 100644
--- a/boehm-gc/ChangeLog
+++ b/boehm-gc/ChangeLog
@@ -1,3 +1,9 @@
+2009-11-30 Ben Elliston <bje@au.ibm.com>
+
+ * os_dep.c: Use the POSIX signal API in preference to the BSD API.
+ Generate a compilation error if neither the POSIX nor BSD APIs can
+ be detected.
+
2009-09-11 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.am (libgcjgc_la_LINK, gctest_LINK): New.
diff --git a/boehm-gc/os_dep.c b/boehm-gc/os_dep.c
index 3f0f20e834c..6f1e81abc16 100644
--- a/boehm-gc/os_dep.c
+++ b/boehm-gc/os_dep.c
@@ -501,7 +501,13 @@ void GC_enable_signals(void)
&& !defined(MACOS) && !defined(DJGPP) && !defined(DOS4GW) \
&& !defined(NOSYS) && !defined(ECOS)
-# if defined(sigmask) && !defined(UTS4) && !defined(HURD)
+# if defined(SIG_BLOCK)
+ /* Use POSIX/SYSV interface */
+# define SIGSET_T sigset_t
+# define SIG_DEL(set, signal) sigdelset(&(set), (signal))
+# define SIG_FILL(set) sigfillset(&set)
+# define SIGSETMASK(old, new) sigprocmask(SIG_SETMASK, &(new), &(old))
+# elif defined(sigmask) && !defined(UTS4) && !defined(HURD)
/* Use the traditional BSD interface */
# define SIGSET_T int
# define SIG_DEL(set, signal) (set) &= ~(sigmask(signal))
@@ -511,11 +517,7 @@ void GC_enable_signals(void)
/* a signal 32. */
# define SIGSETMASK(old, new) (old) = sigsetmask(new)
# else
- /* Use POSIX/SYSV interface */
-# define SIGSET_T sigset_t
-# define SIG_DEL(set, signal) sigdelset(&(set), (signal))
-# define SIG_FILL(set) sigfillset(&set)
-# define SIGSETMASK(old, new) sigprocmask(SIG_SETMASK, &(new), &(old))
+# error undetectable signal API
# endif
static GC_bool mask_initialized = FALSE;