summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-08-20 18:47:02 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-08-20 18:47:02 -0500
commit57871880b203d1225065640dbe8c16aa6d0f3c62 (patch)
tree4b5eef8734ee5f02c93c032f850c6d38951f2577
parentmpc55xx/misc/flash_support.c: Properly flush cache when writing. (diff)
downloadrtems-57871880b203d1225065640dbe8c16aa6d0f3c62.tar.bz2
Add configuration to detect toolset has sigaltstack() prototype
-rw-r--r--cpukit/configure.ac12
-rw-r--r--cpukit/libnetworking/rtems/rtems_bsdnet_internal.h10
2 files changed, 18 insertions, 4 deletions
diff --git a/cpukit/configure.ac b/cpukit/configure.ac
index 56815e224a..fcf3437a1b 100644
--- a/cpukit/configure.ac
+++ b/cpukit/configure.ac
@@ -116,6 +116,12 @@ RTEMS_CHECK_FUNC([pthread_getattr_np],[
#include <pthread.h>])
AC_CHECK_HEADERS([sys/cpuset.h])
+# This was added to newlib in August 2014 to improve conformance.
+# Disable use of internal definition if it is present.
+RTEMS_CHECK_FUNC([sigaltstack],[
+ #define _GNU_SOURCE
+ #include <signal.h>])
+
# Mandated by POSIX, not declared in some versions of newlib.
AC_CHECK_DECLS([getrusage],,,[#include sys/resource.h])
@@ -236,6 +242,12 @@ RTEMS_CPUOPT([__RTEMS_HAVE_SYS_CPUSET_H__],
[1],
[indicate if <sys/cpuset.h> is present in toolset])
+## Header file differences that need to be known in .h after install
+RTEMS_CPUOPT([__RTEMS_HAVE_DECL_SIGALTSTACK__],
+ [test x"${ac_cv_have_decl_sigaltstack}" = x"yes"],
+ [1],
+ [indicate if <signal.h> in toolset has sigaltstack()])
+
## This improves both the size and coverage analysis.
RTEMS_CPUOPT([__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__],
[test x"${RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH}" = x"1"],
diff --git a/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h b/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h
index 05e54b272f..567cc8ab3a 100644
--- a/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h
+++ b/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h
@@ -83,11 +83,13 @@ typedef quad_t * qaddr_t;
typedef void __sighandler_t(int);
typedef __sighandler_t *sig_t; /* type of pointer to a signal function */
#define NSIG 32
-struct sigaltstack {
- char *ss_sp; /* signal stack base */
- int ss_size; /* signal stack length */
- int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */
+#if (__RTEMS_HAVE_DECL_SIGALTSTACK__ == 0)
+struct sigaltstack {
+ char *ss_sp; /* signal stack base */
+ int ss_size; /* signal stack length */
+ int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */
};
+#endif
#ifdef _KERNEL
typedef int boolean_t;