delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/06/06/09:09:54

X-Authentication-Warning: acp3bf.physik.rwth-aachen.de: broeker owned process doing -bs
Date: Tue, 6 Jun 2000 15:09:06 +0200 (MET DST)
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
X-Sender: broeker AT acp3bf
To: djgpp-workers AT delorie DOT com
Subject: Re: ANSI C and stdio.h
In-Reply-To: <200006051708.UAA17738@alpha.netvision.net.il>
Message-ID: <Pine.LNX.4.10.10006061459050.1091-100000@acp3bf>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019