On Wed, Oct 11, 2017 at 03:24:50PM +0200, Ferenc Wágner wrote: > wf...@niif.hu (Ferenc Wágner) writes: > > > The configure check was added for Hurd support. Apparently, Hurd > > defines _POSIX_MONOTONIC_CLOCK to 200809L, returns the same value for > > a sysconf() query, but clock_getres (CLOCK_MONOTONIC, &ts) still fails > > with EINVAL.
Oh, I was not aware of this issue. Thanks for pointing me to it. > #hurd confirmed that this is a Hurd bug in glibc, and promised a fix it > in the next upload. So I guess an unconditional check for > _POSIX_MONOTONIC_CLOCK being positive would be a good general solution. > Do you agree? I do agree that hurd should fix this. Yet, it may not be the thing to rely on here. Testing for a working CLOCK_MONOTONIC is something that many projects to. So a good thing to do here would be to make the check cacheable (AC_CACHE_CHECK). Ideally, the check would move to autoconf-archive or something for more projects to use. After some time of glibc being fixed, my proposed conversion may make more sense. Helmut