Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1abUDf-0004rg-DZ for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Mar 2016 14:27:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1abUDe-0006oJ-Ri for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Mar 2016 14:27:10 +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) (envelope-from ) id 1abUCJ-0005KE-WB for pgsql-hackers@postgresql.org; Thu, 03 Mar 2016 14:25:48 +0000 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1abUCC-0004Nz-8r for pgsql-hackers@postgresql.org; Thu, 03 Mar 2016 14:25:47 +0000 Received: by mail-wm0-x22e.google.com with SMTP id p65so33778418wmp.0 for ; Thu, 03 Mar 2016 06:25:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=iQS2vOQi0vWGszu4C9Bbvv1TBdE4hsSy1AcnUGA9dBI=; b=EVIziUOYnT4l1LnOVSisgzjdj04b0SgV9M2E8vSQnOqyCEIEwtiTWXv+S5xT0N4law exfPR81BlOw6gqNOZleDq2ep/SBVKpD7Cw/znd1hMwiEHSbqzwKs1Z/6ww5+LUOAlhRM zPhH6BN8Akok5QhqzUZlnLVd7lbd/ceC54L7u4zpy33c54J8zBXK+zZZHWkgQR9T8YX/ cdtPk1QN62OGIenZnDlNElrF/FYMCnEq0kq706QcK3ert/yBG5xdmsBMNuVOqoUfKttY 0JyuMNaoUUwZewJP/dqInKmtQrhkqVVeeHf3B+CzKK41RWv67zJbyYS9Zt79ErzFrYSe bahw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=iQS2vOQi0vWGszu4C9Bbvv1TBdE4hsSy1AcnUGA9dBI=; b=QDEZfB2GEe1/SlMIu7pL7vI6B6Vq5DBZMO/mAHPLe/3bmRG1bMiga2RRE+g1kVAgLR /L0JEeYwwClUAnAiQEDKn+4nKcqJlVt4P27ZbgIINbtTLFeq2nByUFh7CKD1yUdmVEjZ 1xK91IcK/bIEb0sAMXeZ0T+ZbdfhUQoZ9NHT2xsXyNsIR8omjlJuHDL4KxMmyGbBXrR1 qYXRXQO1qfZwMU5papDUNBedV+3t3BNh0EVI/6TBM9CBIiNPrZA/JVGYK62P9dvhRR97 mhp98lVjdF7VnTIPk6B4TaMC2obmabMlQOgXGbfJN5hXvY0vK9A2YFlkiOhY/rHcBHG5 EBaQ== X-Gm-Message-State: AD7BkJK6sq/oiAQu0Ks8cC3PKTAg5s+o+mw5r8Jy59kqJ9Vuzc2VGDFu1ANXPfIKo52P7oGd X-Received: by 10.194.184.234 with SMTP id ex10mr3146111wjc.8.1457015139044; Thu, 03 Mar 2016 06:25:39 -0800 (PST) Received: from [192.168.0.103] (150.123.broadband11.iol.cz. [90.178.123.150]) by smtp.gmail.com with ESMTPSA id az8sm34843644wjc.17.2016.03.03.06.25.36 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Mar 2016 06:25:37 -0800 (PST) Subject: Re: VS 2015 support in src/tools/msvc To: pgsql-hackers@postgresql.org, Michael Paquier References: From: Petr Jelinek Message-ID: <56D84960.1080607@2ndquadrant.com> Date: Thu, 3 Mar 2016 15:25:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 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 03/03/16 15:02, Michael Paquier wrote: > Hi all, > > Microsoft provides a set of VMs that one can use for testing and > Windows 10 is in the set: > https://dev.windows.com/en-us/microsoft-edge/tools/vms/windows/ > I have grabbed one and installed the community version of Visual > Studio 2015 so I think that I am going to be able to compile Postgres > with VS2015 with a bit of black magic. > > My goal is double: > 1) As far as things have been discussed, VS2015 is making difficult > the compilation of Postgres, particularly for locales. So I'd like to > see what are the problems behind that and see if we can patch it > properly. This would facilitate the integration of cmake as well for > Windows. The locale problem is that: a) the MS crt headers are broken for this particular part due to unfinished refactoring, even their msvcrt sources don't compile with them, if you read them it's obvious they forgot to put one variable in the struct b) we are using somewhat legacy API there that's internally implemented as hacks over the new API (string parsing and generation and stuff is happening there) c) the non-legacy API works only on Vista+ and does not support the old locale names (which is why the legacy api that is written on top of this has to do the string parsing and generation) To me the least bad solution for MSVC 2015 and codepage detection seemed to use the new API when possible (GetLocaleInfoEx and friends) and fall back to our old string parsing that we did pre-VC2013 when it's not, since afaics it works correctly on all the locale names that are not supported by the new API. It means that MSVC 2015 builds would be Vista+ but I honestly don't see that as big issue given Microsoft's own policy about old Windows versions. > 2) src/tools/msvc stuff has support only up to VS2013. I think that it > would be nice to bump that a bit and get something for 9.5~. > Yeah, we'll also have to do something about perl 5.22 compatibility there as psed is not included in the core distribution anymore from that version and we use it to generate one header file IIRC. > So, would there be interest for a patch on the perl scripts in > src/tools/msvc or are they considered a lost cause? Having a look at > the failures could be done with the cmake work, but it seems a bit > premature to me to look at that for the moment, and having support for > VS2015 with 9.5 (support for new versions of VS won a backpatch the > last couple of years) would be a good thing I think. > +1, and I can help (at least review and testing if nothing else). -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers