diff options
author | Franklin Wei <franklin@rockbox.org> | 2019-07-28 13:58:16 -0400 |
---|---|---|
committer | Franklin Wei <franklin@rockbox.org> | 2019-07-28 13:59:32 -0400 |
commit | 711ddfdaad18cee054213bcba4428ac3c6014774 (patch) | |
tree | b1be050ea60acf67a87663b00ece3ad9624050cf /apps/plugins/sdl | |
parent | c2139db6c5cb235d05103602903ee5454a5f401e (diff) | |
download | rockbox-711ddfdaad18cee054213bcba4428ac3c6014774.tar.gz rockbox-711ddfdaad18cee054213bcba4428ac3c6014774.zip |
sdl: gut non-Rockbox platform detection code
This should prevent false positives when simulators for other systems (e.g.
win32).
Change-Id: Ib14a277fbfeb1b0ae141ebc4591d80a2cc0f526d
Diffstat (limited to 'apps/plugins/sdl')
-rw-r--r-- | apps/plugins/sdl/include/SDL_config.h | 16 | ||||
-rw-r--r-- | apps/plugins/sdl/include/SDL_platform.h | 81 |
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 @@ | |||
26 | #include "SDL_platform.h" | 26 | #include "SDL_platform.h" |
27 | 27 | ||
28 | /* Add any platform that doesn't build using the configure system */ | 28 | /* Add any platform that doesn't build using the configure system */ |
29 | #if defined(__DREAMCAST__) | 29 | #if defined(__ROCKBOX__) |
30 | #include "SDL_config_dreamcast.h" | ||
31 | #elif defined(__MACOS__) | ||
32 | #include "SDL_config_macos.h" | ||
33 | #elif defined(__MACOSX__) | ||
34 | #include "SDL_config_macosx.h" | ||
35 | #elif defined(__SYMBIAN32__) | ||
36 | #include "SDL_config_symbian.h" /* must be before win32! */ | ||
37 | #elif defined(__WIN32__) | ||
38 | #include "SDL_config_win32.h" | ||
39 | #elif defined(__OS2__) | ||
40 | #include "SDL_config_os2.h" | ||
41 | #elif defined(__ROCKBOX__) | ||
42 | #include "SDL_config_rockbox.h" | 30 | #include "SDL_config_rockbox.h" |
43 | #else | 31 | #else |
44 | #include "SDL_config_minimal.h" | 32 | #error This SDL supports Rockbox only! |
45 | #endif /* platform config */ | 33 | #endif /* platform config */ |
46 | 34 | ||
47 | #endif /* _SDL_config_h */ | 35 | #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 @@ | |||
27 | #ifndef _SDL_platform_h | 27 | #ifndef _SDL_platform_h |
28 | #define _SDL_platform_h | 28 | #define _SDL_platform_h |
29 | 29 | ||
30 | #if defined(_AIX) | ||
31 | #undef __AIX__ | ||
32 | #define __AIX__ 1 | ||
33 | #endif | ||
34 | #if defined(__BEOS__) | ||
35 | #undef __BEOS__ | ||
36 | #define __BEOS__ 1 | ||
37 | #endif | ||
38 | #if defined(__HAIKU__) | ||
39 | #undef __HAIKU__ | ||
40 | #define __HAIKU__ 1 | ||
41 | #endif | ||
42 | #if defined(bsdi) || defined(__bsdi) || defined(__bsdi__) | ||
43 | #undef __BSDI__ | ||
44 | #define __BSDI__ 1 | ||
45 | #endif | ||
46 | #if defined(_arch_dreamcast) | ||
47 | #undef __DREAMCAST__ | ||
48 | #define __DREAMCAST__ 1 | ||
49 | #endif | ||
50 | #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) | ||
51 | #undef __FREEBSD__ | ||
52 | #define __FREEBSD__ 1 | ||
53 | #endif | ||
54 | #if defined(__HAIKU__) | ||
55 | #undef __HAIKU__ | ||
56 | #define __HAIKU__ 1 | ||
57 | #endif | ||
58 | #if defined(hpux) || defined(__hpux) || defined(__hpux__) | ||
59 | #undef __HPUX__ | ||
60 | #define __HPUX__ 1 | ||
61 | #endif | ||
62 | #if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE) | ||
63 | #undef __IRIX__ | ||
64 | #define __IRIX__ 1 | ||
65 | #endif | ||
66 | #if (defined(linux) || defined(__linux) || defined(__linux__)) && !defined(ROCKBOX) | ||
67 | #undef __LINUX__ | ||
68 | #define __LINUX__ 1 | ||
69 | #endif | ||
70 | #if defined(__APPLE__) | ||
71 | #undef __MACOSX__ | ||
72 | #define __MACOSX__ 1 | ||
73 | #elif defined(macintosh) | ||
74 | #undef __MACOS__ | ||
75 | #define __MACOS__ 1 | ||
76 | #endif | ||
77 | #if defined(__NetBSD__) | ||
78 | #undef __NETBSD__ | ||
79 | #define __NETBSD__ 1 | ||
80 | #endif | ||
81 | #if defined(__OpenBSD__) | ||
82 | #undef __OPENBSD__ | ||
83 | #define __OPENBSD__ 1 | ||
84 | #endif | ||
85 | #if defined(__OS2__) | ||
86 | #undef __OS2__ | ||
87 | #define __OS2__ 1 | ||
88 | #endif | ||
89 | #if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE) | ||
90 | #undef __OSF__ | ||
91 | #define __OSF__ 1 | ||
92 | #endif | ||
93 | #if defined(__QNXNTO__) | ||
94 | #undef __QNXNTO__ | ||
95 | #define __QNXNTO__ 1 | ||
96 | #endif | ||
97 | #if defined(riscos) || defined(__riscos) || defined(__riscos__) | ||
98 | #undef __RISCOS__ | ||
99 | #define __RISCOS__ 1 | ||
100 | #endif | ||
101 | #if defined(__SVR4) | ||
102 | #undef __SOLARIS__ | ||
103 | #define __SOLARIS__ 1 | ||
104 | #endif | ||
105 | #if defined(WIN32) || defined(_WIN32) | ||
106 | #undef __WIN32__ | ||
107 | #define __WIN32__ 1 | ||
108 | #endif | ||
109 | #if defined(ROCKBOX) | 30 | #if defined(ROCKBOX) |
110 | #undef __ROCKBOX__ | 31 | #undef __ROCKBOX__ |
111 | #undef __LINUX__ /* maybe sim */ | 32 | #undef __LINUX__ /* maybe sim */ |
112 | #define __ROCKBOX__ 1 | 33 | #define __ROCKBOX__ 1 |
34 | #else | ||
35 | #error This SDL supports Rockbox only! | ||
113 | #endif | 36 | #endif |
114 | 37 | ||
115 | #endif /* _SDL_platform_h */ | 38 | #endif /* _SDL_platform_h */ |