On Wed, Apr 8, 2020 at 9:03 AM davinder singh <davindersingh2...@gmail.com> wrote:
> On Tue, Apr 7, 2020 at 8:30 PM Juan José Santamaría Flecha < > juanjo.santama...@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