This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, libgfortran, committed] PR 56919 Backport from 4.9 to 4.7/4.8


Hi,

I committed the patch below as obvious to the 4.7 (r210042) and 4.8
(r210041) branches.

2014-05-03  Janne Blomqvist  <jb@gcc.gnu.org>

    Backport from 4.9
    PR libfortran/56919
    * intrinsics/system_clock.c (GF_CLOCK_MONOTONIC): Check
    _POSIX_MONOTONIC_CLOCK as well.


Index: intrinsics/system_clock.c
===================================================================
--- intrinsics/system_clock.c   (revision 210040)
+++ intrinsics/system_clock.c   (working copy)
@@ -32,7 +32,8 @@ see the files COPYING3 and COPYING.RUNTI
 /* POSIX states that CLOCK_REALTIME must be present if clock_gettime
    is available, others are optional.  */
 #if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_CLOCK_GETTIME_LIBRT)
-#ifdef CLOCK_MONOTONIC
+#if defined(CLOCK_MONOTONIC) && defined(_POSIX_MONOTONIC_CLOCK) \
+  && _POSIX_MONOTONIC_CLOCK >= 0
 #define GF_CLOCK_MONOTONIC CLOCK_MONOTONIC
 #else
 #define GF_CLOCK_MONOTONIC CLOCK_REALTIME


-- 
Janne Blomqvist


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]