[llvm-commits] [llvm] r171574 - /llvm/trunk/lib/Support/Unix/Process.inc
Chandler Carruth
chandlerc at gmail.com
Fri Jan 4 16:42:50 PST 2013
Author: chandlerc
Date: Fri Jan 4 18:42:50 2013
New Revision: 171574
URL: http://llvm.org/viewvc/llvm-project?rev=171574&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Support/Unix/Process.inc
Modified: llvm/trunk/lib/Support/Unix/Process.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Process.inc?rev=171574&r1=171573&r2=171574&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Process.inc (original)
+++ llvm/trunk/lib/Support/Unix/Process.inc Fri Jan 4 18:42:50 2013
@@ -69,7 +69,7 @@
}
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)
More information about the llvm-commits
mailing list