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

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: PG compilation error with Visual Studio 2015/2017/2019
Дата
Msg-id CAA4eK1KsU5TV_ypLHZsok7LvqJLg1WSPsjcf2BR0a_Q5BuD9mw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PG compilation error with Visual Studio 2015/2017/2019  (Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>)
Ответы Re: PG compilation error with Visual Studio 2015/2017/2019  (Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>)
Список pgsql-hackers
On Mon, May 4, 2020 at 6:59 PM Juan José Santamaría Flecha
<juanjo.santamaria@gmail.com> wrote:
>
> On Thu, Apr 30, 2020 at 5:07 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
>>
>>
>> Okay, thanks.  The key point to keep in mind is to avoid touching the
>> code related to prior MSVC versions as we might not have set up to
>> test those.
>
>
> Please find attached a new version following this approach.
>

Thanks for the new version.  I have found few problems and made
changes accordingly.  In back-branch patches, I found one major
problem.

+#if (_MSC_VER >= 1900) /* Visual Studio 2015 or later */
+ rc = get_iso_localename(winlocname, iso_lc_messages);
+#else

Here, we need to free loct, otherwise, it will leak each time this
function is called on a newer MSVC version.  Also, call to
_create_locale is redundant in _MSC_VER >= 1900. So, I have tried to
write it differently, see what do you think about it?

*
+ * BEWARE: this function is WIN32 specific, so wchar_t are UTF-16.
I am not sure how much relevant is this comment so removed for now.

Apart from that, I have made a few other changes in comments, fixed
typos, and ran pgindent.  Let me know what do you think of attached
patches?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: WAL usage calculation patch
Следующее
От: Oleksandr Shulgin
Дата:
Сообщение: Re: Poll: are people okay with function/operator table redesign?