Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
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-05 15:03:26
Message-ID: 11843.1478358206@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I 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
lquery_op.obj : warning LNK4197: export '_ltq_rregex' specified multiple times; using first specification
lquery_op.obj : warning LNK4197: export '_lt_q_regex' specified multiple times; using first specification
lquery_op.obj : warning LNK4197: export '_lt_q_rregex' specified multiple times; using first specification
ltree_gist.obj : warning LNK4197: export '_ltree_compress' specified multiple times; using first specification
ltree_gist.obj : warning LNK4197: export '_ltree_same' specified multiple times; using first specification
ltree_gist.obj : warning LNK4197: export '_ltree_union' specified multiple times; using first specification
ltree_gist.obj : warning LNK4197: export '_ltree_penalty' specified multiple times; using first specification
ltree_gist.obj : warning LNK4197: export '_ltree_picksplit' specified multiple times; using first specification
ltree_gist.obj : warning LNK4197: export '_ltree_consistent' specified multiple times; using first specification
ltree_op.obj : warning LNK4197: export '_ltree_isparent' specified multiple times; using first specification
ltree_op.obj : warning LNK4197: export '_ltree_risparent' specified multiple times; using first specification
ltree_op.obj : warning LNK4197: export '_lca' specified multiple times; using first specification
ltxtquery_op.obj : warning LNK4197: export '_ltxtq_exec' specified multiple times; using first specification
ltxtquery_op.obj : warning LNK4197: export '_ltxtq_rexec' 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.

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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2016-11-05 15:26:33 Re: btree_gin and btree_gist for enums
Previous Message Alvaro Herrera 2016-11-05 13:19:40 Re: [COMMITTERS] pgsql: pg_xlogdump: Add NLS