diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-04-22 21:43:25 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-04-22 21:43:25 +0000 |
commit | 3980bb73ad314bd0015d46066697c71aa1b0ff10 (patch) | |
tree | 8b1019bf216f0b08dee71805469966301c0854e9 /configure.ac | |
parent | 83be42020706ec98bc1455fd6f06f581ca827711 (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.2@190096 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 49ae5174e..f4ae535ab 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"; |