diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2001-11-14 10:25:35 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2001-11-14 10:25:35 +0000 |
commit | d7ca37e413e19f58aa706d8233193fb2120dc4f5 (patch) | |
tree | 7d44c06310458aeedb8f2a5b264921f79e22bf19 | |
parent | 7a90b1ef80704d6d2412c22d2b4555eee304ea54 (diff) | |
download | newlib-d7ca37e413e19f58aa706d8233193fb2120dc4f5.zip newlib-d7ca37e413e19f58aa706d8233193fb2120dc4f5.tar.gz newlib-d7ca37e413e19f58aa706d8233193fb2120dc4f5.tar.bz2 |
* libc/include/alloca.h: Move libc/sys/linux/include/alloca.h
to here. Rearrange for general inclusion by stdlib.h.
* libc/include/stdlib.h: Include <alloca.h> if __STRICT_ANSI__
isn't defined.
* libc/sys/linux/include/alloca.h: Move to libc/include.
-rw-r--r-- | newlib/ChangeLog | 8 | ||||
-rw-r--r-- | newlib/libc/include/alloca.h | 19 | ||||
-rw-r--r-- | newlib/libc/include/stdlib.h | 4 | ||||
-rw-r--r-- | newlib/libc/sys/linux/include/alloca.h | 13 |
4 files changed, 31 insertions, 13 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 6dd6a91..c6644d2 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,11 @@ +2001-11-12 Corinna Vinschen <vinschen@redhat.com> + + * libc/include/alloca.h: Move libc/sys/linux/include/alloca.h + to here. Rearrange for general inclusion by stdlib.h. + * libc/include/stdlib.h: Include <alloca.h> if __STRICT_ANSI__ + isn't defined. + * libc/sys/linux/include/alloca.h: Move to libc/include. + 2001-11-12 Anthony Green <green@redhat.com> * libc/sys/arm/crt0.S (__stack_base__): New symbol. diff --git a/newlib/libc/include/alloca.h b/newlib/libc/include/alloca.h new file mode 100644 index 0000000..42439e3 --- /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 3932584..00a9d1a 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 */ diff --git a/newlib/libc/sys/linux/include/alloca.h b/newlib/libc/sys/linux/include/alloca.h deleted file mode 100644 index ba54262..0000000 --- a/newlib/libc/sys/linux/include/alloca.h +++ /dev/null @@ -1,13 +0,0 @@ -/* libc/sys/linux/include/alloca.h - Allocate memory on stack */ - -/* Written 2000 by Werner Almesberger */ - - -#ifndef _NEWLIB_ALLOCA_H -#define _NEWLIB_ALLOCA_H - -/* Simple, since we know that we use gcc */ - -#define alloca(size) __builtin_alloca(size) - -#endif |