From: | Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com> |
---|---|
To: | Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> |
Cc: | davinder singh <davindersingh2692(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: PG compilation error with Visual Studio 2015/2017/2019 |
Date: | 2020-04-15 18:27:58 |
Message-ID: | CAC+AXB1DOJ-ogZ60Fe4qM7x22ybG2-nf85XfN36hK6pLVS9vpg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Apr 15, 2020 at 4:46 PM Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> wrote:
> Em qua., 15 de abr. de 2020 às 03:08, davinder singh <
> davindersingh2692(at)gmail(dot)com> escreveu:
>
>>
>> 5. Why call _create_locale if _WIN32_WINNT >= 0x0600 is true and loct is
>>> not used?
>>>
>> _create_locale can take bigger input than GetLocaleInfoEx. But we are
>> interested in
>> *language[_country-region[.code-page]]*. We are using _create_locale to
>> validate
>> the given input. The reason is we can't verify the locale name if it is
>> appended with
>> code-page by using GetLocaleInfoEx. So before parsing, we verify if the
>> whole input
>> locale name is valid by using _create_locale. I hope that answers your
>> question.
>>
> Understood. In this case, _create_locale, is being used only to validate
> the input.
> Perhaps, in addition, you could create an additional function, which only
> validates winlocname, without having to create structures or use malloc, to
> be used when _WIN32_WINNT> = 0x0600 is true, but it is only a suggestion,
> if you think it is necessary.
>
Looking at the comments for IsoLocaleName() I see: "MinGW headers declare
_create_locale(), but msvcrt.dll lacks that symbol". This is outdated
[1][2], and _create_locale() could be used from Windows 8, but I think we
should use GetLocaleInfoEx() as a complete alternative to _create_locale().
Please find attached a patch for so.
[1]
https://sourceforge.net/p/mingw-w64/mailman/mingw-w64-public/?limit=250&page=2
[2] https://github.com/mirror/mingw-w64/commit/b508bb87ad
Regards,
Juan José Santamaría Flecha
>
>
Attachment | Content-Type | Size |
---|---|---|
0001-PG-compilation-error-with-VS-2015-2017-2019_v05.patch | application/octet-stream | 4.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2020-04-15 18:56:31 | Re: Poll: are people okay with function/operator table redesign? |
Previous Message | Andres Freund | 2020-04-15 18:19:13 | Re: Parallel copy |