On 25.02.2025 04:30, LIU Hao wrote:
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.
With the exception of the patch 5 (and similar changes copied to other patches), it looks mostly good to me, thanks. A few minor comments bellow.
I know that it's copied from the old header, so we may clean it up separately, but:
--- /dev/null +++ b/mingw-w64-headers/crt/corecrt_wctype.h @@ -0,0 +1,182 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the mingw-w64 runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ +#ifndef _INC_CORECRT_WCTYPE +#define _INC_CORECRT_WCTYPE + +#ifndef _WIN32 +#error Only Win32 target is supported! +#endif
This is redundant.
+#include <crtdefs.h>
It would be better to use corecrt.h, crtdefs.h is a leftover from old times.
+#pragma pack(push,_CRT_PACKING)
The header does not declare any structs, so this seems redundant.
+#ifndef _CRTIMP +#define _CRTIMP __declspec(dllimport) +#endif + +#ifndef _WCHAR_T_DEFINED +#define _WCHAR_T_DEFINED +#ifndef __cplusplus + typedef unsigned short wchar_t; +#endif /* C++ */ +#endif /* _WCHAR_T_DEFINED */
That's redundant too, they are declared in corecrt.h/_mingw.h.
--- a/mingw-w64-headers/crt/ctype.h +++ b/mingw-w64-headers/crt/ctype.h @@ -7,6 +7,7 @@ #define _INC_CTYPE #include <crtdefs.h> +#include <corecrt_wctype.h>
We may remove crtdefs.h include now, corecrt_wctype.h should be enough. Thanks, Jacek _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public