<div></div><div><table class="39fd4d8aff622499diff-table f8a867b9fae0702bjs-diff-table c172d709d6f65f14tab-size" style="border-spacing:0px;box-sizing:border-box;color:rgb( 36 , 41 , 46 );font-family:'-apple-system' , 'blinkmacsystemfont' , 'segoe ui' , 'helvetica' , 'arial' , sans-serif , 'apple color emoji' , 'segoe ui emoji';font-size:14px;width:603.81px"><tbody style="box-sizing:border-box"><tr style="box-sizing:border-box"><td class="c09d3ea2856d1cddblob-num 4074dbfc20d708c4blob-num-deletion 408573b2df2cb34js-linkable-line-number" id="37b87fb793632a94diff-68cd302a034fe49640941d1d22eedeb0238f49227cfce7b54a02a65dd6093b03L79" style="box-sizing:border-box;font-family:'sfmono-regular' , 'consolas' , 'liberation mono' , 'menlo' , monospace;font-size:12px;line-height:20px;min-width:50px;padding:0px 10px 0px 10px;text-align:right;vertical-align:top;white-space:nowrap;width:50.2857px"></td><td class="c09d3ea2856d1cddblob-num 4074dbfc20d708c4blob-num-deletion 437b932cc32e7753empty-cell" style="box-sizing:border-box;font-family:'sfmono-regular' , 'consolas' , 'liberation mono' , 'menlo' , monospace;font-size:12px;line-height:20px;min-width:50px;padding:0px 10px 0px 10px;text-align:right;vertical-align:top;white-space:nowrap;width:50.2857px"></td><td class="eae809a71b982bb0blob-code 5b598c0352b2d783blob-code-deletion" style="box-sizing:border-box;line-height:20px;padding:0px 10px 0px 10px;vertical-align:top"><br /></td></tr><tr style="box-sizing:border-box"><td class="c09d3ea2856d1cddblob-num 11c1771812270c62blob-num-addition 437b932cc32e7753empty-cell" style="box-sizing:border-box;font-family:'sfmono-regular' , 'consolas' , 'liberation mono' , 'menlo' , monospace;font-size:12px;line-height:20px;min-width:50px;padding:0px 10px 0px 10px;text-align:right;vertical-align:top;white-space:nowrap;width:50.2857px"></td><td class="c09d3ea2856d1cddblob-num 11c1771812270c62blob-num-addition 408573b2df2cb34js-linkable-line-number" id="cc87aa5f3fecfa2diff-68cd302a034fe49640941d1d22eedeb0238f49227cfce7b54a02a65dd6093b03R79" style="box-sizing:border-box;font-family:'sfmono-regular' , 'consolas' , 'liberation mono' , 'menlo' , monospace;font-size:12px;line-height:20px;min-width:50px;padding:0px 10px 0px 10px;text-align:right;vertical-align:top;white-space:nowrap;width:50.2857px"></td><td class="eae809a71b982bb0blob-code f5a047806fe4d755blob-code-addition" style="box-sizing:border-box;line-height:20px;padding:0px 10px 0px 10px;vertical-align:top"><span class="d7f4c3761ae80515blob-code-inner 8397beb357b1fa93blob-code-marker" style="box-sizing:border-box;font-family:'sfmono-regular' , 'consolas' , 'liberation mono' , 'menlo' , monospace;font-size:12px;overflow:visible;white-space:pre"> </span></td></tr></tbody></table></div><div>==</div><div><table class="39fd4d8aff622499diff-table f8a867b9fae0702bjs-diff-table c172d709d6f65f14tab-size" style="border-spacing:0px;box-sizing:border-box;color:rgb( 36 , 41 , 46 );font-family:'-apple-system' , 'blinkmacsystemfont' , 'segoe ui' , 'helvetica' , 'arial' , sans-serif , 'apple color emoji' , 'segoe ui emoji';font-size:14px;width:603.81px"><tbody style="box-sizing:border-box"><tr style="box-sizing:border-box"><td class="eae809a71b982bb0blob-code 5f86f5661f35bc2blob-code-context" style="box-sizing:border-box;line-height:20px;padding:0px 10px 0px 10px;vertical-align:top"><br /></td></tr><tr style="box-sizing:border-box"><td class="c09d3ea2856d1cddblob-num 4074dbfc20d708c4blob-num-deletion 408573b2df2cb34js-linkable-line-number" id="37b87fb793632a94diff-68cd302a034fe49640941d1d22eedeb0238f49227cfce7b54a02a65dd6093b03L79" style="box-sizing:border-box;font-family:'sfmono-regular' , 'consolas' , 'liberation mono' , 'menlo' , monospace;font-size:12px;line-height:20px;min-width:50px;padding:0px 10px 0px 10px;text-align:right;vertical-align:top;white-space:nowrap;width:50.2857px"></td><td class="c09d3ea2856d1cddblob-num 4074dbfc20d708c4blob-num-deletion 437b932cc32e7753empty-cell" style="box-sizing:border-box;font-family:'sfmono-regular' , 'consolas' , 'liberation mono' , 'menlo' , monospace;font-size:12px;line-height:20px;min-width:50px;padding:0px 10px 0px 10px;text-align:right;vertical-align:top;white-space:nowrap;width:50.2857px"></td><td class="eae809a71b982bb0blob-code 5b598c0352b2d783blob-code-deletion" style="box-sizing:border-box;line-height:20px;padding:0px 10px 0px 10px;vertical-align:top"><span class="d7f4c3761ae80515blob-code-inner 8397beb357b1fa93blob-code-marker" style="box-sizing:border-box;font-family:'sfmono-regular' , 'consolas' , 'liberation mono' , 'menlo' , monospace;font-size:12px;overflow:visible;white-space:pre">- INT = Shift (And (<span class="b9d0a09a25dfcc94pl-c1" style="box-sizing:border-box">BYTESIZE</span> (<span class="b9d0a09a25dfcc94pl-c1 943242fb1c89ebbbx c54885705edadc1cx-first 9ec2d4694c18aca4x-last" style="border-radius:0.2em;box-sizing:border-box">INTEGER</span>), IOCPARM_MASK), <span class="b9d0a09a25dfcc94pl-c1" style="box-sizing:border-box">16</span>);</span></td></tr><tr style="box-sizing:border-box"><td class="c09d3ea2856d1cddblob-num 11c1771812270c62blob-num-addition 437b932cc32e7753empty-cell" style="box-sizing:border-box;font-family:'sfmono-regular' , 'consolas' , 'liberation mono' , 'menlo' , monospace;font-size:12px;line-height:20px;min-width:50px;padding:0px 10px 0px 10px;text-align:right;vertical-align:top;white-space:nowrap;width:50.2857px"></td><td class="c09d3ea2856d1cddblob-num 11c1771812270c62blob-num-addition 408573b2df2cb34js-linkable-line-number" id="cc87aa5f3fecfa2diff-68cd302a034fe49640941d1d22eedeb0238f49227cfce7b54a02a65dd6093b03R79" style="box-sizing:border-box;font-family:'sfmono-regular' , 'consolas' , 'liberation mono' , 'menlo' , monospace;font-size:12px;line-height:20px;min-width:50px;padding:0px 10px 0px 10px;text-align:right;vertical-align:top;white-space:nowrap;width:50.2857px"></td><td class="eae809a71b982bb0blob-code f5a047806fe4d755blob-code-addition" style="box-sizing:border-box;line-height:20px;padding:0px 10px 0px 10px;vertical-align:top"><span class="d7f4c3761ae80515blob-code-inner 8397beb357b1fa93blob-code-marker" style="box-sizing:border-box;font-family:'sfmono-regular' , 'consolas' , 'liberation mono' , 'menlo' , monospace;font-size:12px;overflow:visible;white-space:pre">+ INT = Shift (And (<span class="b9d0a09a25dfcc94pl-c1" style="box-sizing:border-box">BYTESIZE</span> (<span class="943242fb1c89ebbbx c54885705edadc1cx-first 9ec2d4694c18aca4x-last" style="border-radius:0.2em;box-sizing:border-box">u_long</span>), IOCPARM_MASK), <span class="b9d0a09a25dfcc94pl-c1" style="box-sizing:border-box">16</span>);</span></td></tr><tr style="box-sizing:border-box"><td class="c09d3ea2856d1cddblob-num 7efb05ea09cb5cffblob-num-context 408573b2df2cb34js-linkable-line-number" id="1970e60cba38df7cdiff-68cd302a034fe49640941d1d22eedeb0238f49227cfce7b54a02a65dd6093b03L80" style="box-sizing:border-box;font-family:'sfmono-regular' , 'consolas' , 'liberation mono' , 'menlo' , monospace;font-size:12px;line-height:20px;min-width:50px;padding:0px 10px 0px 10px;text-align:right;vertical-align:top;white-space:nowrap;width:50.2857px"><br /></td><td class="c09d3ea2856d1cddblob-num 7efb05ea09cb5cffblob-num-context 408573b2df2cb34js-linkable-line-number" id="24bd18575da0dd56diff-68cd302a034fe49640941d1d22eedeb0238f49227cfce7b54a02a65dd6093b03R80" style="box-sizing:border-box;font-family:'sfmono-regular' , 'consolas' , 'liberation mono' , 'menlo' , monospace;font-size:12px;line-height:20px;min-width:50px;padding:0px 10px 0px 10px;text-align:right;vertical-align:top;white-space:nowrap;width:50.2857px"></td><td class="eae809a71b982bb0blob-code 5f86f5661f35bc2blob-code-context" style="box-sizing:border-box;line-height:20px;padding:0px 10px 0px 10px;vertical-align:top"><span class="d7f4c3761ae80515blob-code-inner 8397beb357b1fa93blob-code-marker" style="box-sizing:border-box;font-family:'sfmono-regular' , 'consolas' , 'liberation mono' , 'menlo' , monospace;font-size:12px;overflow:visible;white-space:pre"> </span></td></tr></tbody></table></div><div>==</div><div><br /></div><div> Thank! I'll try in near future.</div><div><br /></div><div><br /></div><div>Best regards, Victor Miasnikov</div><div><br /></div><div>07.03.2021, 17:59, "Jay K" <jayk123@hotmail.com>:</div><blockquote><div dir="ltr">
<div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">
<a id="5b77e339768e97e3ee4d22f2cc4f8323LPlnk773863" href="https://github.com/modula3/cm3/commit/24873d4c2f322f1b112d2c0c51a95a1c48a6fb85" target="_blank">Win64: Fix socket ioctl codes. · modula3/cm3@24873d4 (github.com)</a><br />
</div>
<div>
<div id="dd8fcbc3886f6beba9d56dd35eeb1be5appendonsend"></div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">
<br />
</div>
<hr style="display:inline-block;width:98%" />
<div id="f2e387f28ef856c18dfa722bbcbb9bfadivRplyFwdMsg" dir="ltr"><font color="#000000" face="Calibri, sans-serif" style="font-size:11pt"><b>From:</b> <a href="mailto:vvm@tut.by" target="_blank">vvm@tut.by</a> <<a href="mailto:vvm@tut.by" target="_blank">vvm@tut.by</a>><br />
<b>Sent:</b> Tuesday, February 23, 2021 12:02 PM<br />
<b>To:</b> Jay K <<a href="mailto:jayk123@hotmail.com" target="_blank">jayk123@hotmail.com</a>><br />
<b>Subject:</b> WinSock.FIONBIO as -<span class="1f1ea193f6735cf0wmi-callto">2147195266</span> Re: [M3devel] Modula-3 subranges vs. opaque arbitrary 32bit constants?</font>
<div> </div>
</div>
<div>
<div>
<div><span style="background-color:#ffffff;color:#000000;float:none;font-family:'arial' , sans-serif;font-size:16px;font-style:normal;font-variant:normal;font-weight:400;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px">Hi!</span></div>
</div>
<div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'arial' , sans-serif;font-size:16px;font-style:normal;font-variant:normal;font-weight:400;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px">
 </div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'arial' , sans-serif;font-size:16px;font-style:normal;font-variant:normal;font-weight:400;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px">
 </div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'arial' , sans-serif;font-size:16px;font-style:normal;font-variant:normal;font-weight:400;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px">
 Some information dated 2019-11-XX:</div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'arial' , sans-serif;font-size:16px;font-style:normal;font-variant:normal;font-weight:400;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px">
 </div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'arial' , sans-serif;font-size:16px;font-style:normal;font-variant:normal;font-weight:400;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px">
