Re: [pgsql-hackers-win32] libpq build problem with on MS VC++

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [pgsql-hackers-win32] libpq build problem with on MS VC++
Дата
Msg-id 4172.1092753272@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [pgsql-hackers-win32] libpq build problem with  (Andreas Pflug <pgadmin@pse-consulting.de>)
Список pgsql-patches
Andreas Pflug <pgadmin@pse-consulting.de> writes:
>> Back on track: if rename() does exist under Windows then my idea is
>> unreliable.  Any other thoughts?  How about #including <io.h> in port.h
>> (for Windows only of course) before we #define these things?

> Probably won't work, because pgrename and rename do not have the same
> definition/linkage.

So?  The compiler would see something like

    extern linkage_spec rename(...);

    extern int pgrename(...);

    #define rename  pgrename

so the conflict of linkage spec shouldn't bother anything.

> I posted the attached patch 4 days ago, with the comment
> "The attached patch will redefine unlink and rename only if FRONTEND is
> not defined.".

> I still believe this a good way to fix it.

The conflict would still exist.  AFAICS it's pure chance that it's
not affecting any backend modules at the moment.

            regards, tom lane

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

Предыдущее
От: "Mark Cave-Ayland"
Дата:
Сообщение: Re: [pgsql-hackers-win32] GUC variables invisible to contrib/ modules
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [pgsql-hackers-win32] libpq build problem with on MS VC++