From fbea09290bf714dfd1c453e6ab013667c9ca12be Mon Sep 17 00:00:00 2001 From: hniksic Date: Thu, 7 Apr 2005 16:22:53 -0700 Subject: [PATCH] [svn] Check for defined-ness of _POSIX_MONOTONIC_CLOCK, don't require it to be >0. --- src/ChangeLog | 11 +++++++++++ src/ptimer.c | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8242627c..bddaa88c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2005-04-08 Hrvoje Niksic + + * 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 + + * 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 * ptimer.c: New file. Move the "wtimer" functions from utils.c to diff --git a/src/ptimer.c b/src/ptimer.c index e6979216..45a389a8 100644 --- a/src/ptimer.c +++ b/src/ptimer.c @@ -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 -- 2.39.2