summaryrefslogtreecommitdiffstats
path: root/firmware/libc
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/libc
parent77b3625763ae4d5aa6aaa9d44fbc1bfec6b29335 (diff)
downloadrockbox-17a007bc60c69d6ea471a96a465e04ba4ac2d00f.tar.gz
rockbox-17a007bc60c69d6ea471a96a465e04ba4ac2d00f.tar.bz2
rockbox-17a007bc60c69d6ea471a96a465e04ba4ac2d00f.zip
Add normal alloca() definition and implement a strdupa and friends
Change-Id: I21c9c21fd664fb11bc8496ace4a389f535a030d6
Diffstat (limited to 'firmware/libc')
-rw-r--r--firmware/libc/include/stdlib.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/firmware/libc/include/stdlib.h b/firmware/libc/include/stdlib.h
index 57553367c4..e24d6a579f 100644
--- a/firmware/libc/include/stdlib.h
+++ b/firmware/libc/include/stdlib.h
@@ -31,6 +31,11 @@ void free(void *);
void *realloc(void *, size_t);
int atexit(void (*)(void));
+#ifdef __GNUC__
+# undef alloca
+# define alloca(size) __builtin_alloca (size)
+#endif /* GCC. */
+
#define RAND_MAX INT_MAX
void srand(unsigned int seed);