在 2026-1-19 17:45, Kirill Makurin 写道:
Hello,

I noticed that in many header files we have declarations guarded with _POSIX 
and _POSIX_ macros.  When I first saw them I thought that they were mingw-w64's 
convenience macros used when user defines either _POSIX_SOURCE or 
_XOPEN_SOURCE, but apparently I was mistaken.

Does anyone know where they come from? Should we consider replacing them with 
checks for _POSIX_SOURCE/_XOPEN_SOURCE instead?

`_POSIX_` has been existing in Microsoft headers for many years. I suspect it is defined when compiling for the POSIX subsystem: https://blog.ret2.io/2017/09/20/subsystem-posix/


--
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