From: Keith M. <kei...@us...> - 2017-08-21 11:54:31
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/08/17 21:57, Keith Marshall via MinGW-dvlpr wrote: > 3) The definitions of the FD_SET macro differ between the two headers; > this appears to be intentional, in spite of the <winsock.h> version > being utterly broken. I don't know what Microsoft do, in *their* > <winsock.h>, but similar breakage does appear to be perpetuated in > other open source implementations; should we fix it, or should we > continue to mimic the broken behaviour perpetuated by others? > > 4) Although the same in both cases, the FD_CLR macro is detrimentally > affected by the broken FD_SET in <winsock.h>; it's actually not > robust in either case, because it doesn't account for any possible > duplication of socket descriptors in the managed descriptor set; > should we seek a more robust formulation? I've now created an autotest module which demonstrates these two issues: https://sourceforge.net/p/mingw/mingw-org-wsl/ci/a5f7717aa34744b4bb18bf287d9a9920de0f4c30/ As may be seen, from the attached testsuite output, issue (3) is apparent in the <winsock.h>, but not in the <winsock2.h> implementation, of FD_SET, (although the latter implementation is an utterly ghastly mess). Issue (4) remains (identically) in both implementations, in the particular case of an fd_set which may be malformed, (perhaps as a result of using FD_SET to add a duplicate fd, in a translation unit which includes <winsock.h> rather than <winsock2.h>). Unless anyone can offer a convincing argument, within the next seven days, as to why we should faithfully reproduce other projects' bugs, I propose to correct both of these issues. - -- Regards, Keith. Public key available from keys.gnupg.net Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iQIcBAEBAgAGBQJZmsnuAAoJEMCtNsY0flo/Bw4QAL29MSNP4gCKVMKHAKF6izRR nQFZwNVGlj1Qcp/bWNZYNgx7PwL6o9fXuukjI5P8CDDkQR4pwf5FzMKyfFz/YeP3 UHAOdMKXpOAYM2gro2viO4wWIKoElqFO2iXiANjMnEeoXBct2eWpycJW+1C86is4 UzIIE2G2CDLL0rE6oo+L3n/XBFAXOLKq8qcjPYqH8dG4q8MV3NLdinRwykxIQyAg BmqHdR3VNTXimyo170/BsslEmvMd9QwBMUMxj3q/pFmngoWtyz8zh9GIO2rUoD/T rJ4R2Iiy59fMLmdWDixPKahhx3sJw1gLZk76XLkCqq+L1RYIL3rsqJjyNVwuANs6 UIy8XbU0dNgYc01IOEbnPugzVqU2YBy7KeJAv89lLvHW9wv3c1obIGM2MY7KY4wF CS6OL+hHYxt/MYtlPXNw4HvxyOKj5VSMTapiBXb8D3BxHAMMkQ1H8PGsB11F2qFO bWHmcyyFXdKd9VUTqFfbww1ZPrDM5hm78a1VRp05V98SETThHgxucqPbLu2jgSVA 3Qk/D7hQm8/UnnyThd7FMpnMbSZ6CAgzPH3hagbCNr0KJT14aN8Jvn+6N1pCpM/3 5HwCb2VLbs+xV3q96D2vKmH3VZa0Ql+roX5yuH93HlWj7btc6Mg/0HLGSJmKDqJH JeE/gHxCvtJlKDScTp/p =pcO7 -----END PGP SIGNATURE----- |