Re: win32 socket definition

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: win32 socket definition
Дата
Msg-id 18673.1262374870@sss.pgh.pa.us
обсуждение исходный текст
Ответ на win32 socket definition  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: win32 socket definition  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> The win64 port has showed that we have two sockets declared
> incorrectly. They are supposed to be declared as SOCKET on win32, but
> they are declared as int. See attached patch.

> Given that SOCKET is actually defined as int on win32 (no warnings or
> anything there, just on win64), I'm inclined to apply this patch just
> to HEAD and not bother with backpatching.

This looks pretty bletcherous --- plastering #ifdef WIN32 all over the
code is exactly not the way to be fixing this sort of thing.  Maybe we
should go the other direction of "typedef int SOCKET" on Unix then use
SOCKET everywhere.

BTW, isn't this porting project showing the shortsightedness of using
WIN32 as the its-Windows platform symbol?  The case that you're
worried about here is certainly not "WIN32".
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Win64 warnings about size_t
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: [PATCH] Windows x64 [repost]