[swift-corelibs-dev] exit

Tony Parker anthony.parker at apple.com
Thu Jan 14 11:04:48 CST 2016


Do we control this via the module map or some other mechanism?

I could see re-exporting Glibc on Linux as a reasonable solution for now.

- Tony

> On Jan 14, 2016, at 9:04 AM, Philippe Hausler via swift-corelibs-dev <swift-corelibs-dev at swift.org> wrote:
> 
> The reason is that Foundation on darwin re-exports modules below it (by the virtue of objective-c headers) and the linux version is not re-exporting Glibc.
> 
>> On Jan 14, 2016, at 8:44 AM, Drew Crawford via swift-corelibs-dev <swift-corelibs-dev at swift.org <mailto:swift-corelibs-dev at swift.org>> wrote:
>> 
>> on Darwin, we can say:
>> 
>> import Foundation
>> exit(2)
>> 
>> I'm not totally sure how this works, since exit is provided by Darwin, not by Foundation.  But somehow importing Foundation imports Darwin as well.
>> 
>> I think for source compatibility, we should support this, because people <http://stackoverflow.com/questions/34186994/swift-2-2-on-linux-use-of-unresolved-identifier-exit> are asking <http://stackoverflow.com/questions/24102157/seeking-an-exit-equivalent-in-swift> why it doesn't work out of the box.
>> 
>> I considered PRing an exit implementation in corelibs-foundation, but I think that might cause the opposite problem–introduce a conflict between Darwin/Glibc exit and Foundation "exit".
>> 
>> Can someone speak to how this is solved in Darwin Foundation and what we should do about it?
>> 
>> _______________________________________________
>> swift-corelibs-dev mailing list
>> swift-corelibs-dev at swift.org <mailto:swift-corelibs-dev at swift.org>
>> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
> 
> 
> _______________________________________________
> swift-corelibs-dev mailing list
> swift-corelibs-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-corelibs-dev/attachments/20160114/6330d9e4/attachment.html>


More information about the swift-corelibs-dev mailing list