 

> -----Original Message-----
> From: Peter Eisentraut [mailto:peter_e@gmx.net] 
> Sent: 16 December 2003 09:09
> To: Dave Page
> Cc: pgman@candle.pha.pa.us; aspeitia@sells.com; 
> pgsql-hackers@postgresql.org
> Subject: Re: [HACKERS] 7.4 include file conflict
> 
> Dave Page writes:
> > We could prefix the names as Ray suggested <pgsqltypes.h>, or move 
> > them into a pg subdirectory and change the includes to 
> <pg/sqltypes.h>.
> 
> But the file has to be called sqltypes.h or it won't work.

Why, is it used directly by user code? (I never used ecpg)

Regards, Dave

Tue, 16 Dec 2003 10:38:00 -0000
"Dave Page" <dpage@vale-housing.co.uk>
Re: 7.4 include file conflict
On Tue, Dec 16, 2003 at 10:38:00AM -0000, Dave Page wrote:
> > But the file has to be called sqltypes.h or it won't work.
> 
> Why, is it used directly by user code? (I never used ecpg)

Well, it is not really an ecpg file, but one needed for compatibility.
And, yes, Peter is correct, this file may be included directly by some
apps.

Michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

Tue, 16 Dec 2003 13:18:20 +0100
Michael Meskes <meskes@postgresql.org>
Re: 7.4 include file conflict
Michael Meskes <meskes@postgresql.org> writes:
> Well, it is not really an ecpg file, but one needed for compatibility.
> And, yes, Peter is correct, this file may be included directly by some
> apps.

I was under the impression that this issue had already been resolved
among you, Lamar, and the Red Hat packaging people.  Aren't we going to
install ecpg's headers into $(includedir)/ecpg instead of $(includedir)?

			regards, tom lane

Tue, 16 Dec 2003 09:12:16 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: 7.4 include file conflict 
Tom Lane wrote:
> Michael Meskes <meskes@postgresql.org> writes:
> > Well, it is not really an ecpg file, but one needed for compatibility.
> > And, yes, Peter is correct, this file may be included directly by some
> > apps.
> 
> I was under the impression that this issue had already been resolved
> among you, Lamar, and the Red Hat packaging people.  Aren't we going to
> install ecpg's headers into $(includedir)/ecpg instead of $(includedir)?

Maybe that fixes the Red Hat issue, but we have the Cygwin issue with
Win32's sqltypes.h, and there is the issue for other platforms, no?   Is
that install change going to be for all platforms?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Tue, 16 Dec 2003 14:01:51 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: 7.4 include file conflict
On Tue, Dec 16, 2003 at 02:01:51PM -0500, Bruce Momjian wrote:
> Maybe that fixes the Red Hat issue, but we have the Cygwin issue with
> Win32's sqltypes.h, and there is the issue for other platforms, no?   Is
> that install change going to be for all platforms?

The problem as I see it is that some software installs an include file
with the same name into /usr/include. So if you specify -I
/usr/include/pgsql/ecpg you still essantially override this file. Now
the question is whether anyone would have to use the ecpg sqltypes.h and
the other one, be it a windows file or th unixodbc or the iodbc one.

Does anyone know how Informix, where this file comes from, handles this?

Would it be a solution to just move the compat headers out of the main
include dir? 

michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

Tue, 16 Dec 2003 20:08:44 +0100
Michael Meskes <meskes@postgresql.org>
Re: 7.4 include file conflict
Michael Meskes wrote:
> On Tue, Dec 16, 2003 at 02:01:51PM -0500, Bruce Momjian wrote:
> > Maybe that fixes the Red Hat issue, but we have the Cygwin issue with
> > Win32's sqltypes.h, and there is the issue for other platforms, no?   Is
> > that install change going to be for all platforms?
> 
> The problem as I see it is that some software installs an include file
> with the same name into /usr/include. So if you specify -I
> /usr/include/pgsql/ecpg you still essantially override this file. Now
> the question is whether anyone would have to use the ecpg sqltypes.h and
> the other one, be it a windows file or th unixodbc or the iodbc one.

Are you saying some programs will look in /usr/include before looking in
-I specified directories, and that is the whole problem?  If so, that is
100% wrong and we don't have to fix our files to workaround this.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Tue, 16 Dec 2003 19:00:25 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: 7.4 include file conflict
On Tue, Dec 16, 2003 at 07:00:25PM -0500, Bruce Momjian wrote:
> Are you saying some programs will look in /usr/include before looking in
> -I specified directories, and that is the whole problem?  If so, that is
> 100% wrong and we don't have to fix our files to workaround this.

