On Mon, May 4, 2020 at 6:59 PM Juan José Santamaría Flecha <juanjo.santama...@gmail.com> wrote: > > On Thu, Apr 30, 2020 at 5:07 AM Amit Kapila <amit.kapil...@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
0001-PG-compilation-error-with-VS-2015-2017-2019_v16.patch
Description: Binary data
0001-PG_10-compilation-error-with-VS-2015-2017-2019_v16.patch
Description: Binary data
0001-PG9_5-compilation-error-with-VS-2015-2017-2019_v16.patch
Description: Binary data