<div>"TCP.m3.diff m3-comm--tcp--src--WIN32 {--- Revers {= WinSock.i3 is better place.txt"</div>
<div>==</div>
<div>
<div>- IF WinSock.ioctlsocket(sock, WinSock.FIONBIO, ADR(one)) = SockErr THEN<br />
+ IF WinSock.ioctlsocket(sock, -<span class="1f1ea193f6735cf0wmi-callto">2147195266</span>, ADR(one)) = SockErr THEN</div>
</div>
<div>==</div>
</div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'arial' , sans-serif;font-size:16px;font-style:normal;font-variant:normal;font-weight:400;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px">
 </div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'arial' , sans-serif;font-size:16px;font-style:normal;font-variant:normal;font-weight:400;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px">
 </div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'arial' , sans-serif;font-size:16px;font-style:normal;font-variant:normal;font-weight:400;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px">
<div><br />
<span class="1f1ea193f6735cf0wmi-callto">2147772030</span><br />
<span class="1f1ea193f6735cf0wmi-callto">1000110011001111110</span></div>
<div> </div>
<div><br />
-<span class="1f1ea193f6735cf0wmi-callto">2147195266</span><br />
 {=<br />
...<br />
ioctlsocket's cmd parameter is a long, so the actual value of FIONBIO should be printed with %ld and is -<span class="1f1ea193f6735cf0wmi-callto">2147195266</span> – tmm1 Mar 25 '18 at 7:46<br />
...</div>
<div> </div>
<div><br />
...<br />
FASYNC : constant := FIOASYNC; <br />
FIOASYNC : constant := 16#<span class="1f1ea193f6735cf0wmi-callto">8004667</span>d#; <br />
FIONBIO : constant := -<span class="1f1ea193f6735cf0wmi-callto">2147195266</span>; <br />
FIONREAD : constant := 16#<span class="1f1ea193f6735cf0wmi-callto">4004667</span>f#; <br />
...</div>
<div> </div>
<div><br />
...<br />
     /// <summary><br />
     /// Use to determine the amount of data pending in the network's input buffer that can be read from socket s.<br />
     /// </summary><br />
     FIONREAD = <span class="1f1ea193f6735cf0wmi-callto">1074030207</span>,</div>
<div>     /// <summary><br />
     /// The *argp parameter is a pointer to an unsigned long value.<br />
     /// Set *argp to a nonzero value if the nonblocking mode should be enabled,<br />
     /// or zero if the nonblocking mode should be disabled.<br />
     /// </summary><br />
     FIONBIO = -<span class="1f1ea193f6735cf0wmi-callto">2147195266</span>,</div>
<div>     FIOASYNC = <span class="1f1ea193f6735cf0wmi-callto">2147195267</span>,<br />
     SIOCSHIWAT = <span class="1f1ea193f6735cf0wmi-callto">2147192064</span>,<br />
     SIOCGHIWAT = <span class="1f1ea193f6735cf0wmi-callto">1074033409</span>,<br />
     SIOCSLOWAT = <span class="1f1ea193f6735cf0wmi-callto">2147192062</span>,<br />
     SIOCGLOWAT = <span class="1f1ea193f6735cf0wmi-callto">1074033411</span>,</div>
<div>     /// <summary><br />
     /// Use to determine if all out of band (OOB) data has been read.<br />
     /// </summary><br />
     SIOCATMARK = <span class="1f1ea193f6735cf0wmi-callto">1074033415</span><br />
...</div>
<div> </div>
</div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'arial' , sans-serif;font-size:16px;font-style:normal;font-variant:normal;font-weight:400;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px">
 </div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'arial' , sans-serif;font-size:16px;font-style:normal;font-variant:normal;font-weight:400;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px">
Best regards, Victor Miasnikov</div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'arial' , sans-serif;font-size:16px;font-style:normal;font-variant:normal;font-weight:400;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px">
 </div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'arial' , sans-serif;font-size:16px;font-style:normal;font-variant:normal;font-weight:400;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px">
P.S.</div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'arial' , sans-serif;font-size:16px;font-style:normal;font-variant:normal;font-weight:400;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px">
 </div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'arial' , sans-serif;font-size:16px;font-style:normal;font-variant:normal;font-weight:400;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px">
More info in attached files</div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'arial' , sans-serif;font-size:16px;font-style:normal;font-variant:normal;font-weight:400;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px">
 </div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'arial' , sans-serif;font-size:16px;font-style:normal;font-variant:normal;font-weight:400;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px">
 </div>
</div>
<div>22.02.2021, 20:46, "<a href="mailto:vvm@tut.by" target="_blank">vvm@tut.by</a>" <<a href="mailto:vvm@tut.by" target="_blank">vvm@tut.by</a>>:</div>
<blockquote>
<div>Hi!</div>
<div> </div>
<div>  At 21 and 22 February I read 6 or 12 messages in M3 mail list about problem with TCP.m3 </div>
<div> </div>
<div> I think that this:</div>
<div> </div>
<div>-<span style="color:#24292e;font-family:'sfmono-regular' , 'consolas' , 'liberation mono' , 'menlo' , monospace;font-size:11.9px">FIONBIO =   Or (Or (W, INT), Or (FC, 126)); (* Set/clear non-bl.i/o *)</span></div>
<div><span style="color:#24292e;font-family:'sfmono-regular' , 'consolas' , 'liberation mono' , 'menlo' , monospace;font-size:11.9px">+  FIONBIO =   -<span class="1f1ea193f6735cf0wmi-callto">2147195266</span>;  </span></div>
<div> </div>
<div>should solve it.</div>
<div> </div>
<div> Please, try: today I don't have MS VS on my computer.</div>
<div> </div>
<div>Best regards, Victor Miasnikov</div>
<div> </div>
<div>22.02.2021, 20:37, "Jay K" <<a href="mailto:jayk123@hotmail.com" rel="noopener noreferrer" target="_blank">jayk123@hotmail.com</a>>:</div>
<blockquote>
<div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">
Well. I did not apply your patches. I encountered the errors, and then I fixed them.</div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">
In some cases possibly the same as you. Please look at the history in master. It isn't much to read.</div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">
 </div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">
  - Jay</div>
<div>
<div> </div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">
 </div>
<hr style="width:98%" />
<div><font color="#000000" face="Calibri, sans-serif" style="font-size:11pt"><strong>From:</strong>
<a href="mailto:vvm@tut.by" rel="noopener noreferrer" target="_blank">vvm@tut.by</a> <<a href="mailto:vvm@tut.by" rel="noopener noreferrer" target="_blank">vvm@tut.by</a>><br />
<strong>Sent:</strong> Monday, February 22, 2021 12:48 PM<br />
<strong>To:</strong> Jay K <<a href="mailto:jayk123@hotmail.com" rel="noopener noreferrer" target="_blank">jayk123@hotmail.com</a>>; m3devel <<a href="mailto:m3devel@elegosoft.com" rel="noopener noreferrer" target="_blank">m3devel@elegosoft.com</a>><br />
<strong>Subject:</strong> Re: [M3devel] Modula-3 subranges vs. opaque arbitrary 32bit constants?</font>
<div> </div>
</div>
<div>
<div>Hi!</div>
<div> </div>
<div> </div>
<div>> m3tcp!TCP__InitSock+0xb8 [C:\s\cm3\m3-comm\tcp\src\WIN32\TCP.m3 @ 310]:<br />
 </div>
<div> Error's happened even with this patch?</div>
<div> </div>
<div>
<div><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmodula3%2Fcm3%2Fissues%2F47%23issuecomment-501227088&data=04%7C01%7C%7C8d32b717ce4847b3452108d8d7f2e63a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637496785548265726%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Y4BR%2FEf2gh1Gcmo045Z%2FHB0yp4tl0tQyyOd6jg%2FUcf8%3D&reserved=0" rel="noopener noreferrer" target="_blank">https://github.com/modula3/cm3/issues/47#issuecomment-501227088</a></div>
</div>
<div> </div>
<div>(</div>
<div> </div>
<div>
<p style="background-color:rgb( 255 , 255 , 255 );box-sizing:border-box;color:rgb( 36 , 41 , 46 );font-family:'-apple-system' , 'blinkmacsystemfont' , 'segoe ui' , 'helvetica' , 'arial' , sans-serif , 'apple color emoji' , 'segoe ui emoji';font-size:14px;font-style:normal;font-weight:400;margin-bottom:16px;margin-top:0px;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
Related patch:</p>
<pre style="border-radius:6px;box-sizing:border-box;color:rgb( 36 , 41 , 46 );font-family:'sfmono-regular' , 'consolas' , 'liberation mono' , 'menlo' , monospace;font-size:11.9px;font-style:normal;font-weight:400;line-height:1.45;margin-bottom:16px;margin-top:0px;overflow:auto;padding:16px;text-decoration-style:initial;text-indent:0px;text-transform:none;word-spacing:0px"><code style="background-size:initial;border:0px;border-radius:6px;box-sizing:border-box;font-family:'sfmono-regular' , 'consolas' , 'liberation mono' , 'menlo' , monospace;font-size:11.9px;line-height:inherit;margin:0px;overflow:visible;padding:0px;white-space:pre;word-break:normal">--- WinSock.i3 000   Sun Jun 02 21:24:39 2019
+++ WinSock.i3  Wed Jun 12 11:11:53 2019
@@ -80,7 +80,7 @@
 
   (* file i/o controls *)
   FIONREAD =  Or (Or (R, INT), Or (FC, 127)); (* Get # bytes to read *)
-  FIONBIO =   Or (Or (W, INT), Or (FC, 126)); (* Set/clear non-bl.i/o *)
+  FIONBIO =   -2147195266;                    (* Set/clear non-bl.i/o *)  (* Ok only to 32 bit OS   FIONBIO =   Or (Or (W, INT), Or (FC, 126)); *)
   FIOASYNC =  Or (Or (W, INT), Or (FC, 125)); (* Set/clear async i/o    *)
 
   (* Socket i/o controls *)</code></pre>
</div>
<div> </div>
<div>)</div>
<div> </div>
<div> </div>
<div>Best regards, Victor Miasnikov</div>
<div> </div>
<div>22.02.2021, 01:09, "Jay K" <<a href="mailto:jayk123@hotmail.com" rel="noopener noreferrer" target="_blank">jayk123@hotmail.com</a>>:</div>
<blockquote>
<div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">
<div>Maybe it is a bug in the Modula-3 Windows headers cloning, or in the C backend.</div>
<div>I'm not sure.</div>
<div>Please help me to understand?</div>
<div> </div>
<div>The AMD64_NT port works well enough, again, that it can build the runtime and compiler, and the compiler</div>
<div>can build everything.</div>
<div> </div>
<div>But networking fails, here:</div>
<div> </div>
<div>0:000> k</div>
<div> # Child-SP          RetAddr               Call Site</div>
<div>00 (Inline Function) --------`--------     KERNELBASE!DebugBreak [minkernel\kernelbase\debug.c @ 143]</div>
<div><span class="1f1ea193f6735cf0wmi-callto">01 00000053</span>`b8cff<span class="1f1ea193f6735cf0wmi-callto">188 00007</span>fff`b8a35e93     KERNELBASE!wil::details::DebugBreak+0x2 [onecore\internal\sdk\inc\wil\opensource\wil\result_macros.h @ 1737]</div>
<div><span class="1f1ea193f6735cf0wmi-callto">02 00000053</span>`b8cff<span class="1f1ea193f6735cf0wmi-callto">190 00007</span>fff`b8a2682f     m3core!RTOS__Crash+0x43 [C:\s\cm3\m3-libs\m3core\src\runtime\WIN32\RTOS.m3 @ 26]</div>
<div><span class="1f1ea193f6735cf0wmi-callto">03 00000053</span>`b8cff1e0 00007fff`b8a23bef     m3core!RTProcess__Crash+0x6f [C:\s\cm3\m3-libs\m3core\src\runtime\common\RTProcess.m3 @ 66]</div>
<div><span class="1f1ea193f6735cf0wmi-callto">04 00000053</span>`b8cff<span class="1f1ea193f6735cf0wmi-callto">220 00007</span>fff`b8a23820     m3core!RTError__EndError+0x3f [C:\s\cm3\m3-libs\m3core\src\runtime\common\RTError.m3 @ 119]</div>
<div><span class="1f1ea193f6735cf0wmi-callto">05 00000053</span>`b8cff<span class="1f1ea193f6735cf0wmi-callto">260 00007</span>fff`b8a24257     m3core!RTError__MsgS+0xa0 [C:\s\cm3\m3-libs\m3core\src\runtime\common\RTError.m3 @ 41]</div>
<div><span class="1f1ea193f6735cf0wmi-callto">06 00000053</span>`b8cff2a0 00007fff`b8a23e5e     m3core!RTException__Crash+0x317 [C:\s\cm3\m3-libs\m3core\src\runtime\common\RTException.m3 @ 81]</div>
<div><span class="1f1ea193f6735cf0wmi-callto">07 00000053</span>`b8cff<span class="1f1ea193f6735cf0wmi-callto">330 00007</span>fff`b8a23d4b     m3core!RTException__DefaultBackstop+0xce [C:\s\cm3\m3-libs\m3core\src\runtime\common\RTException.m3 @ 39]</div>
<div><span class="1f1ea193f6735cf0wmi-callto">08 00000053</span>`b8cff3a0 00007fff`b8a37d7a     m3core!RTException__InvokeBackstop+0x3b [C:\s\cm3\m3-libs\m3core\src\runtime\common\RTException.m3 @ 25]</div>
<div><span class="1f1ea193f6735cf0wmi-callto">09 00000053</span>`b8cff3e0 00007fff`b8a23f2a     m3core!RTException__Raise+0x9a [C:\s\cm3\m3-libs\m3core\src\runtime\ex_frame\RTExFrame.m3 @ 90]</div>
<div>0a <span class="1f1ea193f6735cf0wmi-callto">00000053</span>`b8cff<span class="1f1ea193f6735cf0wmi-callto">440 00007</span>fff`b8a23d4b     m3core!RTException__DefaultBackstop+0x19a [C:\s\cm3\m3-libs\m3core\src\runtime\common\RTException.m3 @ 49]</div>
<div>0b <span class="1f1ea193f6735cf0wmi-callto">00000053</span>`b8cff4b0 00007fff`b8a37d7a     m3core!RTException__InvokeBackstop+0x3b [C:\s\cm3\m3-libs\m3core\src\runtime\common\RTException.m3 @ 25]</div>
<div>0c <span class="1f1ea193f6735cf0wmi-callto">00000053</span>`b8cff4f0 00007fff`b8a06cce     m3core!RTException__Raise+0x9a [C:\s\cm3\m3-libs\m3core\src\runtime\ex_frame\RTExFrame.m3 @ 90]</div>
<div>0d <span class="1f1ea193f6735cf0wmi-callto">00000053</span>`b8cff<span class="1f1ea193f6735cf0wmi-callto">550 00007</span>ff8`2d57626a     m3core!RTHooks__ReportFault+0xfe [C:\s\cm3\m3-libs\m3core\src\runtime\common\RTHooks.m3 @ 112]</div>
<div><strong>0e <span class="1f1ea193f6735cf0wmi-callto">00000053</span>`b8cff5f0 00007ff8`2d5747f2     m3tcp!M_TCP_L_100_CRASH+0x1a [C:\s\cm3\m3-comm\tcp\AMD64_NT\TCP.m3.c @ 2759]
</strong></div>
<div><strong>0f <span class="1f1ea193f6735cf0wmi-callto">00000053</span>`b8cff<span class="1f1ea193f6735cf0wmi-callto">620 00007</span>ff8`2d57371c     m3tcp!TCP__InitSock+0xc2 [C:\s\cm3\m3-comm\tcp\src\WIN32\TCP.m3 @ 310]
</strong></div>
<div><span class="1f1ea193f6735cf0wmi-callto">10 00000053</span>`b8cff<span class="1f1ea193f6735cf0wmi-callto">680 00007</span>fff`fe8302b3     m3tcp!TCP__NewConnector+0xdc [C:\s\cm3\m3-comm\tcp\src\WIN32\TCP.m3 @ 72]</div>
<div><span class="1f1ea193f6735cf0wmi-callto">11 00000053</span>`b8cff<span class="1f1ea193f6735cf0wmi-callto">720 00007</span>fff`fe82d814     sharedobj!LocalObjectSpace__SpaceInit+0x283 [C:\s\cm3\m3-comm\sharedobj\src\LocalObjectSpace.m3 @ 391]</div>
<div><span class="1f1ea193f6735cf0wmi-callto">12 00000053</span>`b8cff<span class="1f1ea193f6735cf0wmi-callto">930 00007</span>fff`b8a21e17     sharedobj!LocalObjectSpace_M3+0x94 [C:\s\cm3\m3-comm\sharedobj\src\LocalObjectSpace.m3 @ 805]</div>
<div><span class="1f1ea193f6735cf0wmi-callto">13 00000053</span>`b8cff<span class="1f1ea193f6735cf0wmi-callto">990 00007</span>fff`b8a21c9a     m3core!RTLinker__RunMainBody+0x3e7 [C:\s\cm3\m3-libs\m3core\src\runtime\common\RTLinker.m3 @ 408]</div>
<div><span class="1f1ea193f6735cf0wmi-callto">14 00000053</span>`b8cffa<span class="1f1ea193f6735cf0wmi-callto">30 00007</span>fff`b8a21c9a     m3core!RTLinker__RunMainBody+0x26a [C:\s\cm3\m3-libs\m3core\src\runtime\common\RTLinker.m3 @ 389]</div>
<div><span class="1f1ea193f6735cf0wmi-callto">15 00000053</span>`b8cffad0 00007fff`b8a21c9a     m3core!RTLinker__RunMainBody+0x26a [C:\s\cm3\m3-libs\m3core\src\runtime\common\RTLinker.m3 @ 389]</div>
<div><span class="1f1ea193f6735cf0wmi-callto">16 00000053</span>`b8cffb<span class="1f1ea193f6735cf0wmi-callto">70 00007</span>fff`b8a21c9a     m3core!RTLinker__RunMainBody+0x26a [C:\s\cm3\m3-libs\m3core\src\runtime\common\RTLinker.m3 @ 389]</div>
<div><span class="1f1ea193f6735cf0wmi-callto">17 00000053</span>`b8cffc<span class="1f1ea193f6735cf0wmi-callto">10 00007</span>fff`b8a2209b     m3core!RTLinker__RunMainBody+0x26a [C:\s\cm3\m3-libs\m3core\src\runtime\common\RTLinker.m3 @ 389]</div>
<div><span class="1f1ea193f6735cf0wmi-callto">18 00000053</span>`b8cffcb0 00007fff`b8a21818     m3core!RTLinker__AddUnitI+0x11b [C:\s\cm3\m3-libs\m3core\src\runtime\common\RTLinker.m3 @ 116]</div>
<div><span class="1f1ea193f6735cf0wmi-callto">19 00000053</span>`b8cffcf0 00007ff6`f5b31038     m3core!RTLinker__AddUnit+0x118 [C:\s\cm3\m3-libs\m3core\src\runtime\common\RTLinker.m3 @ 125]</div>
<div>1a <span class="1f1ea193f6735cf0wmi-callto">00000053</span>`b8cffd<span class="1f1ea193f6735cf0wmi-callto">50 00007</span>ff6`f5db4d38     mentor!main+0x38 [C:\s\cm3\m3-demo\mentor\AMD64_NT\_m3main.c @ 23]</div>
<div>1b (Inline Function) --------`--------     mentor!invoke_main+0x22 [d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 78]</div>
<div>1c <span class="1f1ea193f6735cf0wmi-callto">00000053</span>`b8cffd<span class="1f1ea193f6735cf0wmi-callto">80 00007</span>ff8`49a67034     mentor!__scrt_common_main_seh+0x10c [d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 288]</div>
<div>1d <span class="1f1ea193f6735cf0wmi-callto">00000053</span>`b8cffdc0 00007ff8`4a8fd241     KERNEL32!BaseThreadInitThunk+0x14 [clientcore\base\win32\client\thread.c @ 64]</div>
<div>1e <span class="1f1ea193f6735cf0wmi-callto">00000053</span>`b8cffdf<span class="1f1ea193f6735cf0wmi-callto">0 00000000</span>`<span class="1f1ea193f6735cf0wmi-callto">00000000</span>     ntdll!RtlUserThreadStart+0x21 [minkernel\ntdll\rtlstrt.c @ 1153]</div>
<div> </div>
<div>***</div>
<div>*** runtime error:</div>
<div>***    An enumeration or subrange value was out of range.</div>
<div>***    file "..\src\WIN32\TCP.m3", line 310</div>
<div>***</div>
<div> </div>
<div>it is "simple" subrange problem.</div>
<div> </div>
<div> </div>
<div>    IF WinSock.ioctlsocket(sock, <strong>WinSock.FIONBIO</strong>, ADR(one)) = SockErr THEN</div>
<div>      IPError.Die();</div>
<div>    END;</div>
<div> </div>
<div> </div>
<div>It is *not* calling that IPError.Die().</div>
<div> </div>
<div>ioctlsocket is declared as:</div>
<div> </div>
<div>PROCEDURE ioctlsocket (s: SOCKET; cmd: INT32; argp: UNTRACED REF UINT32): INT32;</div>
<div> </div>
<div>  INT32 = Cstdint.int32_t;</div>
<div> </div>
<div>  int32_t = Cstdint.int32_t;</div>
<div>      int32_t = Ctypes.int;</div>
<div>  int                = [-16_7fffffff-1 .. 16_7fffffff];</div>
<div> </div>
<div>It is range checking ioctlsocket parameter WinSock.FIONBIO against that and rejecting it.</div>
<div> </div>
<div>The code is:</div>
<div> </div>
<div>  <span class="1f1ea193f6735cf0wmi-callto">307 00007</span>ff8`2d5747ca e<span class="1f1ea193f6735cf0wmi-callto">847620000</span>      call    m3tcp!setsockopt (00007ff8`2d57aa16)   previous line</div>
<div>  <span class="1f1ea193f6735cf0wmi-callto">307 00007</span>ff8`2d5747cf <span class="1f1ea193f6735cf0wmi-callto">89442430</span>        mov     dword ptr [rsp+30h],eax</div>
<div><strong>  <span class="1f1ea193f6735cf0wmi-callto">310 00007</span>ff8`2d5747d3 b87e660880      mov     eax,<span class="1f1ea193f6735cf0wmi-callto">8008667</span>Eh                            WinSock.FIONBIO</strong></div>
<div>  <span class="1f1ea193f6735cf0wmi-callto">310 00007</span>ff8`2d5747d<span class="1f1ea193f6735cf0wmi-callto">8 4889442440</span>      mov     qword ptr [rsp+40h],rax</div>
<div>  <span class="1f1ea193f6735cf0wmi-callto">310 00007</span>ff8`2d5747dd 48817c2440ffffff7f cmp   qword ptr [rsp+40h],7FFFFFFFh</div>
<div>  <span class="1f1ea193f6735cf0wmi-callto">310 00007</span>ff8`2d5747e6 7e0a            jle     m3tcp!TCP__InitSock+0xc2 (00007ff8`2d5747f2)  Branch</div>
<div> </div>
<div>m3tcp!TCP__InitSock+0xb8 [C:\s\cm3\m3-comm\tcp\src\WIN32\TCP.m3 @ 310]:</div>
<div>  <span class="1f1ea193f6735cf0wmi-callto">310 00007</span>ff8`2d5747e8 b9c<span class="1f1ea193f6735cf0wmi-callto">1260000</span>      mov     ecx,26C1h</div>
<div>  <span class="1f1ea193f6735cf0wmi-callto">310 00007</span>ff8`2d5747ed e85e1a0000      call    m3tcp!M_TCP_L_100_CRASH (00007ff8`2d576250)</div>
<div> </div>
<div>dv /V</div>
<div> </div>
<div><span class="1f1ea193f6735cf0wmi-callto">00000053</span>`b8cff660 @rsp+0x0040           L_345_L_346 = 0n<span class="1f1ea193f6735cf0wmi-callto">2148034174</span></div>
<div> </div>
<div>mov eax, constant</div>
<div> </div>
<div>is zero extending</div>
<div> </div>
<div>and to confirm:</div>
<div> </div>
<div> </div>
<div>C:\s>type fio.c</div>
<div> #include <windows.h></div>
<div>#include <stdio.h></div>
<div> </div>
<div>int main()</div>
<div>{<!-- --></div>
<div>printf("%d %x\n", FIONBIO, FIONBIO);</div>
<div>return 0;</div>
<div>}</div>
<div> </div>
<div>C:\s>cl fio.c</div>
<div>Microsoft (R) C/C++ Optimizing Compiler Version 19.24.28316 for x64</div>
<div>Copyright (C) Microsoft Corporation.  All rights reserved.</div>
<div> </div>
<div>fio.c</div>
<div>Microsoft (R) Incremental Linker Version 14.24.28316.0</div>
<div>Copyright (C) Microsoft Corporation.  All rights reserved.</div>
<div> </div>
<div>/out:fio.exe</div>
<div>fio.obj</div>
<div> </div>
<div>C:\s>fio.exe</div>
<div>-<span class="1f1ea193f6735cf0wmi-callto">2147195266 8004667</span>e</div>
<div> </div>
<div> </div>
<div>What is the right way to do this?</div>
<div> </div>
<div>Just change to UINT32?</div>
<div>Even it works, can you explain it to me?</div>
<div>I agree integers should not silently overflow, subranges are good,</div>
<div>but this doesn't seem to me like it should be so difficult.</div>
<div> </div>
<div>I am inclined to further drain the Modula-3 "headers"</div>
<div>and make it an "extern constant variable", really,</div>
<div>though I'm not sure that will help, though it serves</div>
<div>another purpose -- I like to minimally duplicate C headers.</div>
<div>That is one way Posix ports became much easier.</div>
<div> </div>
Thank you,</div>
<div style="color:rgb( 0 , 0 , 0 );font-family:'calibri' , 'helvetica' , sans-serif;font-size:12pt">
 - Jay</div>
</div>
,
<p style="margin-bottom:0;margin-top:0">_______________________________________________<br />
M3devel mailing list<br />
<a href="mailto:M3devel@elegosoft.com" rel="noopener noreferrer" target="_blank">M3devel@elegosoft.com</a><br />
<a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fm3lists.elegosoft.com%2Fmailman%2Flistinfo%2Fm3devel&data=04%7C01%7C%7C8d32b717ce4847b3452108d8d7f2e63a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637496785548275723%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hu9ElJrTbyoiRYPIlcqHuZ4TXs9CkK4dSnhA1lWDww8%3D&reserved=0" rel="noopener noreferrer" target="_blank">https://m3lists.elegosoft.com/mailman/listinfo/m3devel</a></p>
</blockquote>
</div>
</div>
</div>
</blockquote>
</blockquote>
</div>
</div>
</div>
</blockquote>