Re: narwhal and PGDLLIMPORT

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: narwhal and PGDLLIMPORT
Дата
Msg-id 5300C632.90101@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: narwhal and PGDLLIMPORT  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
On 02/16/2014 07:03 AM, Andres Freund wrote:
> On 2014-02-15 17:48:00 -0500, Tom Lane wrote:
>> Marco Atzeri <marco.atzeri@gmail.com> writes:
>>>   32 $ grep -rH in6addr_any *
>>> cygwin/in6.h:extern const struct in6_addr in6addr_any;
>>> cygwin/version.h:          in6addr_any, in6addr_loopback.
>>
>> So how come there's a declspec on the getopt.h variables, but not this
>> one?
> 
> Well, those are real constants, so they probably are fully contained in
> the static link library, no need to dynamically resolve them.

If they're externs that're then defined in a single module, that's not
the case.

Only if they're *not* declared extern, and thus added to each
compilation unit then de-duplicated during linking, may they be safely
referred to without a __declspec(dllimport) because each module gets its
own copy.

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



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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Long paths for tablespace leads to uninterruptible hang in Windows
Следующее
От: Emre Hasegeli
Дата:
Сообщение: Re: GiST support for inet datatypes