diff options
Diffstat (limited to 'newlib/libc/include')
-rw-r--r-- | newlib/libc/include/alloca.h | 19 | ||||
-rw-r--r-- | newlib/libc/include/stdlib.h | 4 |
2 files changed, 23 insertions, 0 deletions
diff --git a/newlib/libc/include/alloca.h b/newlib/libc/include/alloca.h new file mode 100644 index 000000000..42439e370 --- /dev/null +++ b/newlib/libc/include/alloca.h @@ -0,0 +1,19 @@ +/* libc/include/alloca.h - Allocate memory on stack */ + +/* Written 2000 by Werner Almesberger */ +/* Rearranged for general inclusion by stdlib.h. + 2001, Corinna Vinschen <vinschen@redhat.com> */ + +#ifndef _NEWLIB_ALLOCA_H +#define _NEWLIB_ALLOCA_H + +#include "_ansi.h" +#include <sys/reent.h> + +#ifdef __GNUC__ +#define alloca(size) __builtin_alloca(size) +#else +void * _EXFUN(alloca,(size_t)); +#endif + +#endif diff --git a/newlib/libc/include/stdlib.h b/newlib/libc/include/stdlib.h index 3932584c7..00a9d1ab3 100644 --- a/newlib/libc/include/stdlib.h +++ b/newlib/libc/include/stdlib.h @@ -18,6 +18,10 @@ extern "C" { #include <sys/reent.h> +#ifndef __STRICT_ANSI__ +#include <alloca.h> +#endif + typedef struct { int quot; /* quotient */ |