<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>It seems to me that an interesting tool in the swift toolchain would be one that could generate implementations of methods in circumstances like this, using, for instance, CPP macros as hints for function prototypes. Then again, I might be entirely wrong and I'd be happy to be corrected!</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">Tom<br><br>Sent from my iPhone</div><div><br>On 5 Jan 2016, at 16:57, Kate Stone &lt;<a href="mailto:katherine_stone@apple.com">katherine_stone@apple.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div><blockquote type="cite" class=""><div class="">On Jan 5, 2016, at 12:32 PM, Ryan Lovelett via swift-dev &lt;<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Just to be clear though the intent of my question was not to quibble<br class="">with compiler error messages. My real question is how are we meant to do<br class="">systems programming with Swift on Linux if we cannot call ioctl?<br class=""></div></div></blockquote><br class=""></div><div>In the absence of an automatic mechanism for importing the definition of variadic functions you can still define your own prototypes and bind them to the system implementation. &nbsp;For example, this declaration:</div><div><br class=""></div><div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">@_silgen_name("ioctl") func ioctl(fildes: CInt, request: UInt64, result: UnsafePointer&lt;Int&gt;) -&gt; Int</span></div><div class=""><br class=""></div></div>… gives you a non-variadic interface to ioctl that you can use for invocations that conform to this specific convention. &nbsp;You can define as many overloads as you wish, and so long as you’re cautious about which one you’re using for a given request you should be able to make progress.<div class=""><br class=""></div><div class="">The same basic strategy can be applied to any variadic functional interfaces. &nbsp;Ideally you’d want to hide this implementation detail behind a more Swift-friendly API where the request type is implied to create a more type-safe interface.<div class=""><br class=""><div class=""><font color="#424242" class="" style="font-family: 'Lucida Grande'; font-size: x-small;">Kate Stone</font><span class="" style="font-family: 'Lucida Grande'; font-size: x-small;">&nbsp;</span><font color="#009193" class="" style="font-family: 'Lucida Grande'; font-size: x-small;"><a href="mailto:k8stone@apple.com" class="">k8stone@apple.com</a></font></div><div class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="" style="font-family: LucidaGrande; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class="" style="font-family: Times; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><font face="Lucida Grande" size="1" class=""><font color="#009193" class=""></font>&nbsp;Xcode&nbsp;<font color="#424242" class="">Low Level Tools</font></font></div><div class=""><font face="Lucida Grande" size="1" class=""><font color="#424242" class=""><br class=""></font></font></div></div></div></div></div></div></div></div></div></div></div></blockquote></body></html>