From: Brendan Shanks bshanks@codeweavers.com
All our supported macOS versions (10.12 and newer) now have clock_gettime(). This reverts commit 5ddcfa019d027d9d690c98151c708eb4e7d5f72b. --- configure.ac | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac index bd6b1eefa99..734a4368c70 100644 --- a/configure.ac +++ b/configure.ac @@ -2110,15 +2110,11 @@ AC_CHECK_FUNCS(\ CFLAGS="$ac_save_CFLAGS"
dnl Check for clock_gettime which may be in -lrt -case $host_os in - darwin*|macosx*) ;; - *) ac_save_LIBS=$LIBS - AC_SEARCH_LIBS(clock_gettime, rt, - [AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define to 1 if you have the 'clock_gettime' function.]) +ac_save_LIBS=$LIBS +AC_SEARCH_LIBS(clock_gettime, rt, + [AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define to 1 if you have the `clock_gettime' function.]) test "$ac_res" = "none required" || AC_SUBST(RT_LIBS,"$ac_res")]) - LIBS=$ac_save_LIBS - ;; -esac +LIBS=$ac_save_LIBS
AC_CACHE_CHECK([for sched_setaffinity],wine_cv_have_sched_setaffinity, AC_LINK_IFELSE([AC_LANG_PROGRAM(
From: Brendan Shanks bshanks@codeweavers.com
mach_continuous_time() is available on all our supported macOS versions (10.12 and newer). --- configure.ac | 1 - dlls/ntdll/unix/sync.c | 6 +----- server/request.c | 6 +----- 3 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/configure.ac b/configure.ac index 734a4368c70..a55b8c88f43 100644 --- a/configure.ac +++ b/configure.ac @@ -2093,7 +2093,6 @@ AC_CHECK_FUNCS(\ getifaddrs \ getrandom \ kqueue \ - mach_continuous_time \ pipe2 \ port_create \ posix_fadvise \ diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c index 21e66f01875..4269873be6c 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c @@ -85,11 +85,7 @@ static inline ULONGLONG monotonic_counter(void) static mach_timebase_info_data_t timebase;
if (!timebase.denom) mach_timebase_info( &timebase ); -#ifdef HAVE_MACH_CONTINUOUS_TIME - if (&mach_continuous_time != NULL) - return mach_continuous_time() * timebase.numer / timebase.denom / 100; -#endif - return mach_absolute_time() * timebase.numer / timebase.denom / 100; + return mach_continuous_time() * timebase.numer / timebase.denom / 100; #elif defined(HAVE_CLOCK_GETTIME) struct timespec ts; #ifdef CLOCK_MONOTONIC_RAW diff --git a/server/request.c b/server/request.c index 2691e0c7cff..dabcea68309 100644 --- a/server/request.c +++ b/server/request.c @@ -512,11 +512,7 @@ timeout_t monotonic_counter(void) static mach_timebase_info_data_t timebase;
if (!timebase.denom) mach_timebase_info( &timebase ); -#ifdef HAVE_MACH_CONTINUOUS_TIME - if (&mach_continuous_time != NULL) - return mach_continuous_time() * timebase.numer / timebase.denom / 100; -#endif - return mach_absolute_time() * timebase.numer / timebase.denom / 100; + return mach_continuous_time() * timebase.numer / timebase.denom / 100; #elif defined(HAVE_CLOCK_GETTIME) struct timespec ts; #ifdef CLOCK_MONOTONIC_RAW