From: | Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com> |
---|---|
To: | davinder singh <davindersingh2692(at)gmail(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: PG compilation error with Visual Studio 2015/2017/2019 |
Date: | 2020-04-08 14:09:33 |
Message-ID: | CAC+AXB1ryKj6P9X-PEqT92vhLH5JJc7GkR3eVGdqZBE9PHaAoQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Apr 8, 2020 at 9:03 AM davinder singh <davindersingh2692(at)gmail(dot)com>
wrote:
> On Tue, Apr 7, 2020 at 8:30 PM Juan José Santamaría Flecha <
> juanjo(dot)santamaria(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2020-04-08 14:10:37 | Re: adding partitioned tables to publications |
Previous Message | Tomas Vondra | 2020-04-08 14:08:39 | Re: [PATCH] Incremental sort (was: PoC: Partial sort) |