I just looked into the code and found that the file pgsql/common.c includes
interfaces/libpq/c.h instead of include/c.h. I changed the CFLAGS setting in
the Makefile to append -I$(LIBPQDIR) instead of insert it and it compiles
fine.

BTW the file common.c includes c.h twice, directly and via common.h.

Michael
-- 
Michael Meskes                         | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz    | Go Rhein Fire!
Tel.: (+49) 2431/72651                 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De           | Use PostgreSQL!

Wed, 16 Feb 2000 11:11:27 +0100
Michael Meskes <meskes@postgresql.org>
psql compile problems
> I just looked into the code and found that the file pgsql/common.c includes
> interfaces/libpq/c.h instead of include/c.h. I changed the CFLAGS setting in
> the Makefile to append -I$(LIBPQDIR) instead of insert it and it compiles
> fine.
> 
> BTW the file common.c includes c.h twice, directly and via common.h.

I have cleaned up include file use in psql.  It now uses the standard
postgres.h includes and does not use redundant includes as much.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Wed, 16 Feb 2000 08:08:55 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] psql compile problems
On Wed, 16 Feb 2000, Bruce Momjian wrote:

> > I just looked into the code and found that the file pgsql/common.c includes
> > interfaces/libpq/c.h instead of include/c.h. I changed the CFLAGS setting in
> > the Makefile to append -I$(LIBPQDIR) instead of insert it and it compiles
> > fine.
> > 
> > BTW the file common.c includes c.h twice, directly and via common.h.
> 
> I have cleaned up include file use in psql.  It now uses the standard
> postgres.h includes and does not use redundant includes as much.

Actually, the point of including c.h (plus postgres_ext.h) rather than
postgres.h was to not have access to the backend internal stuff, so as to
keep the separation clean. But it doesn't really matter to me. Also, on my
system at least, there were no redundant includes. I actually went through
each library call and put in exactly the includes the man page mentioned.

-- 
Peter Eisentraut                  Sernanders vaeg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden


Wed, 16 Feb 2000 17:13:44 +0100 (MET)
Peter Eisentraut <e99re41@DoCS.UU.SE>
Re: [HACKERS] psql compile problems
> Actually, the point of including c.h (plus postgres_ext.h) rather than
> postgres.h was to not have access to the backend internal stuff, so as to
> keep the separation clean. But it doesn't really matter to me. Also, on my
> system at least, there were no redundant includes. I actually went through
> each library call and put in exactly the includes the man page mentioned.

Yes, I suspected that was your purpose.  I couldn't find any other areas
where c.h was used, so I figured I may as well make it standard, and if
we want to make it separate, we would have to do most of bin and
interfaces, and that would be a separate job.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Wed, 16 Feb 2000 11:39:48 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] psql compile problems