diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2013-01-05 00:42:50 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2013-01-05 00:42:50 +0000 |
commit | b5429f43b8cdc9a96efadcc6fcb8dd6b9ad3122f (patch) | |
tree | a5fa61229395f1223680922e7aaed6b812ff9e22 /llvm/lib/Support/Unix | |
parent | 4a77863bce5d15699a496ff4cae5daea7cab736a (diff) | |
download | bcm5719-llvm-b5429f43b8cdc9a96efadcc6fcb8dd6b9ad3122f.tar.gz bcm5719-llvm-b5429f43b8cdc9a96efadcc6fcb8dd6b9ad3122f.zip |
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.
llvm-svn: 171574
Diffstat (limited to 'llvm/lib/Support/Unix')
-rw-r--r-- | llvm/lib/Support/Unix/Process.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/Unix/Process.inc b/llvm/lib/Support/Unix/Process.inc index c6dd3c0dc55..1335b78e86b 100644 --- a/llvm/lib/Support/Unix/Process.inc +++ b/llvm/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) |