From 634a1f3162f9b720f3d4ed348fcd52ba4fb050b0 Mon Sep 17 00:00:00 2001 From: boxingcow Date: Sat, 12 Jul 2014 22:01:41 +0100 Subject: [PATCH 1/3] Add .DS_Store to .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 396f474d54..43afefc806 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,5 @@ rpcs3/git-version.h bin/dev_hdd0/log.txt x64/Debug/emucore.lib x64/Release/emucore.lib + +.DS_Store From a4f73bc7054563527bee2ce891e3de2c24012c5a Mon Sep 17 00:00:00 2001 From: boxingcow Date: Sat, 12 Jul 2014 22:06:43 +0100 Subject: [PATCH 2/3] Fix broken OS X build with isnan and MAP_ANONYMOUS --- rpcs3/Emu/Cell/PPUThread.cpp | 6 ++++-- rpcs3/Emu/Memory/Memory.h | 9 +++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index 3c8362178d..0b039e4886 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -4,11 +4,13 @@ #include "Emu/System.h" #include "Emu/Cell/PPUThread.h" #include "Emu/SysCalls/Modules.h" - #include "Emu/Cell/PPUDecoder.h" #include "Emu/Cell/PPUInterpreter.h" #include "Emu/Cell/PPUDisAsm.h" + #include +#include + extern gcmInfo gcm_info; PPUThread& GetCurrentPPUThread() @@ -190,7 +192,7 @@ bool FPRdouble::IsINF(PPCdouble d) bool FPRdouble::IsNaN(PPCdouble d) { - return isnan(d) ? 1 : 0; + return std::isnan((double)d) ? 1 : 0; } bool FPRdouble::IsQNaN(PPCdouble d) diff --git a/rpcs3/Emu/Memory/Memory.h b/rpcs3/Emu/Memory/Memory.h index 1642e36770..4a10a3260a 100644 --- a/rpcs3/Emu/Memory/Memory.h +++ b/rpcs3/Emu/Memory/Memory.h @@ -8,6 +8,15 @@ #include "Emu/SysCalls/Callback.h" #include +/* OS X uses MAP_ANON instead of MAP_ANONYMOUS */ +#ifndef MAP_ANONYMOUS + #ifdef MAP_ANON + #define MAP_ANONYMOUS MAP_ANON + #else + #define MAP_ANONYMOUS 0 + #endif +#endif + using std::nullptr_t; #define safe_delete(x) do {delete (x);(x)=nullptr;} while(0) From b7b3761c09cbcf2c82a5db9099f214090dd4b5ff Mon Sep 17 00:00:00 2001 From: boxingcow Date: Sat, 12 Jul 2014 22:10:49 +0100 Subject: [PATCH 3/3] Add include path for XQuartz on OS X --- rpcs3/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rpcs3/CMakeLists.txt b/rpcs3/CMakeLists.txt index 5e713720d4..c9b734be42 100644 --- a/rpcs3/CMakeLists.txt +++ b/rpcs3/CMakeLists.txt @@ -30,6 +30,11 @@ if (NOT MSVC) add_definitions(-msse2) endif() +if (APPLE) + set(CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -I/opt/include/X11”) + set(CMAKE_C_FLAGS “${CMAKE_C_FLAGS} -I/opt/X11/include”) +endif() + If( NOT RPCS3_SRC_DIR) SET(RPCS3_SRC_DIR ${CMAKE_CURRENT_LIST_DIR}) Message("-- Initializing RPCS3_SRC_DIR=${RPCS3_SRC_DIR}")