在 2024-02-19 15:56, Christian Franke 写道:
The __MINGW_FORTIFY_LEVEL set in _mingw_mac.h has no effect if a program including Win32 API headers like windows.h is compiled for Cygwin (same applies possibly to MSYS2). The __MINGW_FORTIFY_LEVEL only affects Libc includes which are not present in the Cygwin Win32 API header package (https://cygwin.com/packages/summary/w32api-headers.html). Cygwin provides its own libc headers with different (and more limited) _FORTIFY_SOURCE support.

So the idea is that `__MINGW_FORTIFY_LEVEL` should only be defined when a user asks for the mingw-w64 CRT; in the case of Cygwin, mingw-w64 headers are included but the CRT is the Cygwin CRT, so it shouldn't be defined; is that right? The patch should be sensible. Let me have a look later.



--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to