Re: close() vs. closesocket() - Mailing list pgsql-hackers

From Shridhar Daithankar
Subject Re: close() vs. closesocket()
Date
Msg-id 3EA92474.7071.4C7B7D9@localhost
Whole thread Raw
In response to close() vs. closesocket()  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
On 24 Apr 2003 at 14:35, Bruce Momjian wrote:

> Looking at libpq, you can see Win32 requires closesocket() while Unix
> uses just uses close().
> 
> I have to add this type of change to the backend for Win32, so I am
> inclined to make all the socket close calls closesocket() and #define
> that as close() on Unix?  It would remove quite a few Win32 defs from
> libpq too.

Rather than #define, I suggest we put CloseSocket as a new function and 
implement it differently.. That way we can keep track in case things start to 
differ on number and types of arguments between closesocket and close.

#define tends to add cruft and I  don't trust windows API to stability the way 
unix does.

Just an opinion..

ByeShridhar

--
Why use Windows, since there is a door?(By fachat@galileo.rhein-neckar.de, 
Andre Fachat)



pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: compile error on cvs tip
Next
From: Sean Chittenden
Date:
Subject: Re: compile error on cvs tip