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/common/dircache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'firmware/common') diff --git a/firmware/common/dircache.c b/firmware/common/dircache.c index f8365e1137..0a58175d53 100644 --- a/firmware/common/dircache.c +++ b/firmware/common/dircache.c @@ -171,7 +171,7 @@ static bool check_event_queue(void) return false; } -#ifndef SIMULATOR +#if (CONFIG_PLATFORM & PLATFORM_NATIVE) /* scan and build static data (avoid redundancy on stack) */ static struct { @@ -301,7 +301,7 @@ static int dircache_scan_and_build(IF_MV2(int volume,) struct dircache_entry *ce return sab_process_dir(0, ce); } -#else /* !SIMULATOR */ +#elif (CONFIG_PLATFORM & PLATFORM_HOSTED) /* PLATFORM_HOSTED */ static char sab_path[MAX_PATH]; static int sab_process_dir(struct dircache_entry *ce) @@ -400,7 +400,7 @@ static int dircache_scan_and_build(IF_MV2(int volume,) struct dircache_entry *ce strlcpy(sab_path, "/", sizeof sab_path); return sab_process_dir(ce); } -#endif /* SIMULATOR */ +#endif /* PLATFORM_NATIVE */ /** * Internal function to get a pointer to dircache_entry for a given filename. @@ -689,7 +689,7 @@ static void dircache_thread(void) dircache_initialized = false; break ; -#ifndef SIMULATOR +#if (CONFIG_PLATFORM & PLATFORM_NATIVE) case SYS_USB_CONNECTED: usb_acknowledge(SYS_USB_CONNECTED_ACK); usb_wait_for_disconnect(&dircache_queue); -- cgit v1.2.3