<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="">On Dec 19, 2015, at 12:26 PM, Zhuowei Z via swift-dev &lt;<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>&gt; wrote:<div><blockquote type="cite" class=""><div class=""><div id="divtagdefaultwrapper" style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">I'm currently working on a port of Swift to Android.</div></div></div></blockquote><div><br class=""></div><div>Great!</div><br class=""><blockquote type="cite" class=""><div class=""><div id="divtagdefaultwrapper" style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class=""> Since Android's libc is missing a few required methods, I added code from a few other sources to implement the functionality.&nbsp;Specifically,&nbsp;I&nbsp;added an implementation of&nbsp;posix_spawn from the FreeBSD libc,&nbsp;floating&nbsp;point routines&nbsp;from&nbsp;Android NDK's copy of SunSoft FDLIBM&nbsp;(which just requires attribution), and a getline implementation from the Android source (Apache licensed).</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">I'm wondering whether I'm allowed to do this. While&nbsp;their licenses are compatible with Apache license, they all require attribution at the top of the source,&nbsp;but Swift's contribution guidelines only allows the&nbsp;Swift license header. I don't think there's any third-party code in Swift currently, so I can't find a precedent for what to do in this situation.</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">Is the inclusion of third party code allowed, and if so,&nbsp;what should the license header on their files look like?</div></div></div></blockquote><br class=""></div><div>This is very problematic from a licensing perspective. &nbsp;We’d really like to keep the license of the swift project simple and consistent. &nbsp;OTOH, I don’t want you to be blocked from contribution. &nbsp;Here are some possible paths forward:</div><div><br class=""></div><div><div>- For things like posix_spawn, it is probably straight-forward to change the uses in swift to use LLVM’s existing abstractions (e.g. see <a href="https://github.com/apple/swift-llvm/blob/stable/include/llvm/Support/Program.h" class="">https://github.com/apple/swift-llvm/blob/stable/include/llvm/Support/Program.h</a>).</div></div><div><div>- getline in particular has lots of prior art, I’d suggest asking the lldb folks in particular if they have suggestions.</div><div class="">- The people who originally wrote the code may be willing to license it to the swift project under the swift license. &nbsp;If so, we can accept it directly from them.</div></div><div>- It may be possible to rewrite the code “clean room” as part of the LLVM or Swift projects. &nbsp;LLVM has a “libsupport” library for papering over system idiosyncrasies that swift relies on, for example.</div><div>- It may be possible to motivate the android folks to improve their platform to incorporate this stuff, it seems like doing so would benefit portability in general.</div><div><br class=""></div><div>I’m not familiar with Android or its ecosystem, nor with the specific code you’re talking about, so some of these are likely non-sensical...</div><div><br class=""></div><div>-Chris</div><br class=""></body></html>