aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2013-01-05 00:42:50 +0000
committerChandler Carruth <chandlerc@gmail.com>2013-01-05 00:42:50 +0000
commit6a40db40eea4f3103cc05610949f5fe217739eea (patch)
tree18a2f0cd757ff6c053e6a9a3933d34f1423b4f14
parent1751a73f1956a26b3806467267f9a6773f0478b3 (diff)
downloadexternal_llvm-6a40db40eea4f3103cc05610949f5fe217739eea.zip
external_llvm-6a40db40eea4f3103cc05610949f5fe217739eea.tar.gz
external_llvm-6a40db40eea4f3103cc05610949f5fe217739eea.tar.bz2
Eric thought that Darwin was right to use -1 consistently rather than
leaving this undefined, and despite the sentence in the standard that seems to require it, I'll cede the point and assume its a bug in the wording. Other parts of POSIX regularly allow for things to be -1 instead of undefined, this should too. Makes things more consistent too. This should have to real impact for folks though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171574 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Support/Unix/Process.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/Unix/Process.inc b/lib/Support/Unix/Process.inc
index c6dd3c0..1335b78 100644
--- a/lib/Support/Unix/Process.inc
+++ b/lib/Support/Unix/Process.inc
@@ -69,7 +69,7 @@ static std::pair<TimeValue, TimeValue> getRUsageTimes() {
}
TimeValue self_process::get_user_time() const {
-#if _POSIX_TIMERS > 0 && defined(_POSIX_CPUTIME)
+#if _POSIX_TIMERS > 0 && _POSIX_CPUTIME > 0
// Try to get a high resolution CPU timer.
struct timespec TS;
if (::clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &TS) == 0)