From f868d0416773aa381d2aec22a2446dbcb639a86e Mon Sep 17 00:00:00 2001 From: barracuda156 Date: Fri, 21 Jul 2023 09:10:18 +0800 Subject: [PATCH] Fixes for PowerPC diff --git include/SDL_config_macosx.h include/SDL_config_macosx.h index d7ad6cc71..736c1043d 100644 --- include/SDL_config_macosx.h +++ include/SDL_config_macosx.h @@ -49,7 +49,12 @@ #define HAVE_STDIO_H 1 #define HAVE_STRING_H 1 #define HAVE_SYS_TYPES_H 1 -#define HAVE_LIBUNWIND_H 1 + +#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 +#define HAVE_LIBUNWIND_H 1 +#else +#define HAVE_LIBUNWIND_H 0 +#endif /* C library functions */ #define HAVE_DLOPEN 1 @@ -270,7 +275,7 @@ #define SDL_FILESYSTEM_COCOA 1 /* Enable assembly routines */ -#ifdef __ppc__ +#ifdef __POWERPC__ #define SDL_ALTIVEC_BLITTERS 1 #endif diff --git include/SDL_platform.h include/SDL_platform.h index d2a7e052d..3127d8cf0 100644 --- include/SDL_platform.h +++ include/SDL_platform.h @@ -108,9 +108,9 @@ /* if not compiling for iOS */ #undef __MACOSX__ #define __MACOSX__ 1 -#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070 -# error SDL for Mac OS X only supports deploying on 10.7 and above. -#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1070 */ +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1040 +# error SDL for Mac OS X only supports deploying on 10.4 and above. +#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1040 */ #endif /* TARGET_OS_IPHONE */ #endif /* defined(__APPLE__) */ --- include/SDL_atomic.h +++ include/SDL_atomic.h @@ -174,7 +174,7 @@ extern DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void); extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void); -#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__)) +#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__)) #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory") #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory") #elif defined(__GNUC__) && defined(__aarch64__)