Re: WIN32 errno patch

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ian Lance Taylor <ian@airs.com>
Cc: Mikhail Terekhov <terekhov@emc.com>, pgsql-hackers@postgresql.org
Date: 2001-08-09T21:18:22Z
Lists: pgsql-hackers
Ian Lance Taylor <ian@airs.com> writes:
> I think the clean way to handle this is something along the lines of
> what the CVS client does.  On Unix, do this:
>     #define SOCK_ERRNO errno
>     #define SOCK_STRERROR strerror
> On Windows, do this:
>     #define SOCK_ERRNO (WSAGetLastError ())
>     #define SOCK_STRERROR sock_strerror

I've been trying to avoid uglifying the code like that, but perhaps
we have no choice :-(.

> (Then you have to write sock_strerror.)

Surely Windows provides a suitable function?

			regards, tom lane