mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 06:48:25 +00:00
Mac OS X does not support comparing a mutex to its initializer. Create a test for this.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
14
configure.ac
14
configure.ac
@@ -595,6 +595,20 @@ fi
|
||||
|
||||
AST_C_DEFINE_CHECK([PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP], [PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP], [pthread.h])
|
||||
|
||||
# Can we compare a mutex to its initial value?
|
||||
# Generally yes on OpenBSD/FreeBSD and no on Mac OS X.
|
||||
AC_MSG_CHECKING(whether we can compare a mutex to its initial value)
|
||||
AC_LINK_IFELSE(
|
||||
AC_LANG_PROGRAM([#include <pthread.h>], [pthread_mutex_t lock;
|
||||
if ((lock) != ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
|
||||
return 0;
|
||||
}
|
||||
return 0]),
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([CAN_COMPARE_MUTEX_TO_INIT_VALUE], 1, [Define to 1 if your system's implementation of mutexes supports comparison of a mutex to its initializer.]),
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
|
||||
#if test "${cross_compiling}" = "no";
|
||||
#then
|
||||
#AC_MSG_CHECKING(for working epoll support)
|
||||
|
||||
Reference in New Issue
Block a user