Re: VS 2015 support in src/tools/msvc

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: VS 2015 support in src/tools/msvc
Дата
Msg-id CAB7nPqSaSO_XSvBoBCfWx9nmeZH9Dc89jiJe-qTBAUktXAiQ6w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: VS 2015 support in src/tools/msvc  (Christian Ullrich <chris@chrullrich.net>)
Ответы Re: VS 2015 support in src/tools/msvc  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
On Mon, Apr 25, 2016 at 4:29 AM, Christian Ullrich <chris@chrullrich.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?
-- 
Michael



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Re: postgres_fdw : Not able to update foreign table referring to a local table's view when use_remote_estimate = true
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: pg_dump / copy bugs with "big lines" ?