Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1au3uw-0007Gu-Vo for pgsql-hackers@arkaria.postgresql.org; Sat, 23 Apr 2016 20:12:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1au3uv-00047D-70 for pgsql-hackers@arkaria.postgresql.org; Sat, 23 Apr 2016 20:12:37 +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 1au3tZ-0002dU-RY for pgsql-hackers@postgresql.org; Sat, 23 Apr 2016 20:11:13 +0000 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1au3tV-00018a-Ua for pgsql-hackers@postgresql.org; Sat, 23 Apr 2016 20:11:12 +0000 Received: from mfilter34-d.gandi.net (mfilter34-d.gandi.net [217.70.178.165]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 2BDE3A80D2; Sat, 23 Apr 2016 22:11:06 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter34-d.gandi.net Received: from relay3-d.mail.gandi.net ([IPv6:::ffff:217.70.183.195]) by mfilter34-d.gandi.net (mfilter34-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id a1kawXz4ZWUF; Sat, 23 Apr 2016 22:11:04 +0200 (CEST) X-Originating-IP: 98.122.164.227 Received: from [192.168.10.146] (unknown [98.122.164.227]) (Authenticated sender: adsend@dunslane.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 602D2A80CD; Sat, 23 Apr 2016 22:11:02 +0200 (CEST) Subject: Re: VS 2015 support in src/tools/msvc To: Michael Paquier , Christian Ullrich References: <570792ED.2080003@chrullrich.net> <5707AC9E.7070309@dunslane.net> <5707C80F.9050709@chrullrich.net> <5707D7DC.2030508@dunslane.net> <5707E074.4030102@chrullrich.net> <0B77CFCB-0F90-4CAB-8509-7EB391C06D59@chrullrich.net> <570A6A14.6040303@dunslane.net> <570A9FCE.5040201@chrullrich.net> <570ABFA0.4090403@2ndquadrant.com> <57192C59.9090903@dunslane.net> Cc: Petr Jelinek , Robert Haas , Tom Lane , Magnus Hagander , PostgreSQL mailing lists From: Andrew Dunstan Message-ID: <571BD6D4.9@dunslane.net> Date: Sat, 23 Apr 2016 16:11:00 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 04/22/2016 01:21 AM, Michael Paquier wrote: >>> 5. It also complains about us casting a pid_t to a HANDLE in >>> pg_basebackup.c. Not sure what to do about that. >> The thing that's being cast is not a PID, but a HANDLE to a process. pid_t is a typedef for int (in port/win32.h), therefore is always 32 bits, while HANDLE is actually void*. However, Microsoft guarantees that kernel32 HANDLEs (this includes those to threads and processes) fit into 32 bits on AMD64. >> >> Source: https://msdn.microsoft.com/en-us/library/windows/desktop/ee872017(v=vs.85).aspx, third bullet point. >> >> So we can simply silence the warning by casting explicitly. > Yes, when casting things this way I think that a comment would be fine > in the code. We could do that as separate patches actually. We are already casting the pid_t to HANDLE and still getting a warning. Apparently we need to do something on win64 like (HANDLE) ((int64) bgchild) cheers andrew -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers