]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR 56919 Check _POSIX_MONOTONIC_CLOCK.
authorJanne Blomqvist <jb@gcc.gnu.org>
Sat, 3 May 2014 21:03:10 +0000 (00:03 +0300)
committerJanne Blomqvist <jb@gcc.gnu.org>
Sat, 3 May 2014 21:03:10 +0000 (00:03 +0300)
2014-05-04  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.

From-SVN: r210042

libgfortran/ChangeLog
libgfortran/intrinsics/system_clock.c

index dde1b58f69c37d8070c8672b0116898f2ce9847d..514ff6216d45e7d3ba9aaf232de0293bdb125d49 100644 (file)
@@ -1,8 +1,15 @@
+2014-05-04  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.
+
 2014-04-12  Jerry DeLisle  <jvdelisle@gcc.gnu>
 
        Backport from mainline
        PR libfortran/60810
-       io/unit.c (is_trim_ok): If internal unit is array, do not trim.
+       io/unit.c (is_trim_ok): If internal unit is array, do not trim.
 
 2014-03-15  Jerry DeLisle  <jvdelisle@gcc.gnu>
 
index 6385c4f0c95dc01117e08e4fa23f82174a39f7d8..d4b2f850e55c72e12bd62e9492f7645a71638b68 100644 (file)
@@ -33,7 +33,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 /* 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