sdl: gut non-Rockbox platform detection code

This should prevent false positives when simulators for other systems (e.g.
win32).

Change-Id: Ib14a277fbfeb1b0ae141ebc4591d80a2cc0f526d
This commit is contained in:
Franklin Wei 2019-07-28 13:58:16 -04:00
parent c2139db6c5
commit 711ddfdaad
2 changed files with 4 additions and 93 deletions

View file

@ -26,22 +26,10 @@
#include "SDL_platform.h" #include "SDL_platform.h"
/* Add any platform that doesn't build using the configure system */ /* Add any platform that doesn't build using the configure system */
#if defined(__DREAMCAST__) #if defined(__ROCKBOX__)
#include "SDL_config_dreamcast.h"
#elif defined(__MACOS__)
#include "SDL_config_macos.h"
#elif defined(__MACOSX__)
#include "SDL_config_macosx.h"
#elif defined(__SYMBIAN32__)
#include "SDL_config_symbian.h" /* must be before win32! */
#elif defined(__WIN32__)
#include "SDL_config_win32.h"
#elif defined(__OS2__)
#include "SDL_config_os2.h"
#elif defined(__ROCKBOX__)
#include "SDL_config_rockbox.h" #include "SDL_config_rockbox.h"
#else #else
#include "SDL_config_minimal.h" #error This SDL supports Rockbox only!
#endif /* platform config */ #endif /* platform config */
#endif /* _SDL_config_h */ #endif /* _SDL_config_h */

View file

@ -27,89 +27,12 @@
#ifndef _SDL_platform_h #ifndef _SDL_platform_h
#define _SDL_platform_h #define _SDL_platform_h
#if defined(_AIX)
#undef __AIX__
#define __AIX__ 1
#endif
#if defined(__BEOS__)
#undef __BEOS__
#define __BEOS__ 1
#endif
#if defined(__HAIKU__)
#undef __HAIKU__
#define __HAIKU__ 1
#endif
#if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
#undef __BSDI__
#define __BSDI__ 1
#endif
#if defined(_arch_dreamcast)
#undef __DREAMCAST__
#define __DREAMCAST__ 1
#endif
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
#undef __FREEBSD__
#define __FREEBSD__ 1
#endif
#if defined(__HAIKU__)
#undef __HAIKU__
#define __HAIKU__ 1
#endif
#if defined(hpux) || defined(__hpux) || defined(__hpux__)
#undef __HPUX__
#define __HPUX__ 1
#endif
#if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
#undef __IRIX__
#define __IRIX__ 1
#endif
#if (defined(linux) || defined(__linux) || defined(__linux__)) && !defined(ROCKBOX)
#undef __LINUX__
#define __LINUX__ 1
#endif
#if defined(__APPLE__)
#undef __MACOSX__
#define __MACOSX__ 1
#elif defined(macintosh)
#undef __MACOS__
#define __MACOS__ 1
#endif
#if defined(__NetBSD__)
#undef __NETBSD__
#define __NETBSD__ 1
#endif
#if defined(__OpenBSD__)
#undef __OPENBSD__
#define __OPENBSD__ 1
#endif
#if defined(__OS2__)
#undef __OS2__
#define __OS2__ 1
#endif
#if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
#undef __OSF__
#define __OSF__ 1
#endif
#if defined(__QNXNTO__)
#undef __QNXNTO__
#define __QNXNTO__ 1
#endif
#if defined(riscos) || defined(__riscos) || defined(__riscos__)
#undef __RISCOS__
#define __RISCOS__ 1
#endif
#if defined(__SVR4)
#undef __SOLARIS__
#define __SOLARIS__ 1
#endif
#if defined(WIN32) || defined(_WIN32)
#undef __WIN32__
#define __WIN32__ 1
#endif
#if defined(ROCKBOX) #if defined(ROCKBOX)
#undef __ROCKBOX__ #undef __ROCKBOX__
#undef __LINUX__ /* maybe sim */ #undef __LINUX__ /* maybe sim */
#define __ROCKBOX__ 1 #define __ROCKBOX__ 1
#else
#error This SDL supports Rockbox only!
#endif #endif
#endif /* _SDL_platform_h */ #endif /* _SDL_platform_h */