Bug 1288625 - Part 2. Check pthread_cond_timedwait_monotonic_np. r=glandium
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Wed, 27 Jul 2016 15:00:59 +0900
changeset 311538 56b6178056e9b6e8c8652312f9f4b0a8c522b695
parent 311537 605ef7faa292854edff8f40121aa7f8a5e4bea00
child 311539 2615d4df8768f04c219491437f54507f2bc87899
push id20410
push userryanvm@gmail.com
push dateMon, 29 Aug 2016 16:57:00 +0000
treeherderfx-team@2ec253835380 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1288625
milestone51.0a1
Bug 1288625 - Part 2. Check pthread_cond_timedwait_monotonic_np. r=glandium Android 64-bit doesn't have pthread_cond_timedwait_monotonic_np. So we need check this function. And although we don't turn on sandbox on Android, same define is used in security/sandbox/chromium/base/synchronization/condition_variable_posix.cc. MozReview-Commit-ID: aeXhNs9Xdj
old-configure.in
--- a/old-configure.in
+++ b/old-configure.in
@@ -1682,16 +1682,26 @@ AC_CACHE_CHECK(for clock_gettime(CLOCK_M
 if test "$ac_cv_clock_monotonic" != "no"; then
     HAVE_CLOCK_MONOTONIC=1
     REALTIME_LIBS=$ac_cv_clock_monotonic
     AC_DEFINE(HAVE_CLOCK_MONOTONIC)
     AC_SUBST(HAVE_CLOCK_MONOTONIC)
     AC_SUBST_LIST(REALTIME_LIBS)
 fi
 
+AC_CACHE_CHECK(for pthread_cond_timedwait_monotonic_np,
+               ac_cv_pthread_cond_timedwait_monotonic_np,
+               AC_TRY_LINK([#include <pthread.h>],
+                           [pthread_cond_timedwait_monotonic_np(0, 0, 0);],
+                           ac_cv_pthread_cond_timewait_monotonic_np=yes,
+                           ac_cv_pthread_cond_timewait_monotonic_np=no))
+if test "$ac_cv_pthread_cond_timewait_monotonic_np" != "no"; then
+    AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC)
+fi
+
 dnl check for wcrtomb/mbrtowc
 dnl =======================================================================
 if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100300"; then
 AC_LANG_SAVE
 AC_LANG_CPLUSPLUS
 AC_CACHE_CHECK(for wcrtomb,
     ac_cv_have_wcrtomb,
     [AC_TRY_LINK([#include <wchar.h>],