Proposed replacement for pipe under Win32

From: Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>
To: "'pgsql-patches(at)postgresql(dot)org'" <pgsql-patches(at)postgresql(dot)org>
Subject: Proposed replacement for pipe under Win32
Date: 2003-12-24 02:50:21
Message-ID: A02DEC4D1073D611BAE8525405FCCE2B0280A6@harris.memetrics.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32 pgsql-patches


To go in src/port/ directory.

This is to allow the handles returned by pipe to be used in select() calls
(which Win32 doesn't allow with the native pipe() call), thereby obviating
the need for reworking of the select() mechanisms in pgstat.c.

Additionally, something of the sort would be required at the top of pgstat.c

#ifdef WIN32
#define pipe(a) pgpipe(a)
#define write(a,b,c) send(a,b,c,0)
#define read(a,b,c) recv(a,b,c,0)
#endif

For reference, see this thread:
http://archives.postgresql.org/pgsql-hackers/2003-12/msg00650.php

Cheers,
Claudio

---
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see
<a
href="http://www.memetrics.com/emailpolicy.html">http://www.memetrics.com/em
ailpolicy.html</a>

Attachment Content-Type Size
pipe.c application/octet-stream 1.4 KB

Responses

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Dru 2003-12-30 10:57:14 hello
Previous Message Claudio Natoli 2003-12-22 22:46:49 Re: [HACKERS] Current Win32 port status

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-12-24 05:21:43 Re: Doc patch--clarifying $1 in PL/PgSQL
Previous Message Christopher Kings-Lynne 2003-12-24 02:37:33 Re: Quoting of psql \d output