Mail Archives: djgpp-workers/2000/06/06/09:09:54
On Mon, 5 Jun 2000, Eli Zaretskii wrote:
> > Date: Mon, 05 Jun 2000 18:16:25 +0300
> > From: Laurynas Biveinis <lauras AT softhome DOT net>
> >
> > BTW, if user includes <stdio.h> only, from all stdarg machinery
> > he gets *only* va_list. No va_start, va_arg, va_end...
>
> That's because va_list is the only type you basolutely need to call
> vfprintf and friends. The other ones are only needed if you
> manipulate va_arg explicitly in your code, in which case you must
> include stdarg.h.
Actually, the only reason I can see for importing the definition of
va_list into <stdio.h> is that the compiler cannot accept that header,
without it. Code that actually does use vfprintf() & friends will always
have to #include <stdarg.h> to be portable. The problem case is code that
does #include <stdio.h>, but does not want to use vfprintf(). Such code
must be allowed.
The remaining question is whether the *name* of the va_list type, as
defined and used in <stdio.h> may have to be moved away from the public
name space, i.e. renamed to something like
__dj_va_list
with <stdarg.h> containing the same <sys/djtypes.h> use as <stdio.h> and
an additional
typedef __dj_va_list va_list;
to provide the 'official' name of that type.
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -