aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-04-22 21:38:15 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-04-22 21:38:15 +0000
commitd2970d26d050ece2c790d757abe4113616550ad2 (patch)
treeecd965e8306d153418e7923c7c041cf2cb71b7d9 /configure.ac
parentf3943d366244e247fb3b22ef50c291b64b9709c5 (diff)
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/trunk@190093 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 95ab0bb58..211df5e7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -461,6 +461,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";