Re: libpq sockets on win32

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: libpq sockets on win32
Дата
Msg-id Pine.LNX.4.30.0106042021520.768-100000@peter.localdomain
обсуждение исходный текст
Ответ на libpq sockets on win32  ("Jeff Johnson" <jeff@jeffjohnson.net>)
Список pgsql-interfaces
Jeff Johnson writes:

> After some poking around, it looked like recv was setting errno to
> ENOENT for some reason.  I figured out why today.  Win32 sockets don't
> set errno at all.  ENOENT was just left in errno from some earlier
> call.

There are already a few (wrong) attempts to cover this situation in
fe-connect.c, but it looks like a bunch of #ifdef's are needed.

> I haven't done much C coding in a few years and don't want to break
> other code by blindly doing:
>
> #define errno WSAGetLastError

Probably rather

#ifndef WIN32
normal code;
#else
windows code;
#endif

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: libpq sockets on win32
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: libpq sockets on win32