Skip site navigation (1) Skip section navigation (2)

Re: Third email on compilining 7.0.2 on Solaris 2.5.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ghaverla(at)freenet(dot)edmonton(dot)ab(dot)ca
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Third email on compilining 7.0.2 on Solaris 2.5.1
Date: 2000-08-19 02:04:25
Message-ID: 21042.966650665@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
ghaverla(at)freenet(dot)edmonton(dot)ab(dot)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

In response to

Responses

pgsql-novice by date

Next:From: ghaverlaDate: 2000-08-19 04:27:41
Subject: Re: Third email on compilining 7.0.2 on Solaris 2.5.1
Previous:From: Tom LaneDate: 2000-08-19 00:18:40
Subject: Re: Installation Problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group