cmake: fix uses of undefined macro identifiers (-Wundef)

This commit is contained in:
Anonymous Maarten authored and GitHub committed 2023-11-17 03:06:26 +00:00
1 parent cc7c0a2dab
commit d81d986858
430 files changed
+1289 -1260

No files matched your search

+1 -1
View File
@@ -284,7 +284,7 @@ int main(int argc, char *argv[])
textwin = SDLTest_TextWindowCreate(0, 0, 640, 480);
#if __IPHONEOS__
#ifdef __IPHONEOS__
/* Creating the context creates the view, which we need to show keyboard */
SDL_GL_CreateContext(window);
#endif
+1 -1
View File
@@ -266,7 +266,7 @@ int main(int argc, char *argv[])
renderer = SDL_CreateRenderer(window, -1, 0);
SDL_RenderPresent(renderer);
#if __IPHONEOS__
#ifdef __IPHONEOS__
/* Creating the context creates the view, which we need to show keyboard */
SDL_GL_CreateContext(window);
#endif
+2 -2
View File
@@ -21,7 +21,7 @@
#include "SDL.h"
#if HAVE_SIGNAL_H
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
@@ -97,7 +97,7 @@ int main(int argc, char *argv[])
wave.spec.callback = NULL; /* we'll push audio. */
#if HAVE_SIGNAL_H
#ifdef HAVE_SIGNAL_H
/* Set the signals */
#ifdef SIGHUP
(void)signal(SIGHUP, poked);
+2 -2
View File
@@ -17,7 +17,7 @@
#include <stdio.h>
#include <stdlib.h>
#if HAVE_SIGNAL_H
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
@@ -163,7 +163,7 @@ int main(int argc, char *argv[])
quit(1);
}
#if HAVE_SIGNAL_H
#ifdef HAVE_SIGNAL_H
/* Set the signals */
#ifdef SIGHUP
(void)signal(SIGHUP, poked);
+2 -2
View File
@@ -464,7 +464,7 @@ int keyboard_setTextInputRect(void *arg)
int keyboard_setTextInputRectNegative(void *arg)
{
/* Some platforms set also an error message; prepare for checking it */
#if SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_COCOA
#if defined(SDL_VIDEO_DRIVER_WINDOWS) || defined(SDL_VIDEO_DRIVER_ANDROID) || defined(SDL_VIDEO_DRIVER_COCOA)
const char *expectedError = "Parameter 'rect' is invalid";
const char *error;
@@ -477,7 +477,7 @@ int keyboard_setTextInputRectNegative(void *arg)
SDLTest_AssertPass("Call to SDL_SetTextInputRect(NULL)");
/* Some platforms set also an error message; so check it */
#if SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_COCOA
#if defined(SDL_VIDEO_DRIVER_WINDOWS) || defined(SDL_VIDEO_DRIVER_ANDROID) || defined(SDL_VIDEO_DRIVER_COCOA)
error = SDL_GetError();
SDLTest_AssertPass("Call to SDL_GetError()");
SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL");
+1 -1
View File
@@ -18,7 +18,7 @@
static int run_test(void);
#if HAVE_LIBUDEV_H || defined(SDL_JOYSTICK_LINUX)
#if defined(HAVE_LIBUDEV_H) || defined(SDL_JOYSTICK_LINUX)
#include <stdint.h>
+3 -3
View File
@@ -40,11 +40,11 @@ static GL_Context ctx;
static int LoadContext(GL_Context *data)
{
#if SDL_VIDEO_DRIVER_UIKIT
#ifdef SDL_VIDEO_DRIVER_UIKIT
#define __SDL_NOGETPROCADDR__
#elif SDL_VIDEO_DRIVER_ANDROID
#elif defined(SDL_VIDEO_DRIVER_ANDROID)
#define __SDL_NOGETPROCADDR__
#elif SDL_VIDEO_DRIVER_PANDORA
#elif defined(SDL_VIDEO_DRIVER_PANDORA)
#define __SDL_NOGETPROCADDR__
#endif
+5 -5
View File
@@ -65,11 +65,11 @@ static GLES2_Context ctx;
static int LoadContext(GLES2_Context *data)
{
#if SDL_VIDEO_DRIVER_UIKIT
#ifdef SDL_VIDEO_DRIVER_UIKIT
#define __SDL_NOGETPROCADDR__
#elif SDL_VIDEO_DRIVER_ANDROID
#elif defined(SDL_VIDEO_DRIVER_ANDROID)
#define __SDL_NOGETPROCADDR__
#elif SDL_VIDEO_DRIVER_PANDORA
#elif defined(SDL_VIDEO_DRIVER_PANDORA)
#define __SDL_NOGETPROCADDR__
#endif
@@ -893,9 +893,9 @@ int main(int argc, char *argv[])
SDL_Log("%2.2f frames per second\n",
((double)frames * 1000) / (now - then));
}
#if !defined(__ANDROID__) && !defined(__NACL__)
#if !defined(__ANDROID__) && !defined(__NACL__)
quit(0);
#endif
#endif
return 0;
}
+3 -3
View File
@@ -63,11 +63,11 @@ static GLES2_Context ctx;
static int LoadContext(GLES2_Context *data)
{
#if SDL_VIDEO_DRIVER_UIKIT
#ifdef SDL_VIDEO_DRIVER_UIKIT
#define __SDL_NOGETPROCADDR__
#elif SDL_VIDEO_DRIVER_ANDROID
#elif defined(SDL_VIDEO_DRIVER_ANDROID)
#define __SDL_NOGETPROCADDR__
#elif SDL_VIDEO_DRIVER_PANDORA
#elif defined(SDL_VIDEO_DRIVER_PANDORA)
#define __SDL_NOGETPROCADDR__
#endif
+1 -1
View File
@@ -29,7 +29,7 @@
#ifdef HAVE_SDL_TTF
#ifdef __MACOSX__
#define DEFAULT_FONT "/System/Library/Fonts/华文细黑.ttf"
#elif __WIN32__
#elif defined(__WIN32__)
/* Some japanese font present on at least Windows 8.1. */
#define DEFAULT_FONT "C:\\Windows\\Fonts\\yugothic.ttf"
#else