diff --git a/Externals/SFML/src/SFML/Network/Ftp.cpp b/Externals/SFML/src/SFML/Network/Ftp.cpp index 8e722c6ad7..4cf93d5fb7 100644 --- a/Externals/SFML/src/SFML/Network/Ftp.cpp +++ b/Externals/SFML/src/SFML/Network/Ftp.cpp @@ -489,7 +489,7 @@ Ftp::Response Ftp::GetResponse() if (In >> Code) { // Extract the separator - char Sep; + char Sep = 0; In.get(Sep); // The '-' character means a multiline response diff --git a/Externals/SFML/src/SFML/Network/Http.cpp b/Externals/SFML/src/SFML/Network/Http.cpp index 201634058f..e9bc403683 100644 --- a/Externals/SFML/src/SFML/Network/Http.cpp +++ b/Externals/SFML/src/SFML/Network/Http.cpp @@ -260,7 +260,7 @@ void Http::Response::FromString(const std::string& Data) } // Extract the status code from the first line - int StatusCode; + int StatusCode = 0; if (In >> StatusCode) { myStatus = static_cast(StatusCode); diff --git a/SConstruct b/SConstruct index ce5ae5167b..465a11c499 100644 --- a/SConstruct +++ b/SConstruct @@ -122,28 +122,27 @@ rev = utils.GenerateRevFile(env['flavor'], '.', None) # OS X specifics if sys.platform == 'darwin': ccld = ['-arch', 'x86_64', '-arch', 'i386', '-mmacosx-version-min=10.5'] + ccld += ['--sysroot=/Developer/SDKs/MacOSX10.5.sdk'] env['CCFLAGS'] += ccld env['CCFLAGS'] += ['-msse3'] env['CC'] = "gcc-4.2 -ObjC" env['CXX'] = "g++-4.2 -ObjC++" - #env['FRAMEWORKPATH'] += [ - # '/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks', - # '/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks'] env['FRAMEWORKS'] += ['AppKit', 'CoreFoundation', 'CoreServices'] env['FRAMEWORKS'] += ['AudioUnit', 'CoreAudio'] env['FRAMEWORKS'] += ['IOBluetooth', 'IOKit', 'OpenGL'] - env['LIBPATH'] += ['/Developer/SDKs/MacOSX10.5.sdk/usr/lib'] - env['LIBS'] = ['gcc_s.10.5', 'iconv', 'SDL'] + env['LIBS'] = ['iconv', 'SDL'] env['LINKFLAGS'] += ccld - env['LINKFLAGS'] += ['-Wl,-search_paths_first', '-Wl,-Z'] - env['LINKFLAGS'] += [ - '-F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks', - '-F/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks'] + env['LINKFLAGS'] += ['-Wl,-search_paths_first'] if platform.mac_ver()[0] < '10.6.0': env['HAVE_OPENCL'] = 0 else: env['CCFLAGS'] += ['-Wextra-tokens', '-Wnewline-eof'] + env['CCFLAGS'] += ['-iframework/Developer/SDKs/MacOSX10.5.sdk' + + '/System/Library/Frameworks'] + env['CCFLAGS'] += ['-iframework/Developer/SDKs/MacOSX10.6.sdk' + + '/System/Library/Frameworks'] + env['CPPDEFINES'] += [('HAVE_OPENCL', 1)] env['HAVE_OPENCL'] = 1 env['FRAMEWORKSFLAGS'] = ['-weak_framework', 'OpenCL'] diff --git a/Source/Core/Common/Src/OpenCL.h b/Source/Core/Common/Src/OpenCL.h index 7972780253..fd9a74c12f 100644 --- a/Source/Core/Common/Src/OpenCL.h +++ b/Source/Core/Common/Src/OpenCL.h @@ -26,20 +26,12 @@ #define HAVE_OPENCL 1 #endif -// The latest (last?) release of Xcode for Leopard does not include the 10.6 -// SDK, so we can only build with OpenCL on a Snow Leopard system where we link -// the OpenCL framework weakly so that the application will also run on 10.5. -#ifdef __APPLE__ -#import -#ifdef NSFoundationVersionNumber10_5 // First defined in the 10.6 SDK -#include -#define HAVE_OPENCL 1 -#endif -#endif - #if defined(HAVE_OPENCL) && HAVE_OPENCL -#ifndef __APPLE__ +#ifdef __APPLE__ +#define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER +#include +#else #include #endif