Re: problem with msvc linker - cannot build orafce - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: problem with msvc linker - cannot build orafce
Date
Msg-id CAMsr+YFxjXKk59T95w5NBMf5AANMuVwVdNxVAbrFWU=JHEC8CQ@mail.gmail.com
Whole thread Raw
In response to Re: problem with msvc linker - cannot build orafce  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 25 November 2015 at 13:36, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Craig Ringer <craig@2ndquadrant.com> writes:
> Actually, if __declspec(dllexport) or a .DEF entry was added in, say,
> 9.4.5, you could probably just:

> #if PG_VERSION_NUM < 90405
> extern int* log_min_messages_p;
> #define log_min_messages (*log_min_messages_p)
> #endif

> after including all PostgreSQL headers. It won't work for inline functions
> defined in PostgreSQL headers, but should otherwise be OK I think.

Some of these workarounds look like they would break if we add the missing
PGDLLIMPORT in future releases.  That would be nasty :-(.  Am I misreading
it?


I don't think they will, but without testing and more digging I can't be sure. If marking the variable __declspec(dllexport) causes its import table entry to be omitted then yes, that'd break things.

I'll try to dig out my Windows VM and prep a few tests once I've delivered on the promised pglogical downstream.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: problem with msvc linker - cannot build orafce
Next
From: Amit Kapila
Date:
Subject: Re: [DESIGN] ParallelAppend