Re: PGDLLEXPORTing all GUCs? - Mailing list pgsql-hackers

From Robert Haas
Subject Re: PGDLLEXPORTing all GUCs?
Date
Msg-id CA+TgmobT3CBxZADHD4A-G778-Z7WOQLgDfDyg5oU2LOfVhXLOA@mail.gmail.com
Whole thread Raw
In response to Re: PGDLLEXPORTing all GUCs?  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: PGDLLEXPORTing all GUCs?  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On Thu, May 8, 2014 at 12:19 AM, Craig Ringer <craig@2ndquadrant.com> wrote:
> In terms of ugliness, would you be happier using a pg_extern instead of
> extern, where we:
>
> #ifdef WIN32
> #define pg_extern extern PGDLLIMPORT
> #else
> #define pg_extern extern
> #endif
>
> ?

I personally would not be happier with that.  extern can be applied to
function prototypes, not just variables, and even to function
definitions.  When I see PGDLLIMPORT, I think, oh look, this is some
kind of magic pixie dust that Windows requires us to sprinkle on our
variables.  When I see pg_extern, I think, oh, this is the PostgreSQL
version of extern, and it's not, really.

But I can live with it if it makes other people sufficiently happier.
One way or another, I really do feel very strongly that we should push
forward with broader PGDLLIMPORT-ification.  My experience mirrors
Craig's: this is a very useful thing for extension developers.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: "MauMau"
Date:
Subject: Re: [bug fix] pg_ctl always uses the same event source
Next
From: Robert Haas
Date:
Subject: Re: pg_shmem_allocations view