va_list used in <stdio.h>

Doug Gwyn gwyn at smoke.BRL.MIL
Sun Aug 13 09:49:11 AEST 1989


In article <1140 at midgard.Midgard.MN.ORG> dal at midgard.Midgard.MN.ORG (Dale Schumacher) writes:
>In the <stdio.h> header file, the v[fs]printf() function prototypes
>use the va_list type, but va_list is not defined anywhere in <stdio.h>.

This is a frequent question.  The answer is that the implementor of
<stdio.h> must not attempt to use "va_list" but instead should just
use the actual type expressed without use of typedefs.

>The standard also seems to imply that header files do not include each
>other.  Is this the case?

Yes, in effect each standard header contains exactly what the Standard
says it does and nothing else.  (Identifers specifically stated as
reserved for implementation use may also be defined/declared in standard
headers.  Warning!  Use __iob or _Iob, not _iob, in your <stdio.h>.)



More information about the Comp.lang.c mailing list