<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="">There is also a similar intent for Zewo’s POSIX:<div class=""><br class=""></div><div class=""><a href="https://github.com/Zewo/POSIX/blob/master/Sources/POSIX" class="">https://github.com/Zewo/POSIX/blob/master/Sources/POSIX</a></div><div class=""><br class=""></div><div class="">It would be great to have something included with Swift.</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 14, 2016, at 5:59 AM, Alex Blewitt via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Vapor's Core package expresses a target called simply 'libc':<div class=""><br class=""></div><div class=""><a href="https://github.com/vapor/core/blob/master/Sources/libc/libc.swift" class="">https://github.com/vapor/core/blob/master/Sources/libc/libc.swift</a></div><div class=""><br class=""></div><div class="">As a result, their Swift files simply say "import libc"</div><div class=""><br class=""></div><div class=""><font color="#4787ff" class=""><u class=""><a href="https://github.com/vapor/core/blob/master/Sources/Core/Lock.swift" class="">https://github.com/vapor/core/blob/master/Sources/Core/Lock.swift</a></u></font></div><div class=""><br class=""></div><div class="">Alex</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 13 Sep 2016, at 20:29, Brian Gesiak via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">Resurrecting this discussion since&nbsp;<span style="font-size:12.8px" class="">the question of "why does Android import Glibc?" came up on this swift-corelibs-foundation pull request: <a href="https://github.com/apple/swift-corelibs-foundation/pull/622#discussion_r77848100" class="">https://github.com/apple/swift-corelibs-foundation/pull/622#discussion_r77848100</a></span></div><div class="gmail_quote"><br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><div class="">I think that it is also important to ask what the real goal here is.&nbsp; Foundation is our cross platform compatibility layer, are there specific deficiencies in the Foundation API that cause a problem here, or is it just that not all of corelibs Foundation is “done” yet?</div></div></blockquote><div class=""><br class=""></div><div class="">When I first proposed the idea, I simply wanted to turn these five lines:<br class=""><br class=""><div style="font-size:12.8px" class="">&nbsp; &nbsp; #if os(Linux) || os(FreeBSD) || os(Android) || os(PS4)</div><div style="font-size:12.8px" class="">&nbsp; &nbsp; &nbsp; &nbsp; import Glibc</div><div style="font-size:12.8px" class="">&nbsp; &nbsp; #else</div><div style="font-size:12.8px" class="">&nbsp; &nbsp; &nbsp; &nbsp; import Darwin</div><div class=""><span style="font-size:12.8px" class="">&nbsp; &nbsp; #endif</span><br class=""><br class=""><span style="font-size:12.8px" class="">Into this one line:</span><br class=""><br class=""><span style="font-size:12.8px" class="">&nbsp; &nbsp; import WhateverNameWeDecideUpon<br class=""><br class="">After all, writing five lines of code for the import is painful, and the list of `#if os(...) || os(...) || ...` is always expanding.<br class=""><br class="">I hadn't thought about a unified overlay for POSIX. I think the simplified import alone has benefit to warrant its own evolution proposal. Would it be possible to have a separate discussion for the POSIX overlay idea? Or is there a reason that I'm missing that prevents the import from being viable on its own? (Apologies in advance if there's an obvious answer to this question!)</span></div></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class="">- Brian Gesiak</span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div></div></div></div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></body></html>