This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: failure building gcc-3.3 (broken libiberty/vsprintf.c or build?)
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: dj at redhat dot com
- Cc: crossgcc at sources dot redhat dot com, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org, peter at baradas dot org
- Date: Tue, 20 May 2003 16:59:23 -0400 (EDT)
- Subject: Re: failure building gcc-3.3 (broken libiberty/vsprintf.c or build?)
- References: <20030520053204.ADDB298982@baradas.org> <200305201609.h4KG9jR20778@greed.delorie.com>
> > gcc-3.3/lbiberty/vsprintf.c, indeed includes <varargs.h> (which gcc
> > supplies), so if gcc-3.3 has killed support for varargs,h, why is
> > libiberty/vsprintf.c trying to include it.
>
> That code in libiberty is ancient. If it's broken now, that means
> that whoever dropped support for varargs.h didn't test it well enough.
FWIW, it appears to be fixed on mainline. We can backport vsprintf.c
to 3.3.1 if you think it's worth fixing. Here's the diff:
--- cvs-egcc-3.3/gcc/libiberty/vsprintf.c 2002-01-22 15:03:29.000000000 -0500
+++ cvs-egcc/gcc/libiberty/vsprintf.c 2003-04-15 16:34:40.516093000 -0400
@@ -26,9 +26,13 @@ the resulting executable to be covered b
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
+#include <ansidecl.h>
+#ifdef ANSI_PROTOTYPES
+#include <stdarg.h>
+#else
#include <varargs.h>
+#endif
#include <stdio.h>
-#include <ansidecl.h>
#undef vsprintf
#if defined _IOSTRG && defined _IOWRT