No I meant to say that you will alsways get our file and not the one in
/usr/include. That means you must not specify our -I option if you need
the file in /usr/include. Since this file may be needed together with
pgsql The best way seems to be moving just the compat headers IMO.

Michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

Wed, 17 Dec 2003 09:39:08 +0100
Michael Meskes <meskes@postgresql.org>
Re: 7.4 include file conflict
I would like to mention that I am on MacOS 10.3 and have this issue 
when compiling PHP with both iODBC support and Postgres support at 
the same time.

I have to specify the -I/usr/include and the 
-I/usr/local/pgsql/include in order for the build scripts to run 
correctly. the problem is that at build time when building iODBC it 
may or may not look in /usr/include first depending on when the flags 
were placed.

Moving the file to ecpg/sqltypes.h should do the trick because 
anything other than postgres should not traverse into ecpg/ unless 
specifically looking for it.

Not sure if that breaks any user programs as someone else noted.

Thanks.

Ray A.


At 9:39 AM +0100 12/17/03, Michael Meskes wrote:
>On Tue, Dec 16, 2003 at 07:00:25PM -0500, Bruce Momjian wrote:
>>  Are you saying some programs will look in /usr/include before looking in
>>  -I specified directories, and that is the whole problem?  If so, that is
>>  100% wrong and we don't have to fix our files to workaround this.
>
>No I meant to say that you will alsways get our file and not the one in
>/usr/include. That means you must not specify our -I option if you need
>the file in /usr/include. Since this file may be needed together with
>pgsql The best way seems to be moving just the compat headers IMO.
>
>Michael
>--
>Michael Meskes
>Email: Michael at Fam-Meskes dot De
>ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
>Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!


Wed, 17 Dec 2003 08:09:33 -0600
Ray Aspeitia <aspeitia@sells.com>
Re: 7.4 include file conflict
Michael Meskes wrote:
> On Tue, Dec 16, 2003 at 07:00:25PM -0500, Bruce Momjian wrote:
> > Are you saying some programs will look in /usr/include before looking in
> > -I specified directories, and that is the whole problem?  If so, that is
> > 100% wrong and we don't have to fix our files to workaround this.
> 
> No I meant to say that you will always get our file and not the one in
> /usr/include. That means you must not specify our -I option if you need
> the file in /usr/include. Since this file may be needed together with
> pgsql The best way seems to be moving just the compat headers IMO.

Yes, that's what I was afraid of.  Once you add -I, there is no way to
access the /usr/include files matching names that are also in the -I
path.  You could use #include "/usr/include/xxx.h", but no one does
that, and I can imagine including a system include that itself wants to
include one of those /usr/include files rather than the pgsql file.

Are you suggesting moving the ecpg files into pgsql/include/ecpg?  Do we
know that no one using ecpg is going to be including a /usr/include file
that needs /usr/include/xxx.h?


-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Wed, 17 Dec 2003 10:27:19 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: 7.4 include file conflict
On Wed, Dec 17, 2003 at 10:27:19AM -0500, Bruce Momjian wrote:
> Are you suggesting moving the ecpg files into pgsql/include/ecpg?  Do we
> know that no one using ecpg is going to be including a /usr/include file
> that needs /usr/include/xxx.h?

No, just the files needed for Informix compatibility. Peter is preparing
a patch that dave can test for us, so we hopefully get this into CVS
until Friday.

michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

Wed, 17 Dec 2003 16:41:45 +0100
Michael Meskes <meskes@postgresql.org>
Re: 7.4 include file conflict
Michael Meskes wrote:
> On Wed, Dec 17, 2003 at 10:27:19AM -0500, Bruce Momjian wrote:
> > Are you suggesting moving the ecpg files into pgsql/include/ecpg? 
> > Do we know that no one using ecpg is going to be including a
> > /usr/include file that needs /usr/include/xxx.h?
>
> No, just the files needed for Informix compatibility. Peter is
> preparing a patch that dave can test for us, so we hopefully get this
> into CVS until Friday.

Patch installed.


Thu, 18 Dec 2003 19:58:44 +0100
Peter Eisentraut <peter_e@gmx.net>
Re: 7.4 include file conflict