From 0ccab5e4a96ae1ad60a815c0045e1f0a51ea27d1 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 17 Oct 2009 01:14:16 +0200 Subject: move extend_alloca macro to alloca.h guard it by _LIBC. __MAX_ALLOCA_CUTOFF is not needed on target either Signed-off-by: Peter S. Mazinger Signed-off-by: Bernhard Reutner-Fischer --- include/libc-internal.h | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'include/libc-internal.h') diff --git a/include/libc-internal.h b/include/libc-internal.h index 33956d8b1..8809bc042 100644 --- a/include/libc-internal.h +++ b/include/libc-internal.h @@ -67,36 +67,6 @@ extern const char *__uclibc_progname attribute_hidden; # endif /* IS_IN_libc */ -/* #include */ -#include -#if defined(_STACK_GROWS_DOWN) -# define extend_alloca(buf, len, newlen) \ - (__typeof (buf)) ({ size_t __newlen = (newlen); \ - char *__newbuf = alloca (__newlen); \ - if (__newbuf + __newlen == (char *) buf) \ - len += __newlen; \ - else \ - len = __newlen; \ - __newbuf; }) -#elif defined(_STACK_GROWS_UP) -# define extend_alloca(buf, len, newlen) \ - (__typeof (buf)) ({ size_t __newlen = (newlen); \ - char *__newbuf = alloca (__newlen); \ - char *__buf = (buf); \ - if (__buf + __newlen == __newbuf) \ - { \ - len += __newlen; \ - __newbuf = __buf; \ - } \ - else \ - len = __newlen; \ - __newbuf; }) -#else -# warning unknown stack -# define extend_alloca(buf, len, newlen) \ - alloca (((len) = (newlen))) -#endif - #endif /* __ASSEMBLER__ */ #endif /* _LIBC_INTERNAL_H */ -- cgit v1.2.3 From ed4533ecdc7c39e8c6e7f1f3d4a0c00a8c1845a5 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 17 Oct 2009 02:19:35 +0200 Subject: move __linux__ to libc-internal.h Signed-off-by: Peter S. Mazinger Signed-off-by: Bernhard Reutner-Fischer --- include/libc-internal.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/libc-internal.h') diff --git a/include/libc-internal.h b/include/libc-internal.h index 8809bc042..443b1fc50 100644 --- a/include/libc-internal.h +++ b/include/libc-internal.h @@ -69,4 +69,12 @@ extern const char *__uclibc_progname attribute_hidden; #endif /* __ASSEMBLER__ */ +/* Some people like to build up uClibc with *-elf toolchains, so + * a little grease here until we drop '#ifdef __linux__' checks + * from our source code. + */ +#ifndef __linux__ +# define __linux__ 1 +#endif + #endif /* _LIBC_INTERNAL_H */ -- cgit v1.2.3