Simplify checks for CLOCK_MONOTONIC

Remove the complicated configure-time and runtime checks, and just use
CLOCK_MONOTONIC if it's defined.

https://bugzilla.gnome.org/show_bug.cgi?id=661421
This commit is contained in:
Dan Winship
2011-10-11 15:38:37 -04:00
parent daede1dc27
commit 71cf70b39c
2 changed files with 32 additions and 63 deletions

View File

@@ -2402,21 +2402,6 @@ AC_CHECK_FUNCS(clock_gettime, [], [
])
AC_SUBST(GLIB_RT_LIBS)
AC_CACHE_CHECK(for monotonic clocks,
glib_cv_monotonic_clock,AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#include <time.h>
#include <unistd.h>
int main() {
#if !(defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC))
#error No monotonic clock
#endif
return 0;
}
]])],glib_cv_monotonic_clock=yes,glib_cv_monotonic_clock=no))
if test "$glib_cv_monotonic_clock" = "yes"; then
AC_DEFINE(HAVE_MONOTONIC_CLOCK,1,[Have a monotonic clock])
fi
dnl ************************
dnl *** g_atomic_* tests ***