This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ColdFire 61/63] Fix vsnprintf() tests on uClibc


uClibc's implementation of vsprintf calls vsnprintf.  This caused
another failure in the buitlins testsuite, because the checking version
of vsnprintf calls vsprintf, leading to mutual recursion.  It also means
that __*printf_chk functions were unexpectedly calling the checking version
of vsnprintf.

This patch simply disabled vsnprintf checking on uClibc targets.

Richard


gcc/testsuite/
	* gcc.c-torture/execute/builtins/lib/chk.c: Include <sys/types.h>.
	(vsnprintf): Don't define for uClibc targets.

Index: gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c	2007-01-09 13:18:10.000000000 +0000
+++ gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c	2007-01-09 15:02:32.000000000 +0000
@@ -1,4 +1,5 @@
 #include <stdarg.h>
+#include <sys/types.h>
 
 extern void abort (void);
 
@@ -448,6 +449,8 @@ snprintf (char *str, __SIZE_TYPE__ len, 
   return ret;
 }
 
+/* uClibc's vsprintf calls vsnprintf.  */
+#ifndef __UCLIBC__
 int
 vsnprintf (char *str, __SIZE_TYPE__ len, const char *fmt, va_list ap)
 {
@@ -470,3 +473,4 @@ vsnprintf (char *str, __SIZE_TYPE__ len,
     }
   return ret;
 }
+#endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]