Re: Third email on compilining 7.0.2 on Solaris 2.5.1
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: ghaverla@freenet.edmonton.ab.ca
Cc: pgsql-novice@postgresql.org
Date: 2000-08-19T02:04:25Z
Lists: 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