Re: [Mingw-w64-public] [PATCH] headers: Add missing marco in synchapi.h

2022-11-17 Thread LIU Hao
在 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.

[Mingw-w64-public] [PATCH] crt: Remove WPRFLAG macro

2022-11-17 Thread Pali Rohár
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

[Mingw-w64-public] [PATCH] crt: Use _TCHAR/_tmain/_tcslen in crtexe.c

2022-11-17 Thread Pali Rohár
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 +++---