[svn] Check for defined-ness of _POSIX_MONOTONIC_CLOCK, don't require

it to be >0.
This commit is contained in:
hniksic 2005-04-07 16:22:53 -07:00
parent eac1dced8f
commit fbea09290b
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,14 @@
2005-04-08 Hrvoje Niksic <hniksic@xemacs.org>
* ptimer.c (ptimer_init): Check whether _POSIX_MONOTONIC_CLOCK is
defined instead of whether it's greater than 0. glibc defines it
to 0, but still makes it available via sysconf.
2005-04-08 Hrvoje Niksic <hniksic@xemacs.org>
* mswindows.c (str_to_int64): Rename OVERFLOW and UNDERFLOW to
INT64_OVERFLOW and INT64_UNDERFLOW, since those names are used.
2005-04-07 Hrvoje Niksic <hniksic@xemacs.org>
* ptimer.c: New file. Move the "wtimer" functions from utils.c to

View File

@ -183,7 +183,7 @@ ptimer_init (void)
{
struct timespec res;
#if _POSIX_MONOTONIC_CLOCK > 0
#ifdef _POSIX_MONOTONIC_CLOCK
if (sysconf (_SC_MONOTONIC_CLOCK) > 0)
posix_clock_id = CLOCK_MONOTONIC;
else