From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199601231627.IAA02218@aurora.romoidoy.com> Date: Tue, 23 Jan 1996 08:27:46 -0800 (PST) From: H J Lu Subject: Re: <varargs.h> vs. <stdarg.h>; <gnu/types.h> In-Reply-To: > > Is it supposed to be ok for a program to include both varargs.h and stdarg.h? > (Never mind for the moment that this is not a good idea--I've already fixed > the code.) The only reason I'm asking is that the following comment > in varargs.h makes me think that gcc would turn off stdarg.h, i.e. skip it: > > /* Record that this is varargs.h; this turns off stdarg.h. */ > > I have a file (mosaic/libhtmlw/HTML-PSformat.c) that includes > varargs.h first and includes stdarg.h later. This is the error I get: > > In file included from /usr/lib/gcc-lib/alpha-linux/2.7.0/include/stdarg.h:36, > from /motif2/X11/Xm/VaSimpleP.h:42, > from HTML-PSformat.c:76: > /usr/lib/gcc-lib/alpha-linux/2.7.0/include/va-alpha.h:42: > warning: `va_start' redefined > /usr/lib/gcc-lib/alpha-linux/2.7.0/include/va-alpha.h:32: > warning: this is the location of the previous definition > HTML-PSformat.c:273: macro `va_start' used with just one arg > > So it doesn't look like stdarg.h got turned off. > The processing procedures are different for and . If you include , it means you want to use the old K&R C style for .... > > has a couple of "ifdef __linux__" sections, > but "__linux__" is not in the gcc predefs, only "linux". > This causes problems with __FD_SET and friends. If you do a "gcc -v -c foo.c" under x86, you will see __linux__ is defined. It is configued in the gcc source. -- H.J. Lu (hjl@gnu.ai.mit.edu)