X-Original-To: pgsql-hackers@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id EC92D474E42 for ; Fri, 25 Apr 2003 02:35:54 -0400 (EDT) Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65]) by postgresql.org (Postfix) with ESMTP id A3390474E42 for ; Fri, 25 Apr 2003 02:35:21 -0400 (EDT) Received: (from root@localhost) by www.pspl.co.in (8.11.6/8.11.6) id h3P6ZK705644 for ; Fri, 25 Apr 2003 12:05:20 +0530 Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161]) by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id h3P6ZKi05639 for ; Fri, 25 Apr 2003 12:05:20 +0530 From: "Shridhar Daithankar" To: PostgreSQL-development Date: Fri, 25 Apr 2003 12:05:08 +0530 MIME-Version: 1.0 Subject: Re: close() vs. closesocket() Reply-To: shridhar_daithankar@persistent.co.in Message-ID: <3EA92474.7071.4C7B7D9@localhost> In-reply-to: <200304241835.h3OIZ2s04294@candle.pha.pa.us> X-mailer: Pegasus Mail for Windows (v4.02) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Spam-Status: No, hits=-26.0 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/883 X-Sequence-Number: 38373 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@galileo.rhein-neckar.de, Andre Fachat)