Re: PG compilation error with Visual Studio 2015/2017/2019
От | Juan José Santamaría Flecha |
---|---|
Тема | Re: PG compilation error with Visual Studio 2015/2017/2019 |
Дата | |
Msg-id | CAC+AXB1OjP+UHcG4C0v6T2QOPvD+cHKfiQNSY5YWNU8uhYP0Zg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: PG compilation error with Visual Studio 2015/2017/2019 (Ranier Vilela <ranier.vf@gmail.com>) |
Список | pgsql-hackers |
On Tue, Apr 21, 2020 at 2:22 PM Ranier Vilela <ranier.vf@gmail.com> wrote:
More few comments.1. Comments about order:/*
* Callback function for EnumSystemLocalesEx.
* Stop enumerating if a match is found for a locale with the format
* <Language>_<Country>.
* The order for search locale is essential:
* Find LCType first as LOCALE_SNAME, if not found try LOCALE_SENGLISHLANGUAGENAME and
* finally LOCALE_SENGLISHCOUNTRYNAME, before return.
*/Typo "enumarating".
I would not call the order essential, is just meant to try the easier ways first: is already "ISO" formatted !-> is just a "language" !-> is a full "language_country" tag.
I take note about "enumarating".
2. Maybe the fail has here:if (hyphen == NULL || underscore == NULL)Change || to &&, the logical is wrong?
If the Windows locale does not have a hyphen ("aa") *or* the lc_message does not have an underscore ("Afar"), only a comparison on language is needed.
3. Why iso_lc_messages[0] = '\0'?If we go call strchr, soon after, it's a waste.
Less code churn, and strchr() againts an empty string did not look too awful.
I would like to find were the errors come from before sending a new version, can you reproduce them?
Regards,
Juan José Santamaría Flecha
В списке pgsql-hackers по дате отправления: