Re: Visual Studio 2005, C-language function - avoiding hacks?

Поиск
Список
Период
Сортировка
От Takahiro Itagaki
Тема Re: Visual Studio 2005, C-language function - avoiding hacks?
Дата
Msg-id 20100308150521.9C6B.52131E4D@oss.ntt.co.jp
обсуждение исходный текст
Ответ на Re: Visual Studio 2005, C-language function - avoiding hacks?  ("Kevin Flanagan" <kevin-f@linkprior.com>)
Ответы Re: Visual Studio 2005, C-language function - avoiding hacks?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
"Kevin Flanagan" <kevin-f@linkprior.com> wrote:

> 1. you have to define the symbol BUILDING_DLL in your code before
> including postgres.h

No, BUILDING_DLL does not work. We use PGDLLIMPORT both exported global
variables and PG_MODULE_MAGIC/PG_FUNCTION_INFO_V1 for now, but actually
we should always use __declspec (dllexport) for the latter cases.
They are exported from *user dlls*, not the postgres' one.

I'd like to propose to define PGALWAYSEXPORT macro:   #ifdef WIN32   #define PGALWAYSEXPORT  __declspec (dllexport)
#endif
and modify PG_MODULE_MAGIC and PG_FUNCTION_INFO_V1 to use it
instead of PGDLLEXPORT.

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center




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

Предыдущее
От: fanng yuan
Дата:
Сообщение: arithmetic about inet
Следующее
От: tomas@tuxteam.de
Дата:
Сообщение: Re: arithmetic about inet