svn commit: trunk/uClibc/include

sjhill at uclibc.org sjhill at uclibc.org
Fri Jan 6 03:22:20 UTC 2006


Author: sjhill
Date: 2006-01-05 19:22:19 -0800 (Thu, 05 Jan 2006)
New Revision: 13120

Log:
Merge from NPTL branch.


Modified:
   trunk/uClibc/include/alloca.h
   trunk/uClibc/include/libc-internal.h
   trunk/uClibc/include/link.h


Changeset:
Modified: trunk/uClibc/include/alloca.h
===================================================================
--- trunk/uClibc/include/alloca.h	2006-01-06 03:21:11 UTC (rev 13119)
+++ trunk/uClibc/include/alloca.h	2006-01-06 03:22:19 UTC (rev 13120)
@@ -36,6 +36,8 @@
 # define alloca(size)	__builtin_alloca (size)
 #endif /* GCC.  */
 
+#define __MAX_ALLOCA_CUTOFF	65536
+
 __END_DECLS
 
 #endif /* alloca.h */

Modified: trunk/uClibc/include/libc-internal.h
===================================================================
--- trunk/uClibc/include/libc-internal.h	2006-01-06 03:21:11 UTC (rev 13119)
+++ trunk/uClibc/include/libc-internal.h	2006-01-06 03:22:19 UTC (rev 13120)
@@ -326,36 +326,6 @@
 #define fopen64 __fopen64
 #endif
 
-/* #include <alloca.h> */
-#include <bits/stackinfo.h>
-#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
-# warning unknown stack
-# define extend_alloca(buf, len, newlen) \
-  alloca (((len) = (newlen)))
-#endif
-
 /* #include <stdlib.h> */
 extern char *__getenv (__const char *__name) attribute_hidden;
 extern void __exit (int __status) __THROW __attribute__ ((__noreturn__)) attribute_hidden;
@@ -478,6 +448,37 @@
 extern const char *__uclibc_progname attribute_hidden;
 
 # endif /* IS_IN_libc */
+
+/* #include <alloca.h> */
+#include <bits/stackinfo.h>
+#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
+# warning unknown stack
+# define extend_alloca(buf, len, newlen) \
+  alloca (((len) = (newlen)))
+#endif
+
 #endif /* __ASSEMBLER__ */
 
 #endif /* _LIBC_INTERNAL_H */

Modified: trunk/uClibc/include/link.h
===================================================================
--- trunk/uClibc/include/link.h	2006-01-06 03:21:11 UTC (rev 13119)
+++ trunk/uClibc/include/link.h	2006-01-06 03:22:19 UTC (rev 13120)
@@ -25,7 +25,7 @@
 #include <elf.h>
 #include <dlfcn.h>
 #include <sys/types.h>
-#ifdef _LIBC
+#if defined _LIBC && defined __UCLIBC_HAS_THREADS_NATIVE__
 #include <tls.h>
 #endif
 




More information about the uClibc-cvs mailing list