[llvm] r201255 - _CS_DARWIN_USER macros available on darwin>=9. Thanks, Dave Odell!
David Fang
fang at csl.cornell.edu
Wed Feb 12 13:02:12 PST 2014
Author: fangism
Date: Wed Feb 12 15:02:12 2014
New Revision: 201255
URL: http://llvm.org/viewvc/llvm-project?rev=201255&view=rev
Log:
_CS_DARWIN_USER macros available on darwin>=9. Thanks, Dave Odell!
Modified:
llvm/trunk/lib/Support/Path.cpp
Modified: llvm/trunk/lib/Support/Path.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Path.cpp?rev=201255&r1=201254&r2=201255&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Path.cpp (original)
+++ llvm/trunk/lib/Support/Path.cpp Wed Feb 12 15:02:12 2014
@@ -508,8 +508,9 @@ bool is_separator(char value) {
void system_temp_directory(bool erasedOnReboot, SmallVectorImpl<char> &result) {
result.clear();
-#ifdef __APPLE__
+#if defined(_CS_DARWIN_USER_TEMP_DIR) && defined(_CS_DARWIN_USER_CACHE_DIR)
// On Darwin, use DARWIN_USER_TEMP_DIR or DARWIN_USER_CACHE_DIR.
+ // macros defined in <unistd.h> on darwin >= 9
int ConfName = erasedOnReboot? _CS_DARWIN_USER_TEMP_DIR
: _CS_DARWIN_USER_CACHE_DIR;
size_t ConfLen = confstr(ConfName, 0, 0);
More information about the llvm-commits
mailing list