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

Re: [PATCHES] Cygwin PostgreSQL ESQL Patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jason Tishler <Jason(dot)Tishler(at)dothill(dot)com>
Cc: Pgsql-Patches <pgsql-patches(at)postgresql(dot)org>, Pgsql-Cygwin <pgsql-cygwin(at)postgresql(dot)org>, Michael Lemke <lemkemch(at)t-online(dot)de>
Subject: Re: [PATCHES] Cygwin PostgreSQL ESQL Patch
Date: 2001-04-20 18:38:53
Message-ID: 27340.987791933@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-cygwinpgsql-patches
Jason Tishler <Jason(dot)Tishler(at)dothill(dot)com> writes:
>> --- why should sqlca.h define this symbol?  What
>> happens if sqlca.h is included in a file that also includes other
>> Postgres includes, which will probably pull in c.h where the real
>> definition is?

> I never thought about this possibility -- I erroneously thought that
> sqlca.h was used by ESQL only.

AFAICT sqlca.h will be included by some (if not all) ecpg client
programs.  I'm not sure whether we should expect that such clients
might also include other Postgres headers.  However, sqlca.h is also
included by several modules of ecpg itself, which certainly do include
a ton of Postgres headers.  So there is a distinct risk that this will
fail when using a compiler that complains about redefinition of macros.

> In the above mentioned URL, I suggested including c.h as another
> possibly better solution.  However, I saw the following in ecpglib.h:
>     /*
>      * this is a small part of c.h since we don't want to leak all postgres
>      * definitions into ecpg programs
>      */
> so I decided against including c.h in the first version of my patch.

That's a fair point.  Maybe it should be

+#ifndef DLLIMPORT
+#ifdef __CYGWIN__
+#define DLLIMPORT __declspec (dllimport)
+#else
+#define DLLIMPORT
+#endif /* __CYGWIN__ */
+#endif /* DLLIMPORT */

			regards, tom lane

In response to

Responses

pgsql-cygwin by date

Next:From: Jason TishlerDate: 2001-04-20 19:38:56
Subject: Re: [PATCHES] Cygwin PostgreSQL ESQL Patch
Previous:From: Jason TishlerDate: 2001-04-20 18:27:19
Subject: Re: [PATCHES] Cygwin PostgreSQL ESQL Patch

pgsql-patches by date

Next:From: Jason TishlerDate: 2001-04-20 19:38:56
Subject: Re: [PATCHES] Cygwin PostgreSQL ESQL Patch
Previous:From: Jason TishlerDate: 2001-04-20 18:27:19
Subject: Re: [PATCHES] Cygwin PostgreSQL ESQL Patch

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