Jacek Caban <[email protected]> wrote:

> On 6/23/26 13:27, Kirill Makurin wrote:
>> Hello,
>>
>> This patch series cleans up and de-duplicates declarations in locale.h.
>
> MSVC doesn't have corecrt_wlocale.h. We could still consider it, but if
> it is just for two function declarations, I am not sure it is worth the
> addition.

You are right that MSVC does not have corecrt_wlocale.h, but I think it is not 
a big deal.

If adding new header file just for two functions is undesired, what if we 
declare them only in locale.h and then include locale.h from wchar.h?

> As for extending the version guards, I am also not convinced it is worth
> doing, especially for irrelevant targets like msvcrt20.dll. It creates
> additional complications and risks for what appear to be purely
> hypothetical gains.

I would like to have such guards as they serve as self-documentation, and make 
it possible to catch issue at compilation time rather than at link time.

>> I wanted to send these changes a month ago, but I ran into issues I 
>> described in my "libc++ unconditionally uses _create_locale, 
>> _configthraedlocale and friends?" message back in May.
>>
>> I hoped to find time to fix those issues in libc++, but in the end these 
>> changes were just laying around in my local git tree ever since. So, 
>> instead, I simply modified them to keep exposing _configthreadlocale, 
>> _create_locale and friends for msvcrt.dll, so we do not break libc++ builds 
>> and possibly some other packages which use those functions unconditionally.
>>
>> This really should be fixed in libc++, but I guess another time. It would be 
>> a great help if anyone could look into fixing usage of these functions in 
>> libc++.
>
> I would argue that there is nothing to be fixed in libc++. It's free to
> choose its supported Windows versions, and requiring a version that
> includes the necessary locale functionality seems perfectly reasonable
> to me.

I generally agree. The problem here is that we build libc++ as part of CI runs, 
and adding proper guards for those functions ends up breaking libc++ builds, 
which ultimately causes CI runs to fail. A solution would be to either drop 
some CI jobs for msvcrt.dll or update use of those functions on libc++.

- Kirill Makurin


_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to