aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-04-22 21:42:58 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-04-22 21:42:58 +0000
commit45190269149982c8cce640717929c0dd739dd5fb (patch)
tree063ae992edd29a1bd440c601bf4c0603983ee684 /configure.ac
parent7e2983761819500ee035ffa77f7712816dc036e5 (diff)
Merged revisions 190093 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r190093 | tilghman | 2009-04-22 16:38:15 -0500 (Wed, 22 Apr 2009) | 14 lines Merged revisions 190092 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r190092 | tilghman | 2009-04-22 16:35:03 -0500 (Wed, 22 Apr 2009) | 7 lines Detect availability of pthread_rwlock_timedwrlock() before using it. (closes issue #14930) Reported by: tilghman Patches: 20090420__bug14930.diff.txt uploaded by tilghman (license 14) Tested by: mvanbaak, tilghman ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@190095 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index b0c32f8ea..9aca78c6e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -437,6 +437,24 @@ AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE_NP], 1, [Define to 1 if your system defi
AC_MSG_RESULT(no)
)
+AC_MSG_CHECKING(for pthread_rwlock_timedwrlock() in pthread.h)
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <pthread.h>
+ #include <time.h>],
+ [pthread_rwlock_t foo; struct timespec bar; pthread_rwlock_timedwrlock(&foo, &bar)])
+ ],[
+ AC_MSG_RESULT(yes)
+ ac_cv_pthread_rwlock_timedwrlock="yes"
+ ],[
+ AC_MSG_RESULT(no)
+ ac_cv_pthread_rwlock_timedwrlock="no"
+ ]
+)
+if test "${ac_cv_pthread_rwlock_timedwrlock}" = "yes"; then
+ AC_DEFINE([HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK], 1, [Define if your system has pthread_rwlock_timedwrlock()])
+fi
+
AST_C_DEFINE_CHECK([PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP], [PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP], [pthread.h])
#if test "${cross_compiling}" = "no";