Re: APC/socket fix (final?)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: APC/socket fix (final?)
Дата
Msg-id 16813.1080263262@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: APC/socket fix (final?)  (Claudio Natoli <claudio.natoli@memetrics.com>)
Список pgsql-patches
Claudio Natoli <claudio.natoli@memetrics.com> writes:
>> I'm loath to invent pg_select() but it might be cleaner than this.

> We'd also need pg_recv() and pg_send(). Chances are it can happen with every
> blocking socket call :-(

Ugh.  Is there a way we can insert a wrapper layer without modifying the
call sites?  I'm thinking of some kind of macro hack, say

    #ifdef WIN32
    #define select(...)  pg_select(...)
    #endif

and then provide a port module that goes roughly like

    #undef select

    pg_select(...)
    {
        foo = select(...);
        // fix errno here;
        return foo;
    }

The fewer places that have to know about this sort of thing, the better
off we will be.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: installdir patch for win32
Следующее
От: Claudio Natoli
Дата:
Сообщение: Re: APC/socket fix (final?)