Re: Fix Windows socket error checking for MinGW

Поиск
Список
Период
Сортировка
От Michael Cronenworth
Тема Re: Fix Windows socket error checking for MinGW
Дата
Msg-id 521221A3.1010404@cchtml.com
обсуждение исходный текст
Ответ на Re: Fix Windows socket error checking for MinGW  (Noah Misch <noah@leadboat.com>)
Ответы Re: Fix Windows socket error checking for MinGW  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: Fix Windows socket error checking for MinGW  (Noah Misch <noah@leadboat.com>)
Список pgsql-hackers
On 08/17/2013 12:16 AM, Noah Misch wrote:
> 1. Redefine those constants for more (all?) compilers.
> 2. Remove that block and put #ifdef around all usage of such constants in
> frontend code, as you have done.
> 3. Remove that block and make src/backend/port/win32/socket.c frontend-usable,
> so frontend code can treat errno like backend code treats errno.
> 
> What do you recommend?

Option 1 is dangerous. I'd rather let the environments keep their constants.

Option 2 is the least dangerous but it adds lines of code.

Option 3: The errno variable is not set in Windows so relying on it is not possible.

If no one likes my patch then you need to come up with your own constants (ex.
PG_EINPROGRESS) and define those based on the compiler environment.



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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Automatic Index Creation for Column Types
Следующее
От: Michael Cronenworth
Дата:
Сообщение: Re: Fix Windows socket error checking for MinGW