Re: close() vs. closesocket()

From: "Shridhar Daithankar" <shridhar_daithankar(at)persistent(dot)co(dot)in>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: close() vs. closesocket()
Date: 2003-04-25 06:35:08
Message-ID: 3EA92474.7071.4C7B7D9@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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..

Bye
Shridhar

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sean Chittenden 2003-04-25 06:46:57 Re: compile error on cvs tip
Previous Message Joe Conway 2003-04-25 04:44:44 Re: compile error on cvs tip

Browse pgsql-patches by date

  From Date Subject
Next Message mlw 2003-04-25 12:29:29 Re: close() vs. closesocket()
Previous Message Bruce Momjian 2003-04-25 01:20:03 Re: [HACKERS] close() vs. closesocket()