Skip site navigation (1) Skip section navigation (2)

Re: VS 2015 support in src/tools/msvc

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Christian Ullrich <chris(at)chrullrich(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: VS 2015 support in src/tools/msvc
Date: 2016-04-29 04:15:01
Message-ID: 5722DFC5.1080100@dunslane.net (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-hackers

On 04/25/2016 03:11 AM, Michael Paquier wrote:
> On Mon, Apr 25, 2016 at 4:29 AM, Christian Ullrich <chris(at)chrullrich(dot)net> wrote:
>> Andrew wrote:
>>> OK, here's my final version of the patch, which I will apply in 24 hours
>> or so unless there is an objection.
> Thanks Andrew for the updated patch!
>
>> This one doesn't matter, but just for perfection's sake:
>>
>> +#if (_MSC_VER >= 1900)
>> +       uint32          cp;
>> +       WCHAR           wctype[80];
>> +
>> +       memset(wctype, 0, 80 * sizeof(WCHAR));
>> +       MultiByteToWideChar(CP_ACP, 0, ctype, -1, wctype, 80);
>>
>> The maximum length is documented as 85 characters, also:
>>
>> <https://msdn.microsoft.com/en-us/library/windows/desktop/dd373815(v=vs.85).aspx>:
>> 'Note   Your application must use the constant [LOCALE_NAME_MAX_LENGTH] for
>> the maximum locale name length, instead of hard-coding the value "85".'
> Just an addition on top of the comments of Christian..
>
> +#pragma warning(push)
> +#pragma warning(disable : 4091)
>   #include <dbghelp.h>
> +#pragma warning(pop)
> It seems to me that we had better protect those pragmas with _MSC_VER
>> = 1900. The crash dump facility could be used by MinGW as well, no?



I think we're being overcautious here.  But to keep people happy I have 
protected it with "#ifdef _MSC_VER".

latest patch attached. I have also cleaned up the docs some, and removed 
references to the now redundant msysGit.

cheers

andrew



Attachment: VS2015-support2.patch
Description: text/x-diff (11.9 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2016-04-29 04:33:32
Subject: Re: UNION ALL - Var attno
Previous:From: sri harshaDate: 2016-04-29 03:55:41
Subject: UNION ALL - Var attno

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group