[swift-dev] importer questions

Dmitri Gribenko gribozavr at gmail.com
Tue Feb 16 02:42:05 CST 2016


On Tue, Feb 16, 2016 at 12:36 AM, Drew Crawford <drew at sealedabstract.com> wrote:
>
> 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:

Thank you for the list!

Unfortunately, it is not clear what is wrong about the import of these
APIs.  Could you elaborate?

Dmitri

>
> 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 :-)
>
>
>
>



-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/


More information about the swift-dev mailing list