Re: Third email on compilining 7.0.2 on Solaris 2.5.1 - Mailing list pgsql-novice

From Tom Lane
Subject Re: Third email on compilining 7.0.2 on Solaris 2.5.1
Date
Msg-id 21042.966650665@sss.pgh.pa.us
Whole thread Raw
In response to Third email on compilining 7.0.2 on Solaris 2.5.1  (ghaverla@freenet.edmonton.ab.ca)
Responses Re: Third email on compilining 7.0.2 on Solaris 2.5.1  (ghaverla@freenet.edmonton.ab.ca)
List pgsql-novice
ghaverla@freenet.edmonton.ab.ca writes:
> I added a line to config.h in the section on vsnprintf
> which did a #include <varargs.h>
> This got past the initial compile problem I was having.
> How other architectures can  include a vsnprintf() function
> without including varargs.h I don't know.  Anyway, the
> compile goes quite a ways and dies, again on a varargs
> problem.  A module assumes va_start takes 2 arguments,
> when my header files say only 1.

ANSI C says va_start() takes 2 args.  <varargs.h> (on those platforms
that have it at all) defines an older, non-ANSI-compliant version of
the va_foo macros.  What you want to be including is <stdarg.h>.
Dunno why src/include/c.h is not including that automatically on your
platform, but that's what to look at.

I've suspected for some time that the conditional include of <varargs.h>
near the bottom of c.h is dead code, if not actively pernicious.  But
without access to a platform where
    #if defined(sun) && defined(__sparc__) && !defined(__SVR4)
applies, I can't be sure whether to rip it out or not.

            regards, tom lane

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Installation Problem
Next
From: ghaverla@freenet.edmonton.ab.ca
Date:
Subject: Re: Third email on compilining 7.0.2 on Solaris 2.5.1