From 35e8b1429a2cdcf6580f6d25890fed9865165d0b Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Mon, 21 Jun 2010 16:53:00 +0000 Subject: Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with #if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently). The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR). The new define is to (de-)select code to compile on hosted platforms generally. Should be no functional change to targets or the simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/system.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'firmware/export/system.h') diff --git a/firmware/export/system.h b/firmware/export/system.h index 5ac92e015d..7a04422b06 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h @@ -125,7 +125,7 @@ int get_cpu_boost_counter(void); /* newer? SDL includes endian.h, So we ignore it */ -#if defined(SIMULATOR) || defined(__PCTOOL__) +#if (CONFIG_PLATFORM & PLATFORM_HOSTED) || defined(__PCTOOL__) #undef letoh16 #undef letoh32 #undef htole16 @@ -234,8 +234,11 @@ enum { #if !defined(SIMULATOR) && !defined(__PCTOOL__) #include "system-target.h" -#elif defined(HAVE_SDL) /* SIMULATOR */ +#elif defined(HAVE_SDL) /* SDL build */ #include "system-sdl.h" +#endif + +#if (CONFIG_PLATFORM & PLATFORM_HOSTED) static inline uint16_t swap16(uint16_t value) /* result[15..8] = value[ 7..0]; @@ -268,7 +271,7 @@ static inline uint32_t swap_odd_even32(uint32_t value) return (t >> 8) | ((t ^ value) << 8); } -#endif /* !SIMULATOR */ +#endif /* PLATFORM_HOSTED */ #ifndef BIT_N #define BIT_N(n) (1U << (n)) -- cgit v1.2.3