[PPL-devel] [GIT] ppl/ppl(master): Support systems that do not define `siginfo_t'.
Roberto Bagnara
bagnara at cs.unipr.it
Thu Mar 26 08:25:28 CET 2009
Module: ppl/ppl
Branch: master
Commit: 5c7a1579dbd0b75a30e5610f97811dcf9a5b60f9
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=5c7a1579dbd0b75a30e5610f97811dcf9a5b60f9
Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date: Thu Mar 26 08:25:02 2009 +0100
Support systems that do not define `siginfo_t'.
---
Watchdog/tests/pwl_test.cc | 4 ++++
tests/ppl_test.cc | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/Watchdog/tests/pwl_test.cc b/Watchdog/tests/pwl_test.cc
index c4bc9a8..f328518 100644
--- a/Watchdog/tests/pwl_test.cc
+++ b/Watchdog/tests/pwl_test.cc
@@ -43,6 +43,7 @@ uncaught_exception_handler() {
exit(1);
}
+#ifdef HAVE_SIGINFO_T
void
fpe_handler(int sig, siginfo_t* sip, void*) {
if (sig != SIGFPE) {
@@ -112,6 +113,7 @@ fpe_handler(int sig, siginfo_t* sip, void*) {
}
exit(1);
}
+#endif // defined(HAVE_SIGINFO_T)
} // namespace
@@ -119,6 +121,7 @@ namespace Parma_Watchdog_Library {
namespace Test {
+#ifdef HAVE_SIGINFO_T
void
set_handlers() {
struct sigaction action;
@@ -130,6 +133,7 @@ set_handlers() {
<< std::endl;
abort();
}
+#endif // defined(HAVE_SIGINFO_T)
std::set_unexpected(unexpected_exception_handler);
std::set_terminate(uncaught_exception_handler);
diff --git a/tests/ppl_test.cc b/tests/ppl_test.cc
index 802f98d..04a5047 100644
--- a/tests/ppl_test.cc
+++ b/tests/ppl_test.cc
@@ -43,6 +43,7 @@ uncaught_exception_handler() {
exit(1);
}
+#ifdef HAVE_SIGINFO_T
void
fpe_handler(int sig, siginfo_t* sip, void*) {
if (sig != SIGFPE) {
@@ -112,6 +113,7 @@ fpe_handler(int sig, siginfo_t* sip, void*) {
}
exit(1);
}
+#endif // defined(HAVE_SIGINFO_T)
} // namespace
@@ -121,6 +123,7 @@ namespace Test {
void
set_handlers() {
+#ifdef HAVE_SIGINFO_T
struct sigaction action;
action.sa_sigaction = fpe_handler;
sigemptyset(&action.sa_mask);
@@ -130,6 +133,7 @@ set_handlers() {
<< std::endl;
abort();
}
+#endif // defined(HAVE_SIGINFO_T)
std::set_unexpected(unexpected_exception_handler);
std::set_terminate(uncaught_exception_handler);
More information about the PPL-devel
mailing list