Re: PG compilation error with Visual Studio 2015/2017/2019
От | Juan José Santamaría Flecha |
---|---|
Тема | Re: PG compilation error with Visual Studio 2015/2017/2019 |
Дата | |
Msg-id | CAC+AXB1ryKj6P9X-PEqT92vhLH5JJc7GkR3eVGdqZBE9PHaAoQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: PG compilation error with Visual Studio 2015/2017/2019 (davinder singh <davindersingh2692@gmail.com>) |
Ответы |
Re: PG compilation error with Visual Studio 2015/2017/2019
|
Список | pgsql-hackers |
On Wed, Apr 8, 2020 at 9:03 AM davinder singh <davindersingh2692@gmail.com> wrote:
On Tue, Apr 7, 2020 at 8:30 PM Juan José Santamaría Flecha <juanjo.santamaria@gmail.com> wrote:* The logic on "defined(_MSC_VER) && (_MSC_VER >= 1900)" is defined as "_WIN32_WINNT >= 0x0600" on other parts of the code. I would recommend using the later.I think "_WIN32_WINNT >= 0x0600" represents windows versions only and doesn't include any information about Visual Studio versions. So I am sticking to " defined(_MSC_VER) && (_MSC_VER >= 1900)".
Let me explain further, in pg_config_os.h you can check that the value of _WIN32_WINNT is solely based on checking _MSC_VER. This patch should also be meaningful for WIN32 builds using MinGW, or we might see this issue reappear in those systems if update the MIN_WINNT value to more current OS versions. So, I still think _WIN32_WINNT is a better option.
I have resolved other comments. I have attached a new version of the patch.
I still see the same last lines in both #ifdef blocks, and pgindent might change a couple of lines to:
+ MultiByteToWideChar(CP_ACP, 0, winlocname, -1, wc_locale_name,
+ LOCALE_NAME_MAX_LENGTH);
+
+ if ((GetLocaleInfoEx(wc_locale_name, LOCALE_SNAME,
+ (LPWSTR)&buffer, LOCALE_NAME_MAX_LENGTH)) > 0)
+ {
+ LOCALE_NAME_MAX_LENGTH);
+
+ if ((GetLocaleInfoEx(wc_locale_name, LOCALE_SNAME,
+ (LPWSTR)&buffer, LOCALE_NAME_MAX_LENGTH)) > 0)
+ {
But that is pretty trivial stuff.
Please open an item in the commitfest for this patch.
Regards,
Juan José Santamaría Flecha
В списке pgsql-hackers по дате отправления: