<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">The fcntl() API is a variadic standard “C” library and as such not supported currently by Swift. Any visit to GitHub looking for a socket implementation will invariably find a .c or .mm file included that exposes fcntl() to Swift via a shim. There are only 3 forms of this API, all returning int. The first takes 2 integers and sets the 3rd to 0. The second takes 3 integers. The last and final form take 2 integers and a void pointer. Looking at the standard library source, it’s trivial to implement. It’ll take longer to write the tests than it will to write the functions. Once implemented, it would eliminate the need for shims for this API.</div><div class=""><br class=""></div><div class="">This seems like one of those obvious things that just haven’t been implemented yet, no?</div><div class=""><br class=""></div><br class=""><div class="">
Regards,<div class=""><font face="Brush Script MT" class=""><i class=""><span class="Apple-tab-span" style="white-space: pre; font-size: 13px; ">        </span><span style="font-size: 48px; " class="">Bill Abt</span></i></font></div><div class=""><span class="Apple-tab-span" style="white-space: pre; ">        </span><a href="mailto:babt@me.com" class="">babt@me.com</a></div>
</div>
<br class=""></body></html>