summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-12-03 20:34:24 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-12-03 20:34:24 +0000
commit57e278dab9aadae2d9de8c6d2d880d7a0363a156 (patch)
tree336ec95ed94b67ae454b8478f1e7e28b61e3463e
parentTypo. (diff)
downloadrtems-57e278dab9aadae2d9de8c6d2d880d7a0363a156.tar.bz2
2010-12-03 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.ac, posix/src/signal_2.c: sighandler_t is defined conditionally in some versions of newlib and unconditionally in others. Make sure we always compile.
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/configure.ac6
-rw-r--r--cpukit/posix/src/signal_2.c4
3 files changed, 14 insertions, 2 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 22996aa8ef..87a90732db 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-03 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * configure.ac, posix/src/signal_2.c: sighandler_t is defined
+ conditionally in some versions of newlib and unconditionally in
+ others. Make sure we always compile.
+
2010-11-30 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libcsupport/src/newlibc_exit.c, score/src/threadhandler.c: Revert
diff --git a/cpukit/configure.ac b/cpukit/configure.ac
index 0e2b65afe2..63413bdb82 100644
--- a/cpukit/configure.ac
+++ b/cpukit/configure.ac
@@ -134,7 +134,11 @@ AC_CHECK_HEADER([pthread.h],[
AC_CHECK_TYPES([pthread_spinlock_t])
])
-RTEMS_CHECK_MULTIPROCESSING
+AC_CHECK_HEADER([signal.h],[
+ AC_CHECK_TYPES([sighandler_t])
+])
+
+ RTEMS_CHECK_MULTIPROCESSING
RTEMS_CHECK_POSIX_API
RTEMS_CHECK_NETWORKING
diff --git a/cpukit/posix/src/signal_2.c b/cpukit/posix/src/signal_2.c
index 8d9c483803..326861752f 100644
--- a/cpukit/posix/src/signal_2.c
+++ b/cpukit/posix/src/signal_2.c
@@ -18,7 +18,9 @@
#include <signal.h>
#include <errno.h>
-typedef void (*sighandler_t)(int);
+#ifndef HAVE_SIGHANDLER_T
+ typedef void (*sighandler_t)(int);
+#endif
sighandler_t signal(
int signum,