[llvm-commits] [llvm] r137137 - /llvm/trunk/lib/Support/Unix/Host.inc
Bob Wilson
bob.wilson at apple.com
Tue Aug 9 12:54:33 PDT 2011
Author: bwilson
Date: Tue Aug 9 14:54:32 2011
New Revision: 137137
URL: http://llvm.org/viewvc/llvm-project?rev=137137&view=rev
Log:
Put Darwin-specific code inside an __APPLE__ ifdef.
Modified:
llvm/trunk/lib/Support/Unix/Host.inc
Modified: llvm/trunk/lib/Support/Unix/Host.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Host.inc?rev=137137&r1=137136&r2=137137&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Host.inc (original)
+++ llvm/trunk/lib/Support/Unix/Host.inc Tue Aug 9 14:54:32 2011
@@ -29,10 +29,12 @@
static std::string getOSVersion() {
struct utsname info;
+#ifdef __APPLE__
// Recognize UNAME_RELEASE environment variable to match Darwin uname.
const char *UnameOverride = ::getenv("UNAME_RELEASE");
if (UnameOverride && UnameOverride[0] != '\0')
return UnameOverride;
+#endif // __APPLE__
if (uname(&info))
return "";
More information about the llvm-commits
mailing list