Re: VS 2015 support in src/tools/msvc - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: VS 2015 support in src/tools/msvc
Date
Msg-id CABUevEyXeH7T7Rn3XwT47=i1dwtDH6RahHMbU8Jud+5LqvSeVg@mail.gmail.com
Whole thread Raw
In response to Re: VS 2015 support in src/tools/msvc  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On Fri, Apr 8, 2016 at 4:12 PM, Michael Paquier <michael.paquier@gmail.com> wrote:
On Fri, Apr 8, 2016 at 10:05 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
¥> On 04/08/2016 07:15 AM, Christian Ullrich wrote:
>> GetLocaleInfoEx() is covered by #if (WINVER >= 0x0600), we define
>> _WIN32_WINNT as 0x0501 (src/include/port/win32.h) and WINVER inherits that
>> value.

Yes, I had a look at winnls.h and that's true.

>> Michael, none of your patches change this, so how does it ever build on
>> your system?

Luck. I am getting a warning but the code is able to somewhat compile:
  src/port/chklocale.c(230): warning C4013: 'GetLocaleInfoEx'
undefined; assuming extern returning int
[C:\Users\IEUser\git\postgres\libpgport.vcxproj]
But that's clearly incorrect to get that. As you are saying, what we
actually just need to do is bumping _WIN32_WINNT to 0x0600 when
compiling with VS2015, meaning that the minimum build requirement for
Postgres with VS2015 would be Windows Vista, and it would not be
possible to compile it on XP or Windows server 2k3. As XP is already
out of support, I think that this is an acceptable tradeoff, and it
would still be possible to build Postgres on XP with older versions of
Visual. Thoughts?

I think that's easily acceptable for the build system, as long as we document it clearly.

I think it would probalby be a bad idea to use those binaries in our binary installers though, but that's a different discussion really.  We have other compiler flags that we don't recommend for that :)


//Magnus

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: VS 2015 support in src/tools/msvc
Next
From: nummervet nummervet
Date:
Subject: Execute ignoring cursor?