Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1
Дата
Msg-id 8027.1476279261@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Ответы Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Список pgsql-hackers
Albe Laurenz <laurenz.albe@wien.gv.at> writes:
> Tom Lane wrote:
>> The lack of complaints about this suggest that it's not actually necessary
>> to do so.  So what this makes me wonder is whether we can't drop the
>> DLLEXPORT on the finfo function too.  I'd rather reduce the number of
>> Microsoft-isms in the code, not increase it.

> I understand the sentiment.

> But it seems to actually cause a problem on Windows, at least there was a
> complaint here: http://stackoverflow.com/q/39964233

> Adding PGDLLEXPORT solved the problem there.

> I guess that there are not more complaints about that because
> few people build C functions on Windows themselves (lack of PGXS)
> and those who do are probably knowledgeable enough that they can
> fix it themselves by sticking an extra declaration with PGDLLEXPORT
> into their source file.

> PostgreSQL itself seems to use export files that explicitly declare the
> exported symbols, so it gets away without these decorations.

Except that we don't.  There aren't PGDLLEXPORT markings for any
functions exported from contrib modules, and we don't use dlltool
on them either.  By your argument, none of contrib would work on
Windows builds at all, but we have a ton of buildfarm evidence and
successful field use to the contrary.  How is that all working?
        regards, tom lane



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

Предыдущее
От: Albe Laurenz
Дата:
Сообщение: Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1
Следующее
От: Albe Laurenz
Дата:
Сообщение: Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1