Claudio Natoli <[EMAIL PROTECTED]> 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(...) #endif and then provide a port module that goes roughly like #undef select pg_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 ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org