Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "'Tom Lane *EXTERN*'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Craig Ringer <craig(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1
Date: 2016-11-07 10:02:59
Message-ID: A737B7A37273E048B164557ADEF4A58B5397845A@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
>> Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> writes:
>>> Anyway, I have prepared a patch along the lines you suggest.
>>
>> Pushed, we'll see if the buildfarm likes this iteration any better.
>
> And the answer is "not very much". The Windows builds aren't actually
> failing, but they are producing lots of warnings:
>
> lquery_op.obj : warning LNK4197: export '_ltq_regex' specified multiple times; using first specification
[...]
>
> This is evidently from the places where there are two "extern"
> declarations for a function, one in a header and one in
> PG_FUNCTION_INFO_V1. The externs are identical now, but nonetheless
> MSVC insists on whining about it.

Funny -- it seems to mind a duplicate declaration only if there
is PGDLLEXPORT in at least one of them.

> I'm inclined to give this up as a bad job and go back to the
> previous state. We have a solution that works and doesn't
> produce warnings; third-party authors who don't want to use it
> are on their own.

I think you are right.

Thanks for the work and thought you expended on this!
Particularly since Windows is not your primary interest.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2016-11-07 11:17:29 Re: Specifying the log file name of pgbench -l option
Previous Message Michael Paquier 2016-11-07 08:05:03 Re: Re: BUG #13755: pgwin32_is_service not checking if SECURITY_SERVICE_SID is disabled