Re: Visual Studio 2005, C-language function - avoiding hacks?

From: Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Kevin Flanagan" <kevin-f(at)linkprior(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Visual Studio 2005, C-language function - avoiding hacks?
Date: 2010-03-08 06:31:44
Message-ID: 20100308153143.9C6F.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> writes:
> > I'd like to propose to define PGALWAYSEXPORT macro:
> > #ifdef WIN32
> > #define PGALWAYSEXPORT __declspec (dllexport)
> > #endif
> > and modify PG_MODULE_MAGIC and PG_FUNCTION_INFO_V1 to use it
> > instead of PGDLLEXPORT.
>
> This seems like change for the sake of change. The existing mechanism
> works (as demonstrated by the fact that the contrib modules work on
> Windows).

I wonder why the contrib modules can be compiled correctly because:
1. PG_MODULE_MAGIC requires dllexport.
2. Other exported variables from postgres requires dllimport.
3. Exported functions from the contrib DLLs require dllexport,
but they don't have any PGDLLEXPORT tags in their functions.

Did we use non-standard tools except msvc in the build frameword
for core code? And what should I do for an external project?

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Christensen 2010-03-08 06:39:36 Re: Explicit psqlrc
Previous Message Tom Lane 2010-03-08 06:15:55 Re: Visual Studio 2005, C-language function - avoiding hacks?