Re: [BUG FIX] Compare returned value by socket() against PGINVALID_SOCKET instead of < 0

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Joel Jacobson <joel(at)trustly(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [BUG FIX] Compare returned value by socket() against PGINVALID_SOCKET instead of < 0
Date: 2014-03-05 19:24:22
Message-ID: 20140305192422.GS4759@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Joel Jacobson wrote:
> Hi,
>
> I've tried to fix some bugs reported by Andrey Karpov in an article at
> http://www.viva64.com/en/b/0227/
>
> The value returned by socket() is unsigned on Windows and can thus not
> be checked if less than zero to detect an error, instead
> PGINVALID_SOCKET should be used, which is hard-coded to -1 on
> non-windows platforms.

Can I bug you into verifying what supported releases need this patch,
and to which does it backpatch cleanly? And if there's any to which it
doesn't, can I further bug you into providing one that does?

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2014-03-05 19:32:12 Re: jsonb and nested hstore
Previous Message Tom Lane 2014-03-05 19:22:30 Re: Custom Scan APIs (Re: Custom Plan node)