summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2020-10-18 16:56:43 +0000
committerTom Lane2020-10-18 16:56:43 +0000
commitd5a9a661fcd2f5db037274157f931863a52004fd (patch)
treeb55f42c2a9e48a77b4bd6ace0fd2ec8e19603e85
parent929c69aa1970b3ae30bbb5a159b9dc530ec34d5c (diff)
Update the Winsock API version requested by libpq.
According to Microsoft's documentation, 2.2 has been the current version since Windows 98 or so. Moreover, that's what the Postgres backend has been requesting since 2004 (cf commit 4cdf51e64). So there seems no reason for libpq to keep asking for 1.1. Bring thread_test along, too, so that we're uniformly asking for 2.2 in all our WSAStartup calls. It's not clear whether there's any point in back-patching this, so for now I didn't. Discussion: https://postgr.es/m/[email protected]
-rw-r--r--src/interfaces/libpq/fe-connect.c2
-rw-r--r--src/test/thread/thread_test.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 704c9e2f79f..b0ca37c2ed8 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -3883,7 +3883,7 @@ makeEmptyPGconn(void)
{
WSADATA wsaData;
- if (WSAStartup(MAKEWORD(1, 1), &wsaData) != 0)
+ if (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0)
return NULL;
wsastartup_done = true;
}
diff --git a/src/test/thread/thread_test.c b/src/test/thread/thread_test.c
index e1bec01b81a..09603c95dd6 100644
--- a/src/test/thread/thread_test.c
+++ b/src/test/thread/thread_test.c
@@ -126,7 +126,7 @@ main(int argc, char *argv[])
#endif
#ifdef WIN32
- err = WSAStartup(MAKEWORD(1, 1), &wsaData);
+ err = WSAStartup(MAKEWORD(2, 2), &wsaData);
if (err != 0)
{
fprintf(stderr, "Cannot start the network subsystem - %d**\nexiting\n", err);