Hi Pekka,

On Tue, 2011-07-05 at 16:30 +0300, Pekka Enberg wrote:
> Darwin doesn't support clock_gettime() but has _POSIX_MONOTONIC_CLOCK defined
> so use a more strict check with _POSIX_TIMERS.
> [...]
> -#ifdef _POSIX_MONOTONIC_CLOCK
> +#if _POSIX_TIMERS > 0 && defined(_POSIX_MONOTONIC_CLOCK)
>    jlong result;
>    struct timespec tp;

I think the pedantically more correct check would be to add
clock_gettime to the list of functions to check with AC_CHECK_FUNCS
under COMPILE_JNI in configure.ac. And then change the test to:

#if defined(HAVE_CLOCK_GETTIME) && defined(_POSIX_MONOTONIC_CLOCK) && 
_POSIX_MONOTONIC_CLOCK > 0

Cheers,

Mark

Reply via email to