summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFranklin Wei <franklin@rockbox.org>2019-07-28 13:58:16 -0400
committerFranklin Wei <franklin@rockbox.org>2019-07-28 13:59:32 -0400
commit711ddfdaad18cee054213bcba4428ac3c6014774 (patch)
treeb1be050ea60acf67a87663b00ece3ad9624050cf
parentc2139db6c5cb235d05103602903ee5454a5f401e (diff)
downloadrockbox-711ddfd.tar.gz
rockbox-711ddfd.tar.bz2
rockbox-711ddfd.zip
sdl: gut non-Rockbox platform detection code
This should prevent false positives when simulators for other systems (e.g. win32). Change-Id: Ib14a277fbfeb1b0ae141ebc4591d80a2cc0f526d
-rw-r--r--apps/plugins/sdl/include/SDL_config.h16
-rw-r--r--apps/plugins/sdl/include/SDL_platform.h81
2 files changed, 4 insertions, 93 deletions
diff --git a/apps/plugins/sdl/include/SDL_config.h b/apps/plugins/sdl/include/SDL_config.h
index af06f4917d..cc55fc479c 100644
--- a/apps/plugins/sdl/include/SDL_config.h
+++ b/apps/plugins/sdl/include/SDL_config.h
@@ -26,22 +26,10 @@
#include "SDL_platform.h"
/* Add any platform that doesn't build using the configure system */
-#if defined(__DREAMCAST__)
-#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__)
+#if defined(__ROCKBOX__)
#include "SDL_config_rockbox.h"
#else
-#include "SDL_config_minimal.h"
+#error This SDL supports Rockbox only!
#endif /* platform config */
#endif /* _SDL_config_h */
diff --git a/apps/plugins/sdl/include/SDL_platform.h b/apps/plugins/sdl/include/SDL_platform.h
index 40df082205..3bc6504232 100644
--- a/apps/plugins/sdl/include/SDL_platform.h
+++ b/apps/plugins/sdl/include/SDL_platform.h
@@ -27,89 +27,12 @@
#ifndef _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)
#undef __ROCKBOX__
#undef __LINUX__ /* maybe sim */
#define __ROCKBOX__ 1
+#else
+#error This SDL supports Rockbox only!
#endif
#endif /* _SDL_platform_h */