Обсуждение: psql compile problems

Поиск
Список
Период
Сортировка

psql compile problems

От
Michael Meskes
Дата:
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!


Re: [HACKERS] psql compile problems

От
Bruce Momjian
Дата:
> 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,
Pennsylvania19026
 


Re: [HACKERS] psql compile problems

От
Peter Eisentraut
Дата:
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



Re: [HACKERS] psql compile problems

От
Bruce Momjian
Дата:
> 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,
Pennsylvania19026