Re: Create function prototype as part of PG_FUNCTION_INFO_V1 - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Create function prototype as part of PG_FUNCTION_INFO_V1
Date
Msg-id 20140217133016.GH6342@eldon.alvh.no-ip.org
Whole thread Raw
In response to Re: Create function prototype as part of PG_FUNCTION_INFO_V1  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Create function prototype as part of PG_FUNCTION_INFO_V1  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
> > On 2/15/14, 10:22 AM, Tom Lane wrote:
> >> Yes it does; people who fail to remove their manual externs will get
> >> Windows-only build failures (or at least warnings; it's not very clear
> >> which declaration will win).
> 
> > The manual externs and the automatically provided ones are exactly the
> > same.  Why would that fail?
> 
> Maybe I'm remembering the wrong patch.  I thought what this patch was
> intending was to put PGDLLEXPORT into the automatically-provided externs.

This hunk is the essence of this patch:
#define PG_FUNCTION_INFO_V1(funcname) \
                                                                                                                   
 
+Datum funcname(PG_FUNCTION_ARGS); \

externPGDLLEXPORT const Pg_finfo_record * CppConcat(pg_finfo_,funcname)(void); \
                                                                                                                  
 


Note that PGDLLEXPORT is already there.  This patch is just about
additionally providing the prototype.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: narwhal and PGDLLIMPORT
Next
From: Alvaro Herrera
Date:
Subject: Re: Draft release notes up for review