[swift-dev] importer questions

Drew Crawford drew at sealedabstract.com
Tue Feb 16 02:36:31 CST 2016


> On Feb 16, 2016, at 2:06 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
> 
> Could you give some examples?

Here are some that I #ifdefed on Linux just today:

SOCK_STREAM
IPPROTO_TCP
timeval.  This is a tricky case, as there are actually 2 types on Darwin (timeval / timeval64), that map to 1 (as far as I know) on Linux.
timeval[64] members, which are in some platforms Int64, in some platforms __darwin_xx and in other platforms Int
SHUT_RDWR
POLLIN etc. is wrong IMO even on Darwin.  I opened SR-178 for this (and previously I filed a radar), but since that bug has sat for 2 months (and the radar for longer) without any comment it motivated me to investigate the DIY approach to these simple "importer bugs", as perhaps the core team is too busy.

Obviously I don't expect 100% portability (these are different OSes afterall), but there are several cases where the type differences feel more by accident than by design.

I will probably have a new list in a few days if interested, as I am still battling Linux-specific compile errors :-)




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160216/076e7066/attachment.html>


More information about the swift-dev mailing list