[swift-dev] [SR-40] Port Swift to Arm progress / question

Nick Wellnhofer wellnhofer at aevum.de
Wed Dec 9 05:42:46 CST 2015

On 09/12/2015 05:50, Dmitri Gribenko via swift-dev wrote:
> Try preprocessing the following program with 'clang -E' and check how the type
> is defined:
> #include <unistd.h>
> #include <sys/types.h>

It's probably defined as `int` as it is on Linux i386:


> Use #if:
> #if defined(__linux__) && defined(__arm__)
> ...
> #else
> ...
> #endif

I guess this only works on 32-bit and needs another check for 64-bit. Why 
isnt't `__swift_ssize_t` simply defined as `ssize_t`? This would avoid this 
kind of problems.


More information about the swift-dev mailing list