From 46c314cc3d85f7e74b79f211eee29ff2bb638391 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 8 Apr 2025 08:14:25 -0700
Subject: [PATCH] Revert "bool is 4 bytes in Apple MacOS X 32 bit PPC ABI"
This reverts commit 5a59b5f3216866f4b3032d1e2c9d66e239ee5262.
The strong ABI guarantee only applies if bool is a byte (we repurposed a Uint8 field as a bool in SDL_gpu.h), and 32-bit PPC isn't a platform we support, so I'm going to back this patch out.
---
include/SDL3/SDL_stdinc.h | 7 -------
1 file changed, 7 deletions(-)
diff --git a/include/SDL3/SDL_stdinc.h b/include/SDL3/SDL_stdinc.h
index dc8538e70fa16..fd80d729d3333 100644
--- a/include/SDL3/SDL_stdinc.h
+++ b/include/SDL3/SDL_stdinc.h
@@ -64,9 +64,6 @@
#define SDL_INCLUDE_STDBOOL_H
#endif
#endif
-#if defined(__APPLE__) && defined(__ppc__) && !defined(SDL_INCLUDE_STDBOOL_H)
-#define SDL_INCLUDE_STDBOOL_H
-#endif
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
(defined(_MSC_VER) && (_MSC_VER >= 1910 /* Visual Studio 2017 */)) || \
defined(SDL_INCLUDE_STDBOOL_H)
@@ -1148,11 +1145,7 @@ SDL_COMPILE_TIME_ASSERT(longlong_size64, sizeof(long long) == 8); /* using I64 f
/** \cond */
#ifndef DOXYGEN_SHOULD_IGNORE_THIS
-#if defined(__APPLE__) && defined(__ppc__) /* MacOSX PPC32 ABI is different. */
-SDL_COMPILE_TIME_ASSERT(bool_size, sizeof(bool) == 4);
-#else
SDL_COMPILE_TIME_ASSERT(bool_size, sizeof(bool) == 1);
-#endif
SDL_COMPILE_TIME_ASSERT(uint8_size, sizeof(Uint8) == 1);
SDL_COMPILE_TIME_ASSERT(sint8_size, sizeof(Sint8) == 1);
SDL_COMPILE_TIME_ASSERT(uint16_size, sizeof(Uint16) == 2);