diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2019-04-24 18:57:36 +0000 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gcc.gnu.org> | 2019-04-24 18:57:36 +0000 |
commit | 58990c4d3a94334bcf1cd4f8dd7c2ba2888263e1 (patch) | |
tree | 881f93120730a284d99101d8d87aa62f84d9c3be /libphobos/libdruntime | |
parent | 265e6a0ae0e9dc0c810edc6158299f0ed1aa05ab (diff) | |
download | gcc-58990c4d3a94334bcf1cd4f8dd7c2ba2888263e1.zip gcc-58990c4d3a94334bcf1cd4f8dd7c2ba2888263e1.tar.gz gcc-58990c4d3a94334bcf1cd4f8dd7c2ba2888263e1.tar.bz2 |
libphobos: Fix FAIL phobos.exp/core.time on CentOS 5.11, Linux 2.6.18
Merges upstream druntime e03164b5.
Reviewed-on: https://github.com/dlang/druntime/pull/2581
libphobos/ChangeLog:
2019-04-24 Iain Buclaw <ibuclaw@gdcproject.org>
PR d/89432
* testsuite/lib/libphobos.exp (check_effective_target_linux_pre_2639):
New proc.
* testsuite/libphobos.druntime/druntime.exp: Add compiler flag
-fversion=Linux_Pre_2639 if target is linux_pre_2639.
* testsuite/libphobos.druntime_shared/druntime_shared.exp: Likewise.
From-SVN: r270554
Diffstat (limited to 'libphobos/libdruntime')
-rw-r--r-- | libphobos/libdruntime/MERGE | 2 | ||||
-rw-r--r-- | libphobos/libdruntime/core/time.d | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/libphobos/libdruntime/MERGE b/libphobos/libdruntime/MERGE index 9fe51fd..d815647 100644 --- a/libphobos/libdruntime/MERGE +++ b/libphobos/libdruntime/MERGE @@ -1,4 +1,4 @@ -513652173d6f02206be3ddaa2b6ed0b191ea4e3d +e03164b5259a9f116eb91dfa5a18c192fa72e575 The first line of this file holds the git revision number of the last merge done from the dlang/druntime repository. diff --git a/libphobos/libdruntime/core/time.d b/libphobos/libdruntime/core/time.d index 1982122..a7640ec 100644 --- a/libphobos/libdruntime/core/time.d +++ b/libphobos/libdruntime/core/time.d @@ -2539,8 +2539,11 @@ unittest static bool clockSupported(ClockType c) { - version (Linux_Pre_2639) // skip CLOCK_BOOTTIME on older linux kernels - return c != ClockType.second && c != ClockType.bootTime; + // Skip unsupported clocks on older linux kernels, assume that only + // CLOCK_MONOTONIC and CLOCK_REALTIME exist, as that is the lowest + // common denominator supported by all versions of Linux pre-2.6.12. + version (Linux_Pre_2639) + return c == ClockType.normal || c == ClockType.precise; else return c != ClockType.second; // second doesn't work with MonoTimeImpl |