Fix -Wundef warnings due to use of unguarded __MACOS__

This commit is contained in:
Anonymous Maarten
2023-03-27 15:35:24 +02:00
parent cfe2efb425
commit ed7a589334
4 changed files with 4 additions and 4 deletions

View File

@@ -25,7 +25,7 @@
#if defined(__x86_64__) && SDL_SSE2_INTRINSICS
#define NEED_SCALAR_CONVERTER_FALLBACKS 0 /* x86_64 guarantees SSE2. */
#elif __MACOS__ && SDL_SSE2_INTRINSICS
#elif defined(__MACOS__) && SDL_SSE2_INTRINSICS
#define NEED_SCALAR_CONVERTER_FALLBACKS 0 /* macOS/Intel guarantees SSE2. */
#elif defined(__ARM_ARCH) && (__ARM_ARCH >= 8) && defined(SDL_NEON_INTRINSICS)
#define NEED_SCALAR_CONVERTER_FALLBACKS 0 /* ARMv8+ promise NEON. */

View File

@@ -582,7 +582,7 @@ static const SDL_UDEV_Symbols *udev_ctx = NULL;
#define HAVE_PLATFORM_BACKEND 1
#endif /* SDL_USE_LIBUDEV */
#elif __MACOS__
#elif defined(__MACOS__)
#include "mac/hid.c"
#define HAVE_PLATFORM_BACKEND 1
#define udev_ctx 1

View File

@@ -1135,7 +1135,7 @@ static char *SDL_PrivateGetGamepadGUIDFromMappingString(const char *pMapping)
SDL_memcpy(&pchGUID[8], &pchGUID[0], 4);
SDL_memcpy(&pchGUID[0], "03000000", 8);
}
#elif __MACOS__
#elif defined(__MACOS__)
if (SDL_strlen(pchGUID) == 32 &&
SDL_memcmp(&pchGUID[4], "000000000000", 12) == 0 &&
SDL_memcmp(&pchGUID[20], "000000000000", 12) == 0) {

View File

@@ -192,7 +192,7 @@ typedef struct
static Uint32 SDL_DefaultGraphicsBackends(SDL_VideoDevice *_this)
{
#if (SDL_VIDEO_OPENGL && __MACOS__) || (defined(__IOS__) && !TARGET_OS_MACCATALYST) || defined(__ANDROID__)
#if (SDL_VIDEO_OPENGL && defined(__MACOS__)) || (defined(__IOS__) && !TARGET_OS_MACCATALYST) || defined(__ANDROID__)
if (_this->GL_CreateContext != NULL) {
return SDL_WINDOW_OPENGL;
}