在 2023/11/25 15:59, LIU Hao 写道:
I don't think the patch is necessary. Windows socket handles are represented as `UINT_PTR` instead of plain `int`. On 64-bit Windows, storing a socket handle into `int` might cause truncation and is not safe.
Also, please read this reply: https://github.com/openssl/openssl/issues/7282#issuecomment-430633656
Some people have conditional typedefs for socket types so they use `SOCKET` on Windows and there will be no such warning. Some others (like OpenSSL) always use `int` and save four bytes; while we can assume this usually just 'works', it will be necessary to cast socket handles back to `SOCKET` from `int` when using Windows socket APIs.
-- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
