Re: [Mingw-w64-public] [PATCH v4] Update of Hyper-V APIs

2025-02-24 Thread LIU Hao
在 2025-02-18 10:46, LIU Hao 写道: Rectify a few errors that were discovered by a token-wise diff. Changes between the previous series are in 'errata.diff'. ping. -- Best regards, LIU Hao OpenPGP_signature.asc Description: OpenPGP digital signature _

[Mingw-w64-public] [PATCH v3] Deduplicate code in ctype.h and wctype.h

2025-02-24 Thread LIU Hao
1. Rebase on master. 2. Declare `isblank*` etc. as dllimport unconditionally. Do not check for `__MSVCRT_VERSION__` any more. 3. Reorder commits so simple ones come first. 4. Delete duplicates of `_UPPER`, `_LOWER` etc. from ctype.h. -- Best regards, LIU Hao From 459cbe6de45d7acb69eb8498359a

Re: [Mingw-w64-public] [PATCH] crt: Provide __iswcsymf and __iswcsym for all CRT import libraries

2025-02-24 Thread LIU Hao
在 2025-02-25 06:02, Pali Rohár 写道: Symbols __iswcsymf and __iswcsym are available in msvcr80+ and UCRT. They are not available in msvcrt.dll. --- mingw-w64-crt/Makefile.am | 4 mingw-w64-crt/misc/__iswcsym.c | 19 +++ mingw-w64-crt/misc/__iswcsymf.c | 19 +

[Mingw-w64-public] [PATCH] crt: Provide __iswcsymf and __iswcsym for all CRT import libraries

2025-02-24 Thread Pali Rohár
Symbols __iswcsymf and __iswcsym are available in msvcr80+ and UCRT. They are not available in msvcrt.dll. --- mingw-w64-crt/Makefile.am | 4 mingw-w64-crt/misc/__iswcsym.c | 19 +++ mingw-w64-crt/misc/__iswcsymf.c | 19 +++ mingw-w64-headers/crt/ctype.

[Mingw-w64-public] [PATCH v2] Deduplicate code in ctype.h and wctype.h

2025-02-24 Thread LIU Hao
1. Create the new header corecrt_wctype.h and move common parts into it. 2. Implement `_isblank_l()` and `_iswblank_l()` for MSVCR80-120 and MSVCRT. 3. Test for TAB before calling `_is_ctype()` to avoid an unnecessary call. -- Best regards, LIU Hao From cbe56c34c0f492e2d5df748e2744dbdf86fb31dc

Re: [Mingw-w64-public] dirent changes

2025-02-24 Thread Lasse Collin
On 2025-02-24 Lasse Collin wrote: > I attached a patch to the new dirent. And now fixed a copypaste error. :-| -- Lasse Collin From 7626a912b2d95a090e401b311ec9a3edf771aed7 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Mon, 24 Feb 2025 17:35:03 +0200 Subject: [PATCH] ... Fix copypaste error

Re: [Mingw-w64-public] dirent changes

2025-02-24 Thread Lasse Collin
On 2025-02-23 Lasse Collin wrote: > On 2025-02-23 Pali Rohár wrote: > > WinAPI \\?\ has meaning to not do any normalization, so consumer > > should not add or remove some characters. [...] > In the new dirent, GetFullPathNameW converts mixed \/ usage to \, then > * is appended and FindFirstFileW

Re: [Mingw-w64-public] [PATCH] Deduplicate code in ctype.h and wctype.h

2025-02-24 Thread Jacek Caban
On 24.02.2025 12:41, LIU Hao wrote: 在 2025-02-24 19:29, Jacek Caban 写道: wchar.h ideally should not include wctype.h, I guess that's why those declarations are currently duplicated. MSVC has its stripped version in corecrt_wctype.h, which is included by both wctype.h and wchar.h. I think we sho

[Mingw-w64-public] _CRT_SECURE_NO_WARNINGS has no effect in C

2025-02-24 Thread Seth McDonald via Mingw-w64-public
Hello all, To my understanding, the header _mingw_mac.h allows users to define the macro __MINGW_MSVC_COMPAT_WARNINGS to receive warnings for using functions that MSVC would consider deprecated or unsafe. And if that macro is defined, the _CRT_NONSTDC_NO_DEPRECATE or _CRT_SECURE_NO_WARNINGS macros

Re: [Mingw-w64-public] make sure WINPTHREAD_API is correctly defined in pthread_time.h

2025-02-24 Thread Kirill Makurin
I think the idea of including pthread_time.h through pthread_compat.h from pthread.h is to make `clock_gettime` and other time functions available for MSVC users without explicitly including pthread_time.h, which is a non-standard header file. Declaration of `clockid_t` in pthread_compat.h may

Re: [Mingw-w64-public] [PATCH] Deduplicate code in ctype.h and wctype.h

2025-02-24 Thread LIU Hao
在 2025-02-24 19:29, Jacek Caban 写道: wchar.h ideally should not include wctype.h, I guess that's why those declarations are currently duplicated. MSVC has its stripped version in corecrt_wctype.h, which is included by both wctype.h and wchar.h. I think we should do the same. I'm aware of . Howe

Re: [Mingw-w64-public] [PATCH] Deduplicate code in ctype.h and wctype.h

2025-02-24 Thread Jacek Caban
On 24.02.2025 12:15, LIU Hao wrote: > diff --git a/mingw-w64-headers/crt/wchar.h b/mingw-w64-headers/crt/wchar.h > index ca2c1fc70..04818083c 100644 > --- a/mingw-w64-headers/crt/wchar.h > +++ b/mingw-w64-headers/crt/wchar.h > @@ -9,6 +9,7 @@ >  #include >  #include >  #include > +#include

[Mingw-w64-public] [PATCH] Deduplicate code in ctype.h and wctype.h

2025-02-24 Thread LIU Hao
At the moment, there are three pieces of wctype functions and macros, such as `iswspace`, scattering in ctype.h, wctype.h, and wchar.h. What's worse is that they are not kept quite synchronized; some of them are not declared properly according to `__MSVCRT_VERSION__`. This series of patches att