Skip site navigation (1) Skip section navigation (2)

Re: APC/socket fix (final?)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>
Cc: "'''pgsql-patches(at)postgresql(dot)org' ' '" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: APC/socket fix (final?)
Date: 2004-03-26 01:07:42
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com> writes:
>> I'm loath to invent pg_select() but it might be cleaner than this.

> We'd also need pg_recv() and pg_send(). Chances are it can happen with every
> blocking socket call :-(

Ugh.  Is there a way we can insert a wrapper layer without modifying the
call sites?  I'm thinking of some kind of macro hack, say

	#ifdef WIN32
	#define select(...)  pg_select(...)

and then provide a port module that goes roughly like

	#undef select

		foo = select(...);
		// fix errno here;
		return foo;

The fewer places that have to know about this sort of thing, the better
off we will be.

			regards, tom lane

In response to

pgsql-patches by date

Next:From: Claudio NatoliDate: 2004-03-26 01:29:14
Subject: Re: APC/socket fix (final?)
Previous:From: Tom LaneDate: 2004-03-26 00:57:19
Subject: Re: installdir patch for win32

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group