Re: narwhal and PGDLLIMPORT - Mailing list pgsql-hackers

From Andres Freund
Subject Re: narwhal and PGDLLIMPORT
Date
Msg-id 20140203143402.GE1225@awork2.anarazel.de
Whole thread Raw
In response to Re: narwhal and PGDLLIMPORT  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2014-02-03 09:25:57 -0500, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > What about the completely crazy thing of simply redefining export to
> > include the declspec on windows for backend build? That will possibly
> > blow up the size of the .def files et al a bit, but I have little mercy
> > with that.
> 
> You mean "#define extern extern PGDLLIMPORT" ?  What will that do to
> function declarations that have "extern"?

As far as I understand it's perfectly ok to have that on
functions. http://msdn.microsoft.com/en-us/library/aa271769%28v=vs.60%29.aspx
even claims it's faster in some scenarios.

> Are we sure C compilers
> are smart enough to not go into an infinite loop on such a macro?

I'd be really surprised if there were any that wouldn't completely choke
on pg otherwise. Especially not as we are only talking about windows
where only gcc and msvc is supported these days.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: GIN improvements part2: fast scan
Next
From: amihay gonen
Date:
Subject: Q: How to use indexer api smartly