Re: PG compilation error with Visual Studio 2015/2017/2019 - Mailing list pgsql-hackers

From Juan José Santamaría Flecha
Subject Re: PG compilation error with Visual Studio 2015/2017/2019
Date
Msg-id CAC+AXB1ryKj6P9X-PEqT92vhLH5JJc7GkR3eVGdqZBE9PHaAoQ@mail.gmail.com
Whole thread Raw
In response to Re: PG compilation error with Visual Studio 2015/2017/2019  (davinder singh <davindersingh2692@gmail.com>)
Responses Re: PG compilation error with Visual Studio 2015/2017/2019  (davinder singh <davindersingh2692@gmail.com>)
List 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)
+ {

But that is pretty trivial stuff.

Please open an item in the commitfest for this patch.

Regards,

Juan José Santamaría Flecha

pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: [PATCH] Incremental sort (was: PoC: Partial sort)
Next
From: Amit Langote
Date:
Subject: Re: adding partitioned tables to publications