在 2022/11/17 01:44, Biswapriyo Nath 写道:
WInSDK checks for _NT_TARGET_VERSION_WIN10_RS4 but it is not defined
or used anywhere. So, I think removing that cpp check would not harm
the use cases. Tested with pywin32 project.
It's because undefined macros are implicit zeroes in an #if condition.
WPRFLAG is defined when _UNICODE is defined. So replace all usage of
WPRFLAG by _UNICODE and remove unused WPRFLAG macro.
---
mingw-w64-crt/crt/crtexe.c | 6 +++---
mingw-w64-crt/crt/dll_argv.c | 3 +--
mingw-w64-crt/crt/dllargv.c| 3 +--
mingw-w64-crt/crt/ucrtexe.c| 1 -
mingw-w64-c
Usage of _TCHAR/_tmain/_tcslen simplify code as it avoids #ifdef.
Note that custom mingw-w64 wbytelen() function is replaced by
'sizeof(_TCHAR) * (_tcslen() + 1)' construction which expands to
2*(wcslen()+1) for unicode build.
---
mingw-w64-crt/crt/crtexe.c | 55 +++---