From f000947d4ed6cac14356d3c62c1e00cca1541ab6 Mon Sep 17 00:00:00 2001 From: dhewg Date: Thu, 28 Jun 2012 14:08:39 +0200 Subject: [PATCH] Fixes issues with MacOSX. - Fixes compiler errors with mismatching types in DoomController.mm - Adds PPC_INTRINSICS fix to Simd_Altivec.h --- neo/idlib/math/Simd_AltiVec.h | 4 +++- neo/sys/osx/DOOMController.mm | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/neo/idlib/math/Simd_AltiVec.h b/neo/idlib/math/Simd_AltiVec.h index 903caac6..2a5776eb 100644 --- a/neo/idlib/math/Simd_AltiVec.h +++ b/neo/idlib/math/Simd_AltiVec.h @@ -95,7 +95,9 @@ If you have questions concerning this license or the applicable additional terms // This turns on support for PPC intrinsics in the SIMD_AltiVec.cpp file. Right now it's only used for frsqrte. GCC // supports these intrinsics but XLC does not. -#define PPC_INTRINSICS +#if defined(__GNUC__) && defined(__ALTIVEC__) + #define PPC_INTRINSICS +#endif // This assumes that the idDrawVert array that is used in DeriveUnsmoothedTangents is aligned. If its not aligned, // then we don't get any speedup diff --git a/neo/sys/osx/DOOMController.mm b/neo/sys/osx/DOOMController.mm index 7335633f..530bda2f 100644 --- a/neo/sys/osx/DOOMController.mm +++ b/neo/sys/osx/DOOMController.mm @@ -254,7 +254,7 @@ returns in megabytes ================ */ int Sys_GetSystemRam( void ) { - long ramSize; + SInt32 ramSize; if ( Gestalt( gestaltPhysicalRAMSize, &ramSize ) == noErr ) { return ramSize / (1024*1024); @@ -265,7 +265,7 @@ int Sys_GetSystemRam( void ) { bool OSX_GetCPUIdentification( int& cpuId, bool& oldArchitecture ) { - long cpu; + SInt32 cpu; Gestalt(gestaltNativeCPUtype, &cpu); cpuId = cpu;