Skip to content

Commit

Permalink
_CS_DARWIN_USER macros available on darwin>=9. Thanks, Dave Odell!
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201255 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
fangism committed Feb 12, 2014
1 parent 4c1ea6b commit 17159cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Support/Path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 17159cb

Please sign in to comment.