Re: [HACKERS] close() vs. closesocket()

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] close() vs. closesocket()
Date: 2003-04-25 01:20:03
Message-ID: 200304250120.h3P1K3701678@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


The following applied patch uses closesocket() for all socket closing
because Win32 requires it, and uses a #define to map that to close() on
Unix.

This patch removes several #ifdef WIN32 defines from libpq. Yea!

---------------------------------------------------------------------------

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.
>
> Comments?
>
> --
> Bruce Momjian | http://candle.pha.pa.us
> pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
> + If your life is a hard drive, | 13 Roberts Road
> + Christ can be your backup. | Newtown Square, Pennsylvania 19073
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 10.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Lo 2003-04-25 02:01:51 Re: Postgresql Filesystem
Previous Message Tom Lane 2003-04-25 00:30:40 Re: query optimization scenarios 17,701 times faster!!!

Browse pgsql-patches by date

  From Date Subject
Next Message Shridhar Daithankar 2003-04-25 06:35:08 Re: close() vs. closesocket()
Previous Message Bruce Momjian 2003-04-24 18:35:02 close() vs. closesocket()