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

Message-ID: <393A6E2C.AEC16FEF@softhome.net>
Date: Sun, 04 Jun 2000 17:56:44 +0300
From: Laurynas Biveinis <lauras AT softhome DOT net>
X-Mailer: Mozilla 4.72 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: ANSI C and stdio.h
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000604174725 DOT 11052F-100000 AT is>
Reply-To: djgpp-workers AT delorie DOT com

Eli Zaretskii wrote:
> > Note that stdarg.h should be included as well. Why?
> 
> Because that's where va_list is supposed to be defined.

So including <stdio.h> in theory is not sufficient?

> > I found FreeBSD definition by accident in gcc mail archives:
> >
> > int      vfprintf __P((FILE *, const char *, _BSD_VA_LIST_));
> > int      vprintf __P((const char *, _BSD_VA_LIST_));
> > ...
> >
> > with _BSD_VA_LIST_ declared in /usr/include/machine/ansi.h as:
> >
> > #define     _BSD_VA_LIST_   char *
> 
> And where do they make the link to va_list?

I think in <stdarg.h>, where else could they? That mail doesn't tell it. 
BTW, I've checked glibc-2.1.3. The things are pretty complicated there,
but they don't use va_list there neither. Actually they even don't provide
<stdarg.h> - they rely on that GCC one.

Laurynas

- Raw text -


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