[uClibc]<stdio.h> conflicts with <varargs.h>
Manuel Novoa III
mjn3 at codepoet.org
Fri Jan 18 05:20:10 UTC 2002
Erik,
On Thu, Jan 17, 2002 at 10:45:07AM -0700, Erik Andersen wrote:
> On Fri Jan 18, 2002 at 02:35:20AM +0900, Miles Bader wrote:
> > Erik Andersen <andersen at codepoet.org> writes:
> > > Why not just use stdarg.h?
> >
> > Because it's nice be able to compile programs without hacking them all
> > to bits, when possible. Often there's no choice -- a program simply
> > does something stupid, and won't work without changes -- but <stdarg.h>
> > and <varargs.h> have coexisted for a long time, and it's not really a
> > problem to support them both.
> >
> > [The program in question, incidentally, was telnet, as distributed in
> > in uClinux-dist-xxx]
>
> K, I'll take a look. Generally speaking though, I consider
> direct use if varargs.h by applications a bug, since stdarg.h is
> defined by things like POSIX. The Single Unix Spec Ver.2 does
> support it, but labels it as LEGACY and states "Use of
> <varargs.h> is not recommended.". So I'll probably fix it, but I
> really don't plan to expend too much effort supporting obsolete
> interfaces. It is really better to fixup applications in this
> case.
The fix is easy. Just remove the "#include <stdarg.h>" line in stdio.h
(according to ansi/iso it shouldn't be there anyway) and replace all
occurences of va_list in stdio.h with whatever hidden name gcc uses
for va_list; __gnuc_va_list I think.
Manuel
More information about the uClibc
mailing list