diff --git a/Transmission.xcodeproj/project.pbxproj b/Transmission.xcodeproj/project.pbxproj index 5ac55b412..4f485933c 100644 --- a/Transmission.xcodeproj/project.pbxproj +++ b/Transmission.xcodeproj/project.pbxproj @@ -3274,7 +3274,11 @@ GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREPROCESSOR_DEFINITIONS = MACOSX; + GCC_PREPROCESSOR_DEFINITIONS = ( + MACOSX, + BUILD_MAC_CLIENT, + XCODE_BUILD, + ); GCC_UNROLL_LOOPS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; @@ -3395,6 +3399,8 @@ GCC_PREPROCESSOR_DEFINITIONS = ( MACOSX, NS_BLOCK_ASSERTIONS, + BUILD_MAC_CLIENT, + XCODE_BUILD, ); GCC_UNROLL_LOOPS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; @@ -3451,7 +3457,11 @@ GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREPROCESSOR_DEFINITIONS = MACOSX; + GCC_PREPROCESSOR_DEFINITIONS = ( + MACOSX, + BUILD_MAC_CLIENT, + XCODE_BUILD, + ); GCC_UNROLL_LOOPS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; diff --git a/configure.ac b/configure.ac index 6e057bd4c..bffe16e75 100644 --- a/configure.ac +++ b/configure.ac @@ -474,6 +474,7 @@ AM_CONDITIONAL([BUILD_DAEMON],[test "x$build_daemon" = "xyes"]) if test "x$build_mac" = "xyes" ; then + AC_DEFINE([BUILD_MAC_CLIENT], 1) # Make sure the proper Mac SDK is installed if test ! -d /Developer/SDKs/MacOSX10.5.sdk; then cat << EOF diff --git a/libtransmission/platform.c b/libtransmission/platform.c index 6a2a7b750..a6c856f64 100644 --- a/libtransmission/platform.c +++ b/libtransmission/platform.c @@ -28,7 +28,7 @@ #include #include /* for CSIDL_APPDATA, CSIDL_MYDOCUMENTS */ #else - #ifdef SYS_DARWIN + #ifdef BUILD_MAC_CLIENT #include #endif #ifdef __HAIKU__ @@ -429,7 +429,7 @@ tr_getWebClientDir (const tr_session * session UNUSED) else { -#ifdef SYS_DARWIN /* on Mac, look in the Application Support folder first, then in the app bundle. */ +#ifdef BUILD_MAC_CLIENT /* on Mac, look in the Application Support folder first, then in the app bundle. */ /* Look in the Application Support folder */ s = tr_buildPath (tr_sessionGetConfigDir (session), "web", NULL); diff --git a/libtransmission/utils.c b/libtransmission/utils.c index e05f91758..af51fdbc4 100644 --- a/libtransmission/utils.c +++ b/libtransmission/utils.c @@ -14,7 +14,7 @@ #define _GNU_SOURCE /* glibc's string.h needs this to pick up memmem */ #endif -#if defined (SYS_DARWIN) +#if defined (XCODE_BUILD) #define HAVE_GETPAGESIZE #define HAVE_ICONV_OPEN #define HAVE_MKDTEMP