Skip site navigation (1) Skip section navigation (2)

Re: libpq sockets on win32

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Jeff Johnson <jeff(at)jeffjohnson(dot)net>
Cc: <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: libpq sockets on win32
Date: 2001-06-04 18:24:23
Message-ID: Pine.LNX.4.30.0106042021520.768-100000@peter.localdomain (view raw or flat)
Thread:
Lists: pgsql-docspgsql-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(at)gmx(dot)net   http://funkturm.homeip.net/~peter


In response to

pgsql-docs by date

Next:From: Tom LaneDate: 2001-06-04 18:29:38
Subject: Re: [INTERFACES] libpq sockets on win32
Previous:From: Bruce MomjianDate: 2001-06-04 18:22:45
Subject: Re: [INTERFACES] libpq sockets on win32

pgsql-interfaces by date

Next:From: Tom LaneDate: 2001-06-04 18:29:38
Subject: Re: [INTERFACES] libpq sockets on win32
Previous:From: Bruce MomjianDate: 2001-06-04 18:22:45
Subject: Re: [INTERFACES] libpq sockets on win32

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group