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

BUG #5394: invalid __declspec for PG_MODULE_MAGIC

From: "Vladimir Barzionov" <snego(dot)barsik(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5394: invalid __declspec for PG_MODULE_MAGIC
Date: 2010-03-27 14:44:50
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugspgsql-hackers
The following bug has been logged online:

Bug reference:      5394
Logged by:          Vladimir Barzionov
Email address:      snego(dot)barsik(at)gmail(dot)com
PostgreSQL version: 8.3.10
Operating system:   win32
Description:        invalid __declspec for PG_MODULE_MAGIC

In fmgr.h,
macros PG_MODULE_MAGIC, PG_FUNCTION_INFO_V1.. are declared with incorrect
"storage-class". It uses PGDLLIMPORT for declare __declspec().

In general for building external DLL module, PGDLLIMPORT must be
__declspec(dllimport). As it is.

However in PG_MAGIC_* macro, storage class for function must be

Same problem was already discussed for example here

Looks like the simplest way for correcting the issue is declaring additional
macro (something like PGMODULEEXPORT)


pgsql-hackers by date

Next:From: Tom LaneDate: 2010-03-27 14:50:21
Subject: Re: join removal
Previous:From: Robert HaasDate: 2010-03-27 11:34:30
Subject: Re: changes to documentation build

pgsql-bugs by date

Next:From: Tom LaneDate: 2010-03-28 20:01:57
Subject: Re: BUG #5394: invalid __declspec for PG_MODULE_MAGIC
Previous:From: tomasDate: 2010-03-27 10:06:31
Subject: Re: BUG #5392: Query Optimization

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