Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* <varargs.h> vs. <stdarg.h>; <gnu/types.h>
@ 1996-01-22 21:11 Craig Groeschel
  1996-01-23 16:27 ` H J Lu
  0 siblings, 1 reply; 2+ messages in thread
From: Craig Groeschel @ 1996-01-22 21:11 UTC (permalink / raw)


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.

<gnu/types.h> 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.

-- 
Craig E. Groeschel  <craig@metrolink.com>  Not speaking for my employer.
"Do not play this piece fast.  It is never right to play Ragtime fast." Joplin
linux$ /bin/pwd: can't load library '/lib/libc.2.2.2'

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-01-23 16:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-01-22 21:11 &lt;varargs.h&gt; vs. &lt;stdarg.h&gt;; &lt;gnu/types.h&gt; Craig Groeschel
1996-01-23 16:27 ` H J Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox