From 05ff848a0f4643678c5cfa3e56cdacbd40baa15a Mon Sep 17 00:00:00 2001 From: David Fang Date: Wed, 12 Feb 2014 21:02:12 +0000 Subject: [PATCH 5/7] _CS_DARWIN_USER macros available on darwin>=9. Thanks, Dave Odell! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201255 91177308-0d34-0410-b5e6-96231b3b80d8 (cherry picked from commit 17159cb1588dd44d0cfc8a5f96da8be04be4c975) --- lib/Support/Path.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git llvm_release_34/lib/Support/Path.cpp macports_release_34/lib/Support/Path.cpp index c869b30..259fcad 100644 --- llvm_release_34/lib/Support/Path.cpp +++ macports_release_34/lib/Support/Path.cpp @@ -507,8 +507,9 @@ bool is_separator(char value) { void system_temp_directory(bool erasedOnReboot, SmallVectorImpl &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 on darwin >= 9 int ConfName = erasedOnReboot? _CS_DARWIN_USER_TEMP_DIR : _CS_DARWIN_USER_CACHE_DIR; size_t ConfLen = confstr(ConfName, 0, 0); -- 2.2.2