]> sjero.net Git - wget/commitdiff
[svn] Use _POSIX_TIMERS - 0 > 0, which handles the case when POSIX_TIMERS is
authorhniksic <devnull@localhost>
Fri, 15 Apr 2005 19:29:19 +0000 (12:29 -0700)
committerhniksic <devnull@localhost>
Fri, 15 Apr 2005 19:29:19 +0000 (12:29 -0700)
_defined but empty, as well as the case when it is
undefined.  Do the same with the check for _POSIX_MONOTONIC_CLOCK.
Suggested by Larry Jones.

src/ChangeLog
src/ptimer.c

index dec3d4caa73bd0ff78df01eb4d6313d976dddf4c..576440188fd0689c33555bfe4bceac7817f21177 100644 (file)
@@ -1,3 +1,10 @@
+2005-04-15  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * ptimer.c: Use _POSIX_TIMERS - 0 > 0, which handles the case when
+       _POSIX_TIMERS is defined but empty, as well as the case when it is
+       undefined.  Do the same with the check for _POSIX_MONOTONIC_CLOCK.
+       Suggested by Larry Jones.
+
 2005-04-15  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * ptimer.c: Check that _POSIX_TIMERS is defined as well as > 0.
index 3a09ceba760ad0010332d569b0a6466eae04d940..3eeb78c635925f7761a561acdf3924f2e4013f9d 100644 (file)
@@ -92,7 +92,7 @@ extern int errno;
 #if defined(WINDOWS) || defined(__CYGWIN__)
 # define PTIMER_WINDOWS                /* use Windows timers */
 #else
-# if defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0
+# if _POSIX_TIMERS - 0 > 0
 #  define PTIMER_POSIX         /* use POSIX timers (clock_gettime) */
 # else
 #  ifdef HAVE_GETTIMEOFDAY
@@ -139,7 +139,7 @@ posix_init (void)
     int id;
     int sysconf_name;
   } clocks[] = {
-#if defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0
+#if _POSIX_MONOTONIC_CLOCK - 0 >= 0
     { CLOCK_MONOTONIC, _SC_MONOTONIC_CLOCK },
 #endif
 #ifdef CLOCK_HIGHRES