Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFNAB-0005nK-Ko for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Nov 2017 16:37:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFNAB-000299-1A for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Nov 2017 16:37:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eFNAA-00028z-Re for pgsql-hackers@lists.postgresql.org; Thu, 16 Nov 2017 16:37:14 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eFNA3-0007Q4-6N for pgsql-hackers@postgreSQL.org; Thu, 16 Nov 2017 16:37:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id vAGGb5GA020125 for ; Thu, 16 Nov 2017 11:37:05 -0500 From: Tom Lane To: pgsql-hackers@postgreSQL.org Subject: _WINSOCK_DEPRECATED_NO_WARNINGS MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <20123.1510850225.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 16 Nov 2017 11:37:05 -0500 Message-ID: <20124.1510850225@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Checking the buildfarm to see if ed9b3606d broke anything, I notice that woodlouse is producing stacks of warnings like this: src/port/thread.c(134): warning C4996: 'gethostbyname': Use getaddrinfo() = or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to dis= able deprecated API warnings [C:\buildfarm\buildenv\HEAD\pgsql.build\libpg= port.vcxproj] C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(22= 38) : see declaration of 'gethostbyname' and was doing so before that commit, so it's not my fault :-) win32.h has * Also for VS2015, add a define that stops compiler complaints about * using the old Winsock API. */ #if defined(_MSC_VER) && _MSC_VER >=3D 1900 #define _WINSOCK_DEPRECATED_NO_WARNINGS but evidently it chose the wrong cutoff for when to enable that symbol, because woodlouse is (or claims to be) running VS2013. Is there any good reason not to just define _WINSOCK_DEPRECATED_NO_WARNINGS unconditionally? Presumably it would have no effect on VS versions too old to know the symbol. I'm a bit inclined to move it to win32_port.h, as well, since that's what includes . regards, tom lane