summaryrefslogtreecommitdiff
path: root/firmware/target/hosted
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2014-08-26 23:11:34 -0400
committerMichael Sevakis <jethead71@rockbox.org>2014-08-29 22:06:59 -0400
commit17a007bc60c69d6ea471a96a465e04ba4ac2d00f (patch)
tree2b0ca8b479f48cbd047414a10cb58430faf9ca71 /firmware/target/hosted
parent77b3625763ae4d5aa6aaa9d44fbc1bfec6b29335 (diff)
downloadrockbox-17a007bc60c69d6ea471a96a465e04ba4ac2d00f.zip
rockbox-17a007bc60c69d6ea471a96a465e04ba4ac2d00f.tar.gz
rockbox-17a007bc60c69d6ea471a96a465e04ba4ac2d00f.tar.bz2
rockbox-17a007bc60c69d6ea471a96a465e04ba4ac2d00f.tar.xz
Add normal alloca() definition and implement a strdupa and friends
Change-Id: I21c9c21fd664fb11bc8496ace4a389f535a030d6
Diffstat (limited to 'firmware/target/hosted')
-rw-r--r--firmware/target/hosted/system-hosted.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/firmware/target/hosted/system-hosted.h b/firmware/target/hosted/system-hosted.h
index e60803f..5e7a7d7 100644
--- a/firmware/target/hosted/system-hosted.h
+++ b/firmware/target/hosted/system-hosted.h
@@ -22,7 +22,7 @@
#ifndef __SYSTEM_HOSTED_H__
#define __SYSTEM_HOSTED_H__
-#include "system.h"
+#ifndef __PCTOOL__
static inline void commit_dcache(void) {}
static inline void commit_discard_dcache(void) {}
@@ -34,4 +34,14 @@ static inline void core_sleep(void)
wait_for_interrupt();
}
+#endif /* __PCTOOL__ */
+
+#if defined(WIN32) || defined(__PCTOOL__)
+
+#ifndef alloca
+#define alloca __builtin_alloca
+#endif
+
+#endif /* WIN32 || __PCTOOL__ */
+
#endif