在 2024-08-25 07:15, Rafael Kitover 写道:
The danger is further reduced by the fact that the Cygwin runtime
itself uses MSVCRT.

However, the main issue is trivial functions like `stricmp()` or
`sprintf_s()` which are safe and do not modify global state.

My point is that if you wish to build something that depends on MSVCRT (or UCRT) anyway, you should build it as a separate DLL with a native compiler, then load this DLL in Cygwin. That's more controllable.

You can't use MSVCRT functions by simply linking with `-lmsvcrt`; it would precede default libraries, specifically, the Cygwin DLL.


, because "comutil.h" has this definition:

#define _COM_PRINTF_S_1(dest,destsize,format,arg1)
sprintf_s(dest,destsize,format,arg1)

This could be just the C99 `snprintf()` .


--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

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

Reply via email to