Module: xenomai-2.6 Branch: master Commit: f60f1a4f758a7d9b010f39f439eb98240b7beb42 URL: http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=f60f1a4f758a7d9b010f39f439eb98240b7beb42
Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org> Date: Sun Apr 28 01:17:32 2013 +0200 posix: fix HAVE_ symbols in exported headers --- configure | 15 +++++++++++++++ configure.in | 3 +++ include/posix/mqueue.h | 6 +++--- include/posix/pthread.h | 6 +++--- src/include/xeno_config.h.in | 9 +++++++++ 5 files changed, 33 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 3c6ea22..ca4a68a 100755 --- a/configure +++ b/configure @@ -13395,6 +13395,21 @@ cat >>confdefs.h <<_ACEOF _ACEOF +cat >>confdefs.h <<_ACEOF +#define CONFIG_XENO_HAVE_MQUEUE_H $HAVE_MQUEUE_H +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define CONFIG_XENO_HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL $HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define CONFIG_XENO_HAVE_PTHREAD_CONDATTR_SETCLOCK $HAVE_PTHREAD_CONDATTR_SETCLOCK +_ACEOF + + test x$CONFIG_XENO_X86_SEP = xy && $as_echo "#define CONFIG_XENO_X86_SEP 1" >>confdefs.h diff --git a/configure.in b/configure.in index 97891af..23ddbac 100644 --- a/configure.in +++ b/configure.in @@ -402,6 +402,9 @@ dnl AC_DEFINE_UNQUOTED(CONFIG_XENO_VERSION_MAJOR,$CONFIG_XENO_VERSION_MAJOR,[config]) AC_DEFINE_UNQUOTED(CONFIG_XENO_VERSION_MINOR,$CONFIG_XENO_VERSION_MINOR,[config]) AC_DEFINE_UNQUOTED(CONFIG_XENO_REVISION_LEVEL,$CONFIG_XENO_REVISION_LEVEL,[config]) +AC_DEFINE_UNQUOTED(CONFIG_XENO_HAVE_MQUEUE_H, $HAVE_MQUEUE_H,[config]) +AC_DEFINE_UNQUOTED(CONFIG_XENO_HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL, $HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL,[config]) +AC_DEFINE_UNQUOTED(CONFIG_XENO_HAVE_PTHREAD_CONDATTR_SETCLOCK, $HAVE_PTHREAD_CONDATTR_SETCLOCK,[config]) dnl dnl Features we enabled and likely want to find at kernel level. diff --git a/include/posix/mqueue.h b/include/posix/mqueue.h index bd131c5..54a8813 100644 --- a/include/posix/mqueue.h +++ b/include/posix/mqueue.h @@ -40,7 +40,7 @@ #endif /* !(__KERNEL__ || __XENO_SIM__) */ -#if defined(__KERNEL__) || defined(__XENO_SIM__) || !defined(HAVE_MQUEUE_H) +#if defined(__KERNEL__) || defined(__XENO_SIM__) || !defined(CONFIG_XENO_HAVE_MQUEUE_H) #ifndef MQ_PRIO_MAX #define MQ_PRIO_MAX 32768 @@ -104,7 +104,7 @@ int mq_unlink(const char *name); } #endif -#else /* !(__KERNEL__ || __XENO_SIM__ || !HAVE_MQUEUE_H) */ +#else /* !(__KERNEL__ || __XENO_SIM__ || !CONFIG_XENO_HAVE_MQUEUE_H) */ __extension__ #include_next <mqueue.h> @@ -156,6 +156,6 @@ int __real_mq_notify(mqd_t mqdes, const struct sigevent *notification); } #endif -#endif /* !(__KERNEL__ || __XENO_SIM__ || !HAVE_MQUEUE_H) */ +#endif /* !(__KERNEL__ || __XENO_SIM__ || !CONFIG_XENO_HAVE_MQUEUE_H) */ #endif /* _XENO_POSIX_MQUEUE_H */ diff --git a/include/posix/pthread.h b/include/posix/pthread.h index 31e50a4..85aa2f0 100644 --- a/include/posix/pthread.h +++ b/include/posix/pthread.h @@ -427,7 +427,7 @@ struct sched_param_ex; extern "C" { #endif -#ifndef HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL +#ifndef CONFIG_XENO_HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *attr, int *proto); @@ -435,7 +435,7 @@ int pthread_mutexattr_setprotocol(pthread_mutexattr_t *attr, int proto); #endif -#ifndef HAVE_PTHREAD_CONDATTR_SETCLOCK +#ifndef CONFIG_XENO_HAVE_PTHREAD_CONDATTR_SETCLOCK int pthread_condattr_getclock(const pthread_condattr_t *attr, clockid_t *clk_id); @@ -500,7 +500,7 @@ int __real_pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int __real_pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type); -#ifdef HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL +#ifdef CONFIG_XENO_HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL int __real_pthread_mutexattr_getprotocol(const pthread_mutexattr_t *attr, int *proto); diff --git a/src/include/xeno_config.h.in b/src/include/xeno_config.h.in index 8dab1c2..b392915 100644 --- a/src/include/xeno_config.h.in +++ b/src/include/xeno_config.h.in @@ -36,6 +36,15 @@ /* configure */ #undef CONFIG_XENO_FORTIFY +/* config */ +#undef CONFIG_XENO_HAVE_MQUEUE_H + +/* config */ +#undef CONFIG_XENO_HAVE_PTHREAD_CONDATTR_SETCLOCK + +/* config */ +#undef CONFIG_XENO_HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL + /* Host system alias */ #undef CONFIG_XENO_HOST_STRING _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git