diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/alloca.h | 35 | ||||
| -rw-r--r-- | include/link.h | 6 | ||||
| -rw-r--r-- | include/time.h | 4 |
3 files changed, 45 insertions, 0 deletions
diff --git a/include/alloca.h b/include/alloca.h index 0dd291f1b..df1b8f099 100644 --- a/include/alloca.h +++ b/include/alloca.h @@ -36,6 +36,41 @@ extern void *alloca (size_t __size) __THROW; # define alloca(size) __builtin_alloca (size) #endif /* GCC. */ +#define __MAX_ALLOCA_CUTOFF 65536 + +#ifdef __UCLIBC__ +#include <bits/stackinfo.h> +#else +#include <allocalim.h> +#endif + +#if _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 _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 +# define extern_alloca(buf, len, newlen) \ + alloca (((len) = (newlen))) +#endif + __END_DECLS #endif /* alloca.h */ diff --git a/include/link.h b/include/link.h index f5958e86e..e50b8317a 100644 --- a/include/link.h +++ b/include/link.h @@ -114,6 +114,12 @@ struct link_map ptrdiff_t l_tls_offset; /* Index of the module in the dtv array. */ size_t l_tls_modid; + enum /* Where this object came from. */ + { + lt_executable, /* The main executable program. */ + lt_library, /* Library needed by main executable. */ + lt_loaded /* Extra run-time loaded shared object. */ + } l_type:2; #endif }; diff --git a/include/time.h b/include/time.h index e8e514ca5..7f6eb60e8 100644 --- a/include/time.h +++ b/include/time.h @@ -191,6 +191,10 @@ extern double difftime (time_t __time1, time_t __time0) __THROW __attribute__ ((__const__)); #endif /* __UCLIBC_HAS_FLOATS__ */ +#ifdef __PTHREADS_NATIVE__ +# define CLOCK_IDFIELD_SIZE 3 +#endif + /* Return the `time_t' representation of TP and normalize TP. */ extern time_t mktime (struct tm *__tp) __THROW; |
