]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR 56919 Check _POSIX_MONOTONIC_CLOCK.
authorJanne Blomqvist <jb@gcc.gnu.org>
Sat, 3 May 2014 20:56:26 +0000 (23:56 +0300)
committerJanne Blomqvist <jb@gcc.gnu.org>
Sat, 3 May 2014 20:56:26 +0000 (23:56 +0300)
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.

From-SVN: r210041

libgfortran/ChangeLog
libgfortran/intrinsics/system_clock.c

index 9eb18d4d6a3eef13560432323e6919a4816d4945..dcdeac18347d169a37e9930a5519c53eea79ac39 100644 (file)
@@ -1,14 +1,20 @@
+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.
+
 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-04-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
        Backport from mainline
        2013-11-15  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
-
        * configure: Regenerate.
 
 2014-03-15  Dominique d'Humieres  <dominiq@lps.ens.fr>
index 87a87e22f1d31381628d8b45a63e6016654e4bbf..63ea393f6a672ad818c280ed84bf37fa4476ed45 100644 (file)
@@ -32,7 +32,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