Re: PG compilation error with Visual Studio 2015/2017/2019

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: davindersingh2692(at)gmail(dot)com, Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
Subject: Re: PG compilation error with Visual Studio 2015/2017/2019
Date: 2020-04-09 11:54:59
Message-ID: CAEudQAo8qR9zDntW=ce=Ksg57fHEigRRK_bZ_AWdb0TgtEp=xg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>On Wed, Apr 8, 2020 at 7:39 PM Juan José Santamaría Flecha

>> 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.
>>
>Thanks for explanation, I was not aware of that, you are right it make
>sense to use " _WIN32_WINNT", Now I am using this only.

>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)
>> + {
>>
>Now I have resolved these comments also, Please check updated version of
>the patch.

>> Please open an item in the commitfest for this patch.
>>
>I have created with same title.

Hi,

I have a few comments about the patch, if I may.

1. Variable rc runs the risk of being used uninitialized.

2. Variable loct has a redundant declaration ( = NULL).

3. Return "C", does not solve the first case?

Attached, your patch with those considerations.

regards,

Ranier VIlela

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Juan José Santamaría Flecha 2020-04-09 12:14:31 Re: PG compilation error with Visual Studio 2015/2017/2019
Previous Message Dilip Kumar 2020-04-09 11:49:06 Re: Parallel copy