Fix -Wundef warnings due to disabling SDL_LIBC

This commit is contained in:
Anonymous Maarten
2023-03-27 19:41:37 +02:00
parent b29a5bcbb6
commit 9bf8fbbba4
6 changed files with 7 additions and 5 deletions

View File

@@ -28,7 +28,7 @@
#include "SDL_log_c.h"
#if HAVE_STDIO_H
#ifdef HAVE_STDIO_H
#include <stdio.h>
#endif
@@ -484,7 +484,7 @@ static void SDLCALL SDL_LogOutput(void *userdata, int category, SDL_LogPriority
}
}
#endif
#if HAVE_STDIO_H && \
#if defined(HAVE_STDIO_H) && \
!(defined(__APPLE__) && (defined(SDL_VIDEO_DRIVER_COCOA) || defined(SDL_VIDEO_DRIVER_UIKIT)))
(void)fprintf(stderr, "%s: %s\n", SDL_priority_prefixes[priority], message);
#endif

View File

@@ -24,7 +24,7 @@
/* Output raw audio data to a file. */
#if HAVE_STDIO_H
#ifdef HAVE_STDIO_H
#include <stdio.h>
#endif

View File

@@ -25,7 +25,7 @@
/* OpenBSD sndio target */
#if HAVE_STDIO_H
#ifdef HAVE_STDIO_H
#include <stdio.h>
#endif

View File

@@ -568,7 +568,7 @@ SDL_RWFromFile(const char *file, const char *mode)
rwops->write = windows_file_write;
rwops->close = windows_file_close;
rwops->type = SDL_RWOPS_WINFILE;
#elif HAVE_STDIO_H
#elif defined(HAVE_STDIO_H)
{
#if defined(__APPLE__) && !SDL_FILE_DISABLED // TODO: add dummy?
FILE *fp = SDL_OpenFPFromBundleOrFallback(file, mode);

View File

@@ -20,6 +20,7 @@
#ifdef SDL_DYNAMIC_API
#undef SDL_DYNAMIC_API
#endif
#define SDL_DYNAMIC_API 0
#include "../src/SDL_internal.h"

View File

@@ -20,6 +20,7 @@
#ifdef SDL_DYNAMIC_API
#undef SDL_DYNAMIC_API
#endif
#define SDL_DYNAMIC_API 0
#include "../src/SDL_internal.h"