check socket creation errors against PGINVALID_SOCKET

Bruce Momjian <bruce@momjian.us>

Commit: f716c3250adeed22f1ea1b1cb93e4782a202856a
Author: Bruce Momjian <bruce@momjian.us>
Date: 2014-04-16T14:45:48Z
Releases: 9.3.5
check socket creation errors against PGINVALID_SOCKET

Previously, in some places, socket creation errors were checked for
negative values, which is not true for Windows because sockets are
unsigned.  This masked socket creation errors on Windows.

Backpatch through 9.0.  8.4 doesn't have the infrastructure to fix this.

Files