Subject: BUG #3813: PGDLLIMPORT conflict
From: fong_nh@yahoo.com ("Nguyen Hoa Phong")
Date: 12/12/2007 10:41:42 AM
The following bug has been logged online:
Bug reference: 3813
Logged by: Nguyen Hoa Phong
Email address: fong_nh@yahoo.com
PostgreSQL version: 8.3-beta4
Operating system: Windows
Description: PGDLLIMPORT conflict
Details:
Because of PGDLLIMPORT conflict and so to use palloc we must to declare
(copydir.c):
/*
* On Windows, call non-macro versions of palloc; we can't reference
* CurrentMemoryContext in this file because of PGDLLIMPORT conflict.
*/
#if defined(WIN32) || defined(__CYGWIN__)
#undef palloc
#undef pstrdup
#define palloc(sz) pgport_palloc(sz)
#define pstrdup(str) pgport_pstrdup(str)
#endif
...
But it's the same if we use the other functions of system, such as, SPI
variables (SPI_result, SPI_tuptable, SPI_lastoid, SPI_processed,...),...
So I think that maybe we should have more one define for this:
#if defined(WIN32) || defined(__CYGWIN__)
#define PGDLLIMPORT __declspec (dllexport)
#endif
And so, the using the relations functions (palloc,..) are normal.
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
Subject: BUG #3813: PGDLLIMPORT conflict
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 12/12/2007 12:00:29 PM
"Nguyen Hoa Phong" <fong_nh@yahoo.com> writes:
> So I think that maybe we should have more one define for this:
> #if defined(WIN32) || defined(__CYGWIN__)
> #define PGDLLIMPORT __declspec (dllexport)
> #endif
You haven't actually explained why this is better, or even why it
won't break things...
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at
http://www.postgresql.org/about/donate
|