Re: Compiling extensions on Windows

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Compiling extensions on Windows
Дата
Msg-id 13260.1389456040@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Compiling extensions on Windows  (Craig Ringer <craig@2ndquadrant.com>)
Ответы Re: Compiling extensions on Windows  (Magnus Hagander <magnus@hagander.net>)
Re: Compiling extensions on Windows  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
Craig Ringer <craig@2ndquadrant.com> writes:
> We don't set __declspec(dllexport) on extension functions automatically
> when building stand-alone on Windows. So it's necessary to explicitly
> specify PGDLLEXPORT for each function.

I'm not sure I believe this.  I don't see any PGDLLEXPORT symbols in any
of the standard contrib modules; how is it that they work?

> Instead we should perhaps be adding this automatically via a prototype
> generated by PG_FUNCTION_INFO_V1, or adding PGDLLEXPORT to all our
> example documentation. I think the latter is preferable because if we
> start generating a prototype for the base function in PG_FUNCTION_INFO
> when we didn't before it could break existing code.

> Comments?

One of the things I've always found particularly vile about Microsoft
is the way that they seem to think it's fine to make people sprinkle
Windows-only droppings throughout code that's supposed to be portable.
I'm not in favor of asking people to write out PGDLLEXPORT manually
on every function unless it's *absolutely* necessary, and the available
evidence suggests to me that it isn't.

So if it's really necessary to change anything here, I'd rather see us
take the approach of hiding it in PG_FUNCTION_INFO_V1.  What happens
if we do that and there's also a manually-written prototype?
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Florian Pflug
Дата:
Сообщение: Re: array_length(anyarray)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Standalone synchronous master